intl/icu/source/test/hdrtst/Makefile.in

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/intl/icu/source/test/hdrtst/Makefile.in	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,180 @@
     1.4 +##
     1.5 +##  Copyright (c) 1999-2011, International Business Machines Corporation and
     1.6 +##  others. All Rights Reserved.
     1.7 +##
     1.8 +##
     1.9 +##  THE PURPOSE OF THIS TEST
    1.10 +##
    1.11 +##     This tests all public header files  - as installed.  icu-config needs to be on the PATH
    1.12 +##  
    1.13 +##     To run it simply type 'make check' after ICU is installed. You SHOULD see:
    1.14 +##
    1.15 +##  unicode/uchar.h -	0
    1.16 +##  unicode/uchriter.h -	0
    1.17 +##  unicode/ucnv.h -	0
    1.18 +##
    1.19 +##    .. etc.  Anything other than zero is an error. (except for the deprecation tests, where '1' is the correct value)
    1.20 +##              
    1.21 +##
    1.22 +##  If a header fails the C compile because it's a C++ header, add it to the
    1.23 +##  file named 'cxxfiles.txt' in this directory.
    1.24 +##
    1.25 +##  If a header fails because it is deprecated, add it to the 'dfiles.txt'
    1.26 +##
    1.27 +##
    1.28 +
    1.29 +## Source directory information
    1.30 +srcdir = @srcdir@
    1.31 +top_srcdir = @top_srcdir@
    1.32 +
    1.33 +top_builddir = ../..
    1.34 +subdir = test/hdrtst
    1.35 +
    1.36 +include $(shell icu-config --incfile)
    1.37 +DIRS=$(prefix)/include/unicode
    1.38 +LDIRS=$(prefix)/include/layout
    1.39 +ECHO_T=@ECHO_T@
    1.40 +ECHO_C=@ECHO_C@
    1.41 +ECHO_N=@ECHO_N@
    1.42 +
    1.43 +all: 
    1.44 +	@echo Please read this Makefile for more information.
    1.45 +	@echo run \'$(MAKE) check\' to run the test "(use -k if you don't want to stop on errs)"
    1.46 +
    1.47 +E_NUM=8
    1.48 +E_D="[1/$(E_NUM)] Deprecated: "
    1.49 +E_C="[2/$(E_NUM)] C  : "
    1.50 +E_CXX="[3/$(E_NUM)] C++: "
    1.51 +E_CXX_L="[4/$(E_NUM)] C++ layout: "
    1.52 +E_DRF="[5/$(E_NUM)] Hide Draft: "
    1.53 +E_DEP="[6/$(E_NUM)] Hide Deprecated: "
    1.54 +E_INT="[7/$(E_NUM)] Hide Internal: "
    1.55 +E_OBS="[8/$(E_NUM)] Hide Obsolete: "
    1.56 +
    1.57 +check: dtest ctest cpptest lotest doclean drafttest deprtest internaltest obsoletetest
    1.58 +ifeq ($(MAKECMDGOALS),check)
    1.59 +	$(MAKE) clean
    1.60 +else
    1.61 +	@echo "(not cleaning automatically)"
    1.62 +endif
    1.63 +
    1.64 +# break dependency
    1.65 +doclean:
    1.66 +	make clean
    1.67 +
    1.68 +cpptest:
    1.69 +	@FAIL=0;for file in `ls $(prefix)/include/unicode/*.h | fgrep -v -f $(srcdir)/pfiles.txt`; do \
    1.70 +	  incfile=`basename $$file .h` ; \
    1.71 +	  echo "$@ unicode/$$incfile.h" ; \
    1.72 +	  echo '#include "'unicode/$$incfile'.h"' > ht_$$incfile.cpp ; \
    1.73 +	  echo 'void junk(){}' >> ht_$$incfile.cpp ; \
    1.74 +          $(COMPILE.cc) -c $(cppflags) ht_$$incfile.cpp || FAIL=1 ; \
    1.75 +	done ;\
    1.76 +	exit $$FAIL
    1.77 +
    1.78 +lotest:
    1.79 +	@FAIL=0;for file in $(prefix)/include/layout/*.h; do \
    1.80 +	  incfile=`basename $$file .h` ; \
    1.81 +	  echo "$@ layout/$$incfile.h" ; \
    1.82 +	  echo '#include "'layout/$$incfile'.h"' > ht_$$incfile.cpp ; \
    1.83 +	  echo 'void junk(){}' >> ht_$$incfile.cpp ; \
    1.84 +          $(COMPILE.cc) -c $(cppflags) -I$(prefix)/include/layout ht_$$incfile.cpp || FAIL=1; \
    1.85 +	done ;\
    1.86 +	exit $$FAIL
    1.87 +
    1.88 +dtest:
    1.89 +	@FAIL=0;NONE="(No deprecated headers)";for stub in `cat $(srcdir)/dfiles.txt | grep -v '^#'` ; do \
    1.90 +	  file=unicode/$$stub ; \
    1.91 +	  NONE="" ; \
    1.92 +	  incfile=`basename $$file .h` ; \
    1.93 +	  echo "$@ unicode/$$incfile.h" ; \
    1.94 +	  echo '#include "'unicode/$$incfile'.h"' > ht_$$incfile.cpp ; \
    1.95 +	  echo 'void junk(){}' >> ht_$$incfile.cpp ; \
    1.96 +	  echo > ht_dep.junk ; \
    1.97 +          $(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" ; \
    1.98 +	  RES=$$? ; \
    1.99 +	  echo $$RES ; \
   1.100 +	  fgrep -q "$$incfile.h header is obsolete" ht_dep.junk || echo "** FAIL Header unicode/$$incfile.h is not obsoleted properly" ; \
   1.101 +	  fgrep -q "$$incfile.h header is obsolete" ht_dep.junk || FAIL=1 ; \
   1.102 +	  rm -f unicode/$$stub ; \
   1.103 +	done ; \
   1.104 +	echo "$@: $$NONE - exit status $$FAIL" ; \
   1.105 +	exit $$FAIL
   1.106 +
   1.107 +#  < ht_dep.junk &&  ; \
   1.108 +
   1.109 +
   1.110 +ctest:
   1.111 +	@echo Building test harness for header files in ../../common and ../../i18n
   1.112 +	@FAIL=0;for file in `ls $(prefix)/include/unicode/*.h | fgrep -v -f $(srcdir)/cxxfiles.txt | tee cfiles.txt`; do \
   1.113 +	  incfile=`basename $$file .h` ; \
   1.114 +	  echo "$@ unicode/$$incfile.h" ; \
   1.115 +	  echo '#include "'unicode/$$incfile'.h"' > ht_$$incfile.c ; \
   1.116 +	  echo 'void junk(void);' >> ht_$$incfile.c ; \
   1.117 +	  echo 'void junk(){}' >> ht_$$incfile.c ; \
   1.118 +          $(COMPILE.c) -c $(cppflags) ht_$$incfile.c || FAIL=1 ; \
   1.119 +	done ;\
   1.120 +	exit $$FAIL
   1.121 +
   1.122 +drafttest:
   1.123 +	@FAIL=0;for file in `ls $(prefix)/include/unicode/*.h | fgrep -v -f $(srcdir)/pfiles.txt`; do \
   1.124 +	  incfile=`basename $$file .h` ; \
   1.125 +	  echo "$@ unicode/$$incfile.h" ; \
   1.126 +	  echo '#define U_HIDE_DRAFT_API' > hd_$$incfile.c; \
   1.127 +	  echo '#include "'unicode/$$incfile'.h"' >> hd_$$incfile.c ; \
   1.128 +	  echo 'void junk(void);' >> hd_$$incfile.c ; \
   1.129 +	  echo 'void junk(){}' >> hd_$$incfile.c ; \
   1.130 +          $(COMPILE.cc) -c $(cppflags) hd_$$incfile.c ||FAIL=1 ; \
   1.131 +	done ;\
   1.132 +	exit $$FAIL
   1.133 +
   1.134 +deprtest:
   1.135 +	@FAIL=0; for file in `ls $(prefix)/include/unicode/*.h | fgrep -v -f $(srcdir)/pfiles.txt`; do \
   1.136 +	  incfile=`basename $$file .h` ; \
   1.137 +	  echo "$@ unicode/$$incfile.h" ; \
   1.138 +	  echo '#define U_HIDE_DEPRECATED_API' > hdp_$$incfile.c; \
   1.139 +	  echo '#include "'unicode/$$incfile'.h"' >> hdp_$$incfile.c ; \
   1.140 +	  echo 'void junk(void);' >> hdp_$$incfile.c ; \
   1.141 +	  echo 'void junk(){}' >> hdp_$$incfile.c ; \
   1.142 +          $(COMPILE.cc) -c $(cppflags) hdp_$$incfile.c || FAIL=1; \
   1.143 +	done ; \
   1.144 +	exit $$FAIL
   1.145 +
   1.146 +internaltest:
   1.147 +	@FAIL=0;\
   1.148 +	 for file in `ls $(prefix)/include/unicode/*.h | fgrep -v -f $(srcdir)/pfiles.txt`; do \
   1.149 +	  incfile=`basename $$file .h` ; \
   1.150 +	  echo "$@ unicode/$$incfile.h" ; \
   1.151 +	  echo '#define U_HIDE_INTERNAL_API' > hin_$$incfile.c; \
   1.152 +	  echo '#include "'unicode/$$incfile'.h"' >> hin_$$incfile.c ; \
   1.153 +	  echo 'void junk(void);' >> hin_$$incfile.c ; \
   1.154 +	  echo 'void junk(){}' >> hin_$$incfile.c ; \
   1.155 +          $(COMPILE.cc) -c $(cppflags) hin_$$incfile.c || FAIL=1 ; \
   1.156 +	done ; \
   1.157 +	exit $$FAIL
   1.158 +
   1.159 +obsoletetest:
   1.160 +	@FAIL=0;for file in `ls $(prefix)/include/unicode/*.h | fgrep -v -f $(srcdir)/pfiles.txt`; do \
   1.161 +	  incfile=`basename $$file .h` ; \
   1.162 +	  echo "$@ unicode/$$incfile.h" ; \
   1.163 +	  echo '#define U_HIDE_OBSOLETE_API' > hob_$$incfile.c; \
   1.164 +	  echo '#include "'unicode/$$incfile'.h"' >> hob_$$incfile.c ; \
   1.165 +	  echo 'void junk(void);' >> hob_$$incfile.c ; \
   1.166 +	  echo 'void junk(){}' >> hob_$$incfile.c ; \
   1.167 +          $(COMPILE.cc) -c $(cppflags) hob_$$incfile.c || FAIL=1 ; \
   1.168 +	done ; \
   1.169 +	exit $$FAIL
   1.170 +
   1.171 +clean:
   1.172 +	-@echo cleaning..
   1.173 +	-@rm -f *.h *.c *.cpp *.o *.junk cfiles.txt
   1.174 +
   1.175 +distclean: clean
   1.176 +	-@rm -f Makefile
   1.177 +
   1.178 +Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
   1.179 +	cd $(top_builddir) \
   1.180 +	&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
   1.181 +
   1.182 +.PHONY:	doclean check all cpptest lotest dtest ctest clean distclean
   1.183 +

mercurial