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