]>
Commit | Line | Data |
---|---|---|
f3c0d7a5 A |
1 | # Copyright (C) 2016 and later: Unicode, Inc. and others. |
2 | # License & terms of use: http://www.unicode.org/copyright.html | |
2ca993e8 A |
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 | ||
9 | CC=clang | |
10 | CXX=clang++ | |
11 | ||
12 | # Runtime libraries | |
13 | ||
14 | for file in `ls common/*.h`; do | |
15 | echo $file | |
16 | echo '#include "'$file'"' > ht_temp.cpp ; | |
17 | echo 'void noop() {}' >> ht_temp.cpp ; | |
f3c0d7a5 | 18 | $CXX -c -std=c++11 -I common -O0 ht_temp.cpp ; |
2ca993e8 A |
19 | done ; |
20 | ||
21 | for file in `ls i18n/*.h`; do | |
22 | echo $file | |
23 | echo '#include "'$file'"' > ht_temp.cpp ; | |
24 | echo 'void noop() {}' >> ht_temp.cpp ; | |
f3c0d7a5 | 25 | $CXX -c -std=c++11 -I common -I i18n -O0 ht_temp.cpp ; |
2ca993e8 A |
26 | done ; |
27 | ||
28 | for file in `ls io/*.h`; do | |
29 | echo $file | |
30 | echo '#include "'$file'"' > ht_temp.cpp ; | |
31 | echo 'void noop() {}' >> ht_temp.cpp ; | |
f3c0d7a5 | 32 | $CXX -c -std=c++11 -I common -I i18n -I io -O0 ht_temp.cpp ; |
2ca993e8 A |
33 | done ; |
34 | ||
f3c0d7a5 | 35 | # layout is removed. |
2ca993e8 | 36 | |
f3c0d7a5 | 37 | # layoutex now depends on external additions such as HarfBuzz, skip here |
2ca993e8 A |
38 | |
39 | # -I . for includes of layout/*.h | |
f3c0d7a5 A |
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 ; | |
2ca993e8 A |
46 | |
47 | # Tools | |
48 | ||
49 | for file in `ls tools/toolutil/*.h`; do | |
50 | echo $file | |
51 | echo '#include "'$file'"' > ht_temp.cpp ; | |
52 | echo 'void noop() {}' >> ht_temp.cpp ; | |
f3c0d7a5 | 53 | $CXX -c -std=c++11 -I common -I i18n -I io -I tools/toolutil -O0 ht_temp.cpp ; |
2ca993e8 A |
54 | done ; |
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 | ||
0f5d89e8 A |
61 | for tool in escapesrc genccode gencmn gencolusb gennorm2 genren gentest icupkg icuswap \ |
62 | pkgdata genbrk gencfu gencnval gendict genrb gensprep icuinfo makeconv memcheck; do | |
2ca993e8 A |
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 ; | |
f3c0d7a5 | 67 | $CXX -c -std=c++11 -I common -I i18n -I io -I tools/toolutil -I tools/$tool -O0 ht_temp.cpp ; |
2ca993e8 A |
68 | done ; |
69 | done ; | |
70 | ||
71 | # Tests | |
72 | ||
73 | for 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 ; | |
f3c0d7a5 | 77 | $CXX -c -std=c++11 -I common -I i18n -I io -I tools/toolutil -I tools/ctestfw -O0 ht_temp.cpp ; |
2ca993e8 A |
78 | done ; |
79 | ||
80 | # C not C++ for cintltst | |
f3c0d7a5 | 81 | for file in `ls test/cintltst/*.h`; do |
2ca993e8 | 82 | echo $file |
f3c0d7a5 A |
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 ; | |
2ca993e8 A |
86 | done ; |
87 | ||
3d1f044b | 88 | for test in intltest iotest testmap thaitest fuzzer; do |
2ca993e8 A |
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 ; | |
f3c0d7a5 | 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 ; |
2ca993e8 A |
94 | done ; |
95 | done ; | |
96 | ||
f3c0d7a5 A |
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 ; | |
2ca993e8 A |
105 | |
106 | # TODO: perf/*/*.h | |
107 | ||
3d1f044b | 108 | rm ht_temp.cpp ht_temp.c ht_temp.o |