]>
Commit | Line | Data |
---|---|---|
b75a7d8f | 1 | ## Makefile.in for ICU data |
f3c0d7a5 A |
2 | ## Copyright (C) 2016 and later: Unicode, Inc. and others. |
3 | ## License & terms of use: http://www.unicode.org/copyright.html | |
b331163b | 4 | ## Copyright (c) 1999-2015, International Business Machines Corporation and |
b75a7d8f A |
5 | ## others. All Rights Reserved. |
6 | ||
7 | ## Source directory information | |
8 | srcdir = @srcdir@ | |
9 | top_srcdir = @top_srcdir@ | |
10 | ||
11 | # So that you have $(top_builddir)/config.status | |
12 | top_builddir = .. | |
13 | ||
14 | ## All the flags and other definitions are included here. | |
15 | include $(top_builddir)/icudefs.mk | |
16 | ||
17 | ## Build directory information | |
18 | # So that $(top_builddir)/$(subdir) ~= "here" | |
19 | subdir = data | |
20 | ||
21 | #lib icu data for link | |
374ca955 A |
22 | LIB_ICUDATA_NAME=$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX) |
23 | LIB_STATIC_ICUDATA_NAME=$(LIBSICU)$(DATA_STUBNAME)$(ICULIBSUFFIX) | |
b75a7d8f | 24 | |
374ca955 A |
25 | # Allow Windows to override these options |
26 | ifeq ($(PKGDATA_OPTS),) | |
27 | PKGDATA_OPTS = -O $(top_builddir)/data/icupkg.inc | |
28 | endif | |
29 | ifeq ($(PKGDATA_VERSIONING),) | |
30 | PKGDATA_VERSIONING = -r $(SO_TARGET_VERSION) | |
31 | endif | |
32 | ||
33 | # This allows all the data to be in one directory | |
34 | ifeq ($(PKGDATA_MODE),dll) | |
35 | ICUPKGDATA_OUTDIR = $(LIBDIR) | |
36 | else | |
729e4ab9 A |
37 | ifeq ($(PKGDATA_MODE),static) |
38 | ICUPKGDATA_OUTDIR = $(LIBDIR) | |
39 | else | |
374ca955 A |
40 | ICUPKGDATA_OUTDIR = $(OUTDIR) |
41 | endif | |
729e4ab9 | 42 | endif |
b75a7d8f | 43 | |
374ca955 | 44 | CURDIR:=$(CURR_FULL_DIR) |
729e4ab9 A |
45 | # current directory should not be blank |
46 | ifeq ($(CURDIR),) | |
47 | CURDIR=. | |
48 | endif | |
57a6839d A |
49 | ifeq ($(OS390BATCH),1) |
50 | PKGDATA = $(TOOLBINDIR)/pkgdata $(PKGDATA_OPTS) -z -q -c -s $(CURDIR)/out/build/$(ICUDATA_PLATFORM_NAME) -d $(ICUPKGDATA_OUTDIR) | |
51 | else | |
729e4ab9 | 52 | PKGDATA = $(TOOLBINDIR)/pkgdata $(PKGDATA_OPTS) -q -c -s $(CURDIR)/out/build/$(ICUDATA_PLATFORM_NAME) -d $(ICUPKGDATA_OUTDIR) |
57a6839d | 53 | endif |
4388f060 | 54 | OS390_PDS_NAME = -z -L $(BATCH_STUB_TARGET) |
374ca955 | 55 | |
73c04bcf A |
56 | ifeq ($(OS390_STUBDATA),1) |
57 | OS390PKG=package390 | |
58 | OS390INSTALL=install390 | |
59 | ||
60 | # Additional data for 390 | |
61 | OS390LIST=$(OUTTMPDIR)/icudata390.lst | |
62 | OUTTMPDIR_390STUB=$(top_builddir)/data/out/tmp_390stub | |
63 | endif | |
b75a7d8f | 64 | |
51004dcb A |
65 | ifeq ($(OS390BATCH),1) |
66 | CPPFLAGS += -Wc,'ros,roc' | |
67 | endif | |
68 | ||
b75a7d8f A |
69 | # OBJDATADIR must be a short path (with ..'s) to the data. |
70 | ||
374ca955 A |
71 | ifeq ($(top_srcdir),..) |
72 | SRCDATADIR=. | |
73 | else | |
b75a7d8f | 74 | SRCDATADIR=$(top_srcdir)/data |
374ca955 A |
75 | endif |
76 | ifeq ($(top_builddir),..) | |
77 | OUTDIR=./out | |
78 | else | |
b75a7d8f | 79 | OUTDIR=$(top_builddir)/data/out |
374ca955 A |
80 | endif |
81 | ||
82 | OUTTMPDIR=$(OUTDIR)/tmp | |
73c04bcf A |
83 | MAINBUILDDIR=$(OUTDIR)/build |
84 | BUILDDIR=$(MAINBUILDDIR)/$(ICUDATA_PLATFORM_NAME) | |
b75a7d8f A |
85 | UNICODEDATADIR=$(SRCDATADIR)/unidata |
86 | LOCSRCDIR=$(SRCDATADIR)/locales | |
729e4ab9 A |
87 | CURRSRCDIR=$(SRCDATADIR)/curr |
88 | CURRBLDDIR=$(BUILDDIR)/curr | |
89 | LANGSRCDIR=$(SRCDATADIR)/lang | |
90 | LANGBLDDIR=$(BUILDDIR)/lang | |
91 | REGIONSRCDIR=$(SRCDATADIR)/region | |
92 | REGIONBLDDIR=$(BUILDDIR)/region | |
93 | ZONESRCDIR=$(SRCDATADIR)/zone | |
94 | ZONEBLDDIR=$(BUILDDIR)/zone | |
b331163b A |
95 | UNITSRCDIR=$(SRCDATADIR)/unit |
96 | UNITBLDDIR=$(BUILDDIR)/unit | |
374ca955 A |
97 | COLSRCDIR=$(SRCDATADIR)/coll |
98 | COLBLDDIR=$(BUILDDIR)/coll | |
99 | RBNFSRCDIR=$(SRCDATADIR)/rbnf | |
100 | RBNFBLDDIR=$(BUILDDIR)/rbnf | |
101 | TRANSLITSRCDIR=$(SRCDATADIR)/translit | |
102 | TRANSLITBLDDIR=$(BUILDDIR)/translit | |
103 | MISCSRCDIR=$(SRCDATADIR)/misc | |
b75a7d8f | 104 | BRKSRCDIR=$(SRCDATADIR)/brkitr |
73c04bcf | 105 | BRKBLDDIR=$(BUILDDIR)/brkitr |
2ca993e8 A |
106 | DICTSRCDIR=$(BRKSRCDIR)/dictionaries |
107 | BRKRULESRCDIR=$(BRKSRCDIR)/rules | |
b75a7d8f A |
108 | MISCSRCDIR=$(SRCDATADIR)/misc |
109 | UCMSRCDIR=$(SRCDATADIR)/mappings | |
729e4ab9 | 110 | SPREPSRCDIR=$(SRCDATADIR)/sprep |
b75a7d8f A |
111 | COMINCDIR=$(top_srcdir)/common/unicode |
112 | SRCLISTDEPS=Makefile $(srcdir)/Makefile.in | |
b331163b | 113 | BUILD_DIRS=$(OUTDIR) $(MAINBUILDDIR) $(BUILDDIR) $(CURRBLDDIR) $(LANGBLDDIR) $(REGIONBLDDIR) $(ZONEBLDDIR) $(UNITBLDDIR) $(BRKBLDDIR) $(COLBLDDIR) $(RBNFBLDDIR) $(TRANSLITBLDDIR) $(OUTTMPDIR) $(OUTTMPDIR_390STUB) $(OUTTMPDIR)/$(CURR_TREE) $(OUTTMPDIR)/$(LANG_TREE) $(OUTTMPDIR)/$(REGION_TREE) $(OUTTMPDIR)/$(ZONE_TREE) $(OUTTMPDIR)/$(UNIT_TREE) $(OUTTMPDIR)/$(COLLATION_TREE) $(OUTTMPDIR)/$(RBNF_TREE) $(OUTTMPDIR)/$(TRANSLIT_TREE) $(OUTTMPDIR)/$(BREAK_TREE) |
b75a7d8f A |
114 | |
115 | # relative lib links from pkgdata are the same as for tmp | |
116 | TOOLDIR=$(top_builddir)/tools | |
117 | ||
118 | ## List of phony targets | |
374ca955 | 119 | .PHONY : all all-local all-recursive install install-local install-files \ |
b75a7d8f A |
120 | install-recursive clean clean-local clean-recursive distclean \ |
121 | distclean-local distclean-recursive dist dist-local dist-recursive \ | |
57a6839d | 122 | check check-local check-recursive clean-resindex icudata.jar \ |
4388f060 | 123 | check-exhaustive |
b75a7d8f A |
124 | |
125 | ## Clear suffix list | |
126 | .SUFFIXES : | |
127 | ||
128 | ## List of standard targets | |
129 | all: all-local | |
130 | install: all-local install-local | |
131 | clean: clean-local | |
132 | distclean : distclean-local | |
133 | dist: | |
134 | check: all | |
135 | ||
4388f060 A |
136 | check-exhaustive: check |
137 | ||
729e4ab9 A |
138 | -include Makefile.local |
139 | ||
b75a7d8f A |
140 | |
141 | distclean-local: clean | |
142 | $(RMV) Makefile | |
143 | ||
374ca955 | 144 | all-local: build-dir icupkg.inc build-local packagedata $(POST_DATA_BUILD) $(OS390PKG) |
b75a7d8f A |
145 | |
146 | dist-local: | |
147 | ||
148 | clean-map: | |
149 | -test -z *.map || $(RMV) *.map | |
150 | ||
151 | clean-local: cleanpackage cleanfiles clean-map | |
57a6839d | 152 | $(RMV) build-dir* build-local packagedata uni-core-data |
b75a7d8f A |
153 | |
154 | cleanfiles: | |
155 | test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) | |
156 | ||
157 | cleanpackage: | |
158 | $(RMV) $(OUTDIR) | |
b331163b | 159 | $(RMV) $(LIBDIR)/*$(LIB_ICUDATA_NAME)*.$(SO)* $(LIBDIR)/$(LIB_STATIC_ICUDATA_NAME).$(A) |
b75a7d8f A |
160 | |
161 | check-local: | |
162 | ||
73c04bcf A |
163 | # Find out if we have a source archive. |
164 | # If we have that, then use that instead of building everything from scratch. | |
165 | ICUDATA_SOURCE_ARCHIVE = $(wildcard $(srcdir)/in/$(ICUDATA_PLATFORM_NAME).dat) | |
166 | ifeq ($(ICUDATA_SOURCE_ARCHIVE),) | |
167 | ICUDATA_ARCHIVE = $(firstword $(wildcard $(srcdir)/in/$(ICUDATA_BASENAME_VERSION)*.dat)) | |
168 | # We don't have the data in the current endianess or charset. | |
169 | # See if we can find data of any archive type, | |
170 | # and convert it to the current type. | |
171 | ifneq ($(ICUDATA_ARCHIVE),) | |
172 | ICUDATA_SOURCE_ARCHIVE = $(OUTDIR)/$(ICUDATA_PLATFORM_NAME).dat | |
173 | $(ICUDATA_SOURCE_ARCHIVE): $(ICUDATA_ARCHIVE) $(OUTDIR) | |
729e4ab9 | 174 | $(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $(ICUDATA_ARCHIVE) $(ICUDATA_SOURCE_ARCHIVE) |
73c04bcf A |
175 | endif |
176 | else | |
177 | ifneq ($(ENABLE_STATIC),YES) | |
178 | ifeq ($(PKGDATA_MODE),common) | |
179 | # We have a source data common archive in the native endianess, | |
180 | # and it's what we want to build. Try to not run any of ICU's tools. | |
181 | ICUDATA_SOURCE_IS_NATIVE_TARGET=YES | |
182 | endif | |
183 | endif | |
184 | endif | |
185 | ||
46f4442e | 186 | packagedata: icupkg.inc $(PKGDATA_LIST) build-local |
b75a7d8f | 187 | ifneq ($(ENABLE_STATIC),) |
46f4442e | 188 | ifeq ($(PKGDATA_MODE),dll) |
729e4ab9 | 189 | $(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) -m static $(PKGDATA_VERSIONING) $(PKGDATA_LIST) |
46f4442e | 190 | endif |
b75a7d8f | 191 | endif |
73c04bcf | 192 | ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES) |
46f4442e | 193 | $(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) |
73c04bcf A |
194 | else |
195 | $(INSTALL_DATA) $(ICUDATA_SOURCE_ARCHIVE) $(OUTDIR) | |
196 | endif | |
57a6839d | 197 | echo timestamp > $@ |
b75a7d8f A |
198 | |
199 | ## Install ICU data. | |
46f4442e | 200 | install-local: $(PKGDATA_LIST) ./icupkg.inc packagedata $(OS390INSTALL) |
b75a7d8f | 201 | $(MKINSTALLDIRS) $(TMPDATADIR) $(DESTDIR)$(ICUPKGDATA_DIR) |
729e4ab9 A |
202 | ifeq ($(PKGDATA_MODE),files) |
203 | $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME) | |
204 | $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(CURR_TREE) | |
205 | $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(LANG_TREE) | |
206 | $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(REGION_TREE) | |
207 | $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(ZONE_TREE) | |
b331163b | 208 | $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(UNIT_TREE) |
729e4ab9 A |
209 | $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(BREAK_TREE) |
210 | $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(COLLATION_TREE) | |
211 | $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(RBNF_TREE) | |
212 | $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(TRANSLIT_TREE) | |
213 | endif | |
b75a7d8f | 214 | ifneq ($(ENABLE_STATIC),) |
46f4442e A |
215 | ifeq ($(PKGDATA_MODE),dll) |
216 | $(PKGDATA_INVOKE) $(PKGDATA) -m static -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_LIBDIR) | |
217 | endif | |
b75a7d8f | 218 | endif |
73c04bcf | 219 | ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES) |
46f4442e | 220 | $(PKGDATA_INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_DIR) |
73c04bcf A |
221 | else |
222 | $(INSTALL_DATA) $(ICUDATA_SOURCE_ARCHIVE) $(DESTDIR)$(ICUPKGDATA_DIR) | |
223 | endif | |
b75a7d8f | 224 | |
b75a7d8f A |
225 | |
226 | #### | |
227 | #### | |
228 | #### 390 support | |
374ca955 | 229 | install390: package390 |
b75a7d8f | 230 | $(MKINSTALLDIRS) $(TMPDATADIR) $(DESTDIR)$(libdir) |
374ca955 | 231 | $(INVOKE) $(PKGDATA) -s $(BUILDDIR)$(STUB_SUFFIX) -T $(OUTTMPDIR_390STUB) -p $(ICUDATA_NAME)$(STUB_SUFFIX) $(PKGDATA_LIBNAME)$(STUB_SUFFIX) -e $(ICUDATA_ENTRY_POINT) $(OS390LIST) -m dll $(PKGDATA_VERSIONING) -I $(DESTDIR)$(ICUPKGDATA_DIR) |
b75a7d8f | 232 | ifeq ($(PKGDATA_MODE),dll) |
729e4ab9 | 233 | $(INSTALL-L) $(ICUPKGDATA_OUTDIR)/$(FINAL_IMPORT_LIB) $(DESTDIR)$(ICUPKGDATA_DIR)/$(FINAL_IMPORT_LIB) |
b75a7d8f A |
234 | endif |
235 | ||
374ca955 | 236 | #### $(LIB_ICUDATA_NAME)$(STUB_SUFFIX) is the subset data for batch mode |
46f4442e | 237 | package390: $(OUTTMPDIR)/icudata390.lst $(PKGDATA_LIST) ./icupkg.inc packagedata |
374ca955 A |
238 | ln -s $(ICUDATA_NAME) $(OUTDIR)/build/$(ICUDATA_NAME)$(STUB_SUFFIX) |
239 | $(INVOKE) $(PKGDATA) -s $(BUILDDIR)$(STUB_SUFFIX) -T $(OUTTMPDIR_390STUB) -p $(ICUDATA_NAME)$(STUB_SUFFIX) $(PKGDATA_LIBNAME)$(STUB_SUFFIX) -e $(ICUDATA_ENTRY_POINT) $(OS390LIST) -m dll $(PKGDATA_VERSIONING) | |
240 | cp $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX).$(SO) $(top_builddir)/stubdata/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX).$(SO) | |
b75a7d8f A |
241 | |
242 | ||
243 | ##### Define all the data files. the build rule that depends on them is below. | |
374ca955 A |
244 | # X_FILES_SHORT = just the base names (for lists) |
245 | # X_FILES = full paths (for dependency) | |
b75a7d8f A |
246 | |
247 | ## DAT files - Misc. data files. | |
73c04bcf A |
248 | # 2005-may-05 Removed Unicode properties files (unorm.icu, uprops.icu, ucase.icu, ubidi.icu) |
249 | # from data build. See Jitterbug 4497. (makedata.mak revision 1.117) | |
4388f060 A |
250 | # 2010-dec Removed pnames.icu. |
251 | # These are now hardcoded in ICU4C and only loaded in ICU4J. | |
73c04bcf | 252 | # |
b331163b | 253 | DAT_FILES_SHORT=unames.icu cnvalias.icu coll/ucadata.icu nfkc.nrm nfkc_cf.nrm uts46.nrm |
374ca955 | 254 | DAT_FILES=$(DAT_FILES_SHORT:%=$(BUILDDIR)/%) |
b75a7d8f A |
255 | |
256 | ## BRK files | |
73c04bcf | 257 | BREAK_TREE=brkitr |
374ca955 A |
258 | -include $(BRKSRCDIR)/brkfiles.mk |
259 | -include $(BRKSRCDIR)/brklocal.mk | |
73c04bcf A |
260 | ALL_BRK_SOURCE= $(BRK_SOURCE) $(BRK_SOURCE_LOCAL) |
261 | BRK_FILES_SHORT=$(ALL_BRK_SOURCE:%.txt=$(BREAK_TREE)/%.brk) | |
262 | BRK_FILES=$(ALL_BRK_SOURCE:%.txt=$(BRKBLDDIR)/%.brk) | |
51004dcb A |
263 | ifdef BRK_DICT_SOURCE |
264 | ALL_DICT_SOURCE=$(BRK_DICT_SOURCE) $(BRK_DICT_SOURCE_LOCAL) | |
265 | DICT_FILES_SHORT=$(ALL_DICT_SOURCE:%.txt=$(BREAK_TREE)/%.dict) | |
266 | DICT_FILES=$(ALL_DICT_SOURCE:%.txt=$(BRKBLDDIR)/%.dict) | |
73c04bcf A |
267 | endif |
268 | ifdef BRK_RES_SOURCE | |
269 | BRS_SRC= root.txt $(BRK_RES_SOURCE) $(BRK_RES_SOURCE_LOCAL) | |
270 | BRS_SRC_FILES = $(BRS_SRC:%=$(BRKSRCDIR)/%) | |
271 | INSTALLED_BRS_FILES = $(BRK_RES_SOURCE:%.txt=%) $(BRK_RES_SOURCE_LOCAL:%.txt=%) | |
272 | endif | |
b75a7d8f | 273 | |
729e4ab9 A |
274 | ## Confusables (Spoofing) files |
275 | ALL_CFU_SOURCE=$(UNICODEDATADIR)/confusables.txt $(UNICODEDATADIR)/confusablesWholeScript.txt | |
276 | CFU_FILES_SHORT=confusables.cfu | |
277 | CFU_FILES=$(BUILDDIR)/$(CFU_FILES_SHORT) | |
278 | ||
374ca955 | 279 | ## UCM files |
b75a7d8f A |
280 | -include $(UCMSRCDIR)/ucmcore.mk |
281 | -include $(UCMSRCDIR)/ucmfiles.mk | |
282 | -include $(UCMSRCDIR)/ucmebcdic.mk | |
283 | -include $(UCMSRCDIR)/ucmlocal.mk | |
284 | ALL_UCM_SOURCE=ibm-37_P100-1995.ucm ibm-1047_P100-1995.ucm $(UCM_SOURCE_CORE) $(UCM_SOURCE_FILES) $(UCM_SOURCE_EBCDIC) $(UCM_SOURCE_LOCAL) | |
285 | UCM_FILES = $(ALL_UCM_SOURCE:%=$(SRCDATADIR)/%) | |
374ca955 A |
286 | CNV_FILES = $(ALL_UCM_SOURCE:%.ucm=$(BUILDDIR)/%.cnv) |
287 | CNV_FILES_SHORT = $(ALL_UCM_SOURCE:%.ucm=%.cnv) | |
729e4ab9 A |
288 | UCM_SOURCE_SPECIAL=$(UCM_SOURCE_EBCDIC_IGNORE_SISO) $(UCM_SOURCE_EBCDIC_IGNORE_SISO_LOCAL) |
289 | UCM_FILES_SPECIAL=$(UCM_SOURCE_SPECIAL:%=$(UCMSRCDIR)/%) | |
290 | CNV_FILES_SPECIAL=$(UCM_SOURCE_SPECIAL:%.ucm=$(BUILDDIR)/%.cnv) | |
291 | CNV_FILES_SHORT_SPECIAL=$(UCM_SOURCE_SPECIAL:%.ucm=%.cnv) | |
b75a7d8f A |
292 | |
293 | ## RES files | |
294 | -include $(LOCSRCDIR)/resfiles.mk | |
729e4ab9 A |
295 | -include $(CURRSRCDIR)/resfiles.mk |
296 | -include $(LANGSRCDIR)/resfiles.mk | |
297 | -include $(REGIONSRCDIR)/resfiles.mk | |
298 | -include $(ZONESRCDIR)/resfiles.mk | |
b331163b | 299 | -include $(UNITSRCDIR)/resfiles.mk |
374ca955 A |
300 | -include $(COLSRCDIR)/colfiles.mk |
301 | -include $(RBNFSRCDIR)/rbnffiles.mk | |
302 | -include $(TRANSLITSRCDIR)/trnsfiles.mk | |
b75a7d8f | 303 | -include $(LOCSRCDIR)/reslocal.mk |
729e4ab9 A |
304 | -include $(CURRSRCDIR)/reslocal.mk |
305 | -include $(LANGSRCDIR)/reslocal.mk | |
306 | -include $(REGIONSRCDIR)/reslocal.mk | |
307 | -include $(ZONESRCDIR)/reslocal.mk | |
b331163b | 308 | -include $(UNITSRCDIR)/reslocal.mk |
374ca955 | 309 | -include $(COLSRCDIR)/collocal.mk |
73c04bcf | 310 | -include $(BRKSRCDIR)/brslocal.mk |
374ca955 | 311 | -include $(RBNFSRCDIR)/rbnflocal.mk |
73c04bcf A |
312 | -include $(TRANSLITSRCDIR)/trnslocal.mk |
313 | ifdef GENRB_SOURCE | |
46f4442e | 314 | RES_SRC= root.txt $(GENRB_SOURCE) $(GENRB_ALIAS_SOURCE) $(GENRB_SOURCE_LOCAL) $(GENRB_ALIAS_SOURCE_LOCAL) |
374ca955 | 315 | RES_SRC_FILES = $(RES_SRC:%=$(LOCSRCDIR)/%) |
b75a7d8f | 316 | INSTALLED_RB_FILES = $(GENRB_SOURCE:%.txt=%) $(GENRB_SOURCE_LOCAL:%.txt=%) |
73c04bcf | 317 | endif |
729e4ab9 A |
318 | ifdef CURR_SOURCE |
319 | CURR_SRC= root.txt supplementalData.txt $(CURR_SOURCE) $(CURR_ALIAS_SOURCE) $(CURR_SOURCE_LOCAL) | |
320 | CURR_SRC_FILES = $(CURR_SRC:%=$(CURRSRCDIR)/%) | |
321 | INSTALLED_CURR_FILES = $(CURR_SOURCE:%.txt=%) $(CURR_SOURCE_LOCAL:%.txt=%) | |
322 | endif | |
323 | ifdef LANG_SOURCE | |
324 | LANG_SRC= root.txt $(LANG_SOURCE) $(LANG_ALIAS_SOURCE) $(LANG_SOURCE_LOCAL) | |
325 | LANG_SRC_FILES = $(LANG_SRC:%=$(LANGSRCDIR)/%) | |
326 | INSTALLED_LANG_FILES = $(LANG_SOURCE:%.txt=%) $(LANG_SOURCE_LOCAL:%.txt=%) | |
327 | endif | |
328 | ifdef REGION_SOURCE | |
329 | REGION_SRC= root.txt $(REGION_SOURCE) $(REGION_ALIAS_SOURCE) $(REGION_SOURCE_LOCAL) | |
330 | REGION_SRC_FILES = $(REGION_SRC:%=$(REGIONSRCDIR)/%) | |
331 | INSTALLED_REGION_FILES = $(REGION_SOURCE:%.txt=%) $(REGION_SOURCE_LOCAL:%.txt=%) | |
332 | endif | |
333 | ifdef ZONE_SOURCE | |
b331163b | 334 | ZONE_SRC= root.txt $(ZONE_SOURCE) $(ZONE_ALIAS_SOURCE) $(ZONE_SOURCE_LOCAL) tzdbNames.txt |
729e4ab9 A |
335 | ZONE_SRC_FILES = $(ZONE_SRC:%=$(ZONESRCDIR)/%) |
336 | INSTALLED_ZONE_FILES = $(ZONE_SOURCE:%.txt=%) $(ZONE_SOURCE_LOCAL:%.txt=%) | |
337 | endif | |
b331163b A |
338 | ifdef UNIT_SOURCE |
339 | UNIT_SRC= root.txt $(UNIT_SOURCE) $(UNIT_ALIAS_SOURCE) $(UNIT_SOURCE_LOCAL) | |
340 | UNIT_SRC_FILES = $(UNIT_SRC:%=$(UNITSRCDIR)/%) | |
341 | INSTALLED_UNIT_FILES = $(UNIT_SOURCE:%.txt=%) $(UNIT_SOURCE_LOCAL:%.txt=%) | |
342 | endif | |
73c04bcf | 343 | ifdef COLLATION_SOURCE |
f3c0d7a5 | 344 | COL_SRC= root.txt $(COLLATION_SOURCE) $(COLLATION_ALIAS_SOURCE) $(COLLATION_SOURCE_LOCAL) $(COLLATION_ALIAS_SOURCE_LOCAL) |
374ca955 A |
345 | COL_SRC_FILES = $(COL_SRC:%=$(COLSRCDIR)/%) |
346 | INSTALLED_COL_FILES = $(COLLATION_SOURCE:%.txt=%) $(COLLATION_SOURCE_LOCAL:%.txt=%) | |
73c04bcf A |
347 | endif |
348 | ifdef RBNF_SOURCE | |
374ca955 A |
349 | RBNF_SRC= root.txt $(RBNF_SOURCE) $(RBNF_ALIAS_SOURCE) $(RBNF_SOURCE_LOCAL) |
350 | RBNF_SRC_FILES = $(RBNF_SRC:%=$(RBNFSRCDIR)/%) | |
351 | INSTALLED_RBNF_FILES = $(RBNF_SOURCE:%.txt=%) $(RBNF_SOURCE_LOCAL:%.txt=%) | |
73c04bcf A |
352 | endif |
353 | ifdef TRANSLIT_SOURCE | |
354 | TRANSLIT_SRC= $(TRANSLIT_SOURCE) $(TRANSLIT_ALIAS_SOURCE) $(TRANSLIT_SOURCE_LOCAL) | |
374ca955 A |
355 | TRANSLIT_SRC_FILES = $(TRANSLIT_SRC:%=$(TRANSLITSRCDIR)/%) |
356 | INSTALLED_TRANSLIT_FILES = $(TRANSLIT_SOURCE:%.txt=%) $(TRANSLIT_SOURCE_LOCAL:%.txt=%) | |
73c04bcf | 357 | endif |
374ca955 A |
358 | GENRBOPTS=-k |
359 | ||
360 | ## MISC files | |
361 | -include $(MISCSRCDIR)/miscfiles.mk | |
362 | -include $(MISCSRCDIR)/misclocal.mk | |
729e4ab9 | 363 | MSC_SOURCE= $(MISC_SOURCE) $(MISC_SOURCE_LOCAL) |
374ca955 A |
364 | MSC_SRC_FILES=$(MSC_SOURCE:%=$(MISCSRCDIR)/%) |
365 | ||
366 | ifeq ($(ENABLE_SO_VERSION_DATA),1) | |
367 | ifeq ($(PKGDATA_MODE),dll) | |
368 | SO_VERSION_DATA = $(OUTTMPDIR)/icudata.res | |
369 | $(SO_VERSION_DATA) : $(MISCSRCDIR)/icudata.rc | |
b331163b A |
370 | ifeq ($(MSYS_RC_MODE),1) |
371 | rc.exe -i$(srcdir)/../common -i$(top_builddir)/common -fo$@ $(CPPFLAGS) $< | |
372 | else | |
4388f060 | 373 | rc.exe /i$(srcdir)/../common /i$(top_builddir)/common /fo$@ $(CPPFLAGS) $(SOURCE_FILE) |
374ca955 A |
374 | endif |
375 | endif | |
b331163b | 376 | endif |
b75a7d8f | 377 | |
729e4ab9 A |
378 | INDEX_NAME=res_index |
379 | INDEX_FILE=$(OUTTMPDIR)/$(INDEX_NAME).txt | |
380 | ||
374ca955 | 381 | ALL_RES_SRC= $(RES_SRC) $(TRNS_SOURCE) $(MSC_SOURCE) |
729e4ab9 A |
382 | RES_FILES = $(ALL_RES_SRC:%.txt=$(BUILDDIR)/%.res) $(BUILDDIR)/$(INDEX_NAME).res $(BUILDDIR)/pool.res |
383 | RES_FILES_SHORT = $(ALL_RES_SRC:%.txt=%.res) $(INDEX_NAME).res pool.res | |
46f4442e | 384 | PKGDATA_LIST = $(OUTTMPDIR)/icudata.lst |
374ca955 | 385 | |
729e4ab9 A |
386 | CURR_TREE=curr |
387 | CURR_INDEX_FILE=$(OUTTMPDIR)/$(CURR_TREE)/$(INDEX_NAME).txt | |
388 | CURR_FILES = $(CURR_SRC:%.txt=$(CURRBLDDIR)/%.res) $(CURRBLDDIR)/$(INDEX_NAME).res $(CURRBLDDIR)/pool.res | |
389 | CURR_FILES_SHORT = $(CURR_SRC:%.txt=$(CURR_TREE)/%.res) $(CURR_TREE)/$(INDEX_NAME).res $(CURR_TREE)/pool.res | |
390 | ||
391 | LANG_TREE=lang | |
392 | LANG_INDEX_FILE=$(OUTTMPDIR)/$(LANG_TREE)/$(INDEX_NAME).txt | |
393 | LANG_FILES = $(LANG_SRC:%.txt=$(LANGBLDDIR)/%.res) $(LANGBLDDIR)/$(INDEX_NAME).res $(LANGBLDDIR)/pool.res | |
394 | LANG_FILES_SHORT = $(LANG_SRC:%.txt=$(LANG_TREE)/%.res) $(LANG_TREE)/$(INDEX_NAME).res $(LANG_TREE)/pool.res | |
395 | ||
396 | REGION_TREE=region | |
397 | REGION_INDEX_FILE=$(OUTTMPDIR)/$(REGION_TREE)/$(INDEX_NAME).txt | |
398 | REGION_FILES = $(REGION_SRC:%.txt=$(REGIONBLDDIR)/%.res) $(REGIONBLDDIR)/$(INDEX_NAME).res $(REGIONBLDDIR)/pool.res | |
399 | REGION_FILES_SHORT = $(REGION_SRC:%.txt=$(REGION_TREE)/%.res) $(REGION_TREE)/$(INDEX_NAME).res $(REGION_TREE)/pool.res | |
400 | ||
401 | ZONE_TREE=zone | |
402 | ZONE_INDEX_FILE=$(OUTTMPDIR)/$(ZONE_TREE)/$(INDEX_NAME).txt | |
403 | ZONE_FILES = $(ZONE_SRC:%.txt=$(ZONEBLDDIR)/%.res) $(ZONEBLDDIR)/$(INDEX_NAME).res $(ZONEBLDDIR)/pool.res | |
404 | ZONE_FILES_SHORT = $(ZONE_SRC:%.txt=$(ZONE_TREE)/%.res) $(ZONE_TREE)/$(INDEX_NAME).res $(ZONE_TREE)/pool.res | |
374ca955 | 405 | |
b331163b A |
406 | UNIT_TREE=unit |
407 | UNIT_INDEX_FILE=$(OUTTMPDIR)/$(UNIT_TREE)/$(INDEX_NAME).txt | |
408 | UNIT_FILES = $(UNIT_SRC:%.txt=$(UNITBLDDIR)/%.res) $(UNITBLDDIR)/$(INDEX_NAME).res $(UNITBLDDIR)/pool.res | |
409 | UNIT_FILES_SHORT = $(UNIT_SRC:%.txt=$(UNIT_TREE)/%.res) $(UNIT_TREE)/$(INDEX_NAME).res $(UNIT_TREE)/pool.res | |
410 | ||
374ca955 A |
411 | COLLATION_TREE=coll |
412 | COLLATION_INDEX_FILE=$(OUTTMPDIR)/$(COLLATION_TREE)/$(INDEX_NAME).txt | |
413 | COLLATION_INDEX_RES=$(COLBLDDIR)/$(INDEX_NAME).res | |
414 | COLLATION_INDEX_RES_SHORT=$(COLLATION_TREE)/$(INDEX_NAME).res | |
415 | COLLATION_FILES = $(COL_SRC:%.txt=$(COLBLDDIR)/%.res) $(COLLATION_INDEX_RES) | |
416 | COLLATION_FILES_SHORT = $(COL_SRC:%.txt=$(COLLATION_TREE)/%.res) | |
417 | ||
73c04bcf A |
418 | BRK_RES_INDEX_FILE=$(OUTTMPDIR)/$(BREAK_TREE)/$(INDEX_NAME).txt |
419 | BRK_RES_INDEX_RES=$(BRKBLDDIR)/$(INDEX_NAME).res | |
420 | BRK_RES_INDEX_RES_SHORT=$(BREAK_TREE)/$(INDEX_NAME).res | |
421 | BRK_RES_FILES = $(BRS_SRC:%.txt=$(BRKBLDDIR)/%.res) $(BRK_RES_INDEX_RES) | |
422 | BRK_RES_FILES_SHORT = $(BRS_SRC:%.txt=$(BREAK_TREE)/%.res) | |
423 | ||
374ca955 A |
424 | RBNF_TREE=rbnf |
425 | RBNF_INDEX_FILE=$(OUTTMPDIR)/$(RBNF_TREE)/$(INDEX_NAME).txt | |
426 | RBNF_INDEX_RES=$(RBNFBLDDIR)/$(INDEX_NAME).res | |
427 | RBNF_INDEX_RES_SHORT=$(RBNF_TREE)/$(INDEX_NAME).res | |
428 | RBNF_FILES = $(RBNF_SRC:%.txt=$(RBNFBLDDIR)/%.res) $(RBNF_INDEX_RES) | |
429 | RBNF_FILES_SHORT = $(RBNF_SRC:%.txt=$(RBNF_TREE)/%.res) | |
430 | ||
431 | TRANSLIT_TREE=translit | |
432 | #TRANSLIT_INDEX_FILE=$(OUTTMPDIR)/$(TRANSLIT_TREE)/$(INDEX_NAME).txt | |
433 | #TRANSLIT_INDEX_RES=$(TRANSLITBLDDIR)/$(INDEX_NAME).res | |
434 | #TRANSLIT_INDEX_RES_SHORT=$(TRANSLIT_TREE)/$(INDEX_NAME).res | |
435 | TRANSLIT_FILES = $(TRANSLIT_SRC:%.txt=$(TRANSLITBLDDIR)/%.res) | |
436 | TRANSLIT_FILES_SHORT = $(TRANSLIT_SRC:%.txt=$(TRANSLIT_TREE)/%.res) | |
b75a7d8f | 437 | |
729e4ab9 A |
438 | ## SPP files |
439 | -include $(SPREPSRCDIR)/sprepfiles.mk | |
440 | -include $(SPREPSRCDIR)/spreplocal.mk | |
441 | ALL_SPREP_SOURCE=$(SPREP_SOURCE) $(SPREP_SOURCE_LOCAL) | |
442 | SPREP_FILES = $(ALL_SPREP_SOURCE:%.txt=$(BUILDDIR)/%.spp) | |
443 | SPREP_FILES_SHORT = $(ALL_SPREP_SOURCE:%.txt=%.spp) | |
444 | ||
b75a7d8f | 445 | ## All generated files |
b331163b A |
446 | ALL_FILES = $(DAT_FILES) $(CNV_FILES) $(CNV_FILES_SPECIAL) $(BRK_FILES) $(DICT_FILES) $(RES_FILES) $(INDEX_RES_FILE) $(CURR_FILES) $(LANG_FILES) $(REGION_FILES) $(ZONE_FILES) $(UNIT_FILES) $(COLLATION_FILES) $(BRK_RES_FILES) $(RBNF_FILES) $(TRANSLIT_FILES) $(SPREP_FILES) $(CFU_FILES) |
447 | ALL_INDEX_SRC_FILES = $(PKGDATA_LIST) $(INDEX_FILE) $(CURR_INDEX_FILE) $(LANG_INDEX_FILE) $(REGION_INDEX_FILE) $(ZONE_INDEX_FILE) $(UNIT_INDEX_FILE) $(COLLATION_INDEX_FILE) $(BRK_RES_INDEX_FILE) $(RBNF_INDEX_FILE) | |
374ca955 | 448 | # a list to use in the .lst files (package-relative) |
729e4ab9 | 449 | COLL_FILES_LIST=$(COLLATION_FILES_SHORT) $(COLLATION_INDEX_RES_SHORT) |
51004dcb | 450 | BRK_FILES_LIST=$(BRK_FILES_SHORT) $(BRK_RES_FILES_SHORT) $(BRK_RES_INDEX_RES_SHORT) $(DICT_FILES_SHORT) |
b331163b | 451 | LOCALE_FILES_LIST= $(RES_FILES_SHORT) $(LANG_FILES_SHORT) $(REGION_FILES_SHORT) $(ZONE_FILES_SHORT) $(UNIT_FILES_SHORT) |
729e4ab9 | 452 | MISC_FILES_LIST=$(DAT_FILES_SHORT) $(CNV_FILES_SHORT) $(CNV_FILES_SHORT_SPECIAL) $(CURR_FILES_SHORT) $(RBNF_FILES_SHORT) $(RBNF_INDEX_RES_SHORT) $(TRANSLIT_FILES_SHORT) $(SPREP_FILES_SHORT) $(CFU_FILES_SHORT) |
b331163b | 453 | UNI_CORE_DATA=pnames.icu uprops.icu ucase.icu ubidi.icu nfc.nrm |
46f4442e A |
454 | UNI_CORE_TARGET_DATA=$(UNI_CORE_DATA:%=$(BUILDDIR)/%) |
455 | ||
456 | ifneq ($(INCLUDE_UNI_CORE_DATA),) | |
729e4ab9 | 457 | MISC_FILES_LIST+=$(UNI_CORE_DATA) |
46f4442e | 458 | build-local: uni-core-data |
57a6839d | 459 | echo timestamp > $@ |
46f4442e A |
460 | endif |
461 | ||
b75a7d8f A |
462 | ##################################################### |
463 | # General data build rules | |
464 | ||
465 | ## Files to remove for 'make clean' | |
57a6839d | 466 | CLEANFILES = *~ icupkg.inc *.x |
b75a7d8f | 467 | |
73c04bcf | 468 | ifeq ($(ICUDATA_SOURCE_ARCHIVE),) |
46f4442e | 469 | build-local: build-dir $(SO_VERSION_DATA) $(ALL_FILES) $(PKGDATA_LIST) $(OS390LIST) |
57a6839d | 470 | echo timestamp > $@ |
46f4442e | 471 | $(PKGDATA_LIST): $(SRCLISTDEPS) |
b75a7d8f A |
472 | @echo "generating $@ (list of data files)" |
473 | @-$(RMV) $@ | |
729e4ab9 A |
474 | @for file in $(COLL_FILES_LIST); do \ |
475 | echo $$file >> $@; \ | |
476 | done; | |
477 | @for file in $(BRK_FILES_LIST); do \ | |
478 | echo $$file >> $@; \ | |
479 | done; | |
480 | @for file in $(LOCALE_FILES_LIST); do \ | |
481 | echo $$file >> $@; \ | |
482 | done; | |
483 | @for file in $(MISC_FILES_LIST); do \ | |
b75a7d8f A |
484 | echo $$file >> $@; \ |
485 | done; | |
73c04bcf | 486 | else |
46f4442e | 487 | build-local: build-dir $(SO_VERSION_DATA) $(PKGDATA_LIST) $(OS390LIST) |
57a6839d | 488 | echo timestamp > $@ |
46f4442e | 489 | $(PKGDATA_LIST): $(SRCLISTDEPS) $(ICUDATA_SOURCE_ARCHIVE) |
73c04bcf A |
490 | ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES) |
491 | @echo "Unpacking $(ICUDATA_SOURCE_ARCHIVE) and generating $@ (list of data files)" | |
492 | @-$(RMV) $@ | |
729e4ab9 | 493 | $(INVOKE) $(TOOLBINDIR)/icupkg -d $(BUILDDIR) --list -x \* $(ICUDATA_SOURCE_ARCHIVE) -o $@ |
73c04bcf A |
494 | else |
495 | @echo "$@" > $@ | |
496 | endif | |
497 | endif | |
b75a7d8f | 498 | |
b75a7d8f | 499 | |
729e4ab9 A |
500 | $(BUILD_DIRS): build-dir |
501 | ||
46f4442e | 502 | build-dir: |
57a6839d A |
503 | @-$(RMV) $@ |
504 | echo timestamp > $@.tmp | |
46f4442e A |
505 | @list='$(BUILD_DIRS)'; \ |
506 | for dir in $$list; do \ | |
507 | if ! test -d $$dir; then \ | |
508 | echo $(MKINSTALLDIRS) $(BUILD_DIRS); \ | |
509 | $(MKINSTALLDIRS) $(BUILD_DIRS); \ | |
510 | fi; \ | |
511 | done | |
57a6839d | 512 | mv $@.tmp $@ |
b75a7d8f | 513 | |
46f4442e A |
514 | # The | is an order-only prerequisite. This helps when the -j option is used, |
515 | # and we don't want the files to be built before the directories are built. | |
516 | ifneq ($(filter order-only,$(.FEATURES)),) | |
517 | $(ALL_FILES) $(ALL_INDEX_SRC_FILES): | build-dir | |
518 | endif | |
b75a7d8f A |
519 | |
520 | # Now, sections for building each kind of data. | |
521 | ||
522 | #################################################### DAT | |
523 | # DAT FILES | |
524 | ||
729e4ab9 A |
525 | # cnvalias.icu |
526 | $(BUILDDIR)/cnvalias.icu: $(UCMSRCDIR)/convrtrs.txt $(TOOLBINDIR)/gencnval$(TOOLEXEEXT) | |
527 | $(INVOKE) $(TOOLBINDIR)/gencnval -d $(BUILDDIR) $(UCMSRCDIR)/convrtrs.txt | |
b75a7d8f | 528 | |
729e4ab9 A |
529 | # Targets for prebuilt Unicode data |
530 | $(BUILDDIR)/%.icu: $(SRCDATADIR)/in/%.icu | |
531 | $(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $< $@ | |
b75a7d8f | 532 | |
729e4ab9 A |
533 | $(BUILDDIR)/%.nrm: $(SRCDATADIR)/in/%.nrm |
534 | $(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $< $@ | |
b75a7d8f | 535 | |
b331163b | 536 | $(BUILDDIR)/coll/ucadata.icu: $(SRCDATADIR)/in/coll/ucadata-unihan.icu |
729e4ab9 | 537 | $(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $< $@ |
b75a7d8f | 538 | |
729e4ab9 A |
539 | #################################################### SPP |
540 | # SPP FILES | |
b75a7d8f | 541 | |
4388f060 | 542 | $(BUILDDIR)/%.spp: $(SPREPSRCDIR)/%.txt $(TOOLBINDIR)/gensprep$(TOOLEXEEXT) $(BUILDDIR)/unames.icu |
729e4ab9 | 543 | $(INVOKE) $(TOOLBINDIR)/gensprep -d $(BUILDDIR) -i $(BUILDDIR) -s $(SPREPSRCDIR) -b $(@F:%.spp=%) -m $(UNICODEDATADIR) -u 3.2.0 $(<F) |
b75a7d8f A |
544 | |
545 | #################################################### BRK | |
546 | # BRK FILES | |
547 | ||
2ca993e8 | 548 | $(BRKBLDDIR)/%.brk: $(BRKRULESRCDIR)/%.txt $(TOOLBINDIR)/genbrk$(TOOLEXEEXT) $(DAT_FILES) |
729e4ab9 | 549 | $(INVOKE) $(TOOLBINDIR)/genbrk -c -i $(BUILDDIR) -r $< -o $@ |
b75a7d8f | 550 | |
51004dcb A |
551 | #################################################### DICT |
552 | # DICT FILES | |
553 | ||
554 | # .dict file generated regardless of whether dictionary file exists | |
555 | ||
556 | $(BRKBLDDIR)/%.dict: $(TOOLBINDIR)/gendict$(TOOLEXEEXT) $(DAT_FILES) | |
2ca993e8 | 557 | $(INVOKE) $(TOOLBINDIR)/gendict --uchars -c -i $(BUILDDIR) $(DICTSRCDIR)/$(*F).txt $@ |
51004dcb A |
558 | |
559 | $(BRKBLDDIR)/thaidict.dict: $(TOOLBINDIR)/gendict$(TOOLEXEEXT) $(DAT_FILES) | |
2ca993e8 | 560 | $(INVOKE) $(TOOLBINDIR)/gendict --bytes --transform offset-0x0e00 -c -i $(BUILDDIR) $(DICTSRCDIR)/thaidict.txt $(BRKBLDDIR)/thaidict.dict |
73c04bcf | 561 | |
57a6839d | 562 | $(BRKBLDDIR)/laodict.dict: $(TOOLBINDIR)/gendict$(TOOLEXEEXT) $(DAT_FILES) |
2ca993e8 | 563 | $(INVOKE) $(TOOLBINDIR)/gendict --bytes --transform offset-0x0e80 -c -i $(BUILDDIR) $(DICTSRCDIR)/laodict.txt $(BRKBLDDIR)/laodict.dict |
57a6839d | 564 | |
b331163b | 565 | $(BRKBLDDIR)/burmesedict.dict: $(TOOLBINDIR)/gendict$(TOOLEXEEXT) $(DAT_FILES) |
2ca993e8 | 566 | $(INVOKE) $(TOOLBINDIR)/gendict --bytes --transform offset-0x1000 -c -i $(BUILDDIR) $(DICTSRCDIR)/burmesedict.txt $(BRKBLDDIR)/burmesedict.dict |
b331163b | 567 | |
51004dcb A |
568 | # TODO: figure out why combining characters are here? |
569 | $(BRKBLDDIR)/khmerdict.dict: $(TOOLBINDIR)/gendict$(TOOLEXEEXT) $(DAT_FILES) | |
2ca993e8 | 570 | $(INVOKE) $(TOOLBINDIR)/gendict --bytes --transform offset-0x1780 -c -i $(BUILDDIR) $(DICTSRCDIR)/khmerdict.txt $(BRKBLDDIR)/khmerdict.dict |
729e4ab9 A |
571 | |
572 | #################################################### CFU | |
573 | # CFU FILES | |
574 | # Note: gencfu requires two input files to produce a single output file. | |
575 | # There will be exactly one target file and two source files. | |
576 | # The $(word n, ...) selects the nth word from the following stuff. | |
577 | # There must be a nicer way to do this. | |
578 | ||
579 | $(CFU_FILES): $(ALL_CFU_SOURCE) $(TOOLBINDIR)/gencfu$(TOOLEXEEXT) $(DAT_FILES) | |
580 | $(INVOKE) echo ALL_CFU_SOURCE: $(ALL_CFU_SOURCE) | |
581 | $(INVOKE) echo CFU_FILES: $(CFU_FILES) | |
582 | $(INVOKE) echo CFU_FILES_SHORT: $(CFU_FILES_SHORT) | |
583 | $(INVOKE) $(TOOLBINDIR)/gencfu -c -i $(BUILDDIR) -r $(word 1,$(ALL_CFU_SOURCE)) -w $(word 2,$(ALL_CFU_SOURCE)) -o $@ | |
584 | ||
73c04bcf | 585 | |
b75a7d8f A |
586 | #################################################### CNV |
587 | # CNV FILES | |
729e4ab9 A |
588 | $(CNV_FILES_SPECIAL) : $(UCM_FILES_SPECIAL) $(TOOLBINDIR)/makeconv$(TOOLEXEEXT) |
589 | $(INVOKE) $(TOOLBINDIR)/makeconv --ignore-siso-check -c -d $(BUILDDIR) $(UCMSRCDIR)/$(@F:%.cnv=%.ucm) | |
590 | $(BUILDDIR)/%.cnv: $(UCMSRCDIR)/%.ucm $(TOOLBINDIR)/makeconv$(TOOLEXEEXT) | |
591 | $(INVOKE) $(TOOLBINDIR)/makeconv -c -d $(BUILDDIR) $(UCMSRCDIR)/$(<F) | |
b75a7d8f A |
592 | |
593 | #################################################### RES | |
594 | # RES FILES | |
595 | ||
729e4ab9 A |
596 | ### curr res |
597 | $(CURRBLDDIR)/%.res: $(CURRSRCDIR)/%.txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT) $(DAT_FILES) | |
598 | $(INVOKE) $(TOOLBINDIR)/genrb --usePoolBundle $(GENRBOPTS) -i $(BUILDDIR) -s $(CURRSRCDIR) -d $(CURRBLDDIR) $(<F) | |
599 | ||
600 | # copy the curr/pool.res file from the source folder to the build output folder | |
601 | # and swap it to native endianness | |
602 | $(CURRBLDDIR)/pool.res: $(CURRSRCDIR)/pool.res | |
603 | $(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $(CURRSRCDIR)/pool.res $(CURRBLDDIR)/pool.res | |
604 | ||
605 | $(CURRBLDDIR)/$(INDEX_NAME).res: $(OUTTMPDIR)/$(CURR_TREE)/$(INDEX_NAME).txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT) | |
606 | $(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(OUTTMPDIR)/$(CURR_TREE) -d $(CURRBLDDIR) $(INDEX_NAME).txt | |
607 | ||
608 | $(CURR_INDEX_FILE): $(SRCLISTDEPS) | |
609 | @echo "generating $@ (list of installed currency name locales)"; \ | |
610 | $(RMV) $@; \ | |
611 | echo "// Warning this file is automatically generated" > $@; \ | |
612 | echo "$(INDEX_NAME):table(nofallback) {" >> $@; \ | |
613 | echo " InstalledLocales {" >> $@; \ | |
614 | for file in $(INSTALLED_CURR_FILES); do \ | |
615 | echo " $$file {\"\"}" >> $@; \ | |
616 | done; \ | |
617 | echo " }" >> $@; \ | |
618 | echo "}" >> $@; | |
619 | ||
620 | ### lang res | |
621 | $(LANGBLDDIR)/%.res: $(LANGSRCDIR)/%.txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT) $(DAT_FILES) | |
622 | $(INVOKE) $(TOOLBINDIR)/genrb --usePoolBundle $(GENRBOPTS) -i $(BUILDDIR) -s $(LANGSRCDIR) -d $(LANGBLDDIR) $(<F) | |
623 | ||
624 | # copy the lang/pool.res file from the source folder to the build output folder | |
625 | # and swap it to native endianness | |
626 | $(LANGBLDDIR)/pool.res: $(LANGSRCDIR)/pool.res | |
627 | $(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $(LANGSRCDIR)/pool.res $(LANGBLDDIR)/pool.res | |
628 | ||
629 | $(LANGBLDDIR)/$(INDEX_NAME).res: $(OUTTMPDIR)/$(LANG_TREE)/$(INDEX_NAME).txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT) | |
630 | $(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(OUTTMPDIR)/$(LANG_TREE) -d $(LANGBLDDIR) $(INDEX_NAME).txt | |
631 | ||
632 | $(LANG_INDEX_FILE): $(SRCLISTDEPS) | |
633 | @echo "generating $@ (list of installed language name locales)"; \ | |
634 | $(RMV) $@; \ | |
635 | echo "// Warning this file is automatically generated" > $@; \ | |
636 | echo "$(INDEX_NAME):table(nofallback) {" >> $@; \ | |
637 | echo " InstalledLocales {" >> $@; \ | |
638 | for file in $(INSTALLED_LANG_FILES); do \ | |
639 | echo " $$file {\"\"}" >> $@; \ | |
640 | done; \ | |
641 | echo " }" >> $@; \ | |
642 | echo "}" >> $@; | |
643 | ||
644 | ### region res | |
645 | $(REGIONBLDDIR)/%.res: $(REGIONSRCDIR)/%.txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT) $(DAT_FILES) | |
646 | $(INVOKE) $(TOOLBINDIR)/genrb --usePoolBundle $(GENRBOPTS) -i $(BUILDDIR) -s $(REGIONSRCDIR) -d $(REGIONBLDDIR) $(<F) | |
647 | ||
648 | # copy the region/pool.res file from the source folder to the build output folder | |
649 | # and swap it to native endianness | |
650 | $(REGIONBLDDIR)/pool.res: $(REGIONSRCDIR)/pool.res | |
651 | $(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $(REGIONSRCDIR)/pool.res $(REGIONBLDDIR)/pool.res | |
652 | ||
653 | $(REGIONBLDDIR)/$(INDEX_NAME).res: $(OUTTMPDIR)/$(REGION_TREE)/$(INDEX_NAME).txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT) | |
654 | $(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(OUTTMPDIR)/$(REGION_TREE) -d $(REGIONBLDDIR) $(INDEX_NAME).txt | |
655 | ||
656 | $(REGION_INDEX_FILE): $(SRCLISTDEPS) | |
657 | @echo "generating $@ (list of installed region name locales)"; \ | |
658 | $(RMV) $@; \ | |
659 | echo "// Warning this file is automatically generated" > $@; \ | |
660 | echo "$(INDEX_NAME):table(nofallback) {" >> $@; \ | |
661 | echo " InstalledLocales {" >> $@; \ | |
662 | for file in $(INSTALLED_REGION_FILES); do \ | |
663 | echo " $$file {\"\"}" >> $@; \ | |
664 | done; \ | |
665 | echo " }" >> $@; \ | |
666 | echo "}" >> $@; | |
667 | ||
668 | ### zone res | |
669 | $(ZONEBLDDIR)/%.res: $(ZONESRCDIR)/%.txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT) $(DAT_FILES) | |
670 | $(INVOKE) $(TOOLBINDIR)/genrb --usePoolBundle $(GENRBOPTS) -i $(BUILDDIR) -s $(ZONESRCDIR) -d $(ZONEBLDDIR) $(<F) | |
671 | ||
672 | # copy the zone/pool.res file from the source folder to the build output folder | |
673 | # and swap it to native endianness | |
674 | $(ZONEBLDDIR)/pool.res: $(ZONESRCDIR)/pool.res | |
675 | $(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $(ZONESRCDIR)/pool.res $(ZONEBLDDIR)/pool.res | |
676 | ||
677 | $(ZONEBLDDIR)/$(INDEX_NAME).res: $(OUTTMPDIR)/$(ZONE_TREE)/$(INDEX_NAME).txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT) | |
678 | $(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(OUTTMPDIR)/$(ZONE_TREE) -d $(ZONEBLDDIR) $(INDEX_NAME).txt | |
679 | ||
680 | $(ZONE_INDEX_FILE): $(SRCLISTDEPS) | |
681 | @echo "generating $@ (list of installed time zone name locales)"; \ | |
682 | $(RMV) $@; \ | |
683 | echo "// Warning this file is automatically generated" > $@; \ | |
684 | echo "$(INDEX_NAME):table(nofallback) {" >> $@; \ | |
685 | echo " InstalledLocales {" >> $@; \ | |
686 | for file in $(INSTALLED_ZONE_FILES); do \ | |
687 | echo " $$file {\"\"}" >> $@; \ | |
688 | done; \ | |
689 | echo " }" >> $@; \ | |
690 | echo "}" >> $@; | |
691 | ||
b331163b A |
692 | ### unit res |
693 | $(UNITBLDDIR)/%.res: $(UNITSRCDIR)/%.txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT) $(DAT_FILES) | |
694 | $(INVOKE) $(TOOLBINDIR)/genrb --usePoolBundle $(GENRBOPTS) -i $(BUILDDIR) -s $(UNITSRCDIR) -d $(UNITBLDDIR) $(<F) | |
695 | ||
696 | # copy the unit/pool.res file from the source folder to the build output folder | |
697 | # and swap it to native endianness | |
698 | $(UNITBLDDIR)/pool.res: $(UNITSRCDIR)/pool.res | |
699 | $(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $(UNITSRCDIR)/pool.res $(UNITBLDDIR)/pool.res | |
700 | ||
701 | $(UNITBLDDIR)/$(INDEX_NAME).res: $(OUTTMPDIR)/$(UNIT_TREE)/$(INDEX_NAME).txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT) | |
702 | $(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(OUTTMPDIR)/$(UNIT_TREE) -d $(UNITBLDDIR) $(INDEX_NAME).txt | |
703 | ||
704 | $(UNIT_INDEX_FILE): $(SRCLISTDEPS) | |
705 | @echo "generating $@ (list of installed time zone name locales)"; \ | |
706 | $(RMV) $@; \ | |
707 | echo "// Warning this file is automatically generated" > $@; \ | |
708 | echo "$(INDEX_NAME):table(nofallback) {" >> $@; \ | |
709 | echo " InstalledLocales {" >> $@; \ | |
710 | for file in $(INSTALLED_UNIT_FILES); do \ | |
711 | echo " $$file {\"\"}" >> $@; \ | |
712 | done; \ | |
713 | echo " }" >> $@; \ | |
714 | echo "}" >> $@; | |
715 | ||
374ca955 | 716 | ### collation res |
729e4ab9 | 717 | $(COLBLDDIR)/%.res: $(COLSRCDIR)/%.txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT) $(DAT_FILES) |
b331163b | 718 | $(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(COLSRCDIR) -d $(COLBLDDIR) $(<F) |
374ca955 | 719 | |
729e4ab9 | 720 | $(COLBLDDIR)/$(INDEX_NAME).res: $(OUTTMPDIR)/$(COLLATION_TREE)/$(INDEX_NAME).txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT) |
b331163b | 721 | $(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(OUTTMPDIR)/$(COLLATION_TREE) -d $(COLBLDDIR) $(INDEX_NAME).txt |
374ca955 | 722 | |
46f4442e | 723 | $(COLLATION_INDEX_FILE): $(SRCLISTDEPS) |
374ca955 A |
724 | @echo "generating $@ (list of installed collation locales)"; \ |
725 | $(RMV) $@; \ | |
726 | echo "// Warning this file is automatically generated" > $@; \ | |
73c04bcf | 727 | echo "$(INDEX_NAME):table(nofallback) {" >> $@; \ |
374ca955 A |
728 | echo " InstalledLocales {" >> $@; \ |
729 | for file in $(INSTALLED_COL_FILES); do \ | |
730 | echo " $$file {\"\"}" >> $@; \ | |
731 | done; \ | |
732 | echo " }" >> $@; \ | |
733 | echo "}" >> $@; | |
734 | ||
73c04bcf | 735 | ### brk res |
51004dcb | 736 | $(BRKBLDDIR)/%.res: $(BRKSRCDIR)/%.txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT) $(BRK_FILES) $(DICT_FILES) $(DAT_FILES) |
729e4ab9 | 737 | $(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(BRKSRCDIR) -d $(BRKBLDDIR) $(<F) |
73c04bcf | 738 | |
729e4ab9 A |
739 | $(BRKBLDDIR)/$(INDEX_NAME).res: $(OUTTMPDIR)/$(BREAK_TREE)/$(INDEX_NAME).txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT) |
740 | $(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(OUTTMPDIR)/$(BREAK_TREE) -d $(BRKBLDDIR) $(INDEX_NAME).txt | |
73c04bcf | 741 | |
46f4442e | 742 | $(BRK_RES_INDEX_FILE): $(SRCLISTDEPS) |
73c04bcf A |
743 | @echo "generating $@ (list of installed break locales)"; \ |
744 | $(RMV) $@; \ | |
745 | echo "// Warning this file is automatically generated" > $@; \ | |
746 | echo "$(INDEX_NAME):table(nofallback) {" >> $@; \ | |
747 | echo " InstalledLocales {" >> $@; \ | |
748 | for file in $(INSTALLED_BRS_FILES); do \ | |
749 | echo " $$file {\"\"}" >> $@; \ | |
750 | done; \ | |
751 | echo " }" >> $@; \ | |
752 | echo "}" >> $@; | |
753 | ||
374ca955 | 754 | ### RBNF res |
729e4ab9 A |
755 | $(RBNFBLDDIR)/%.res: $(RBNFSRCDIR)/%.txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT) $(DAT_FILES) |
756 | $(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(RBNFSRCDIR) -d $(RBNFBLDDIR) $(<F) | |
374ca955 | 757 | |
729e4ab9 A |
758 | $(RBNFBLDDIR)/$(INDEX_NAME).res: $(OUTTMPDIR)/$(RBNF_TREE)/$(INDEX_NAME).txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT) |
759 | $(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(OUTTMPDIR)/$(RBNF_TREE) -d $(RBNFBLDDIR) $(INDEX_NAME).txt | |
374ca955 | 760 | |
46f4442e | 761 | $(RBNF_INDEX_FILE): $(SRCLISTDEPS) |
374ca955 A |
762 | @echo "generating $@ (list of installed RBNF locales)"; \ |
763 | $(RMV) $@; \ | |
764 | echo "// Warning this file is automatically generated" > $@; \ | |
73c04bcf | 765 | echo "$(INDEX_NAME):table(nofallback) {" >> $@; \ |
374ca955 A |
766 | echo " InstalledLocales {" >> $@; \ |
767 | for file in $(INSTALLED_RBNF_FILES); do \ | |
768 | echo " $$file {\"\"}" >> $@; \ | |
769 | done; \ | |
770 | echo " }" >> $@; \ | |
771 | echo "}" >> $@; | |
772 | ||
773 | ### TRANSLIT res | |
729e4ab9 A |
774 | $(TRANSLITBLDDIR)/%.res: $(TRANSLITSRCDIR)/%.txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT) $(DAT_FILES) |
775 | $(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(TRANSLITSRCDIR) -d $(TRANSLITBLDDIR) $(<F) | |
776 | ||
374ca955 | 777 | ### normal (locale) res |
b75a7d8f A |
778 | all-RES: $(RES_FILES) |
779 | ||
729e4ab9 A |
780 | $(BUILDDIR)/%.res: $(LOCSRCDIR)/%.txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT) $(DAT_FILES) |
781 | $(INVOKE) $(TOOLBINDIR)/genrb --usePoolBundle $(GENRBOPTS) -i $(BUILDDIR) -s $(LOCSRCDIR) -d $(BUILDDIR) $(<F) | |
782 | ||
783 | # copy the locales/pool.res file from the source folder to the build output folder | |
784 | # and swap it to native endianness | |
785 | $(BUILDDIR)/pool.res: $(LOCSRCDIR)/pool.res | |
786 | $(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $(LOCSRCDIR)/pool.res $(BUILDDIR)/pool.res | |
b75a7d8f | 787 | |
729e4ab9 A |
788 | # if the tzcode directory contains a new tzdata*.tar.gz file, use it for zoneinfo |
789 | ifeq ($(TZDATA),) | |
73c04bcf | 790 | TZDATA = $(firstword $(wildcard $(top_builddir)/tools/tzcode/tzdata*.tar.gz) $(wildcard $(top_srcdir)/tools/tzcode/tzdata*.tar.gz)) |
729e4ab9 | 791 | endif |
73c04bcf A |
792 | |
793 | ifneq ($(TZDATA),) | |
794 | ||
795 | TZCODE_DIR=$(top_builddir)/tools/tzcode | |
729e4ab9 | 796 | ZONEINFO=$(TZCODE_DIR)/zoneinfo64.txt |
73c04bcf | 797 | |
729e4ab9 A |
798 | # Override the normal genrb for zoneinfo to always pull from |
799 | # icu/source/tools/tzcode/zoneinfo64.txt | |
800 | $(BUILDDIR)/zoneinfo64.res: $(ZONEINFO) $(TOOLBINDIR)/genrb$(TOOLEXEEXT) | |
73c04bcf | 801 | @echo Note: $(MISCSRCDIR)/zoneinfo.txt is IGNORED because $(TZDATA) is present. |
729e4ab9 | 802 | $(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -q -i $(BUILDDIR) -d $(BUILDDIR) $(ZONEINFO) |
73c04bcf | 803 | |
729e4ab9 | 804 | # Create the tzcode tool and zoneinfo as needed. |
73c04bcf A |
805 | $(ZONEINFO): $(TZDATA) |
806 | @echo "$(MAKE)[$(MAKELEVEL)]: Making \`$(ZONEINFO)' in \`$(TZCODE_DIR)'"; \ | |
807 | (cd $(TZCODE_DIR) && $(MAKE)) || exit; \ | |
808 | ||
729e4ab9 | 809 | # end of zoneinfo-generation |
73c04bcf A |
810 | endif |
811 | ||
374ca955 | 812 | # zoneinfo has some issues. Ignore some warnings with -q |
729e4ab9 A |
813 | $(BUILDDIR)/%.res: $(MISCSRCDIR)/%.txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT) |
814 | $(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -q -i $(BUILDDIR) -s $(MISCSRCDIR) -d $(BUILDDIR) $(<F) | |
b75a7d8f | 815 | |
73c04bcf A |
816 | |
817 | ||
46f4442e | 818 | $(INDEX_FILE): $(SRCLISTDEPS) |
b75a7d8f A |
819 | @echo "generating $@ (list of installed locales)"; \ |
820 | $(RMV) $@; \ | |
821 | echo "// Warning this file is automatically generated" > $@; \ | |
73c04bcf | 822 | echo "$(INDEX_NAME):table(nofallback) {" >> $@; \ |
46f4442e | 823 | echo " CLDRVersion { \"$(GENRB_CLDR_VERSION)\" }" >> $@; \ |
b75a7d8f A |
824 | echo " InstalledLocales {" >> $@; \ |
825 | for file in $(INSTALLED_RB_FILES); do \ | |
826 | echo " $$file {\"\"}" >> $@; \ | |
827 | done; \ | |
828 | echo " }" >> $@; \ | |
829 | echo "}" >> $@; | |
830 | ||
374ca955 | 831 | clean-resindex: |
46f4442e | 832 | -$(RMV) $(BUILDDIR)/$(INDEX_NAME).txt $(PKGDATA_LIST) |
374ca955 | 833 | |
729e4ab9 A |
834 | $(BUILDDIR)/$(INDEX_NAME).res: $(INDEX_FILE) $(TOOLBINDIR)/genrb$(TOOLEXEEXT) |
835 | $(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -d $(BUILDDIR) $(INDEX_FILE) | |
b75a7d8f | 836 | |
4388f060 | 837 | # The core Unicode properties files (pnames.icu, uprops.icu, ucase.icu, ubidi.icu) |
46f4442e A |
838 | # are hardcoded in the common DLL and therefore not included in the data package any more. |
839 | # They are not built by default but need to be built for ICU4J data and for getting the .c source files | |
840 | # when updating the Unicode data. | |
46f4442e A |
841 | uni-core-data: build-dir $(UNI_CORE_TARGET_DATA) |
842 | @echo Unicode .icu files built to $(BUILDDIR) | |
57a6839d | 843 | echo timestamp > $@ |
729e4ab9 A |
844 | |
845 | # Build the ICU4J icudata.jar. | |
846 | # Command line: | |
847 | # (Run this from the output data folder which may not be .../source/data in an out-of-source build.) | |
848 | # ~/svn.icu/trunk/source/data> make JAR=jar ICU4J_ROOT=~/svn.icu4j/trunk icudata.jar | |
849 | # You can omit the ICU4J_ROOT for just building the .jar files without copying them. | |
850 | # You can omit the JAR if it's just jar. | |
851 | JAR=jar | |
852 | ||
853 | # For building the testdata.jar see ../test/testdata/Makefile. | |
854 | ||
4388f060 A |
855 | ICU4J_TZDATA=$(OUTDIR)/icu4j/icutzdata.jar |
856 | ICU4J_TZDATA_FILES=zoneinfo64 metaZones timezoneTypes windowsZones | |
857 | ICU4J_DATA_DIRNAME=com/ibm/icu/impl/data/$(ICUDATA_BASENAME_VERSION)b | |
858 | ICU4J_TZDATA_PATHS=$(ICU4J_TZDATA_FILES:%="$(ICU4J_DATA_DIRNAME)/%.res") | |
859 | ||
860 | # generate icu4j-related data to $(OUTDIR)/icu4j/com/ibm/icu/impl/data/... | |
861 | generate-data: build-dir packagedata $(OUTTMPDIR)/$(ICUDATA_PLATFORM_NAME).dat uni-core-data | |
862 | mkdir -p $(OUTDIR)/icu4j/$(ICU4J_DATA_DIRNAME) | |
863 | mkdir -p $(OUTDIR)/icu4j/tzdata/$(ICU4J_DATA_DIRNAME) | |
b331163b | 864 | echo $(UNI_CORE_DATA) > $(OUTDIR)/icu4j/add.txt |
4388f060 A |
865 | $(INVOKE) $(TOOLBINDIR)/icupkg $(OUTTMPDIR)/$(ICUDATA_PLATFORM_NAME).dat $(OUTDIR)/icu4j/$(ICUDATA_BASENAME_VERSION)b.dat -a $(OUTDIR)/icu4j/add.txt -s $(BUILDDIR) -x '*' -tb -d $(OUTDIR)/icu4j/$(ICU4J_DATA_DIRNAME) |
866 | mv $(ICU4J_TZDATA_PATHS:%=$(OUTDIR)/icu4j/%) "$(OUTDIR)/icu4j/tzdata/$(ICU4J_DATA_DIRNAME)" | |
867 | ||
868 | $(OUTDIR)/icu4j/icutzdata.jar: generate-data | |
869 | $(JAR) cf $(OUTDIR)/icu4j/icutzdata.jar -C $(OUTDIR)/icu4j/tzdata $(ICU4J_DATA_DIRNAME)/ | |
870 | ||
729e4ab9 A |
871 | # Build icudata.jar: |
872 | # - add the uni-core-data to the ICU package | |
873 | # - swap the ICU data | |
874 | # - extract all data items | |
875 | # - package them into the .jar file | |
4388f060 A |
876 | $(OUTDIR)/icu4j/icudata.jar: generate-data |
877 | $(JAR) cf $(OUTDIR)/icu4j/icudata.jar -C $(OUTDIR)/icu4j $(ICU4J_DATA_DIRNAME)/ | |
729e4ab9 A |
878 | |
879 | ICU4J_DATA=$(OUTDIR)/icu4j/icudata.jar | |
880 | ||
881 | ifdef ICU4J_ROOT | |
882 | ||
4388f060 | 883 | ICU4J_DATA_INSTALLED=$(ICU4J_ROOT)/main/shared/data/icudata.jar $(ICU4J_ROOT)/main/shared/data/icutzdata.jar |
729e4ab9 A |
884 | |
885 | $(ICU4J_ROOT)/main/shared/data/icudata.jar: $(OUTDIR)/icu4j/icudata.jar | |
886 | mkdir -p $(ICU4J_ROOT)/main/shared/data | |
887 | cp $(OUTDIR)/icu4j/icudata.jar $(ICU4J_ROOT)/main/shared/data | |
888 | ||
4388f060 A |
889 | $(ICU4J_ROOT)/main/shared/data/icutzdata.jar: $(OUTDIR)/icu4j/icutzdata.jar |
890 | mkdir -p $(ICU4J_ROOT)/main/shared/data | |
891 | cp $(OUTDIR)/icu4j/icutzdata.jar $(ICU4J_ROOT)/main/shared/data | |
892 | ||
729e4ab9 A |
893 | icu4j-data-install: $(ICU4J_DATA_INSTALLED) |
894 | ||
895 | else | |
896 | ||
897 | icu4j-data-install: icu4j-data | |
898 | @echo data is built into $(OUTDIR)/icu4j | |
899 | @echo '** Error:' ICU4J_ROOT was not set, could not install | |
900 | exit 1 | |
901 | ||
902 | endif | |
903 | ||
4388f060 | 904 | icu4j-data: $(ICU4J_DATA) $(ICU4J_TZDATA) |
729e4ab9 | 905 | |
46f4442e | 906 | |
b75a7d8f A |
907 | ################################################################### |
908 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | |
909 | cd $(top_builddir) \ | |
910 | && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status | |
911 | ||
729e4ab9 A |
912 | icupkg.inc: pkgdataMakefile |
913 | $(MAKE) -f pkgdataMakefile | |
914 | ||
915 | pkgdataMakefile: | |
b75a7d8f A |
916 | cd $(top_builddir) \ |
917 | && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status | |
918 | ||
919 | ########### | |
920 | ########### 390 (z/OS) support | |
921 | UCMFILES390=ebcdic-xml-us.ucm ibm-37_P100-1995.ucm ibm-1047_P100-1995.ucm ibm-4909_P100-1999.ucm | |
4388f060 A |
922 | # used to depend on pnames.icu uprops.icu ucase.icu ubidi.icu |
923 | # These are now hardcoded in ICU4C and only loaded in ICU4J. | |
924 | ALLFILES390=cnvalias.icu $(UCMFILES390:.ucm=.cnv) | |
b75a7d8f | 925 | |
374ca955 | 926 | $(OUTTMPDIR)/icudata390.lst: $(SRCLISTDEPS) |
b75a7d8f A |
927 | @echo "generating $@ (list of 390 data files)" |
928 | @-$(RMV) $@ | |
929 | @for file in $(ALLFILES390); do \ | |
b75a7d8f A |
930 | echo $$file >> $@; \ |
931 | done; | |
932 | ||
374ca955 A |
933 | ifeq ($(POST_DATA_BUILD), os400-data-rebind) |
934 | os400-data-rebind: $(LIBICUUC) | |
b75a7d8f | 935 | |
374ca955 A |
936 | $(LIBICUUC): $(LIBICUDT) |
937 | $(RMV) $(LIBICUUC) | |
938 | (cd ../common && $(MAKE) RECURSIVE=YES) || exit; | |
939 | endif | |
b75a7d8f | 940 |