ICU-3466 Clean up hdrtst, only work w/ installed ICU, add Makefile.in.

X-SVN-Rev: 15665
This commit is contained in:
Eric Mader 2004-06-01 22:55:03 +00:00
parent cf86660489
commit 8492d2095e
7 changed files with 383 additions and 232 deletions

View File

@ -116,10 +116,6 @@ ICULIBS = $(ICULIBS_BASE) $(ICULIBS_I18N) $(ICULIBS_COMMON) $(ICULIBS_DATA)
# (Overridden when necessary in -mh files)
LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH
# Versioned target for a shared library
FINAL_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION)
MIDDLE_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION_MAJOR)
# Access to important ICU tools.
# Use as follows: $(INVOKE) $(GENRB) arguments ..
INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(libdir):$$$(LDLIBRARYPATH_ENVVAR) $(LEAK_CHECKER)

371
icu4c/source/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -981,6 +981,7 @@ AC_OUTPUT([icudefs.mk \
tools/toolutil/Makefile \
tools/dumpce/Makefile \
test/Makefile test/testdata/Makefile \
test/hdrtst/Makefile \
test/intltest/Makefile \
test/cintltst/Makefile \
test/iotest/Makefile \

View File

@ -1,43 +1,40 @@
#
# Copyright (c) 1999-2003, International Business Machines Corporation and
# others. All Rights Reserved.
#
#
# THE PURPOSE OF THIS TEST
#
# This tests all public header files (
#
# 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. (except for the deprecation tests, where '1' is the correct value)
#
#
# If a header fails the C compile because it's a C++ header, add it to the
# file named 'cxxfiles.txt' in this directory.
#
# If a header fails because it is deprecated, add it to the 'dfiles.txt'
#
#
# Generated automatically from Makefile.in by configure.
##
## Copyright (c) 1999-2004, International Business Machines Corporation and
## others. All Rights Reserved.
##
##
## THE PURPOSE OF THIS TEST
##
## This tests all public header files (
##
## 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. (except for the deprecation tests, where '1' is the correct value)
##
##
## If a header fails the C compile because it's a C++ header, add it to the
## file named 'cxxfiles.txt' in this directory.
##
## If a header fails because it is deprecated, add it to the 'dfiles.txt'
##
##
ifeq ($(USE_ICU_CONFIG),1)
include $(shell icu-config --incfile)
DIRS=$(shell icu-config --prefix)/include/unicode
LDIRS=$(shell icu-config --prefix)/include/layout
else
include ../../config/Makefile.inc
DIRS=../../../common/unicode ../../../i18n/unicode ../../../extra/ustdio/unicode
LDIRS=../../../layout/layout ../../../layoutex/layout
endif
include $(shell icu-config --incfile)
srcdir=.
DIRS=$(prefix)/include/unicode
LDIRS=$(prefix)/include/layout
all:
@echo Please read this Makefile for more information.
@echo run \'$(MAKE) check\' to run the test
check: hdrdir lodir dtest ctest cpptest lotest doclean
check: dtest ctest cpptest lotest doclean
@echo "All header tests have finished. If deprecation #errors appeared, "
@echo " add files to hdrtst/dfiles.txt"
@echo "#################################################################"
@ -47,41 +44,17 @@ check: hdrdir lodir dtest ctest cpptest lotest doclean
doclean:
make clean
#layout not tested due to path dependencies
hdrdir:
@echo CPPFLAGS are $(CPPFLAGS)
@-$(RMV) ./unicode
@mkdir ./unicode
@echo Preparing unicode/ directory ..
@cd ./unicode ; \
for dir in $(DIRS); do \
echo "linking from " $$dir '(' `ls $$dir/*.h | wc -l` 'headers )' ; \
ln -s $$dir/*.h . ; \
done
rm unicode/pwin32.h
lodir:
@-$(RMV) ./layout
@mkdir ./layout
@echo Preparing layout/ directory ..
@cd ./layout ; \
for dir in $(LDIRS); do \
echo "linking from " $$dir '(' `ls $$dir/*.h | wc -l` 'headers )' ; \
ln -s $$dir/*.h . ; \
done
cpptest:
@echo "C++ test #######################################################"
@rm -f Makefile.sub
@echo 'Testing all header files under C++'
@echo 'the number after the hyphen (-) refers to the exit code - should be zero!'
@for file in unicode/*.h; do \
@for file in `ls $(prefix)/include/unicode/*.h | fgrep -v -f $(srcdir)/pfiles.txt`; do \
incfile=`basename $$file .h` ; \
echo -n "C++ unicode/$$incfile.h - " ; \
echo '#include "'unicode/$$incfile'.h"' > ht_$$incfile.cpp ; \
echo 'void junk(){}' >> ht_$$incfile.cpp ; \
$(COMPILE.cc) -c -I. ht_$$incfile.cpp ; \
$(COMPILE.cc) -c $(cppflags) ht_$$incfile.cpp ; \
echo $$? ; \
done
@ -90,12 +63,12 @@ lotest:
@rm -f Makefile.sub
@echo 'Testing all layout files under C++'
@echo 'the number after the hyphen (-) refers to the exit code - should be zero!'
@for file in layout/*.h; do \
@for file in $(prefix)/include/layout/*.h; do \
incfile=`basename $$file .h` ; \
echo -n "C++ layout/$$incfile.h - " ; \
echo '#include "'layout/$$incfile'.h"' > ht_$$incfile.cpp ; \
echo 'void junk(){}' >> ht_$$incfile.cpp ; \
$(COMPILE.cc) -c -I. ht_$$incfile.cpp ; \
$(COMPILE.cc) -c $(cppflags) -I$(prefix)/include/layout ht_$$incfile.cpp ; \
echo $$? ; \
done
@ -103,14 +76,14 @@ dtest:
@rm -f Makefile.sub
@echo "Deprecation #######################################################"
@echo 'Should be 1 in each case if file is properly obsoleted.'
@for stub in `cat dfiles.txt | grep -v '^#'` ; do \
@for stub in `cat $(srcdir)/dfiles.txt | grep -v '^#'` ; do \
file=unicode/$$stub \
incfile=`basename $$file .h` ; \
echo -n "C++ unicode/$$incfile.h - " ; \
echo '#include "'unicode/$$incfile'.h"' > ht_$$incfile.cpp ; \
echo 'void junk(){}' >> ht_$$incfile.cpp ; \
echo > ht_dep.junk ; \
$(COMPILE.cc) -c -I. ht_$$incfile.cpp 2>&1 | sed -e 's/^.*#error[^"]*"//' | fgrep -v ht_ | tee ht_dep.junk | fgrep -v "$$incfile.h header is obsolete" ; \
$(COMPILE.cc) -c $(cppflags) ht_$$incfile.cpp 2>&1 | sed -e 's/^.*#error[^"]*"//' | fgrep -v ht_ | tee ht_dep.junk | fgrep -v "$$incfile.h header is obsolete" ; \
RES=$$? ; \
echo $$RES ; \
fgrep -q "$$incfile.h header is obsolete" ht_dep.junk || echo "** FAIL Header unicode/$$incfile.h is not obsoleted properly" ; \
@ -126,18 +99,17 @@ ctest:
@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 \
@for file in `ls $(prefix)/include/unicode/*.h | fgrep -v -f $(srcdir)/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(void);' >> ht_$$incfile.c ; \
echo 'void junk(){}' >> ht_$$incfile.c ; \
$(COMPILE.c) -c -I. ht_$$incfile.c ; \
$(COMPILE.c) -c $(cppflags) ht_$$incfile.c ; \
RES=$$? ; \
echo $$RES ; \
done
distclean clean:
-@rm -f *.h *.c *.cpp *.o *.junk
-@$(RMV) ./unicode
-@$(RMV) ./layout

View File

@ -0,0 +1,114 @@
##
## Copyright (c) 1999-2004, International Business Machines Corporation and
## others. All Rights Reserved.
##
##
## THE PURPOSE OF THIS TEST
##
## This tests all public header files (
##
## 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. (except for the deprecation tests, where '1' is the correct value)
##
##
## If a header fails the C compile because it's a C++ header, add it to the
## file named 'cxxfiles.txt' in this directory.
##
## If a header fails because it is deprecated, add it to the 'dfiles.txt'
##
##
include $(shell icu-config --incfile)
srcdir=@srcdir@
DIRS=$(prefix)/include/unicode
LDIRS=$(prefix)/include/layout
all:
@echo Please read this Makefile for more information.
@echo run \'$(MAKE) check\' to run the test
check: dtest ctest cpptest lotest doclean
@echo "All header tests have finished. If deprecation #errors appeared, "
@echo " add files to hdrtst/dfiles.txt"
@echo "#################################################################"
@echo
# break dependency
doclean:
make clean
cpptest:
@echo "C++ test #######################################################"
@rm -f Makefile.sub
@echo 'Testing all header files under C++'
@echo 'the number after the hyphen (-) refers to the exit code - should be zero!'
@for file in `ls $(prefix)/include/unicode/*.h | fgrep -v -f $(srcdir)/pfiles.txt`; do \
incfile=`basename $$file .h` ; \
echo -n "C++ unicode/$$incfile.h - " ; \
echo '#include "'unicode/$$incfile'.h"' > ht_$$incfile.cpp ; \
echo 'void junk(){}' >> ht_$$incfile.cpp ; \
$(COMPILE.cc) -c $(cppflags) ht_$$incfile.cpp ; \
echo $$? ; \
done
lotest:
@echo "Layout test #######################################################"
@rm -f Makefile.sub
@echo 'Testing all layout files under C++'
@echo 'the number after the hyphen (-) refers to the exit code - should be zero!'
@for file in $(prefix)/include/layout/*.h; do \
incfile=`basename $$file .h` ; \
echo -n "C++ layout/$$incfile.h - " ; \
echo '#include "'layout/$$incfile'.h"' > ht_$$incfile.cpp ; \
echo 'void junk(){}' >> ht_$$incfile.cpp ; \
$(COMPILE.cc) -c $(cppflags) -I$(prefix)/include/layout ht_$$incfile.cpp ; \
echo $$? ; \
done
dtest:
@rm -f Makefile.sub
@echo "Deprecation #######################################################"
@echo 'Should be 1 in each case if file is properly obsoleted.'
@for stub in `cat $(srcdir)/dfiles.txt | grep -v '^#'` ; do \
file=unicode/$$stub \
incfile=`basename $$file .h` ; \
echo -n "C++ unicode/$$incfile.h - " ; \
echo '#include "'unicode/$$incfile'.h"' > ht_$$incfile.cpp ; \
echo 'void junk(){}' >> ht_$$incfile.cpp ; \
echo > ht_dep.junk ; \
$(COMPILE.cc) -c $(cppflags) ht_$$incfile.cpp 2>&1 | sed -e 's/^.*#error[^"]*"//' | fgrep -v ht_ | tee ht_dep.junk | fgrep -v "$$incfile.h header is obsolete" ; \
RES=$$? ; \
echo $$RES ; \
fgrep -q "$$incfile.h header is obsolete" ht_dep.junk || echo "** FAIL Header unicode/$$incfile.h is not obsoleted properly" ; \
rm -f unicode/$$stub ; \
done
# < ht_dep.junk && ; \
ctest:
@echo "C Test #######################################################"
@echo " (if any C++ files show up here, stop the test and add them to hdrtst/cxxfiles.txt) "
@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 $(prefix)/include/unicode/*.h | fgrep -v -f $(srcdir)/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(void);' >> ht_$$incfile.c ; \
echo 'void junk(){}' >> ht_$$incfile.c ; \
$(COMPILE.c) -c $(cppflags) ht_$$incfile.c ; \
RES=$$? ; \
echo $$RES ; \
done
distclean clean:
-@rm -f *.h *.c *.cpp *.o *.junk

View File

@ -1,4 +1,4 @@
# Copyright (c) 2001-2003 International Business Machines
# Copyright (c) 2001-2004 International Business Machines
# Corporation and others. All Rights Reserved.
bidi.h
brkiter.h
@ -69,3 +69,13 @@ LESwaps.h
LETypes.h
ParagraphLayout.h
RunArrays.h
# currency...
curramt.h
currunit.h
measfmt.h
measunit.h
measure.h
# platform specific
pmacos.h
pos400.h
pwin32.h

View File

@ -0,0 +1,5 @@
# Copyright (c) 2001-2004 International Business Machines
# Corporation and others. All Rights Reserved.
pmacos.h
pos400.h
pwin32.h