1# Copyright (C) 2016 and later: Unicode, Inc. and others. 2# License & terms of use: http://www.unicode.org/copyright.html 3# Copyright (C) 2016 International Business Machines Corporation 4# and others. All rights reserved. 5# 6# Run this script from $ICU_ROOT/src/source/ 7# ~/svn.icu/trunk/src/source$ test/hdrtst/testinternalheaders.sh 8 9CC=clang 10CXX=clang++ 11 12# Runtime libraries 13 14for file in `ls common/*.h`; do 15 echo $file 16 echo '#include "'$file'"' > ht_temp.cpp ; 17 echo 'void noop() {}' >> ht_temp.cpp ; 18 $CXX -c -std=c++11 -I common -O0 ht_temp.cpp ; 19done ; 20 21for file in `ls i18n/*.h`; do 22 echo $file 23 echo '#include "'$file'"' > ht_temp.cpp ; 24 echo 'void noop() {}' >> ht_temp.cpp ; 25 $CXX -c -std=c++11 -I common -I i18n -O0 ht_temp.cpp ; 26done ; 27 28for file in `ls io/*.h`; do 29 echo $file 30 echo '#include "'$file'"' > ht_temp.cpp ; 31 echo 'void noop() {}' >> ht_temp.cpp ; 32 $CXX -c -std=c++11 -I common -I i18n -I io -O0 ht_temp.cpp ; 33done ; 34 35# layout is removed. 36 37# layoutex now depends on external additions such as HarfBuzz, skip here 38 39# -I . for includes of layout/*.h 40#for file in `ls layoutex/*.h`; do 41# echo $file 42# echo '#include "'$file'"' > ht_temp.cpp ; 43# echo 'void noop() {}' >> ht_temp.cpp ; 44# $CXX -c -I common -I i18n -I io -I layout -I . -I layoutex -O0 ht_temp.cpp ; 45#done ; 46 47# Tools 48 49for file in `ls tools/toolutil/*.h`; do 50 echo $file 51 echo '#include "'$file'"' > ht_temp.cpp ; 52 echo 'void noop() {}' >> ht_temp.cpp ; 53 $CXX -c -std=c++11 -I common -I i18n -I io -I tools/toolutil -O0 ht_temp.cpp ; 54done ; 55 56# Exclude tzcode: tools/tzcode/private.h uses an argument "new" in a function declaration. 57# Markus sent an email to the tz list on 20160307 requesting that it be renamed. 58# We don't want to patch it, and don't want to spend the time for this script here 59# to know about C-only header files. 60 61for tool in escapesrc genccode gencmn gencolusb gennorm2 genren gentest icupkg icuswap \ 62 pkgdata genbrk gencfu gencnval gendict genrb gensprep icuinfo makeconv memcheck; do 63 for file in `ls tools/$tool/*.h`; do 64 echo $file 65 echo '#include "'$file'"' > ht_temp.cpp ; 66 echo 'void noop() {}' >> ht_temp.cpp ; 67 $CXX -c -std=c++11 -I common -I i18n -I io -I tools/toolutil -I tools/$tool -O0 ht_temp.cpp ; 68 done ; 69done ; 70 71# Tests 72 73for file in `ls tools/ctestfw/unicode/*.h`; do 74 echo $file 75 echo '#include "'$file'"' > ht_temp.cpp ; 76 echo 'void noop() {}' >> ht_temp.cpp ; 77 $CXX -c -std=c++11 -I common -I i18n -I io -I tools/toolutil -I tools/ctestfw -O0 ht_temp.cpp ; 78done ; 79 80# C not C++ for cintltst 81for file in `ls test/cintltst/*.h`; do 82 echo $file 83 echo '#include "'$file'"' > ht_temp.c ; 84 echo 'void noop() {}' >> ht_temp.c ; 85 $CC -c -std=c11 -I common -I i18n -I io -I tools/toolutil -I tools/ctestfw -I test/cintltst -O0 ht_temp.c ; 86done ; 87 88for test in intltest iotest testmap thaitest; do 89 for file in `ls test/$test/*.h`; do 90 echo $file 91 echo '#include "'$file'"' > ht_temp.cpp ; 92 echo 'void noop() {}' >> ht_temp.cpp ; 93 $CXX -c -std=c++11 -I common -I i18n -I io -I tools/toolutil -I tools/ctestfw -I test/$test -O0 ht_temp.cpp ; 94 done ; 95done ; 96 97# layoutex now depends on external additions such as HarfBuzz, skip here 98 99#for file in `ls test/letest/*.h`; do 100# echo $file 101# echo '#include "'$file'"' > ht_temp.cpp ; 102# echo 'void noop() {}' >> ht_temp.cpp ; 103# $CXX -c -I common -I i18n -I io -I layout -I . -I layoutex -I tools/toolutil -I tools/ctestfw -I test/letest -O0 ht_temp.cpp ; 104#done ; 105 106# TODO: perf/*/*.h 107 108rm ht_temp.cpp ht_temp.o 109