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