2000-01-12 01:22:44 +00:00
|
|
|
#
|
2000-01-17 19:48:20 +00:00
|
|
|
# Copyright (c) 1999-2000, International Business Machines Corporation and
|
|
|
|
# others. All Rights Reserved.
|
2000-01-12 01:22:44 +00:00
|
|
|
#
|
|
|
|
#
|
|
|
|
# THE PURPOSE OF THIS TEST
|
|
|
|
#
|
|
|
|
# This test will try building all ICU public files
|
|
|
|
# (../../common/unicode/*.h and ../../common/i18n/unicode/*.h)
|
|
|
|
# by themselves. it uses C++ becuase we don't have a list of which
|
|
|
|
# headers are C and which are C++. [Future opportunity!]
|
|
|
|
#
|
|
|
|
# To run it simply type 'make check'. You SHOULD see:
|
|
|
|
#
|
|
|
|
# unicode/uchar.h - 0
|
|
|
|
# unicode/uchriter.h - 0
|
|
|
|
# unicode/ucnv.h - 0
|
|
|
|
#
|
|
|
|
# .. etc. Anything other than zero is an error.
|
|
|
|
#
|
|
|
|
#
|
2002-03-13 16:17:54 +00:00
|
|
|
# If a header fails the C compile because it's a C++ header, add it to the
|
|
|
|
# file named 'cxxfiles.txt' in this directory.
|
|
|
|
#
|
2000-01-12 01:22:44 +00:00
|
|
|
#
|
|
|
|
|
2000-06-29 01:08:38 +00:00
|
|
|
include ../../config/Makefile.inc
|
2000-01-12 01:22:44 +00:00
|
|
|
|
2000-06-03 02:58:54 +00:00
|
|
|
CPPFLAGS=-I.
|
2000-01-12 01:22:44 +00:00
|
|
|
|
|
|
|
all:
|
|
|
|
@echo Please read this Makefile for more information.
|
|
|
|
@echo run \'$(MAKE) check\' to run the test
|
|
|
|
|
2002-03-13 16:17:54 +00:00
|
|
|
check: hdrdir ctest cpptest doclean
|
|
|
|
|
|
|
|
# break dependency
|
|
|
|
doclean:
|
|
|
|
make clean
|
|
|
|
|
|
|
|
#layout not tested for path dependencies
|
2000-06-03 02:58:54 +00:00
|
|
|
|
|
|
|
hdrdir:
|
|
|
|
-$(RMV) ./unicode
|
|
|
|
mkdir ./unicode
|
2002-03-13 16:17:54 +00:00
|
|
|
( cd ./unicode ; ln -s ../../../common/unicode/*.h ../../../i18n/unicode/*.h ../../../extra/ustdio/unicode/*.h . )
|
|
|
|
rm unicode/pwin32.h
|
2000-01-12 01:22:44 +00:00
|
|
|
|
2002-03-13 16:17:54 +00:00
|
|
|
cpptest:
|
2000-01-12 01:22:44 +00:00
|
|
|
@rm -f Makefile.sub
|
|
|
|
@echo Building test harness for header files in ../../common and ../../i18n
|
|
|
|
@echo 'the number after the hyphen (-) refers to the exit code - should be zero!'
|
2002-03-13 16:17:54 +00:00
|
|
|
@for file in unicode/*.h; do \
|
2000-01-12 01:22:44 +00:00
|
|
|
incfile=`basename $$file .h` ; \
|
2002-03-13 16:17:54 +00:00
|
|
|
echo -n "C++ unicode/$$incfile.h - " ; \
|
2000-01-12 01:22:44 +00:00
|
|
|
echo '#include "'unicode/$$incfile'.h"' > ht_$$incfile.cpp ; \
|
2001-03-23 00:25:09 +00:00
|
|
|
echo 'void junk(){}' >> ht_$$incfile.cpp ; \
|
2000-06-03 02:58:54 +00:00
|
|
|
$(COMPILE.cc) -c -I. ht_$$incfile.cpp ; \
|
2000-01-12 01:22:44 +00:00
|
|
|
RES=$$? ; \
|
|
|
|
echo $$RES ; \
|
|
|
|
done
|
2002-03-13 16:17:54 +00:00
|
|
|
|
|
|
|
ctest:
|
|
|
|
@echo "Now, C test"
|
|
|
|
@rm -f Makefile.sub
|
|
|
|
@echo Building test harness for header files in ../../common and ../../i18n
|
|
|
|
@echo 'the number after the hyphen (-) refers to the exit code - should be zero!'
|
|
|
|
@for file in `ls unicode/*.h | fgrep -v -f ./cxxfiles.txt | tee cfiles.txt`; do \
|
|
|
|
incfile=`basename $$file .h` ; \
|
|
|
|
echo -n "C unicode/$$incfile.h - " ; \
|
|
|
|
echo '#include "'unicode/$$incfile'.h"' > ht_$$incfile.c ; \
|
|
|
|
echo 'void junk(){}' >> ht_$$incfile.c ; \
|
|
|
|
$(COMPILE.c) -c -I. ht_$$incfile.c ; \
|
|
|
|
RES=$$? ; \
|
|
|
|
echo $$RES ; \
|
|
|
|
done
|
2000-01-12 01:22:44 +00:00
|
|
|
|
|
|
|
distclean clean:
|
2002-03-13 16:17:54 +00:00
|
|
|
-rm -f *.h *.c *.cpp *.o
|
2000-06-03 02:58:54 +00:00
|
|
|
-$(RMV) ./unicode
|
2002-03-13 16:17:54 +00:00
|
|
|
|