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