• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2016 and later: Unicode, Inc. and others.
2# License & terms of use: http://www.unicode.org/copyright.html
3#**********************************************************************
4#* Copyright (C) 1999-2016, International Business Machines Corporation
5#* and others.  All Rights Reserved.
6#**********************************************************************
7# nmake file for creating data files on win32
8# invoke with
9# nmake /f makedata.mak icumake=$(ProjectDir)
10#
11#	12/10/1999	weiv	Created
12
13##############################################################################
14# Keep the following in sync with the version - see common/unicode/uvernum.h
15U_ICUDATA_NAME=icudt63
16##############################################################################
17!IF "$(UWP)" == "UWP"
18# Optionally change the name of the data file for the UWP version.
19U_ICUDATA_NAME=icudt63
20!ENDIF
21U_ICUDATA_ENDIAN_SUFFIX=l
22UNICODE_VERSION=11.0
23ICU_LIB_TARGET=$(DLL_OUTPUT)\$(U_ICUDATA_NAME).dll
24
25#  ICUMAKE
26#     Must be provided by whoever runs this makefile.
27#     Is the directory containing this file (makedata.mak)
28#     Is the directory into which most data is built (prior to packaging)
29#     Is icu\source\data\
30#
31!IF "$(ICUMAKE)"==""
32!ERROR Can't find ICUMAKE (ICU Data Make dir, should point to icu\source\data\ )!
33!ENDIF
34!MESSAGE ICU data make path is $(ICUMAKE)
35
36!IF [py -3]!=0
37!MESSAGE Information: Unable to find Python 3. ICU versions 64 and later will require Python 3 to build.
38!MESSAGE Information: See ICU-10923 for more information: https://unicode-org.atlassian.net/browse/ICU-10923
39!ELSE
40!MESSAGE Information: Found Python 3. You are all set for ICU 64, which will require Python 3 to build.
41!MESSAGE Information: For more info on Python 3 requirement, see: https://unicode-org.atlassian.net/browse/ICU-10923
42!ENDIF
43
44# Suffixes for data files
45.SUFFIXES : .nrm .icu .ucm .cnv .dll .dat .res .txt .c
46
47ICUOUT=$(ICUMAKE)\out
48
49#  the prefix "icudt62_" for use in filenames
50ICUPKG=$(U_ICUDATA_NAME)$(U_ICUDATA_ENDIAN_SUFFIX)
51
52# need to nuke \\ for .NET...
53ICUOUT=$(ICUOUT:\\=\)
54
55ICUBLD=$(ICUOUT)\build
56ICUBLD_PKG=$(ICUBLD)\$(ICUPKG)
57ICUTMP=$(ICUOUT)\tmp
58
59#  ICUP
60#     The root of the ICU source directory tree
61#
62ICUP=$(ICUMAKE)\..\..
63ICUP=$(ICUP:\source\data\..\..=)
64# In case the first one didn't do it, try this one.  .NET would do the second one.
65ICUP=$(ICUP:\source\data\\..\..=)
66!MESSAGE ICU root path is $(ICUP)
67
68
69#  ICUSRCDATA
70#       The data directory in source
71#
72ICUSRCDATA=$(ICUP)\source\data
73ICUSRCDATA_RELATIVE_PATH=..\..\..
74
75#  ICUUCM
76#       The directory that contains ucmcore.mk files along with *.ucm files
77#
78ICUUCM=mappings
79
80#  ICULOC
81#       The directory that contains resfiles.mk files along with *.txt locale data files
82#
83ICULOC=locales
84
85#  ICUCOL
86#       The directory that contains colfiles.mk files along with *.txt collation data files
87#
88ICUCOL=coll
89
90#  ICURBNF
91#       The directory that contains rbnffiles.mk files along with *.txt RBNF data files
92#
93ICURBNF=rbnf
94
95#  ICUTRNS
96#       The directory that contains trfiles.mk files along with *.txt transliterator files
97#
98ICUTRNS=translit
99
100#  ICUBRK
101#       The directory that contains resfiles.mk files along with *.txt break iterator files
102#
103ICUBRK=brkitr
104
105#  ICUUNIDATA
106#       The directory that contains Unicode data files
107#
108ICUUNIDATA=$(ICUP)\source\data\unidata
109
110
111#  ICUMISC
112#       The directory that contains miscfiles.mk along with files that are miscelleneous data
113#
114ICUMISC=$(ICUP)\source\data\misc
115ICUMISC2=misc
116
117#  ICUSPREP
118#       The directory that contains sprepfiles.mk files along with *.txt stringprep files
119#
120ICUSPREP=sprep
121
122#
123#  ICUDATA
124#     The source directory.  Contains the source files for the common data to be built.
125#     WARNING:  NOT THE SAME AS ICU_DATA environment variable.  Confusing.
126ICUDATA=$(ICUP)\source\data
127
128#
129#  DLL_OUTPUT
130#      Destination directory for the common data DLL file.
131#      This is the same place that all of the other ICU DLLs go (the code-containing DLLs)
132#      The lib file for the data DLL goes in $(DLL_OUTPUT)/../lib/
133#
134!IF "$(CFG)" == "ARM\Release" || "$(CFG)" == "ARM\Debug"
135DLL_OUTPUT=$(ICUP)\binARM$(UWP)
136!ELSE IF "$(CFG)" == "x64\Release" || "$(CFG)" == "x64\Debug"
137DLL_OUTPUT=$(ICUP)\bin64$(UWP)
138!ELSE IF "$(UWP)" == "UWP"
139DLL_OUTPUT=$(ICUP)\bin32$(UWP)
140!ELSE
141DLL_OUTPUT=$(ICUP)\bin$(UWP)
142!ENDIF
143
144#
145#  TESTDATA
146#     The source directory for data needed for test programs.
147TESTDATA=$(ICUP)\source\test\testdata
148
149#
150#   TESTDATAOUT
151#      The destination directory for the built test data .dat file
152TESTDATAOUT=$(ICUP)\source\test\testdata\out
153
154#
155#   TESTDATABLD
156#		The build directory for test data intermidiate files
157#		(Tests are NOT run from this makefile,
158#         only the data is put in place.)
159TESTDATABLD=$(ICUP)\source\test\testdata\out\build
160
161#
162#   ICUTOOLS
163#       Directory under which all of the ICU data building tools live.
164#
165ICUTOOLS=$(ICUP)\source\tools
166!MESSAGE ICU tools path is $(ICUTOOLS)
167
168#
169#  TOOLS CFG PATH
170#      ARM needs to use one of the other tools, so make sure to get an usable cfg path
171#      Since tools, particularly pkggen, have architecture built-in, we made x64 on
172#      Windows be machine-independent and use those tools.
173#
174CFGTOOLS=$(CFG)
175!IF "$(CFG)" == "ARM\Release" || "$(CFG)" == "ARM\Debug"
176CFGTOOLS=x64\Release
177!ENDIF
178!MESSAGE ICU tools CFG subpath is $(CFGTOOLS)
179
180# The current ICU tools need to be in the path first.
181# x86 uses x86, x64 and arm use x64
182!IF "$(CFG)" == "x86\Release" || "$(CFG)" == "x86\Debug"
183PATH = $(ICUP)\bin;$(PATH)
184ICUPBIN=$(ICUP)\bin
185!ELSE
186PATH = $(ICUP)\bin64;$(PATH)
187ICUPBIN=$(ICUP)\bin64
188!ENDIF
189
190
191# This variable can be overridden to "-m static" by the project settings,
192# if you want a static data library.
193!IF "$(ICU_PACKAGE_MODE)"==""
194ICU_PACKAGE_MODE=-m dll
195!ENDIF
196
197# If this archive exists, build from that
198# instead of building everything from scratch.
199ICUDATA_SOURCE_ARCHIVE=$(ICUSRCDATA)\in\$(ICUPKG).dat
200!IF !EXISTS("$(ICUDATA_SOURCE_ARCHIVE)")
201# Does a big endian version exist either?
202ICUDATA_ARCHIVE=$(ICUSRCDATA)\in\$(U_ICUDATA_NAME)b.dat
203!IF EXISTS("$(ICUDATA_ARCHIVE)")
204ICUDATA_SOURCE_ARCHIVE=$(ICUTMP)\$(ICUPKG).dat
205!ELSE
206# Nothing was usable for input
207!UNDEF ICUDATA_SOURCE_ARCHIVE
208!ENDIF
209!ENDIF
210
211!IFDEF ICUDATA_SOURCE_ARCHIVE
212!MESSAGE ICU data source archive is $(ICUDATA_SOURCE_ARCHIVE)
213!ELSE
214# We're including a list of .ucm files.
215# There are several lists, they are all optional.
216
217# Always build the mapping files for the EBCDIC fallback codepages
218# They are necessary on EBCDIC machines, and
219# the following logic is much easier if UCM_SOURCE is never empty.
220# (They are small.)
221UCM_SOURCE=ibm-37_P100-1995.ucm ibm-1047_P100-1995.ucm
222
223!IF EXISTS("$(ICUSRCDATA)\$(ICUUCM)\ucmcore.mk")
224!INCLUDE "$(ICUSRCDATA)\$(ICUUCM)\ucmcore.mk"
225UCM_SOURCE=$(UCM_SOURCE) $(UCM_SOURCE_CORE)
226!ELSE
227!MESSAGE Warning: cannot find "ucmcore.mk". Not building core MIME/Unix/Windows converter files.
228!ENDIF
229
230!IF EXISTS("$(ICUSRCDATA)\$(ICUUCM)\ucmfiles.mk")
231!INCLUDE "$(ICUSRCDATA)\$(ICUUCM)\ucmfiles.mk"
232UCM_SOURCE=$(UCM_SOURCE) $(UCM_SOURCE_FILES)
233!ELSE
234!MESSAGE Warning: cannot find "ucmfiles.mk". Not building many converter files.
235!ENDIF
236
237!IF EXISTS("$(ICUSRCDATA)\$(ICUUCM)\ucmebcdic.mk")
238!INCLUDE "$(ICUSRCDATA)\$(ICUUCM)\ucmebcdic.mk"
239UCM_SOURCE=$(UCM_SOURCE) $(UCM_SOURCE_EBCDIC)
240!IFDEF UCM_SOURCE_EBCDIC_IGNORE_SISO
241BUILD_SPECIAL_CNV_FILES=YES
242UCM_SOURCE_SPECIAL=$(UCM_SOURCE_EBCDIC_IGNORE_SISO)
243!ELSE
244!UNDEF BUILD_SPECIAL_CNV_FILES
245!ENDIF
246!ELSE
247!MESSAGE Warning: cannot find "ucmebcdic.mk". Not building EBCDIC converter files.
248!ENDIF
249
250!IF EXISTS("$(ICUSRCDATA)\$(ICUUCM)\ucmlocal.mk")
251!INCLUDE "$(ICUSRCDATA)\$(ICUUCM)\ucmlocal.mk"
252!IFDEF UCM_SOURCE_LOCAL
253UCM_SOURCE=$(UCM_SOURCE) $(UCM_SOURCE_LOCAL)
254!ENDIF
255!IFDEF UCM_SOURCE_EBCDIC_IGNORE_SISO_LOCAL
256UCM_SOURCE_SPECIAL=$(UCM_SOURCE_SPECIAL) $(UCM_SOURCE_EBCDIC_IGNORE_SISO_LOCAL)
257BUILD_SPECIAL_CNV_FILES=YES
258!ENDIF
259!ELSE
260!MESSAGE Information: cannot find "ucmlocal.mk". Not building user-additional converter files.
261!ENDIF
262
263CNV_FILES=$(UCM_SOURCE:.ucm=.cnv)
264!IFDEF BUILD_SPECIAL_CNV_FILES
265CNV_FILES_SPECIAL=$(UCM_SOURCE_SPECIAL:.ucm=.cnv)
266!ENDIF
267
268!IF EXISTS("$(ICUSRCDATA)\$(ICUBRK)\brkfiles.mk")
269!INCLUDE "$(ICUSRCDATA)\$(ICUBRK)\brkfiles.mk"
270!IF EXISTS("$(ICUSRCDATA)\$(ICUBRK)\brklocal.mk")
271!INCLUDE "$(ICUSRCDATA)\$(ICUBRK)\brklocal.mk"
272!IFDEF BRK_SOURCE_LOCAL
273BRK_SOURCE=$(BRK_SOURCE) $(BRK_SOURCE_LOCAL)
274!ENDIF
275!IFDEF BRK_DICT_SOURCE_LOCAL
276BRK_DICT_SOURCE=$(BRK_DICT_SOURCE) $(BRK_DICT_SOURCE_LOCAL)
277!ENDIF
278!IFDEF BRK_RES_SOURCE_LOCAL
279BRK_RES_SOURCE=$(BRK_RES_SOURCE) $(BRK_RES_SOURCE_LOCAL)
280!ENDIF
281!ELSE
282!MESSAGE Information: cannot find "brklocal.mk". Not building user-additional break iterator files.
283!ENDIF
284!ELSE
285!MESSAGE Warning: cannot find "brkfiles.mk"
286!ENDIF
287
288#
289#  Break iterator data files.
290#
291BRK_FILES=$(ICUBRK)\$(BRK_SOURCE:.txt =.brk brkitr\)
292BRK_FILES=$(BRK_FILES:.txt=.brk)
293BRK_FILES=$(BRK_FILES:brkitr\ =brkitr\)
294
295!IFDEF BRK_DICT_SOURCE
296BRK_DICT_FILES = $(ICUBRK)\$(BRK_DICT_SOURCE:.txt =.dict brkitr\)
297BRK_DICT_FILES = $(BRK_DICT_FILES:.txt=.dict)
298BRK_DICT_FILES = $(BRK_DICT_FILES:brkitr\ =brkitr\)
299!ENDIF
300
301!IFDEF BRK_RES_SOURCE
302BRK_RES_FILES = $(BRK_RES_SOURCE:.txt =.res brkitr\)
303BRK_RES_FILES = $(BRK_RES_FILES:.txt=.res)
304BRK_RES_FILES = $(ICUBRK)\root.res $(ICUBRK)\$(BRK_RES_FILES:brkitr\ =)
305ALL_RES = $(ALL_RES) $(ICUBRK)\res_index.res
306!ENDIF
307
308# Read list of locale resource bundle files
309!IF EXISTS("$(ICUSRCDATA)\$(ICULOC)\resfiles.mk")
310!INCLUDE "$(ICUSRCDATA)\$(ICULOC)\resfiles.mk"
311!IF EXISTS("$(ICUSRCDATA)\$(ICULOC)\reslocal.mk")
312!INCLUDE "$(ICUSRCDATA)\$(ICULOC)\reslocal.mk"
313!IFDEF GENRB_SOURCE_LOCAL
314GENRB_SOURCE=$(GENRB_SOURCE) $(GENRB_SOURCE_LOCAL)
315!ENDIF
316!ELSE
317!MESSAGE Information: cannot find "reslocal.mk". Not building user-additional resource bundle files.
318!ENDIF
319!ELSE
320!MESSAGE Warning: cannot find "resfiles.mk"
321!ENDIF
322
323!IFDEF GENRB_SOURCE
324RB_FILES = root.res pool.res $(GENRB_ALIAS_SOURCE:.txt=.res) $(GENRB_ALIAS_SOURCE_LOCAL:.txt=.res) $(GENRB_SOURCE:.txt=.res)
325ALL_RES = $(ALL_RES) res_index.res
326!ENDIF
327
328
329# Read the list of currency display name resource bundle files
330!IF EXISTS("$(ICUSRCDATA)\curr\resfiles.mk")
331!INCLUDE "$(ICUSRCDATA)\curr\resfiles.mk"
332!IF EXISTS("$(ICUSRCDATA)\curr\reslocal.mk")
333!INCLUDE "$(ICUSRCDATA)\curr\reslocal.mk"
334!IFDEF CURR_SOURCE_LOCAL
335CURR_SOURCE=$(CURR_SOURCE) $(CURR_SOURCE_LOCAL)
336!ENDIF
337!ELSE
338!MESSAGE Information: cannot find "curr\reslocal.mk". Not building user-additional resource bundle files.
339!ENDIF
340!ELSE
341!MESSAGE Warning: cannot find "curr\resfiles.mk"
342!ENDIF
343
344!IFDEF CURR_SOURCE
345CURR_FILES = curr\root.txt supplementalData.txt $(CURR_ALIAS_SOURCE) $(CURR_SOURCE)
346CURR_RES_FILES = $(CURR_FILES:.txt =.res curr\)
347CURR_RES_FILES = $(CURR_RES_FILES:.txt=.res)
348CURR_RES_FILES = curr\pool.res $(CURR_RES_FILES:curr\ =curr\)
349ALL_RES = $(ALL_RES) curr\res_index.res
350!ENDIF
351
352# Read the list of language/script display name resource bundle files
353!IF EXISTS("$(ICUSRCDATA)\lang\resfiles.mk")
354!INCLUDE "$(ICUSRCDATA)\lang\resfiles.mk"
355!IF EXISTS("$(ICUSRCDATA)\lang\reslocal.mk")
356!INCLUDE "$(ICUSRCDATA)\lang\reslocal.mk"
357!IFDEF LANG_SOURCE_LOCAL
358LANG_SOURCE=$(LANG_SOURCE) $(LANG_SOURCE_LOCAL)
359!ENDIF
360!ELSE
361!MESSAGE Information: cannot find "lang\reslocal.mk". Not building user-additional resource bundle files.
362!ENDIF
363!ELSE
364!MESSAGE Warning: cannot find "lang\resfiles.mk"
365!ENDIF
366
367!IFDEF LANG_SOURCE
368LANG_FILES = lang\root.txt $(LANG_ALIAS_SOURCE) $(LANG_SOURCE)
369LANG_RES_FILES = $(LANG_FILES:.txt =.res lang\)
370LANG_RES_FILES = $(LANG_RES_FILES:.txt=.res)
371LANG_RES_FILES = lang\pool.res $(LANG_RES_FILES:lang\ =lang\)
372ALL_RES = $(ALL_RES) lang\res_index.res
373!ENDIF
374
375# Read the list of region display name resource bundle files
376!IF EXISTS("$(ICUSRCDATA)\region\resfiles.mk")
377!INCLUDE "$(ICUSRCDATA)\region\resfiles.mk"
378!IF EXISTS("$(ICUSRCDATA)\region\reslocal.mk")
379!INCLUDE "$(ICUSRCDATA)\region\reslocal.mk"
380!IFDEF REGION_SOURCE_LOCAL
381REGION_SOURCE=$(REGION_SOURCE) $(REGION_SOURCE_LOCAL)
382!ENDIF
383!ELSE
384!MESSAGE Information: cannot find "region\reslocal.mk". Not building user-additional resource bundle files.
385!ENDIF
386!ELSE
387!MESSAGE Warning: cannot find "region\resfiles.mk"
388!ENDIF
389
390!IFDEF REGION_SOURCE
391REGION_FILES = region\root.txt $(REGION_ALIAS_SOURCE) $(REGION_SOURCE)
392REGION_RES_FILES = $(REGION_FILES:.txt =.res region\)
393REGION_RES_FILES = $(REGION_RES_FILES:.txt=.res)
394REGION_RES_FILES = region\pool.res $(REGION_RES_FILES:region\ =region\)
395ALL_RES = $(ALL_RES) region\res_index.res
396!ENDIF
397
398# Read the list of time zone display name resource bundle files
399!IF EXISTS("$(ICUSRCDATA)\zone\resfiles.mk")
400!INCLUDE "$(ICUSRCDATA)\zone\resfiles.mk"
401!IF EXISTS("$(ICUSRCDATA)\zone\reslocal.mk")
402!INCLUDE "$(ICUSRCDATA)\zone\reslocal.mk"
403!IFDEF ZONE_SOURCE_LOCAL
404ZONE_SOURCE=$(ZONE_SOURCE) $(ZONE_SOURCE_LOCAL)
405!ENDIF
406!ELSE
407!MESSAGE Information: cannot find "zone\reslocal.mk". Not building user-additional resource bundle files.
408!ENDIF
409ZONE_SOURCE=$(ZONE_SOURCE) tzdbNames.txt
410!ELSE
411!MESSAGE Warning: cannot find "zone\resfiles.mk"
412!ENDIF
413
414!IFDEF ZONE_SOURCE
415ZONE_FILES = zone\root.txt $(ZONE_ALIAS_SOURCE) $(ZONE_SOURCE)
416ZONE_RES_FILES = $(ZONE_FILES:.txt =.res zone\)
417ZONE_RES_FILES = $(ZONE_RES_FILES:.txt=.res)
418ZONE_RES_FILES = zone\pool.res $(ZONE_RES_FILES:zone\ =zone\)
419ALL_RES = $(ALL_RES) zone\res_index.res
420!ENDIF
421
422# Read the list of units display name resource bundle files
423!IF EXISTS("$(ICUSRCDATA)\unit\resfiles.mk")
424!INCLUDE "$(ICUSRCDATA)\unit\resfiles.mk"
425!IF EXISTS("$(ICUSRCDATA)\unit\reslocal.mk")
426!INCLUDE "$(ICUSRCDATA)\unit\reslocal.mk"
427!IFDEF UNIT_SOURCE_LOCAL
428UNIT_SOURCE=$(UNIT_SOURCE) $(UNIT_SOURCE_LOCAL)
429!ENDIF
430!ELSE
431!MESSAGE Information: cannot find "unit\reslocal.mk". Not building user-additional resource bundle files.
432!ENDIF
433!ELSE
434!MESSAGE Warning: cannot find "unit\resfiles.mk"
435!ENDIF
436
437!IFDEF UNIT_SOURCE
438UNIT_FILES = unit\root.txt $(UNIT_ALIAS_SOURCE) $(UNIT_SOURCE)
439UNIT_RES_FILES = $(UNIT_FILES:.txt =.res unit\)
440UNIT_RES_FILES = $(UNIT_RES_FILES:.txt=.res)
441UNIT_RES_FILES = unit\pool.res $(UNIT_RES_FILES:unit\ =unit\)
442ALL_RES = $(ALL_RES) unit\res_index.res
443!ENDIF
444
445# Read the list of collation resource bundle files
446!IF EXISTS("$(ICUSRCDATA)\$(ICUCOL)\colfiles.mk")
447!INCLUDE "$(ICUSRCDATA)\$(ICUCOL)\colfiles.mk"
448!IF EXISTS("$(ICUSRCDATA)\$(ICUCOL)\collocal.mk")
449!INCLUDE "$(ICUSRCDATA)\$(ICUCOL)\collocal.mk"
450!IFDEF COLLATION_SOURCE_LOCAL
451COLLATION_SOURCE=$(COLLATION_SOURCE) $(COLLATION_SOURCE_LOCAL)
452!ENDIF
453!ELSE
454!MESSAGE Information: cannot find "collocal.mk". Not building user-additional resource bundle files.
455!ENDIF
456!ELSE
457!MESSAGE Warning: cannot find "colfiles.mk"
458!ENDIF
459
460!IFDEF COLLATION_SOURCE
461COL_FILES = $(ICUCOL)\root.txt $(COLLATION_ALIAS_SOURCE) $(COLLATION_SOURCE)
462COL_COL_FILES = $(COL_FILES:.txt =.res coll\)
463COL_COL_FILES = $(COL_COL_FILES:.txt=.res)
464COL_COL_FILES = $(COL_COL_FILES:coll\ =)
465ALL_RES = $(ALL_RES) $(ICUCOL)\res_index.res
466!ENDIF
467
468# Read the list of RBNF resource bundle files
469!IF EXISTS("$(ICUSRCDATA)\$(ICURBNF)\rbnffiles.mk")
470!INCLUDE "$(ICUSRCDATA)\$(ICURBNF)\rbnffiles.mk"
471!IF EXISTS("$(ICUSRCDATA)\$(ICURBNF)\rbnflocal.mk")
472!INCLUDE "$(ICUSRCDATA)\$(ICURBNF)\rbnflocal.mk"
473!IFDEF RBNF_SOURCE_LOCAL
474RBNF_SOURCE=$(RBNF_SOURCE) $(RBNF_SOURCE_LOCAL)
475!ENDIF
476!ELSE
477!MESSAGE Information: cannot find "rbnflocal.mk". Not building user-additional resource bundle files.
478!ENDIF
479!ELSE
480!MESSAGE Warning: cannot find "rbnffiles.mk"
481!ENDIF
482
483!IFDEF RBNF_SOURCE
484RBNF_FILES = $(ICURBNF)\root.txt $(RBNF_ALIAS_SOURCE) $(RBNF_SOURCE)
485RBNF_RES_FILES = $(RBNF_FILES:.txt =.res rbnf\)
486RBNF_RES_FILES = $(RBNF_RES_FILES:.txt=.res)
487RBNF_RES_FILES = $(RBNF_RES_FILES:rbnf\ =rbnf\)
488ALL_RES = $(ALL_RES) $(ICURBNF)\res_index.res
489!ENDIF
490
491# Read the list of transliterator resource bundle files
492!IF EXISTS("$(ICUSRCDATA)\$(ICUTRNS)\trnsfiles.mk")
493!INCLUDE "$(ICUSRCDATA)\$(ICUTRNS)\trnsfiles.mk"
494!IF EXISTS("$(ICUSRCDATA)\$(ICUTRNS)\trnslocal.mk")
495!INCLUDE "$(ICUSRCDATA)\$(ICUTRNS)\trnslocal.mk"
496!IFDEF TRANSLIT_SOURCE_LOCAL
497TRANSLIT_SOURCE=$(TRANSLIT_SOURCE) $(TRANSLIT_SOURCE_LOCAL)
498!ENDIF
499!ELSE
500!MESSAGE Information: cannot find "trnslocal.mk". Not building user-additional transliterator files.
501!ENDIF
502!ELSE
503!MESSAGE Warning: cannot find "trnsfiles.mk"
504!ENDIF
505
506!IFDEF TRANSLIT_SOURCE
507TRANSLIT_FILES = $(ICUTRNS)\$(TRANSLIT_ALIAS_SOURCE) $(TRANSLIT_SOURCE)
508TRANSLIT_RES_FILES = $(TRANSLIT_FILES:.txt =.res translit\)
509TRANSLIT_RES_FILES = $(TRANSLIT_RES_FILES:.txt=.res)
510TRANSLIT_RES_FILES = $(TRANSLIT_RES_FILES:translit\ =translit\)
511#ALL_RES = $(ALL_RES) $(ICUTRNS)\res_index.res
512!ENDIF
513
514# Read the list of miscellaneous resource bundle files
515!IF EXISTS("$(ICUSRCDATA)\$(ICUMISC2)\miscfiles.mk")
516!INCLUDE "$(ICUSRCDATA)\$(ICUMISC2)\miscfiles.mk"
517!IF EXISTS("$(ICUSRCDATA)\$(ICUMISC2)\misclocal.mk")
518!INCLUDE "$(ICUSRCDATA)\$(ICUMISC2)\misclocal.mk"
519!IFDEF MISC_SOURCE_LOCAL
520MISC_SOURCE=$(MISC_SOURCE) $(MISC_SOURCE_LOCAL)
521!ENDIF
522!ELSE
523!MESSAGE Information: cannot find "misclocal.mk". Not building user-additional miscellaenous files.
524!ENDIF
525!ELSE
526!MESSAGE Warning: cannot find "miscfiles.mk"
527!ENDIF
528
529MISC_FILES = $(MISC_SOURCE:.txt=.res)
530
531# don't include COL_FILES
532ALL_RES = $(ALL_RES) $(RB_FILES) $(MISC_FILES)
533!ENDIF
534
535# Read the list of stringprep profile files
536!IF EXISTS("$(ICUSRCDATA)\$(ICUSPREP)\sprepfiles.mk")
537!INCLUDE "$(ICUSRCDATA)\$(ICUSPREP)\sprepfiles.mk"
538!IF EXISTS("$(ICUSRCDATA)\$(ICUSPREP)\spreplocal.mk")
539!INCLUDE "$(ICUSRCDATA)\$(ICUSPREP)\spreplocal.mk"
540!IFDEF SPREP_SOURCE_LOCAL
541SPREP_SOURCE=$(SPREP_SOURCE) $(SPREP_SOURCE_LOCAL)
542!ENDIF
543!ELSE
544!MESSAGE Information: cannot find "spreplocal.mk". Not building user-additional stringprep files.
545!ENDIF
546!ELSE
547!MESSAGE Warning: cannot find "sprepfiles.mk"
548!ENDIF
549
550SPREP_FILES = $(SPREP_SOURCE:.txt=.spp)
551
552# Common defines for both ways of building ICU's data library.
553COMMON_ICUDATA_DEPENDENCIES="$(ICUPBIN)\pkgdata.exe" "$(ICUTMP)\icudata.res" "$(ICUP)\source\stubdata\stubdatabuilt.txt"
554COMMON_ICUDATA_ARGUMENTS=-f -e $(U_ICUDATA_NAME) -v $(ICU_PACKAGE_MODE) -c -p $(ICUPKG) -T "$(ICUTMP)" -L $(U_ICUDATA_NAME) -d "$(ICUBLD_PKG)" -s .
555!IF "$(UWP)" == "UWP"
556COMMON_ICUDATA_ARGUMENTS=$(COMMON_ICUDATA_ARGUMENTS) -u
557!IF "$(CFG)" == "ARM\Release" || "$(CFG)" == "ARM\Debug"
558COMMON_ICUDATA_ARGUMENTS=$(COMMON_ICUDATA_ARGUMENTS) -a
559!ENDIF
560!ENDIF
561
562#############################################################################
563#
564# ALL
565#     This target builds all the data files.  The world starts here.
566#			Note: we really want the common data dll to go to $(DLL_OUTPUT), not $(ICUBLD_PKG).  But specifying
567#				that here seems to cause confusion with the building of the stub library of the same name.
568#				Building the common dll in $(ICUBLD_PKG) unconditionally copies it to $(DLL_OUTPUT) too.
569#
570#############################################################################
571ALL : GODATA "$(ICU_LIB_TARGET)" "$(TESTDATAOUT)\testdata.dat"
572	@echo All targets are up to date
573
574!IF "$(UWP)" == "UWP"
575	@if not exist "$(ICUMAKE)\..\..\commondata\" mkdir "$(ICUMAKE)\..\..\commondata\"
576    copy "$(ICUOUT)\$(U_ICUDATA_NAME)$(U_ICUDATA_ENDIAN_SUFFIX).dat" "$(ICUMAKE)\..\..\commondata\"
577!ENDIF
578
579# The core Unicode properties files (uprops.icu, ucase.icu, ubidi.icu)
580# are hardcoded in the common DLL and therefore not included in the data package any more.
581# They are not built by default but need to be built for ICU4J data and for getting the .c source files
582# when updating the Unicode data.
583# Changed in makedata.mak revision 1.117. See Jitterbug 4497.
584# 2010-dec Removed pnames.icu.
585# Command line:
586#   C:\svn\icuproj\icu\trunk\source\data>nmake -f makedata.mak ICUMAKE=C:\svn\icuproj\icu\trunk\source\data\ CFG=x86\Debug uni-core-data
587uni-core-data: GODATA "$(ICUBLD_PKG)\pnames.icu" "$(ICUBLD_PKG)\uprops.icu" "$(ICUBLD_PKG)\ucase.icu" "$(ICUBLD_PKG)\ubidi.icu" "$(ICUBLD_PKG)\nfc.nrm"
588	@echo Unicode .icu files built to "$(ICUBLD_PKG)"
589
590# Build the ICU4J icudata.jar and testdata.jar.
591# see icu4j-readme.txt
592
593ICU4J_TZDATA="$(ICUOUT)\icu4j\icutzdata.jar"
594ICU4J_DATA_DIRNAME=com\ibm\icu\impl\data\$(U_ICUDATA_NAME)b
595ICU4J_TZDATA_PATHS=$(ICU4J_DATA_DIRNAME)\zoneinfo64.res $(ICU4J_DATA_DIRNAME)\metaZones.res $(ICU4J_DATA_DIRNAME)\timezoneTypes.res $(ICU4J_DATA_DIRNAME)\windowsZones.res
596
597generate-data: GODATA "$(ICUOUT)\$(ICUPKG).dat" uni-core-data
598	if not exist "$(ICUOUT)\icu4j\$(ICU4J_DATA_DIRNAME)" mkdir "$(ICUOUT)\icu4j\$(ICU4J_DATA_DIRNAME)"
599	if not exist "$(ICUOUT)\icu4j\tzdata\$(ICU4J_DATA_DIRNAME)" mkdir "$(ICUOUT)\icu4j\tzdata\$(ICU4J_DATA_DIRNAME)"
600	echo pnames.icu ubidi.icu ucase.icu uprops.icu nfc.nrm > "$(ICUOUT)\icu4j\add.txt"
601	"$(ICUPBIN)\icupkg" "$(ICUOUT)\$(ICUPKG).dat" "$(ICUOUT)\icu4j\$(U_ICUDATA_NAME)b.dat" -a "$(ICUOUT)\icu4j\add.txt" -s "$(ICUBLD_PKG)" -x * -tb -d "$(ICUOUT)\icu4j\$(ICU4J_DATA_DIRNAME)"
602	@for %f in ($(ICU4J_TZDATA_PATHS)) do @move "$(ICUOUT)\icu4j\%f" "$(ICUOUT)\icu4j\tzdata\$(ICU4J_DATA_DIRNAME)"
603
604"$(ICUOUT)\icu4j\icutzdata.jar": GODATA generate-data
605	"$(JAR)" cf "$(ICUOUT)\icu4j\icutzdata.jar" -C "$(ICUOUT)\icu4j\tzdata" "$(ICU4J_DATA_DIRNAME)"
606
607# Build icudata.jar:
608# - add the uni-core-data to the ICU package
609# - swap the ICU data
610# - extract all data items
611# - package them into the .jar file
612"$(ICUOUT)\icu4j\icudata.jar": GODATA generate-data
613	"$(JAR)" cf "$(ICUOUT)\icu4j\icudata.jar" -C "$(ICUOUT)\icu4j" "$(ICU4J_DATA_DIRNAME)"
614
615# Build testdata.jar:
616# - swap the test data
617# - extract all data items
618# - package them into the .jar file
619"$(ICUOUT)\icu4j\testdata.jar": GODATA "$(TESTDATAOUT)\testdata.dat"
620	if not exist "$(ICUOUT)\icu4j\com\ibm\icu\dev\data\testdata" mkdir "$(ICUOUT)\icu4j\com\ibm\icu\dev\data\testdata"
621	"$(ICUPBIN)\icupkg" "$(TESTDATAOUT)\testdata.dat" -r test.icu -x * -tb -d "$(ICUOUT)\icu4j\com\ibm\icu\dev\data\testdata"
622	"$(JAR)" cf "$(ICUOUT)\icu4j\testdata.jar" -C "$(ICUOUT)\icu4j" com\ibm\icu\dev\data\testdata
623
624## Compare to:  source\data\Makefile.in and source\test\testdata\Makefile.in
625
626DEBUGUTILITIESDATA_DIR=main\tests\core\src\com\ibm\icu\dev\test\util
627DEBUGUTILITIESDATA_SRC=DebugUtilitiesData.java
628
629# Build DebugUtilitiesData.java
630"$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)" : {"$(ICUTOOLS)\gentest\$(CFGTOOLS)"}gentest.exe
631	if not exist "$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)" mkdir "$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)"
632	"$(ICUTOOLS)\gentest\$(CFGTOOLS)\gentest" -j -d"$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)"
633
634ICU4J_DATA="$(ICUOUT)\icu4j\icudata.jar" "$(ICUOUT)\icu4j\testdata.jar"  "$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)"
635
636icu4j-data: GODATA $(ICU4J_DATA) $(ICU4J_TZDATA)
637
638!IFDEF ICU4J_ROOT
639
640"$(ICU4J_ROOT)\main\shared\data\icudata.jar": "$(ICUOUT)\icu4j\icudata.jar"
641	if not exist "$(ICU4J_ROOT)\main\shared\data" mkdir "$(ICU4J_ROOT)\main\shared\data"
642	copy "$(ICUOUT)\icu4j\icudata.jar" "$(ICU4J_ROOT)\main\shared\data"
643
644"$(ICU4J_ROOT)\main\shared\data\icutzdata.jar": "$(ICUOUT)\icu4j\icutzdata.jar"
645	if not exist "$(ICU4J_ROOT)\main\shared\data" mkdir "$(ICU4J_ROOT)\main\shared\data"
646	copy "$(ICUOUT)\icu4j\icutzdata.jar" "$(ICU4J_ROOT)\main\shared\data"
647
648"$(ICU4J_ROOT)\main\shared\data\testdata.jar": "$(ICUOUT)\icu4j\testdata.jar"
649	if not exist "$(ICU4J_ROOT)\main\shared\data" mkdir "$(ICU4J_ROOT)\main\shared\data"
650	copy "$(ICUOUT)\icu4j\testdata.jar" "$(ICU4J_ROOT)\main\shared\data"
651
652# "$(DEBUGUTILTIESDATA_OUT)"
653
654"$(ICU4J_ROOT)\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)": "$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)"
655	if not exist "$(ICU4J_ROOT)\$(DEBUGUTILITIESDATA_DIR)" mkdir "$(ICU4J_ROOT)\$(DEBUGUTILITIESDATA_DIR)"
656	copy "$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)" "$(ICU4J_ROOT)\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)"
657
658ICU4J_DATA_INSTALLED="$(ICU4J_ROOT)\main\shared\data\icudata.jar" "$(ICU4J_ROOT)\main\shared\data\icutzdata.jar" "$(ICU4J_ROOT)\main\shared\data\testdata.jar" "$(ICU4J_ROOT)\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)"
659
660icu4j-data-install : GODATA $(ICU4J_DATA) $(ICU4J_TZDATA) $(ICU4J_DATA_INSTALLED)
661	@echo ICU4J  data output to "$(ICU4J_ROOT)"
662
663!ELSE
664
665icu4j-data-install :
666	@echo ERROR ICU4J_ROOT not set
667	@exit 1
668
669!ENDIF
670
671
672
673#
674# testdata - nmake will invoke pkgdata, which will create testdata.dat
675#
676"$(TESTDATAOUT)\testdata.dat": "$(TESTDATA)\*" "$(ICUBLD_PKG)\$(ICUCOL)\ucadata.icu" $(TRANSLIT_RES_FILES) $(MISC_FILES) $(RB_FILES) {"$(ICUTOOLS)\genrb\$(CFGTOOLS)"}genrb.exe
677	@cd "$(TESTDATA)"
678	@echo building testdata...
679	nmake /nologo /f "$(TESTDATA)\testdata.mak" TESTDATA=. ICUTOOLS="$(ICUTOOLS)" ICUPBIN="$(ICUPBIN)" ICUP="$(ICUP)" CFG=$(CFGTOOLS) TESTDATAOUT="$(TESTDATAOUT)" TESTDATABLD="$(TESTDATABLD)"
680
681#invoke pkgdata for ICU common data
682#  pkgdata will drop all output files (.dat, .dll, .lib) into the target (ICUBLD_PKG) directory.
683#  move the .dll and .lib files to their final destination afterwards.
684#  The $(U_ICUDATA_NAME).lib and $(U_ICUDATA_NAME).exp should already be in the right place due to stubdata.
685#
686#  2005-may-05 Removed Unicode properties files (unorm.icu, uprops.icu, ucase.icu, ubidi.icu)
687#  from data build. See Jitterbug 4497. (makedata.mak revision 1.117)
688#
689!IFDEF ICUDATA_SOURCE_ARCHIVE
690"$(ICU_LIB_TARGET)" : $(COMMON_ICUDATA_DEPENDENCIES) "$(ICUDATA_SOURCE_ARCHIVE)"
691	@echo Building icu data from $(ICUDATA_SOURCE_ARCHIVE)
692	cd "$(ICUBLD_PKG)"
693	"$(ICUPBIN)\icupkg" -x * --list "$(ICUDATA_SOURCE_ARCHIVE)" > "$(ICUTMP)\icudata.lst"
694	"$(ICUPBIN)\pkgdata" $(COMMON_ICUDATA_ARGUMENTS) "$(ICUTMP)\icudata.lst"
695	copy "$(U_ICUDATA_NAME).dll" "$(DLL_OUTPUT)"
696	-@erase "$(U_ICUDATA_NAME).dll"
697	copy "$(ICUTMP)\$(ICUPKG).dat" "$(ICUOUT)\$(U_ICUDATA_NAME)$(U_ICUDATA_ENDIAN_SUFFIX).dat"
698	-@erase "$(ICUTMP)\$(ICUPKG).dat"
699!ELSE
700"$(ICU_LIB_TARGET)" : $(COMMON_ICUDATA_DEPENDENCIES) $(CNV_FILES) $(CNV_FILES_SPECIAL) "$(ICUBLD_PKG)\unames.icu" "$(ICUBLD_PKG)\cnvalias.icu" "$(ICUBLD_PKG)\nfkc.nrm" "$(ICUBLD_PKG)\nfkc_cf.nrm" "$(ICUBLD_PKG)\uts46.nrm" "$(ICUBLD_PKG)\$(ICUCOL)\ucadata.icu"  $(CURR_RES_FILES) $(LANG_RES_FILES) $(REGION_RES_FILES) $(ZONE_RES_FILES) $(UNIT_RES_FILES) $(BRK_FILES) $(BRK_DICT_FILES) $(BRK_RES_FILES) $(ALL_RES) $(COL_COL_FILES) $(RBNF_RES_FILES) $(TRANSLIT_RES_FILES) $(SPREP_FILES) "$(ICUBLD_PKG)\confusables.cfu"
701	@echo Building icu data
702	cd "$(ICUBLD_PKG)"
703	"$(ICUPBIN)\pkgdata" $(COMMON_ICUDATA_ARGUMENTS) <<"$(ICUTMP)\icudata.lst"
704unames.icu
705confusables.cfu
706$(ICUCOL)\ucadata.icu
707cnvalias.icu
708nfkc.nrm
709nfkc_cf.nrm
710uts46.nrm
711$(CNV_FILES:.cnv =.cnv
712)
713$(CNV_FILES_SPECIAL:.cnv =.cnv
714)
715$(ALL_RES:.res =.res
716)
717$(CURR_RES_FILES:.res =.res
718)
719$(LANG_RES_FILES:.res =.res
720)
721$(REGION_RES_FILES:.res =.res
722)
723$(ZONE_RES_FILES:.res =.res
724)
725$(UNIT_RES_FILES:.res =.res
726)
727$(COL_COL_FILES:.res =.res
728)
729$(RBNF_RES_FILES:.res =.res
730)
731$(TRANSLIT_RES_FILES:.res =.res
732)
733$(BRK_FILES:.brk =.brk
734)
735$(BRK_DICT_FILES:.dict =.dict
736)
737$(BRK_RES_FILES:.res =.res
738)
739$(SPREP_FILES:.spp=.spp
740)
741<<KEEP
742	-@erase "$(ICU_LIB_TARGET)"
743    @if not exist "$(DLL_OUTPUT)" mkdir "$(DLL_OUTPUT)"
744	copy "$(U_ICUDATA_NAME).dll" "$(ICU_LIB_TARGET)"
745	-@erase "$(U_ICUDATA_NAME).dll"
746	copy "$(ICUTMP)\$(ICUPKG).dat" "$(ICUOUT)\$(U_ICUDATA_NAME)$(U_ICUDATA_ENDIAN_SUFFIX).dat"
747	-@erase "$(ICUTMP)\$(ICUPKG).dat"
748!ENDIF
749
750# utility target to create missing directories
751CREATE_DIRS :
752	@if not exist "$(ICUOUT)\$(NULL)" mkdir "$(ICUOUT)"
753	@if not exist "$(ICUTMP)\$(NULL)" mkdir "$(ICUTMP)"
754	@if not exist "$(ICUOUT)\build\$(NULL)" mkdir "$(ICUOUT)\build"
755	@if not exist "$(ICUBLD_PKG)\$(NULL)" mkdir "$(ICUBLD_PKG)"
756	@if not exist "$(ICUBLD_PKG)\curr\$(NULL)" mkdir "$(ICUBLD_PKG)\curr"
757	@if not exist "$(ICUBLD_PKG)\lang\$(NULL)" mkdir "$(ICUBLD_PKG)\lang"
758	@if not exist "$(ICUBLD_PKG)\region\$(NULL)" mkdir "$(ICUBLD_PKG)\region"
759	@if not exist "$(ICUBLD_PKG)\zone\$(NULL)" mkdir "$(ICUBLD_PKG)\zone"
760	@if not exist "$(ICUBLD_PKG)\$(ICUBRK)\$(NULL)" mkdir "$(ICUBLD_PKG)\$(ICUBRK)"
761	@if not exist "$(ICUBLD_PKG)\$(ICUCOL)\$(NULL)" mkdir "$(ICUBLD_PKG)\$(ICUCOL)"
762	@if not exist "$(ICUBLD_PKG)\$(ICURBNF)\$(NULL)" mkdir "$(ICUBLD_PKG)\$(ICURBNF)"
763	@if not exist "$(ICUBLD_PKG)\$(ICUTRNS)\$(NULL)" mkdir "$(ICUBLD_PKG)\$(ICUTRNS)"
764	@if not exist "$(TESTDATAOUT)\$(NULL)" mkdir "$(TESTDATAOUT)"
765	@if not exist "$(TESTDATABLD)\$(NULL)" mkdir "$(TESTDATABLD)"
766	@if not exist "$(TESTDATAOUT)\testdata\$(NULL)" mkdir "$(TESTDATAOUT)\testdata"
767
768# utility target to send us to the right dir
769GODATA : CREATE_DIRS
770	@cd "$(ICUBLD_PKG)"
771
772# This is to remove all the data files
773CLEAN : GODATA
774	@echo Cleaning up the data files.
775	@cd "$(ICUBLD_PKG)"
776	-@erase "*.cnv"
777	-@erase "*.exp"
778	-@erase "*.icu"
779	-@erase "*.lib"
780	-@erase "*.nrm"
781	-@erase "*.res"
782	-@erase "*.spp"
783	-@erase "*.txt"
784	-@erase "*.cfu"
785	-@erase "curr\*.res"
786	-@erase "curr\*.txt"
787	-@erase "lang\*.res"
788	-@erase "lang\*.txt"
789	-@erase "region\*.res"
790	-@erase "region\*.txt"
791	-@erase "zone\*.res"
792	-@erase "zone\*.txt"
793	@cd "$(ICUBLD_PKG)\$(ICUBRK)"
794	-@erase "*.brk"
795	-@erase "*.res"
796	-@erase "*.txt"
797	-@erase "*.dict"
798	@cd "$(ICUBLD_PKG)\$(ICUCOL)"
799	-@erase "*.res"
800	-@erase "*.txt"
801	@cd "$(ICUBLD_PKG)\$(ICURBNF)"
802	-@erase "*.res"
803	-@erase "*.txt"
804	@cd "$(ICUBLD_PKG)\$(ICUTRNS)"
805	-@erase "*.res"
806	@cd "$(ICUOUT)"
807	-@erase "*.dat"
808	@cd "$(ICUTMP)"
809	-@erase "*.html"
810	-@erase "*.lst"
811	-@erase "*.mak"
812	-@erase "*.obj"
813	-@erase "*.res"
814	@cd "$(TESTDATABLD)"
815	-@erase "*.cnv"
816	-@erase "*.icu"
817	-@erase "*.mak"
818	-@erase "*.nrm"
819	-@erase "*.res"
820	-@erase "*.spp"
821	-@erase "*.txt"
822	@cd "$(TESTDATAOUT)"
823	-@erase "*.dat"
824	@cd "$(TESTDATAOUT)\testdata"
825	-@erase "*.typ"
826	@cd "$(ICUBLD_PKG)"
827
828
829# RBBI .brk file generation.
830{$(ICUSRCDATA_RELATIVE_PATH)\$(ICUBRK)\rules}.txt.brk:
831	@echo Creating $@
832	@"$(ICUTOOLS)\genbrk\$(CFGTOOLS)\genbrk" -c -r $< -o $@ -d"$(ICUBLD_PKG)" -i "$(ICUBLD_PKG)"
833
834#RBBI .dict file generation.
835{$(ICUSRCDATA_RELATIVE_PATH)\$(ICUBRK)\dictionaries}.txt.dict:
836    @echo Creating $@
837    @"$(ICUTOOLS)\gendict\$(CFGTOOLS)\gendict" -c --uchars $<  "$(ICUBLD_PKG)\$@"
838
839$(ICUBRK)\thaidict.dict:
840	@echo Creating $(ICUBRK)\thaidict.dict
841	@"$(ICUTOOLS)\gendict\$(CFGTOOLS)\gendict" -c --bytes --transform offset-0x0e00 $(ICUSRCDATA_RELATIVE_PATH)\$(ICUBRK)\dictionaries\thaidict.txt "$(ICUBLD_PKG)\$(ICUBRK)\thaidict.dict"
842
843$(ICUBRK)\laodict.dict:
844	@echo Creating $(ICUBRK)\laodict.dict
845	@"$(ICUTOOLS)\gendict\$(CFGTOOLS)\gendict" -c --bytes --transform offset-0x0e80 $(ICUSRCDATA_RELATIVE_PATH)\$(ICUBRK)\dictionaries\laodict.txt "$(ICUBLD_PKG)\$(ICUBRK)\laodict.dict"
846
847$(ICUBRK)\burmesedict.dict:
848	@echo Creating $(ICUBRK)\burmesedict.dict
849	@"$(ICUTOOLS)\gendict\$(CFGTOOLS)\gendict" -c --bytes --transform offset-0x1000 $(ICUSRCDATA_RELATIVE_PATH)\$(ICUBRK)\dictionaries\burmesedict.txt "$(ICUBLD_PKG)\$(ICUBRK)\burmesedict.dict"
850
851$(ICUBRK)\khmerdict.dict:
852	@echo Creating $(ICUBRK)\khmerdict.dict
853	@"$(ICUTOOLS)\gendict\$(CFGTOOLS)\gendict" -c --bytes --transform offset-0x1780 $(ICUSRCDATA_RELATIVE_PATH)\$(ICUBRK)\dictionaries\khmerdict.txt "$(ICUBLD_PKG)\$(ICUBRK)\khmerdict.dict"
854
855!IFNDEF ICUDATA_SOURCE_ARCHIVE
856# Rule for creating converters
857$(CNV_FILES): $(UCM_SOURCE)
858	@echo Building Charset Conversion table $(@B)
859	@"$(ICUTOOLS)\makeconv\$(CFGTOOLS)\makeconv" -c -d"$(ICUBLD_PKG)" $(ICUSRCDATA_RELATIVE_PATH)\$(ICUUCM)\$(@B).ucm
860!ENDIF
861
862!IFDEF BUILD_SPECIAL_CNV_FILES
863$(CNV_FILES_SPECIAL): $(UCM_SOURCE_SPECIAL)
864	@echo Building Special Charset Conversion table $(@B)
865	@"$(ICUTOOLS)\makeconv\$(CFGTOOLS)\makeconv" -c --ignore-siso-check -d"$(ICUBLD_PKG)" $(ICUSRCDATA_RELATIVE_PATH)\$(ICUUCM)\$(@B).ucm
866!ENDIF
867
868# Batch inference rule for creating miscellaneous resource files
869# TODO: -q option is specified to squelch the 120+ warnings about
870#       empty intvectors and binary elements.  Unfortunately, this may
871#       squelch other legitimate warnings.  When there is a better
872#       way, remove the -q.
873{$(ICUSRCDATA_RELATIVE_PATH)\$(ICUMISC2)}.txt.res::
874	@echo Making Miscellaneous Resource Bundle files
875	@"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -q -d"$(ICUBLD_PKG)" $<
876
877# Inference rule for creating resource bundle files
878{$(ICUSRCDATA_RELATIVE_PATH)\$(ICULOC)}.txt.res::
879	@echo Making Locale Resource Bundle files
880	@"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" --usePoolBundle $(ICUSRCDATA_RELATIVE_PATH)\$(ICULOC) -k -d"$(ICUBLD_PKG)" $<
881
882# copy the locales/pool.res file from the source folder to the build output folder
883# and swap it to native endianness
884pool.res: $(ICUSRCDATA_RELATIVE_PATH)\$(ICULOC)\pool.res
885	"$(ICUPBIN)\icupkg" -tl "$(ICUSRCDATA_RELATIVE_PATH)\$(ICULOC)\pool.res" pool.res
886
887res_index.res:
888	@echo Generating <<res_index.txt
889// Warning this file is automatically generated
890res_index:table(nofallback) {
891    InstalledLocales {
892        $(GENRB_SOURCE:.txt= {""}
893       )
894    }
895}
896<<KEEP
897	@"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -d"$(ICUBLD_PKG)" .\res_index.txt
898
899
900{$(ICUSRCDATA_RELATIVE_PATH)\curr}.txt{curr}.res::
901	@echo Making currency display name files
902	@"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" --usePoolBundle $(ICUSRCDATA_RELATIVE_PATH)\curr -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\curr" $<
903
904# copy the curr/pool.res file from the source folder to the build output folder
905# and swap it to native endianness
906curr\pool.res: $(ICUSRCDATA_RELATIVE_PATH)\curr\pool.res
907	"$(ICUPBIN)\icupkg" -tl "$(ICUSRCDATA_RELATIVE_PATH)\curr\pool.res" curr\pool.res
908
909curr\res_index.res:
910	@echo Generating <<curr\res_index.txt
911// Warning this file is automatically generated
912res_index:table(nofallback) {
913    InstalledLocales {
914        $(CURR_SOURCE:.txt= {""}
915       )
916    }
917}
918<<KEEP
919	@"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -d"$(ICUBLD_PKG)\curr" .\curr\res_index.txt
920
921
922{$(ICUSRCDATA_RELATIVE_PATH)\lang}.txt{lang}.res::
923	@echo Making language/script display name files
924	@"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" --usePoolBundle $(ICUSRCDATA_RELATIVE_PATH)\lang -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\lang" $<
925
926# copy the lang/pool.res file from the source folder to the build output folder
927# and swap it to native endianness
928lang\pool.res: $(ICUSRCDATA_RELATIVE_PATH)\lang\pool.res
929	"$(ICUPBIN)\icupkg" -tl "$(ICUSRCDATA_RELATIVE_PATH)\lang\pool.res" lang\pool.res
930
931lang\res_index.res:
932	@echo Generating <<lang\res_index.txt
933// Warning this file is automatically generated
934res_index:table(nofallback) {
935    InstalledLocales {
936        $(LANG_SOURCE:.txt= {""}
937       )
938    }
939}
940<<KEEP
941	@"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -d"$(ICUBLD_PKG)\lang" .\lang\res_index.txt
942
943
944{$(ICUSRCDATA_RELATIVE_PATH)\region}.txt{region}.res::
945	@echo Making region display name files
946	@"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" --usePoolBundle $(ICUSRCDATA_RELATIVE_PATH)\region -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\region" $<
947
948# copy the region/pool.res file from the source folder to the build output folder
949# and swap it to native endianness
950region\pool.res: $(ICUSRCDATA_RELATIVE_PATH)\region\pool.res
951	"$(ICUPBIN)\icupkg" -tl "$(ICUSRCDATA_RELATIVE_PATH)\region\pool.res" region\pool.res
952
953region\res_index.res:
954	@echo Generating <<region\res_index.txt
955// Warning this file is automatically generated
956res_index:table(nofallback) {
957    InstalledLocales {
958        $(REGION_SOURCE:.txt= {""}
959       )
960    }
961}
962<<KEEP
963	@"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -d"$(ICUBLD_PKG)\region" .\region\res_index.txt
964
965
966{$(ICUSRCDATA_RELATIVE_PATH)\zone}.txt{zone}.res::
967	@echo Making time zone display name files
968	@"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" --usePoolBundle $(ICUSRCDATA_RELATIVE_PATH)\zone -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\zone" $<
969
970# copy the zone/pool.res file from the source folder to the build output folder
971# and swap it to native endianness
972zone\pool.res: $(ICUSRCDATA_RELATIVE_PATH)\zone\pool.res
973	"$(ICUPBIN)\icupkg" -tl "$(ICUSRCDATA_RELATIVE_PATH)\zone\pool.res" zone\pool.res
974
975zone\res_index.res:
976	@echo Generating <<zone\res_index.txt
977// Warning this file is automatically generated
978res_index:table(nofallback) {
979    InstalledLocales {
980        $(ZONE_SOURCE:.txt= {""}
981       )
982    }
983}
984<<KEEP
985	@"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -d"$(ICUBLD_PKG)\zone" .\zone\res_index.txt
986
987
988{$(ICUSRCDATA_RELATIVE_PATH)\unit}.txt{unit}.res::
989	@echo Making unit display name files
990	@"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" --usePoolBundle $(ICUSRCDATA_RELATIVE_PATH)\unit -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\unit" $<
991
992# copy the unit/pool.res file from the source folder to the build output folder
993# and swap it to native endianness
994unit\pool.res: $(ICUSRCDATA_RELATIVE_PATH)\unit\pool.res
995	"$(ICUPBIN)\icupkg" -tl "$(ICUSRCDATA_RELATIVE_PATH)\unit\pool.res" unit\pool.res
996
997unit\res_index.res:
998	@echo Generating <<unit\res_index.txt
999// Warning this file is automatically generated
1000res_index:table(nofallback) {
1001    InstalledLocales {
1002        $(UNIT_SOURCE:.txt= {""}
1003       )
1004    }
1005}
1006<<KEEP
1007	@"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -d"$(ICUBLD_PKG)\unit" .\unit\res_index.txt
1008
1009
1010{$(ICUSRCDATA_RELATIVE_PATH)\$(ICUCOL)}.txt{$(ICUCOL)}.res::
1011	@echo Making Collation files
1012	@"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\$(ICUCOL)" $<
1013
1014$(ICUCOL)\res_index.res:
1015	@echo Generating <<$(ICUCOL)\res_index.txt
1016// Warning this file is automatically generated
1017res_index:table(nofallback) {
1018    InstalledLocales {
1019        $(COLLATION_SOURCE:.txt= {""}
1020       )
1021    }
1022}
1023<<KEEP
1024	@"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -d"$(ICUBLD_PKG)\$(ICUCOL)" .\$(ICUCOL)\res_index.txt
1025
1026{$(ICUSRCDATA_RELATIVE_PATH)\$(ICURBNF)}.txt{$(ICURBNF)}.res::
1027	@echo Making RBNF files
1028	@"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\$(ICURBNF)" $<
1029
1030$(ICURBNF)\res_index.res:
1031	@echo Generating <<$(ICURBNF)\res_index.txt
1032// Warning this file is automatically generated
1033res_index:table(nofallback) {
1034    InstalledLocales {
1035        $(RBNF_SOURCE:.txt= {""}
1036       )
1037    }
1038}
1039<<KEEP
1040	@"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -d"$(ICUBLD_PKG)\$(ICURBNF)" .\$(ICURBNF)\res_index.txt
1041
1042$(ICUBRK)\res_index.res:
1043	@echo Generating <<$(ICUBRK)\res_index.txt
1044// Warning this file is automatically generated
1045res_index:table(nofallback) {
1046    InstalledLocales {
1047        $(BRK_RES_SOURCE:.txt= {""}
1048       )
1049    }
1050}
1051<<KEEP
1052	@"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -d"$(ICUBLD_PKG)\$(ICUBRK)" .\$(ICUBRK)\res_index.txt
1053
1054{$(ICUSRCDATA_RELATIVE_PATH)\$(ICUBRK)}.txt{$(ICUBRK)}.res::
1055	@echo Making Break Iterator Resource files
1056	@"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\$(ICUBRK)" $<
1057
1058{$(ICUSRCDATA_RELATIVE_PATH)\$(ICUTRNS)}.txt{$(ICUTRNS)}.res::
1059	@echo Making Transliterator files
1060	@"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\$(ICUTRNS)" $<
1061
1062
1063# DLL version information
1064# If you modify this, modify winmode.c in pkgdata.
1065"$(ICUTMP)\icudata.res": "$(ICUMISC)\icudata.rc"
1066	@echo Creating data DLL version information from $**
1067	@rc.exe /i "..\..\..\..\common" /r /fo $@ $**
1068
1069# Targets for converters
1070"$(ICUBLD_PKG)\cnvalias.icu" : {"$(ICUSRCDATA)\$(ICUUCM)"}\convrtrs.txt "$(ICUTOOLS)\gencnval\$(CFGTOOLS)\gencnval.exe"
1071	@echo Creating data file for Converter Aliases
1072	@"$(ICUTOOLS)\gencnval\$(CFGTOOLS)\gencnval" -d "$(ICUBLD_PKG)" "$(ICUSRCDATA)\$(ICUUCM)\convrtrs.txt"
1073
1074# Targets for prebuilt Unicode data
1075"$(ICUBLD_PKG)\pnames.icu": $(ICUSRCDATA_RELATIVE_PATH)\in\pnames.icu
1076	"$(ICUPBIN)\icupkg" -tl $? $@
1077
1078"$(ICUBLD_PKG)\ubidi.icu": $(ICUSRCDATA_RELATIVE_PATH)\in\ubidi.icu
1079	"$(ICUPBIN)\icupkg" -tl $? $@
1080
1081"$(ICUBLD_PKG)\ucase.icu": $(ICUSRCDATA_RELATIVE_PATH)\in\ucase.icu
1082	"$(ICUPBIN)\icupkg" -tl $? $@
1083
1084"$(ICUBLD_PKG)\uprops.icu": $(ICUSRCDATA_RELATIVE_PATH)\in\uprops.icu
1085	"$(ICUPBIN)\icupkg" -tl $? $@
1086
1087"$(ICUBLD_PKG)\unames.icu": $(ICUSRCDATA_RELATIVE_PATH)\in\unames.icu
1088	"$(ICUPBIN)\icupkg" -tl $? $@
1089
1090"$(ICUBLD_PKG)\nfc.nrm": $(ICUSRCDATA_RELATIVE_PATH)\in\nfc.nrm
1091	"$(ICUPBIN)\icupkg" -tl $? $@
1092
1093"$(ICUBLD_PKG)\nfkc.nrm": $(ICUSRCDATA_RELATIVE_PATH)\in\nfkc.nrm
1094	"$(ICUPBIN)\icupkg" -tl $? $@
1095
1096"$(ICUBLD_PKG)\nfkc_cf.nrm": $(ICUSRCDATA_RELATIVE_PATH)\in\nfkc_cf.nrm
1097	"$(ICUPBIN)\icupkg" -tl $? $@
1098
1099"$(ICUBLD_PKG)\uts46.nrm": $(ICUSRCDATA_RELATIVE_PATH)\in\uts46.nrm
1100	"$(ICUPBIN)\icupkg" -tl $? $@
1101
1102"$(ICUBLD_PKG)\coll\ucadata.icu": $(ICUSRCDATA_RELATIVE_PATH)\in\coll\ucadata-unihan.icu
1103	"$(ICUPBIN)\icupkg" -tl $? $@
1104
1105# Stringprep .spp file generation.
1106{$(ICUSRCDATA_RELATIVE_PATH)\$(ICUSPREP)}.txt.spp:
1107	@echo Creating $@
1108	@"$(ICUTOOLS)\gensprep\$(CFGTOOLS)\gensprep" -s $(<D) -d "$(ICUBLD_PKG)" -b $(@B) -m "$(ICUUNIDATA)" -u 3.2.0 $(<F)
1109
1110# Confusables .cfu file generation
1111#     Can't use an inference rule because two .txt source files combine to produce a single .cfu output file
1112"$(ICUBLD_PKG)\confusables.cfu": "$(ICUUNIDATA)\confusables.txt" "$(ICUUNIDATA)\confusablesWholeScript.txt" "$(ICUTOOLS)\gencfu\$(CFGTOOLS)\gencfu.exe"
1113	@echo Creating $@
1114	@"$(ICUTOOLS)\gencfu\$(CFGTOOLS)\gencfu" -c -r "$(ICUUNIDATA)\confusables.txt" -w "$(ICUUNIDATA)\confusablesWholeScript.txt" -o $@ -i "$(ICUBLD_PKG)"
1115
1116!IFDEF ICUDATA_ARCHIVE
1117"$(ICUDATA_SOURCE_ARCHIVE)": CREATE_DIRS $(ICUDATA_ARCHIVE) "$(ICUTOOLS)\icupkg\$(CFGTOOLS)\icupkg.exe"
1118	"$(ICUTOOLS)\icupkg\$(CFGTOOLS)\icupkg" -t$(U_ICUDATA_ENDIAN_SUFFIX) "$(ICUDATA_ARCHIVE)" "$(ICUDATA_SOURCE_ARCHIVE)"
1119!ENDIF
1120
1121# Dependencies on the tools for the batch inference rules
1122
1123!IFNDEF ICUDATA_SOURCE_ARCHIVE
1124$(UCM_SOURCE) : {"$(ICUTOOLS)\makeconv\$(CFGTOOLS)"}makeconv.exe
1125
1126!IFDEF BUILD_SPECIAL_CNV_FILES
1127$(UCM_SOURCE_SPECIAL): {"$(ICUTOOLS)\makeconv\$(CFGTOOLS)"}makeconv.exe
1128!ENDIF
1129
1130# This used to depend on "$(ICUBLD_PKG)\uprops.icu" "$(ICUBLD_PKG)\ucase.icu" "$(ICUBLD_PKG)\ubidi.icu"
1131# This data is now hard coded as a part of the library.
1132# See Jitterbug 4497 for details.
1133$(MISC_SOURCE) $(RB_FILES) $(CURR_FILES) $(LANG_FILES) $(REGION_FILES) $(ZONE_FILES) $(UNIT_FILES) $(COL_COL_FILES) $(RBNF_RES_FILES) $(BRK_RES_FILES) $(TRANSLIT_RES_FILES): {"$(ICUTOOLS)\genrb\$(CFGTOOLS)"}genrb.exe "$(ICUBLD_PKG)\$(ICUCOL)\ucadata.icu"
1134
1135# This used to depend on "$(ICUBLD_PKG)\pnames.icu" "$(ICUBLD_PKG)\uprops.icu" "$(ICUBLD_PKG)\ucase.icu" "$(ICUBLD_PKG)\ubidi.icu"
1136# These are now hardcoded in ICU4C and only loaded in ICU4J.
1137$(BRK_SOURCE) : "$(ICUBLD_PKG)\unames.icu"
1138!ENDIF
1139