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