]>
Commit | Line | Data |
---|---|---|
1 | #********************************************************************** | |
2 | #* Copyright (C) 1999-2006, International Business Machines Corporation | |
3 | #* and others. All Rights Reserved. | |
4 | #********************************************************************** | |
5 | # nmake file for creating data files on win32 | |
6 | # invoke with | |
7 | # nmake /f makedata.mak icumake=$(ProjectDir) | |
8 | # | |
9 | # 12/10/1999 weiv Created | |
10 | ||
11 | ############################################################################## | |
12 | # Keep the following in sync with the version - see common/unicode/uversion.h | |
13 | U_ICUDATA_NAME=icudt36 | |
14 | ############################################################################## | |
15 | U_ICUDATA_ENDIAN_SUFFIX=l | |
16 | UNICODE_VERSION=5.0 | |
17 | ICU_LIB_TARGET=$(DLL_OUTPUT)\$(U_ICUDATA_NAME).dll | |
18 | ||
19 | # ICUMAKE | |
20 | # Must be provided by whoever runs this makefile. | |
21 | # Is the directory containing this file (makedata.mak) | |
22 | # Is the directory into which most data is built (prior to packaging) | |
23 | # Is icu\source\data\build | |
24 | # | |
25 | !IF "$(ICUMAKE)"=="" | |
26 | !ERROR Can't find ICUMAKE (ICU Data Make dir, should point to icu\source\data\ )! | |
27 | !ENDIF | |
28 | !MESSAGE ICU data make path is $(ICUMAKE) | |
29 | ||
30 | # Suffixes for data files | |
31 | .SUFFIXES : .ucm .cnv .dll .dat .res .txt .c | |
32 | ||
33 | ICUOUT=$(ICUMAKE)\out | |
34 | ||
35 | # the prefix "icudt21_" for use in filenames | |
36 | ICUPKG=$(U_ICUDATA_NAME)$(U_ICUDATA_ENDIAN_SUFFIX) | |
37 | ||
38 | # need to nuke \\ for .NET... | |
39 | ICUOUT=$(ICUOUT:\\=\) | |
40 | ||
41 | ICUBLD=$(ICUOUT)\build | |
42 | ICUBLD_PKG=$(ICUBLD)\$(ICUPKG) | |
43 | ICUTMP=$(ICUOUT)\tmp | |
44 | ||
45 | # ICUP | |
46 | # The root of the ICU source directory tree | |
47 | # | |
48 | ICUP=$(ICUMAKE)\..\.. | |
49 | ICUP=$(ICUP:\source\data\..\..=) | |
50 | # In case the first one didn't do it, try this one. .NET would do the second one. | |
51 | ICUP=$(ICUP:\source\data\\..\..=) | |
52 | !MESSAGE ICU root path is $(ICUP) | |
53 | ||
54 | ||
55 | # ICUSRCDATA | |
56 | # The data directory in source | |
57 | # | |
58 | ICUSRCDATA=$(ICUP)\source\data | |
59 | ICUSRCDATA_RELATIVE_PATH=..\..\.. | |
60 | ||
61 | # ICUUCM | |
62 | # The directory that contains ucmcore.mk files along with *.ucm files | |
63 | # | |
64 | ICUUCM=mappings | |
65 | ||
66 | # ICULOC | |
67 | # The directory that contains resfiles.mk files along with *.txt locale data files | |
68 | # | |
69 | ICULOC=locales | |
70 | ||
71 | # ICUCOL | |
72 | # The directory that contains colfiles.mk files along with *.txt collation data files | |
73 | # | |
74 | ICUCOL=coll | |
75 | ||
76 | # ICURBNF | |
77 | # The directory that contains rbnffiles.mk files along with *.txt RBNF data files | |
78 | # | |
79 | ICURBNF=rbnf | |
80 | ||
81 | # ICUTRNS | |
82 | # The directory that contains trfiles.mk files along with *.txt transliterator files | |
83 | # | |
84 | ICUTRNS=translit | |
85 | ||
86 | # ICUBRK | |
87 | # The directory that contains resfiles.mk files along with *.txt break iterator files | |
88 | # | |
89 | ICUBRK=brkitr | |
90 | ||
91 | # ICUUNIDATA | |
92 | # The directory that contains Unicode data files | |
93 | # | |
94 | ICUUNIDATA=$(ICUP)\source\data\unidata | |
95 | ||
96 | ||
97 | # ICUMISC | |
98 | # The directory that contains miscfiles.mk along with files that are miscelleneous data | |
99 | # | |
100 | ICUMISC=$(ICUP)\source\data\misc | |
101 | ICUMISC2=misc | |
102 | ||
103 | # | |
104 | # ICUDATA | |
105 | # The source directory. Contains the source files for the common data to be built. | |
106 | # WARNING: NOT THE SAME AS ICU_DATA environment variable. Confusing. | |
107 | ICUDATA=$(ICUP)\source\data | |
108 | ||
109 | # | |
110 | # DLL_OUTPUT | |
111 | # Destination directory for the common data DLL file. | |
112 | # This is the same place that all of the other ICU DLLs go (the code-containing DLLs) | |
113 | # The lib file for the data DLL goes in $(DLL_OUTPUT)/../lib/ | |
114 | # | |
115 | DLL_OUTPUT=$(ICUP)\bin | |
116 | ||
117 | # | |
118 | # TESTDATA | |
119 | # The source directory for data needed for test programs. | |
120 | TESTDATA=$(ICUP)\source\test\testdata | |
121 | ||
122 | # | |
123 | # TESTDATAOUT | |
124 | # The destination directory for the built test data .dat file | |
125 | TESTDATAOUT=$(ICUP)\source\test\testdata\out | |
126 | ||
127 | # | |
128 | # TESTDATABLD | |
129 | # The build directory for test data intermidiate files | |
130 | # (Tests are NOT run from this makefile, | |
131 | # only the data is put in place.) | |
132 | TESTDATABLD=$(ICUP)\source\test\testdata\out\build | |
133 | ||
134 | # | |
135 | # ICUTOOLS | |
136 | # Directory under which all of the ICU data building tools live. | |
137 | # | |
138 | ICUTOOLS=$(ICUP)\source\tools | |
139 | ||
140 | # The current ICU tools need to be in the path first. | |
141 | PATH = $(ICUP)\bin;$(PATH) | |
142 | ||
143 | # This variable can be overridden to "-m static" by the project settings, | |
144 | # if you want a static data library. | |
145 | !IF "$(ICU_PACKAGE_MODE)"=="" | |
146 | ICU_PACKAGE_MODE=-m dll | |
147 | !ENDIF | |
148 | ||
149 | # If this archive exists, build from that | |
150 | # instead of building everything from scratch. | |
151 | ICUDATA_SOURCE_ARCHIVE=$(ICUSRCDATA)\in\$(ICUPKG).dat | |
152 | !IF !EXISTS("$(ICUDATA_SOURCE_ARCHIVE)") | |
153 | # Does a big endian version exist either? | |
154 | ICUDATA_ARCHIVE=$(ICUSRCDATA)\in\$(U_ICUDATA_NAME)b.dat | |
155 | !IF EXISTS("$(ICUDATA_ARCHIVE)") | |
156 | ICUDATA_SOURCE_ARCHIVE=$(ICUTMP)\$(ICUPKG).dat | |
157 | !ELSE | |
158 | # Nothing was usable for input | |
159 | !UNDEF ICUDATA_SOURCE_ARCHIVE | |
160 | !ENDIF | |
161 | !ENDIF | |
162 | ||
163 | !IFDEF ICUDATA_SOURCE_ARCHIVE | |
164 | !MESSAGE ICU data source archive is $(ICUDATA_SOURCE_ARCHIVE) | |
165 | !ELSE | |
166 | # We're including a list of .ucm files. | |
167 | # There are several lists, they are all optional. | |
168 | ||
169 | # Always build the mapping files for the EBCDIC fallback codepages | |
170 | # They are necessary on EBCDIC machines, and | |
171 | # the following logic is much easier if UCM_SOURCE is never empty. | |
172 | # (They are small.) | |
173 | UCM_SOURCE=ibm-37_P100-1995.ucm ibm-1047_P100-1995.ucm | |
174 | ||
175 | !IF EXISTS("$(ICUSRCDATA)\$(ICUUCM)\ucmcore.mk") | |
176 | !INCLUDE "$(ICUSRCDATA)\$(ICUUCM)\ucmcore.mk" | |
177 | UCM_SOURCE=$(UCM_SOURCE) $(UCM_SOURCE_CORE) | |
178 | !ELSE | |
179 | !MESSAGE Warning: cannot find "ucmcore.mk". Not building core MIME/Unix/Windows converter files. | |
180 | !ENDIF | |
181 | ||
182 | !IF EXISTS("$(ICUSRCDATA)\$(ICUUCM)\ucmfiles.mk") | |
183 | !INCLUDE "$(ICUSRCDATA)\$(ICUUCM)\ucmfiles.mk" | |
184 | UCM_SOURCE=$(UCM_SOURCE) $(UCM_SOURCE_FILES) | |
185 | !ELSE | |
186 | !MESSAGE Warning: cannot find "ucmfiles.mk". Not building many converter files. | |
187 | !ENDIF | |
188 | ||
189 | !IF EXISTS("$(ICUSRCDATA)\$(ICUUCM)\ucmebcdic.mk") | |
190 | !INCLUDE "$(ICUSRCDATA)\$(ICUUCM)\ucmebcdic.mk" | |
191 | UCM_SOURCE=$(UCM_SOURCE) $(UCM_SOURCE_EBCDIC) | |
192 | !ELSE | |
193 | !MESSAGE Warning: cannot find "ucmebcdic.mk". Not building EBCDIC converter files. | |
194 | !ENDIF | |
195 | ||
196 | !IF EXISTS("$(ICUSRCDATA)\$(ICUUCM)\ucmlocal.mk") | |
197 | !INCLUDE "$(ICUSRCDATA)\$(ICUUCM)\ucmlocal.mk" | |
198 | UCM_SOURCE=$(UCM_SOURCE) $(UCM_SOURCE_LOCAL) | |
199 | !ELSE | |
200 | !MESSAGE Information: cannot find "ucmlocal.mk". Not building user-additional converter files. | |
201 | !ENDIF | |
202 | ||
203 | CNV_FILES=$(UCM_SOURCE:.ucm=.cnv) | |
204 | ||
205 | !IF EXISTS("$(ICUSRCDATA)\$(ICUBRK)\brkfiles.mk") | |
206 | !INCLUDE "$(ICUSRCDATA)\$(ICUBRK)\brkfiles.mk" | |
207 | !IF EXISTS("$(ICUSRCDATA)\$(ICUBRK)\brklocal.mk") | |
208 | !INCLUDE "$(ICUSRCDATA)\$(ICUBRK)\brklocal.mk" | |
209 | BRK_SOURCE=$(BRK_SOURCE) $(BRK_SOURCE_LOCAL) | |
210 | BRK_CTD_SOURCE=$(BRK_CTD_SOURCE) $(BRK_CTD_SOURCE_LOCAL) | |
211 | BRK_RES_SOURCE=$(BRK_RES_SOURCE) $(BRK_RES_SOURCE_LOCAL) | |
212 | !ELSE | |
213 | !MESSAGE Information: cannot find "brklocal.mk". Not building user-additional break iterator files. | |
214 | !ENDIF | |
215 | !ELSE | |
216 | !MESSAGE Warning: cannot find "brkfiles.mk" | |
217 | !ENDIF | |
218 | ||
219 | # | |
220 | # Break iterator data files. | |
221 | # | |
222 | BRK_FILES=$(ICUBRK)\$(BRK_SOURCE:.txt =.brk brkitr\) | |
223 | BRK_FILES=$(BRK_FILES:.txt=.brk) | |
224 | BRK_FILES=$(BRK_FILES:brkitr\ =brkitr\) | |
225 | ||
226 | !IFDEF BRK_CTD_SOURCE | |
227 | BRK_CTD_FILES = $(ICUBRK)\$(BRK_CTD_SOURCE:.txt =.ctd brkitr\) | |
228 | BRK_CTD_FILES = $(BRK_CTD_FILES:.txt=.ctd) | |
229 | BRK_CTD_FILES = $(BRK_CTD_FILES:brkitr\ =) | |
230 | !ENDIF | |
231 | ||
232 | !IFDEF BRK_RES_SOURCE | |
233 | BRK_RES_FILES = $(BRK_RES_SOURCE:.txt =.res brkitr\) | |
234 | BRK_RES_FILES = $(BRK_RES_FILES:.txt=.res) | |
235 | BRK_RES_FILES = $(ICUBRK)\root.res $(ICUBRK)\$(BRK_RES_FILES:brkitr\ =) | |
236 | ALL_RES = $(ALL_RES) $(ICUBRK)\res_index.res | |
237 | !ENDIF | |
238 | ||
239 | # Read list of locale resource bundle files | |
240 | !IF EXISTS("$(ICUSRCDATA)\$(ICULOC)\resfiles.mk") | |
241 | !INCLUDE "$(ICUSRCDATA)\$(ICULOC)\resfiles.mk" | |
242 | !IF EXISTS("$(ICUSRCDATA)\$(ICULOC)\reslocal.mk") | |
243 | !INCLUDE "$(ICUSRCDATA)\$(ICULOC)\reslocal.mk" | |
244 | GENRB_SOURCE=$(GENRB_SOURCE) $(GENRB_SOURCE_LOCAL) | |
245 | !ELSE | |
246 | !MESSAGE Information: cannot find "reslocal.mk". Not building user-additional resource bundle files. | |
247 | !ENDIF | |
248 | !ELSE | |
249 | !MESSAGE Warning: cannot find "resfiles.mk" | |
250 | !ENDIF | |
251 | ||
252 | !IFDEF GENRB_SOURCE | |
253 | RB_FILES = root.res $(GENRB_ALIAS_SOURCE:.txt=.res) $(GENRB_SOURCE:.txt=.res) | |
254 | ALL_RES = $(ALL_RES) res_index.res | |
255 | !ENDIF | |
256 | ||
257 | ||
258 | # Read list of locale resource bundle files | |
259 | !IF EXISTS("$(ICUSRCDATA)\$(ICUCOL)\colfiles.mk") | |
260 | !INCLUDE "$(ICUSRCDATA)\$(ICUCOL)\colfiles.mk" | |
261 | !IF EXISTS("$(ICUSRCDATA)\$(ICUCOL)\collocal.mk") | |
262 | !INCLUDE "$(ICUSRCDATA)\$(ICUCOL)\collocal.mk" | |
263 | COLLATION_SOURCE=$(COLLATION_SOURCE) $(COLLATION_SOURCE_LOCAL) | |
264 | !ELSE | |
265 | !MESSAGE Information: cannot find "collocal.mk". Not building user-additional resource bundle files. | |
266 | !ENDIF | |
267 | !ELSE | |
268 | !MESSAGE Warning: cannot find "colfiles.mk" | |
269 | !ENDIF | |
270 | ||
271 | !IFDEF COLLATION_SOURCE | |
272 | COL_FILES = $(ICUCOL)\root.txt $(COLLATION_ALIAS_SOURCE) $(COLLATION_SOURCE) | |
273 | COL_COL_FILES = $(COL_FILES:.txt =.res coll\) | |
274 | COL_COL_FILES = $(COL_COL_FILES:.txt=.res) | |
275 | COL_COL_FILES = $(COL_COL_FILES:coll\ =) | |
276 | ALL_RES = $(ALL_RES) $(ICUCOL)\res_index.res | |
277 | !ENDIF | |
278 | ||
279 | # Read list of RBNF resource bundle files | |
280 | !IF EXISTS("$(ICUSRCDATA)\$(ICURBNF)\rbnffiles.mk") | |
281 | !INCLUDE "$(ICUSRCDATA)\$(ICURBNF)\rbnffiles.mk" | |
282 | !IF EXISTS("$(ICUSRCDATA)\$(ICURBNF)\rbnflocal.mk") | |
283 | !INCLUDE "$(ICUSRCDATA)\$(ICURBNF)\rbnflocal.mk" | |
284 | RBNF_SOURCE=$(RBNF_SOURCE) $(RBNF_SOURCE_LOCAL) | |
285 | !ELSE | |
286 | !MESSAGE Information: cannot find "rbnflocal.mk". Not building user-additional resource bundle files. | |
287 | !ENDIF | |
288 | !ELSE | |
289 | !MESSAGE Warning: cannot find "rbnffiles.mk" | |
290 | !ENDIF | |
291 | ||
292 | !IFDEF RBNF_SOURCE | |
293 | RBNF_FILES = $(ICURBNF)\root.txt $(RBNF_ALIAS_SOURCE) $(RBNF_SOURCE) | |
294 | RBNF_RES_FILES = $(RBNF_FILES:.txt =.res rbnf\) | |
295 | RBNF_RES_FILES = $(RBNF_RES_FILES:.txt=.res) | |
296 | RBNF_RES_FILES = $(RBNF_RES_FILES:rbnf\ =rbnf\) | |
297 | ALL_RES = $(ALL_RES) $(ICURBNF)\res_index.res | |
298 | !ENDIF | |
299 | ||
300 | # Read list of transliterator resource bundle files | |
301 | !IF EXISTS("$(ICUSRCDATA)\$(ICUTRNS)\trnsfiles.mk") | |
302 | !INCLUDE "$(ICUSRCDATA)\$(ICUTRNS)\trnsfiles.mk" | |
303 | !IF EXISTS("$(ICUSRCDATA)\$(ICUTRNS)\trnslocal.mk") | |
304 | !INCLUDE "$(ICUSRCDATA)\$(ICUTRNS)\trnslocal.mk" | |
305 | TRANSLIT_SOURCE=$(TRANSLIT_SOURCE) $(TRANSLIT_SOURCE_LOCAL) | |
306 | !ELSE | |
307 | !MESSAGE Information: cannot find "trnslocal.mk". Not building user-additional transliterator files. | |
308 | !ENDIF | |
309 | !ELSE | |
310 | !MESSAGE Warning: cannot find "trnsfiles.mk" | |
311 | !ENDIF | |
312 | ||
313 | !IFDEF TRANSLIT_SOURCE | |
314 | TRANSLIT_FILES = $(ICUTRNS)\$(TRANSLIT_ALIAS_SOURCE) $(TRANSLIT_SOURCE) | |
315 | TRANSLIT_RES_FILES = $(TRANSLIT_FILES:.txt =.res translit\) | |
316 | TRANSLIT_RES_FILES = $(TRANSLIT_RES_FILES:.txt=.res) | |
317 | TRANSLIT_RES_FILES = $(TRANSLIT_RES_FILES:translit\ =translit\) | |
318 | #ALL_RES = $(ALL_RES) $(ICUTRNS)\res_index.res | |
319 | !ENDIF | |
320 | ||
321 | # Read list of miscellaneous resource bundle files | |
322 | !IF EXISTS("$(ICUSRCDATA)\$(ICUMISC2)\miscfiles.mk") | |
323 | !INCLUDE "$(ICUSRCDATA)\$(ICUMISC2)\miscfiles.mk" | |
324 | !IF EXISTS("$(ICUSRCDATA)\$(ICUMISC2)\misclocal.mk") | |
325 | !INCLUDE "$(ICUSRCDATA)\$(ICUMISC2)\misclocal.mk" | |
326 | MISC_SOURCE=$(MISC_SOURCE) $(MISC_SOURCE_LOCAL) | |
327 | !ELSE | |
328 | !MESSAGE Information: cannot find "misclocal.mk". Not building user-additional miscellaenous files. | |
329 | !ENDIF | |
330 | !ELSE | |
331 | !MESSAGE Warning: cannot find "miscfiles.mk" | |
332 | !ENDIF | |
333 | ||
334 | MISC_FILES = $(MISC_SOURCE:.txt=.res) | |
335 | ||
336 | # don't include COL_FILES | |
337 | ALL_RES = $(ALL_RES) $(RB_FILES) $(MISC_FILES) | |
338 | !ENDIF | |
339 | ||
340 | # Common defines for both ways of building ICU's data library. | |
341 | COMMON_ICUDATA_DEPENDENCIES="$(ICUP)\bin\pkgdata.exe" "$(ICUTMP)\icudata.res" "$(ICUP)\source\stubdata\stubdatabuilt.txt" | |
342 | COMMON_ICUDATA_ARGUMENTS=-f -e $(U_ICUDATA_NAME) -v $(ICU_PACKAGE_MODE) -M"PKGDATA_LDFLAGS=/base:0x4ad00000" -c -p $(ICUPKG) -T "$(ICUTMP)" -L $(U_ICUDATA_NAME) -d "$(ICUBLD_PKG)" -s . | |
343 | ||
344 | ############################################################################# | |
345 | # | |
346 | # ALL | |
347 | # This target builds all the data files. The world starts here. | |
348 | # Note: we really want the common data dll to go to $(DLL_OUTPUT), not $(ICUBLD_PKG). But specifying | |
349 | # that here seems to cause confusion with the building of the stub library of the same name. | |
350 | # Building the common dll in $(ICUBLD_PKG) unconditionally copies it to $(DLL_OUTPUT) too. | |
351 | # | |
352 | ############################################################################# | |
353 | ALL : GODATA "$(ICU_LIB_TARGET)" "$(TESTDATAOUT)\testdata.dat" | |
354 | @echo All targets are up to date | |
355 | ||
356 | # Starting with ICU4C 3.4, the core Unicode properties files (uprops.icu, ucase.icu, ubidi.icu, unorm.icu) | |
357 | # are hardcoded in the common DLL and therefore not included in the data package any more. | |
358 | # They are not built by default but need to be built for ICU4J data and for getting the .c source files | |
359 | # when updating the Unicode data. | |
360 | # Changed in makedata.mak revision 1.117. See Jitterbug 4497. | |
361 | uni-core-data: GODATA "$(ICUBLD_PKG)\uprops.icu" "$(ICUBLD_PKG)\ucase.icu" "$(ICUBLD_PKG)\ubidi.icu" "$(ICUBLD_PKG)\unorm.icu" | |
362 | @echo Unicode .icu files built to "$(ICUBLD_PKG)" | |
363 | @echo Unicode .c source files built to "$(ICUTMP)" | |
364 | ||
365 | # | |
366 | # testdata - nmake will invoke pkgdata, which will create testdata.dat | |
367 | # | |
368 | "$(TESTDATAOUT)\testdata.dat": "$(ICUBLD_PKG)\ucadata.icu" $(TRANSLIT_RES_FILES) $(MISC_FILES) $(RB_FILES) {"$(ICUTOOLS)\genrb\$(CFG)"}genrb.exe | |
369 | @cd "$(TESTDATA)" | |
370 | @echo building testdata... | |
371 | nmake /nologo /f "$(TESTDATA)\testdata.mak" TESTDATA=. ICUTOOLS="$(ICUTOOLS)" ICUP="$(ICUP)" CFG=$(CFG) TESTDATAOUT="$(TESTDATAOUT)" ICUDATA="$(ICUDATA)" TESTDATABLD="$(TESTDATABLD)" | |
372 | ||
373 | #invoke pkgdata for ICU common data | |
374 | # pkgdata will drop all output files (.dat, .dll, .lib) into the target (ICUBLD_PKG) directory. | |
375 | # move the .dll and .lib files to their final destination afterwards. | |
376 | # The $(U_ICUDATA_NAME).lib and $(U_ICUDATA_NAME).exp should already be in the right place due to stubdata. | |
377 | # | |
378 | # 2005-may-05 Removed Unicode properties files (unorm.icu, uprops.icu, ucase.icu, ubidi.icu) | |
379 | # from data build. See Jitterbug 4497. (makedata.mak revision 1.117) | |
380 | # | |
381 | !IFDEF ICUDATA_SOURCE_ARCHIVE | |
382 | "$(ICU_LIB_TARGET)" : $(COMMON_ICUDATA_DEPENDENCIES) "$(ICUDATA_SOURCE_ARCHIVE)" | |
383 | @echo Building icu data from $(ICUDATA_SOURCE_ARCHIVE) | |
384 | cd "$(ICUBLD_PKG)" | |
385 | "$(ICUP)\bin\icupkg" -x * --list "$(ICUDATA_SOURCE_ARCHIVE)" > "$(ICUTMP)\icudata.lst" | |
386 | "$(ICUP)\bin\pkgdata" $(COMMON_ICUDATA_ARGUMENTS) "$(ICUTMP)\icudata.lst" | |
387 | copy "$(U_ICUDATA_NAME).dll" "$(DLL_OUTPUT)" | |
388 | -@erase "$(U_ICUDATA_NAME).dll" | |
389 | copy "$(ICUPKG).dat" "$(ICUOUT)\$(U_ICUDATA_NAME)$(U_ICUDATA_ENDIAN_SUFFIX).dat" | |
390 | -@erase "$(ICUPKG).dat" | |
391 | !ELSE | |
392 | "$(ICU_LIB_TARGET)" : $(COMMON_ICUDATA_DEPENDENCIES) $(CNV_FILES) "$(ICUBLD_PKG)\unames.icu" "$(ICUBLD_PKG)\pnames.icu" "$(ICUBLD_PKG)\cnvalias.icu" "$(ICUBLD_PKG)\ucadata.icu" "$(ICUBLD_PKG)\invuca.icu" "$(ICUBLD_PKG)\uidna.spp" $(BRK_FILES) $(BRK_CTD_FILES) $(BRK_RES_FILES) $(COL_COL_FILES) $(RBNF_RES_FILES) $(TRANSLIT_RES_FILES) $(ALL_RES) | |
393 | @echo Building icu data | |
394 | cd "$(ICUBLD_PKG)" | |
395 | "$(ICUP)\bin\pkgdata" $(COMMON_ICUDATA_ARGUMENTS) <<"$(ICUTMP)\icudata.lst" | |
396 | pnames.icu | |
397 | unames.icu | |
398 | ucadata.icu | |
399 | invuca.icu | |
400 | uidna.spp | |
401 | cnvalias.icu | |
402 | $(CNV_FILES:.cnv =.cnv | |
403 | ) | |
404 | $(ALL_RES:.res =.res | |
405 | ) | |
406 | $(COL_COL_FILES:.res =.res | |
407 | ) | |
408 | $(RBNF_RES_FILES:.res =.res | |
409 | ) | |
410 | $(TRANSLIT_RES_FILES:.res =.res | |
411 | ) | |
412 | $(BRK_FILES:.brk =.brk | |
413 | ) | |
414 | $(BRK_CTD_FILES:.ctd =.ctd | |
415 | ) | |
416 | $(BRK_RES_FILES:.res =.res | |
417 | ) | |
418 | <<KEEP | |
419 | -@erase "$(ICU_LIB_TARGET)" | |
420 | copy "$(U_ICUDATA_NAME).dll" "$(ICU_LIB_TARGET)" | |
421 | -@erase "$(U_ICUDATA_NAME).dll" | |
422 | copy "$(ICUPKG).dat" "$(ICUOUT)\$(U_ICUDATA_NAME)$(U_ICUDATA_ENDIAN_SUFFIX).dat" | |
423 | -@erase "$(ICUPKG).dat" | |
424 | !ENDIF | |
425 | ||
426 | # utility target to create missing directories | |
427 | CREATE_DIRS : | |
428 | @if not exist "$(ICUOUT)\$(NULL)" mkdir "$(ICUOUT)" | |
429 | @if not exist "$(ICUTMP)\$(NULL)" mkdir "$(ICUTMP)" | |
430 | @if not exist "$(ICUOUT)\build\$(NULL)" mkdir "$(ICUOUT)\build" | |
431 | @if not exist "$(ICUBLD_PKG)\$(NULL)" mkdir "$(ICUBLD_PKG)" | |
432 | @if not exist "$(ICUBLD_PKG)\$(ICUBRK)\$(NULL)" mkdir "$(ICUBLD_PKG)\$(ICUBRK)" | |
433 | @if not exist "$(ICUBLD_PKG)\$(ICUCOL)\$(NULL)" mkdir "$(ICUBLD_PKG)\$(ICUCOL)" | |
434 | @if not exist "$(ICUBLD_PKG)\$(ICURBNF)\$(NULL)" mkdir "$(ICUBLD_PKG)\$(ICURBNF)" | |
435 | @if not exist "$(ICUBLD_PKG)\$(ICUTRNS)\$(NULL)" mkdir "$(ICUBLD_PKG)\$(ICUTRNS)" | |
436 | @if not exist "$(TESTDATAOUT)\$(NULL)" mkdir "$(TESTDATAOUT)" | |
437 | @if not exist "$(TESTDATABLD)\$(NULL)" mkdir "$(TESTDATABLD)" | |
438 | @if not exist "$(TESTDATAOUT)\testdata\$(NULL)" mkdir "$(TESTDATAOUT)\testdata" | |
439 | ||
440 | # utility target to send us to the right dir | |
441 | GODATA : CREATE_DIRS | |
442 | @cd "$(ICUBLD_PKG)" | |
443 | ||
444 | # This is to remove all the data files | |
445 | CLEAN : GODATA | |
446 | @echo Cleaning up the data files. | |
447 | @cd "$(ICUBLD_PKG)" | |
448 | -@erase "*.cnv" | |
449 | -@erase "*.exp" | |
450 | -@erase "*.icu" | |
451 | -@erase "*.lib" | |
452 | -@erase "*.res" | |
453 | -@erase "*.spp" | |
454 | -@erase "*.txt" | |
455 | @cd "$(ICUBLD_PKG)\$(ICUBRK)" | |
456 | -@erase "*.brk" | |
457 | -@erase "*.res" | |
458 | -@erase "*.txt" | |
459 | @cd "$(ICUBLD_PKG)\$(ICUCOL)" | |
460 | -@erase "*.res" | |
461 | -@erase "*.txt" | |
462 | @cd "$(ICUBLD_PKG)\$(ICURBNF)" | |
463 | -@erase "*.res" | |
464 | -@erase "*.txt" | |
465 | @cd "$(ICUBLD_PKG)\$(ICUTRNS)" | |
466 | -@erase "*.res" | |
467 | @cd "$(ICUOUT)" | |
468 | -@erase "*.dat" | |
469 | @cd "$(ICUTMP)" | |
470 | -@erase "*.txt" | |
471 | -@erase "*.lst" | |
472 | -@erase "*.mak" | |
473 | -@erase "*.obj" | |
474 | -@erase "*.res" | |
475 | @cd "$(TESTDATABLD)" | |
476 | -@erase "*.cnv" | |
477 | -@erase "*.icu" | |
478 | -@erase "*.mak" | |
479 | -@erase "*.res" | |
480 | -@erase "*.spp" | |
481 | -@erase "*.txt" | |
482 | @cd "$(TESTDATAOUT)" | |
483 | -@erase "*.dat" | |
484 | @cd "$(TESTDATAOUT)\testdata" | |
485 | -@erase "*.typ" | |
486 | @cd "$(ICUBLD_PKG)" | |
487 | ||
488 | ||
489 | # RBBI .brk file generation. | |
490 | {$(ICUSRCDATA_RELATIVE_PATH)\$(ICUBRK)}.txt.brk: | |
491 | @echo Creating $@ | |
492 | @"$(ICUTOOLS)\genbrk\$(CFG)\genbrk" -c -r $< -o $@ -d"$(ICUBLD_PKG)" -i "$(ICUBLD_PKG)" | |
493 | ||
494 | # RBBI .ctd file generation. | |
495 | {$(ICUSRCDATA_RELATIVE_PATH)\$(ICUBRK)}.txt.ctd: | |
496 | @echo Creating $@ | |
497 | @"$(ICUTOOLS)\genctd\$(CFG)\genctd" -c -o $@ -d"$(ICUBLD_PKG)" -i "$(ICUBLD_PKG)" $< | |
498 | ||
499 | # Batch inference rule for creating converters | |
500 | {$(ICUSRCDATA_RELATIVE_PATH)\$(ICUUCM)}.ucm.cnv:: | |
501 | @echo Generating converters | |
502 | @"$(ICUTOOLS)\makeconv\$(CFG)\makeconv" -c -d"$(ICUBLD_PKG)" $< | |
503 | ||
504 | # Batch inference rule for creating miscellaneous resource files | |
505 | # TODO: -q option is specified to squelch the 120+ warnings about | |
506 | # empty intvectors and binary elements. Unfortunately, this may | |
507 | # squelch other legitimate warnings. When there is a better | |
508 | # way, remove the -q. | |
509 | {$(ICUSRCDATA_RELATIVE_PATH)\$(ICUMISC2)}.txt.res:: | |
510 | @echo Making Miscellaneous Resource Bundle files | |
511 | @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -q -d"$(ICUBLD_PKG)" $< | |
512 | ||
513 | # Inference rule for creating resource bundle files | |
514 | {$(ICUSRCDATA_RELATIVE_PATH)\$(ICULOC)}.txt.res:: | |
515 | @echo Making Locale Resource Bundle files | |
516 | @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -d"$(ICUBLD_PKG)" $< | |
517 | ||
518 | res_index.res: | |
519 | @echo Generating <<res_index.txt | |
520 | // Warning this file is automatically generated | |
521 | res_index:table(nofallback) { | |
522 | InstalledLocales { | |
523 | $(GENRB_SOURCE:.txt= {""} | |
524 | ) | |
525 | } | |
526 | } | |
527 | <<KEEP | |
528 | @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -d"$(ICUBLD_PKG)" .\res_index.txt | |
529 | ||
530 | {$(ICUSRCDATA_RELATIVE_PATH)\$(ICUCOL)}.txt{$(ICUCOL)}.res:: | |
531 | @echo Making Collation files | |
532 | @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\$(ICUCOL)" $< | |
533 | ||
534 | $(ICUCOL)\res_index.res: | |
535 | @echo Generating <<$(ICUCOL)\res_index.txt | |
536 | // Warning this file is automatically generated | |
537 | res_index:table(nofallback) { | |
538 | InstalledLocales { | |
539 | $(COLLATION_SOURCE:.txt= {""} | |
540 | ) | |
541 | } | |
542 | } | |
543 | <<KEEP | |
544 | @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -d"$(ICUBLD_PKG)\$(ICUCOL)" .\$(ICUCOL)\res_index.txt | |
545 | ||
546 | {$(ICUSRCDATA_RELATIVE_PATH)\$(ICURBNF)}.txt{$(ICURBNF)}.res:: | |
547 | @echo Making RBNF files | |
548 | @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\$(ICURBNF)" $< | |
549 | ||
550 | $(ICURBNF)\res_index.res: | |
551 | @echo Generating <<$(ICURBNF)\res_index.txt | |
552 | // Warning this file is automatically generated | |
553 | res_index:table(nofallback) { | |
554 | InstalledLocales { | |
555 | $(RBNF_SOURCE:.txt= {""} | |
556 | ) | |
557 | } | |
558 | } | |
559 | <<KEEP | |
560 | @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -d"$(ICUBLD_PKG)\$(ICURBNF)" .\$(ICURBNF)\res_index.txt | |
561 | ||
562 | $(ICUBRK)\res_index.res: | |
563 | @echo Generating <<$(ICUBRK)\res_index.txt | |
564 | // Warning this file is automatically generated | |
565 | res_index:table(nofallback) { | |
566 | InstalledLocales { | |
567 | $(BRK_RES_SOURCE:.txt= {""} | |
568 | ) | |
569 | } | |
570 | } | |
571 | <<KEEP | |
572 | @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -d"$(ICUBLD_PKG)\$(ICUBRK)" .\$(ICUBRK)\res_index.txt | |
573 | ||
574 | {$(ICUSRCDATA_RELATIVE_PATH)\$(ICUBRK)}.txt{$(ICUBRK)}.res:: | |
575 | @echo Making Break Iterator Resource files | |
576 | @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\$(ICUBRK)" $< | |
577 | ||
578 | {$(ICUSRCDATA_RELATIVE_PATH)\$(ICUTRNS)}.txt{$(ICUTRNS)}.res:: | |
579 | @echo Making Transliterator files | |
580 | @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\$(ICUTRNS)" $< | |
581 | ||
582 | ||
583 | # DLL version information | |
584 | # If you modify this, modify winmode.c in pkgdata. | |
585 | "$(ICUTMP)\icudata.res": "$(ICUMISC)\icudata.rc" | |
586 | @echo Creating data DLL version information from $** | |
587 | @rc.exe /i "..\..\..\..\common" /r /fo $@ $** | |
588 | ||
589 | # Targets for unames.icu | |
590 | "$(ICUBLD_PKG)\unames.icu": "$(ICUUNIDATA)\*.txt" "$(ICUTOOLS)\gennames\$(CFG)\gennames.exe" | |
591 | @echo Creating data file for Unicode Names | |
592 | @"$(ICUTOOLS)\gennames\$(CFG)\gennames" -1 -u $(UNICODE_VERSION) -d "$(ICUBLD_PKG)" "$(ICUUNIDATA)\UnicodeData.txt" | |
593 | ||
594 | # Targets for pnames.icu | |
595 | # >> Depends on the Unicode data as well as uchar.h and uscript.h << | |
596 | "$(ICUBLD_PKG)\pnames.icu": "$(ICUUNIDATA)\*.txt" "$(ICUTOOLS)\genpname\$(CFG)\genpname.exe" "$(ICUP)\source\common\unicode\uchar.h" "$(ICUP)\source\common\unicode\uscript.h" | |
597 | @echo Creating data file for Unicode Property Names | |
598 | @"$(ICUTOOLS)\genpname\$(CFG)\genpname" -d "$(ICUBLD_PKG)" | |
599 | ||
600 | # Targets for uprops.icu | |
601 | "$(ICUBLD_PKG)\uprops.icu": "$(ICUUNIDATA)\*.txt" "$(ICUTOOLS)\genprops\$(CFG)\genprops.exe" "$(ICUBLD_PKG)\pnames.icu" | |
602 | @echo Creating data file for Unicode Character Properties | |
603 | @"$(ICUTOOLS)\genprops\$(CFG)\genprops" -u $(UNICODE_VERSION) -i "$(ICUBLD_PKG)" -s "$(ICUUNIDATA)" -d "$(ICUBLD_PKG)" | |
604 | @"$(ICUTOOLS)\genprops\$(CFG)\genprops" --csource -u $(UNICODE_VERSION) -i "$(ICUBLD_PKG)" -s "$(ICUUNIDATA)" -d "$(ICUTMP)" | |
605 | ||
606 | # Targets for ubidi.icu | |
607 | "$(ICUBLD_PKG)\ubidi.icu": "$(ICUUNIDATA)\*.txt" "$(ICUTOOLS)\genbidi\$(CFG)\genbidi.exe" | |
608 | @echo Creating data file for Unicode BiDi/Shaping Properties | |
609 | @"$(ICUTOOLS)\genbidi\$(CFG)\genbidi" -u $(UNICODE_VERSION) -i "$(ICUBLD_PKG)" -s "$(ICUUNIDATA)" -d "$(ICUBLD_PKG)" | |
610 | @"$(ICUTOOLS)\genbidi\$(CFG)\genbidi" --csource -u $(UNICODE_VERSION) -i "$(ICUBLD_PKG)" -s "$(ICUUNIDATA)" -d "$(ICUTMP)" | |
611 | ||
612 | # Targets for ucase.icu | |
613 | "$(ICUBLD_PKG)\ucase.icu": "$(ICUUNIDATA)\*.txt" "$(ICUTOOLS)\gencase\$(CFG)\gencase.exe" | |
614 | @echo Creating data file for Unicode Case Mapping Properties | |
615 | @"$(ICUTOOLS)\gencase\$(CFG)\gencase" -u $(UNICODE_VERSION) -i "$(ICUBLD_PKG)" -s "$(ICUUNIDATA)" -d "$(ICUBLD_PKG)" | |
616 | @"$(ICUTOOLS)\gencase\$(CFG)\gencase" --csource -u $(UNICODE_VERSION) -i "$(ICUBLD_PKG)" -s "$(ICUUNIDATA)" -d "$(ICUTMP)" | |
617 | ||
618 | # Targets for unorm.icu | |
619 | "$(ICUBLD_PKG)\unorm.icu": "$(ICUUNIDATA)\*.txt" "$(ICUTOOLS)\gennorm\$(CFG)\gennorm.exe" "$(ICUBLD_PKG)\pnames.icu" "$(ICUBLD_PKG)\uprops.icu" "$(ICUBLD_PKG)\ucase.icu" | |
620 | @echo Creating data file for Unicode Normalization | |
621 | @"$(ICUTOOLS)\gennorm\$(CFG)\gennorm" -u $(UNICODE_VERSION) -i "$(ICUBLD_PKG)" -s "$(ICUUNIDATA)" -d "$(ICUBLD_PKG)" | |
622 | @"$(ICUTOOLS)\gennorm\$(CFG)\gennorm" --csource -u $(UNICODE_VERSION) -i "$(ICUBLD_PKG)" -s "$(ICUUNIDATA)" -d "$(ICUTMP)" | |
623 | ||
624 | # Targets for converters | |
625 | "$(ICUBLD_PKG)\cnvalias.icu" : {"$(ICUSRCDATA)\$(ICUUCM)"}\convrtrs.txt "$(ICUTOOLS)\gencnval\$(CFG)\gencnval.exe" | |
626 | @echo Creating data file for Converter Aliases | |
627 | @"$(ICUTOOLS)\gencnval\$(CFG)\gencnval" -d "$(ICUBLD_PKG)" "$(ICUSRCDATA)\$(ICUUCM)\convrtrs.txt" | |
628 | ||
629 | # Targets for ucadata.icu & invuca.icu | |
630 | # used to depend on "$(ICUBLD_PKG)\uprops.icu" "$(ICUBLD_PKG)\ucase.icu" "$(ICUBLD_PKG)\unorm.icu" | |
631 | # see Jitterbug 4497 | |
632 | "$(ICUBLD_PKG)\invuca.icu" "$(ICUBLD_PKG)\ucadata.icu": "$(ICUUNIDATA)\FractionalUCA.txt" "$(ICUTOOLS)\genuca\$(CFG)\genuca.exe" | |
633 | @echo Creating UCA data files | |
634 | @"$(ICUTOOLS)\genuca\$(CFG)\genuca" -d "$(ICUBLD_PKG)" -i "$(ICUBLD_PKG)" -s "$(ICUUNIDATA)" | |
635 | ||
636 | # Targets for uidna.spp | |
637 | "$(ICUBLD_PKG)\uidna.spp" : "$(ICUUNIDATA)\*.txt" "$(ICUMISC)\NamePrepProfile.txt" | |
638 | "$(ICUTOOLS)\gensprep\$(CFG)\gensprep" -s "$(ICUMISC)" -d "$(ICUBLD_PKG)\\" -b uidna -n "$(ICUUNIDATA)" -k -u 3.2.0 NamePrepProfile.txt | |
639 | ||
640 | !IFDEF ICUDATA_ARCHIVE | |
641 | "$(ICUDATA_SOURCE_ARCHIVE)": CREATE_DIRS $(ICUDATA_ARCHIVE) "$(ICUTOOLS)\icupkg\$(CFG)\icupkg.exe" | |
642 | "$(ICUTOOLS)\icupkg\$(CFG)\icupkg" -t$(U_ICUDATA_ENDIAN_SUFFIX) "$(ICUDATA_ARCHIVE)" "$(ICUDATA_SOURCE_ARCHIVE)" | |
643 | !ENDIF | |
644 | ||
645 | # Dependencies on the tools for the batch inference rules | |
646 | ||
647 | !IFNDEF ICUDATA_SOURCE_ARCHIVE | |
648 | $(UCM_SOURCE) : {"$(ICUTOOLS)\makeconv\$(CFG)"}makeconv.exe | |
649 | ||
650 | # This used to depend on "$(ICUBLD_PKG)\uprops.icu" "$(ICUBLD_PKG)\ucase.icu" "$(ICUBLD_PKG)\ubidi.icu" "$(ICUBLD_PKG)\unorm.icu" | |
651 | # This data is now hard coded as a part of the library. | |
652 | # See Jitterbug 4497 for details. | |
653 | $(MISC_SOURCE) $(RB_FILES) $(COL_COL_FILES) $(RBNF_RES_FILES) $(BRK_RES_FILES) $(TRANSLIT_RES_FILES): {"$(ICUTOOLS)\genrb\$(CFG)"}genrb.exe "$(ICUBLD_PKG)\ucadata.icu" | |
654 | ||
655 | # This used to depend on "$(ICUBLD_PKG)\uprops.icu" "$(ICUBLD_PKG)\ucase.icu" "$(ICUBLD_PKG)\ubidi.icu" "$(ICUBLD_PKG)\unorm.icu" | |
656 | # This data is now hard coded as a part of the library. | |
657 | # See Jitterbug 4497 for details. | |
658 | $(BRK_SOURCE) : "$(ICUBLD_PKG)\unames.icu" "$(ICUBLD_PKG)\pnames.icu" | |
659 | !ENDIF | |
660 |