]>
Commit | Line | Data |
---|---|---|
b75a7d8f A |
1 | #****************************************************************************** |
2 | # | |
374ca955 | 3 | # Copyright (C) 1998-2004, International Business Machines |
b75a7d8f A |
4 | # Corporation and others. All Rights Reserved. |
5 | # | |
6 | #****************************************************************************** | |
7 | ## Top-level Makefile.in for ICU | |
8 | ## Stephen F. Booth | |
9 | ||
10 | ## Source directory information | |
11 | srcdir = @srcdir@ | |
12 | top_srcdir = @top_srcdir@ | |
13 | ||
14 | top_builddir = ../.. | |
15 | ||
16 | include $(top_builddir)/icudefs.mk | |
17 | ||
18 | ## Build directory information | |
19 | subdir = test/testdata | |
20 | ||
b75a7d8f A |
21 | ## Files to remove for 'make clean' |
22 | CLEANFILES = *~ | |
23 | ||
b75a7d8f A |
24 | SUBDIRS = |
25 | ||
b75a7d8f A |
26 | ## List of phony targets |
27 | .PHONY : all all-local all-recursive install install-local install-udata install-udata-files install-udata-dlls \ | |
28 | install-recursive clean clean-local clean-recursive distclean \ | |
29 | distclean-local distclean-recursive doc dist dist-local dist-recursive \ | |
374ca955 A |
30 | check check-local check-recursive build-dir |
31 | ||
32 | .NOTPARALLEL: build-dir | |
b75a7d8f A |
33 | |
34 | ## Clear suffix list | |
35 | .SUFFIXES : | |
36 | ||
37 | ## List of standard targets | |
38 | all: all-local all-recursive | |
39 | install: install-recursive install-local | |
40 | clean: clean-recursive clean-local | |
41 | distclean : distclean-recursive distclean-local | |
42 | dist: dist-recursive dist-local | |
43 | check: all check-recursive check-local | |
44 | ||
374ca955 | 45 | all-local: build-dir build-testdata testdata packagetest |
b75a7d8f A |
46 | |
47 | install-local: | |
48 | ||
49 | dist-local: | |
50 | ||
51 | clean-local: | |
52 | test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) | |
374ca955 | 53 | $(RMV) $(TESTOUTDIR) |
b75a7d8f A |
54 | |
55 | distclean-local: clean-local | |
374ca955 | 56 | $(RMV) Makefile pkgdata.inc |
b75a7d8f A |
57 | |
58 | check-local: | |
59 | ||
374ca955 | 60 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status |
b75a7d8f | 61 | cd $(top_builddir) \ |
374ca955 | 62 | && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status |
b75a7d8f | 63 | |
374ca955 A |
64 | pkgdata.inc: $(srcdir)/pkgdata.inc.in Makefile $(top_builddir)/config.status |
65 | cd $(top_builddir) \ | |
66 | && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status | |
b75a7d8f | 67 | |
b75a7d8f | 68 | |
374ca955 A |
69 | ######################################################################### |
70 | ############################## Test ## stuff ############################ | |
b75a7d8f | 71 | |
374ca955 A |
72 | ifeq ($(PKGDATA_OPTS),) |
73 | PKGDATA_OPTS = -O $(top_builddir)/test/testdata/pkgdata.inc | |
b75a7d8f A |
74 | endif |
75 | ||
374ca955 A |
76 | # relative lib links from pkgdata are the same as for tmp |
77 | GENRBOPTS=-k | |
78 | TOOLDIR=$(top_builddir)/tools | |
79 | SRCDATADIR=$(top_srcdir)/data | |
80 | UNICODEDATADIR=$(SRCDATADIR)/unidata | |
81 | OUTDIR=$(top_builddir)/data/out | |
82 | OUTTMPDIR=$(top_builddir)/data/out/tmp | |
83 | BUILDDIR=$(OUTDIR)/build/$(ICUDATA_PLATFORM_NAME) | |
84 | TESTSRCDATADIR=$(top_srcdir)/test/testdata | |
85 | TESTOUTDIR=$(top_builddir)/test/testdata/out | |
86 | BUILD_DIRS = $(TESTOUTDIR) $(TESTBUILDDIR) | |
87 | ||
88 | PKGDATA = $(BINDIR)/pkgdata $(PKGDATA_OPTS) -q -c -s $(CURDIR)/out/build/$(ICUDATA_PLATFORM_NAME) | |
89 | PKGDATA_INVOKE:=$(INVOKE) $(PKGDATA_INVOKE_OPTS) | |
90 | ||
91 | # Contains all 'intermediate' files (and temp files) except for 'unpackaged data' below | |
92 | TESTBUILDDIR=$(TESTOUTDIR)/build | |
93 | ||
94 | # unpackaged files - live in 'out' so that the path can find them as part of the pkg | |
95 | UNPACKAGEDTESTDATA=$(TESTOUTDIR)/$(TESTDT)nam.typ | |
96 | ||
97 | # pkg name for testdata | |
98 | TESTDATA=testdata | |
99 | # prefix for files that are testdata | |
100 | TESTDT=$(TESTDATA)_ | |
101 | ||
102 | # File definitions | |
103 | TEST_DAT_FILES=$(TESTBUILDDIR)/$(TESTDT)test.icu $(TESTBUILDDIR)/$(TESTDT)nfscsi.spp $(TESTBUILDDIR)/$(TESTDT)nfscss.spp $(TESTBUILDDIR)/$(TESTDT)nfscis.spp $(TESTBUILDDIR)/$(TESTDT)nfsmxs.spp $(TESTBUILDDIR)/$(TESTDT)nfsmxp.spp | |
104 | ||
105 | TEST_UCM_SOURCE= test1.ucm test3.ucm test4.ucm test4x.ucm ibm9027.ucm | |
106 | TEST_UCM_FILES=$(TEST_UCM_SOURCE:%=$(TESTSRCDATADIR)/data/%) | |
107 | TEST_CNV_FILES=$(TEST_UCM_SOURCE:%.ucm=$(TESTBUILDDIR)/$(TESTDT)%.cnv) | |
108 | ||
109 | TEST_RES = casing.txt mc.txt root.txt te.txt te_IN.txt testtypes.txt testaliases.txt testempty.txt structLocale.txt DataDrivenCollationTest.txt idna_rules.txt conversion.txt icuio.txt testtable32.txt | |
110 | TEST_RES_FILES=$(TEST_RES:%.txt=$(TESTBUILDDIR)/$(TESTDT)%.res) $(TESTBUILDDIR)/$(TESTDT)iscii.res $(TESTSRCDATADIR)/$(TESTDT)icu26_testtypes.res $(TESTSRCDATADIR)/$(TESTDT)icu26e_testtypes.res | |
111 | ||
112 | ALL_TEST_FILES = $(TEST_DAT_FILES) $(TEST_BRK_FILES) $(TEST_CNV_FILES) $(TEST_RES_FILES) $(TESTOUTDIR)/$(TESTDT)nam.typ | |
113 | ||
114 | # list | |
115 | ||
116 | $(TESTBUILDDIR)/testdata.lst: $(SRCLISTDEPS) | |
117 | @echo "generating $@ (list of data files)" | |
118 | @-$(RMV) $@ | |
119 | @for file in $(TEST_RES_FILES) $(TEST_DAT_FILES) $(TEST_CNV_FILES); do \ | |
120 | echo $$file >> $@; \ | |
121 | done; | |
122 | ||
123 | ||
124 | build-testdata: build-dir $(ALL_TEST_FILES) $(TESTBUILDDIR)/testdata.lst $(TESTBUILDDIR)/$(TESTDT)iscii.res | |
125 | ||
126 | # test.icu | |
127 | $(TESTBUILDDIR)/$(TESTDT)test.icu: $(TOOLDIR)/gentest/gentest$(EXEEXT) | |
128 | $(INVOKE) $(TOOLDIR)/gentest/gentest -d $(TESTBUILDDIR) | |
129 | ||
130 | $(TESTBUILDDIR)/testtable32.txt: $(TOOLDIR)/gentest/gentest$(EXEEXT) | |
131 | $(INVOKE) $(TOOLDIR)/gentest/gentest -r -d $(TESTBUILDDIR) | |
132 | ||
133 | $(TESTBUILDDIR)/$(TESTDT)testtable32.res: $(TESTBUILDDIR)/testtable32.txt $(BINDIR)/genrb$(EXEEXT) | |
134 | $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -p $(TESTDATA) -q -s $(TESTBUILDDIR) -i $(BUILDDIR) -d $(TESTBUILDDIR) $(<F) | |
135 | ||
136 | # Targets for nfscsi.spp | |
137 | $(TESTBUILDDIR)/$(TESTDT)nfscsi.spp: $(BINDIR)/gensprep$(EXEEXT) $(TESTSRCDATADIR)/nfs4_cs_prep_ci.txt | |
138 | @echo Building nfscsi.icu | |
139 | $(INVOKE) $(BINDIR)/gensprep -s $(TESTSRCDATADIR) -i $(BUILDDIR) -d $(TESTBUILDDIR) -b nfscsi -p $(TESTDATA) -u 3.2.0 nfs4_cs_prep_ci.txt | |
140 | ||
141 | # Targets for nfscss.spp | |
142 | $(TESTBUILDDIR)/$(TESTDT)nfscss.spp: $(BINDIR)/gensprep$(EXEEXT) $(TESTSRCDATADIR)/nfs4_cs_prep_cs.txt | |
143 | @echo Building nfscss.icu | |
144 | $(INVOKE) $(BINDIR)/gensprep -s $(TESTSRCDATADIR) -i $(BUILDDIR) -d $(TESTBUILDDIR) -b nfscss -p $(TESTDATA) -u 3.2.0 nfs4_cs_prep_cs.txt | |
145 | ||
146 | # Targets for nfscis.spp | |
147 | $(TESTBUILDDIR)/$(TESTDT)nfscis.spp: $(BINDIR)/gensprep$(EXEEXT) $(TESTSRCDATADIR)/nfs4_cis_prep.txt | |
148 | @echo Building nfscis.spp | |
149 | $(INVOKE) $(BINDIR)/gensprep -s $(TESTSRCDATADIR) -i $(BUILDDIR) -d $(TESTBUILDDIR) -b nfscis -p $(TESTDATA) -k -n $(UNICODEDATADIR) -u 3.2.0 nfs4_cis_prep.txt | |
150 | ||
151 | # Targets for nfsmxs.spp | |
152 | $(TESTBUILDDIR)/$(TESTDT)nfsmxs.spp: $(BINDIR)/gensprep$(EXEEXT) $(TESTSRCDATADIR)/nfs4_mixed_prep_s.txt | |
153 | @echo Building nfsmxs.spp | |
154 | $(INVOKE) $(BINDIR)/gensprep -s $(TESTSRCDATADIR) -i $(BUILDDIR) -d $(TESTBUILDDIR) -b nfsmxs -p $(TESTDATA) -k -n $(UNICODEDATADIR) -u 3.2.0 nfs4_mixed_prep_s.txt | |
155 | ||
156 | # Targets for nfsmxp.spp | |
157 | $(TESTBUILDDIR)/$(TESTDT)nfsmxp.spp: $(BINDIR)/gensprep$(EXEEXT) $(TESTSRCDATADIR)/nfs4_mixed_prep_p.txt | |
158 | @echo Building nfsmxp.spp | |
159 | $(INVOKE) $(BINDIR)/gensprep -s $(TESTSRCDATADIR) -i $(BUILDDIR) -d $(TESTBUILDDIR) -b nfsmxp -p $(TESTDATA) -k -n $(UNICODEDATADIR) -u 3.2.0 nfs4_mixed_prep_p.txt | |
160 | ||
161 | $(TESTBUILDDIR)/$(TESTDT)%.cnv: $(TESTSRCDATADIR)/%.ucm $(BINDIR)/makeconv$(EXEEXT) | |
162 | $(INVOKE) $(BINDIR)/makeconv -p $(TESTDATA) -c -d $(TESTBUILDDIR) $(TESTSRCDATADIR)/$(<F) | |
163 | ||
164 | $(TESTBUILDDIR)/$(TESTDT)%.res: $(TESTSRCDATADIR)/%.txt $(BINDIR)/genrb$(EXEEXT) $(DAT_FILES) | |
165 | $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -p $(TESTDATA) -q -s $(TESTSRCDATADIR) -i $(BUILDDIR) -d $(TESTBUILDDIR) $(<F) | |
166 | ||
167 | $(TESTBUILDDIR)/$(TESTDT)iscii.res: $(TESTSRCDATADIR)/iscii.bin $(BINDIR)/genrb$(EXEEXT) | |
168 | @echo Testing genrb -e option | |
169 | @ICU_DATA=$(BUILDDIR) $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -s $(TESTSRCDATADIR) -p $(TESTDATA) -eISCII,version=0 -d $(TESTBUILDDIR) $(<F) >/dev/null || ( echo "WARNING: could not open ISCII - it may have been disabled." | tee $@ ) | |
170 | @echo Finished testing genrb -e option | |
171 | ||
172 | ################################################################### TYP | |
173 | # TYP FILES | |
174 | ||
175 | $(TESTOUTDIR)/$(TESTDT)nam.typ: $(TESTBUILDDIR)/$(TESTDT)te_IN.res | |
176 | cp $< $@ | |
177 | ||
178 | ||
179 | testdata: build-dir $(ALL_TEST_FILES) $(UNPACKAGEDTESTDATA) | |
180 | ||
181 | #$(ALL_TEST_FILES) $(TESTBUILDDIR)/testtable32.txt $(TESTBUILDDIR)/testdata.lst: build-dir | |
182 | ||
183 | packagetest: build-dir testdata pkgdata.inc $(TESTBUILDDIR)/testdata.lst | |
184 | $(PKGDATA_INVOKE) $(PKGDATA) -T $(TESTBUILDDIR) -d $(TESTOUTDIR) -s $(TESTBUILDDIR) -p $(TESTDATA) -m common $(TESTBUILDDIR)/testdata.lst | |
185 | ||
186 | build-dir: $(BUILD_DIRS) | |
187 | $(BUILD_DIRS): | |
188 | -$(MKINSTALLDIRS) $(BUILD_DIRS) | |
189 | ||
190 |