]> git.saurik.com Git - apple/icu.git/blob - icuSources/data/Makefile.in
ICU-8.11.tar.gz
[apple/icu.git] / icuSources / data / Makefile.in
1 ## Makefile.in for ICU data
2 ## Copyright (c) 1999-2006, International Business Machines Corporation and
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
20 LIB_ICUDATA_NAME=$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX)
21 LIB_STATIC_ICUDATA_NAME=$(LIBSICU)$(DATA_STUBNAME)$(ICULIBSUFFIX)
22
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
35 ICUPKGDATA_OUTDIR = $(OUTDIR)
36 endif
37
38 CURDIR:=$(CURR_FULL_DIR)
39 PKGDATA = $(BINDIR)/pkgdata $(PKGDATA_OPTS) -q -c -s $(CURDIR)/out/build/$(ICUDATA_PLATFORM_NAME) -d $(ICUPKGDATA_OUTDIR) -M'PKGDATA_LDFLAGS="$(LDFLAGSICUDT)"'
40
41 ifeq ($(OS390_STUBDATA),1)
42 OS390PKG=package390
43 OS390INSTALL=install390
44
45 # Additional data for 390
46 OS390LIST=$(OUTTMPDIR)/icudata390.lst
47 OUTTMPDIR_390STUB=$(top_builddir)/data/out/tmp_390stub
48 endif
49
50 # OBJDATADIR must be a short path (with ..'s) to the data.
51
52 ifeq ($(top_srcdir),..)
53 SRCDATADIR=.
54 else
55 SRCDATADIR=$(top_srcdir)/data
56 endif
57 ifeq ($(top_builddir),..)
58 OUTDIR=./out
59 else
60 OUTDIR=$(top_builddir)/data/out
61 endif
62
63 OUTTMPDIR=$(OUTDIR)/tmp
64 MAINBUILDDIR=$(OUTDIR)/build
65 BUILDDIR=$(MAINBUILDDIR)/$(ICUDATA_PLATFORM_NAME)
66 UNICODEDATADIR=$(SRCDATADIR)/unidata
67 LOCSRCDIR=$(SRCDATADIR)/locales
68 COLSRCDIR=$(SRCDATADIR)/coll
69 COLBLDDIR=$(BUILDDIR)/coll
70 RBNFSRCDIR=$(SRCDATADIR)/rbnf
71 RBNFBLDDIR=$(BUILDDIR)/rbnf
72 TRANSLITSRCDIR=$(SRCDATADIR)/translit
73 TRANSLITBLDDIR=$(BUILDDIR)/translit
74 MISCSRCDIR=$(SRCDATADIR)/misc
75 BRKSRCDIR=$(SRCDATADIR)/brkitr
76 BRKBLDDIR=$(BUILDDIR)/brkitr
77 MISCSRCDIR=$(SRCDATADIR)/misc
78 UCMSRCDIR=$(SRCDATADIR)/mappings
79 COMINCDIR=$(top_srcdir)/common/unicode
80 SRCLISTDEPS=Makefile $(srcdir)/Makefile.in
81 BUILD_DIRS=$(OUTDIR) $(BUILDDIR) $(BRKBLDDIR) $(COLBLDDIR) $(RBNFBLDDIR) $(TRANSLITBLDDIR) $(TESTOUTDIR) $(TESTBUILDDIR) $(OUTTMPDIR) $(OUTTMPDIR_390STUB) $(OUTTMPDIR)/$(COLLATION_TREE) $(OUTTMPDIR)/$(RBNF_TREE) $(OUTTMPDIR)/$(TRANSLIT_TREE) $(OUTTMPDIR)/$(BREAK_TREE)
82
83 # relative lib links from pkgdata are the same as for tmp
84 TOOLDIR=$(top_builddir)/tools
85
86 ## List of phony targets
87 .PHONY : all all-local all-recursive install install-local install-files \
88 install-recursive clean clean-local clean-recursive distclean \
89 distclean-local distclean-recursive dist dist-local dist-recursive \
90 check check-local check-recursive build-local clean-resindex build-dir
91
92 ## Clear suffix list
93 .SUFFIXES :
94
95 ## List of standard targets
96 all: all-local
97 install: all-local install-local
98 clean: clean-local
99 distclean : distclean-local
100 dist:
101 check: all
102
103
104 distclean-local: clean
105 $(RMV) Makefile
106
107 all-local: build-dir icupkg.inc build-local packagedata $(POST_DATA_BUILD) $(OS390PKG)
108
109 # Starting with ICU4C 3.4, the core Unicode properties files (uprops.icu, ucase.icu, ubidi.icu, unorm.icu)
110 # are hardcoded in the common DLL and therefore not included in the data package any more.
111 # They are not built by default but need to be built for ICU4J data and for getting the .c source files
112 # when updating the Unicode data.
113 # Changed in Makefile.in revision 1.147. See Jitterbug 4497.
114 uni-core-data: build-dir $(BUILDDIR)/uprops.icu $(BUILDDIR)/ucase.icu $(BUILDDIR)/ubidi.icu $(BUILDDIR)/unorm.icu
115 @echo Unicode .icu files built to $(BUILDDIR)
116 @echo Unicode .c source files built to $(OUTTMPDIR)
117
118 dist-local:
119
120 clean-map:
121 -test -z *.map || $(RMV) *.map
122
123 clean-local: cleanpackage cleanfiles clean-map
124
125 cleanfiles:
126 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
127
128 cleanpackage:
129 $(RMV) $(OUTDIR)
130 $(RMV) $(LIBDIR)/$(LIB_ICUDATA_NAME)*.$(SO)* $(LIBDIR)/$(LIB_STATIC_ICUDATA_NAME).$(A)
131
132 check-local:
133
134 # Find out if we have a source archive.
135 # If we have that, then use that instead of building everything from scratch.
136 ICUDATA_SOURCE_ARCHIVE = $(wildcard $(srcdir)/in/$(ICUDATA_PLATFORM_NAME).dat)
137 ifeq ($(ICUDATA_SOURCE_ARCHIVE),)
138 ICUDATA_ARCHIVE = $(firstword $(wildcard $(srcdir)/in/$(ICUDATA_BASENAME_VERSION)*.dat))
139 # We don't have the data in the current endianess or charset.
140 # See if we can find data of any archive type,
141 # and convert it to the current type.
142 ifneq ($(ICUDATA_ARCHIVE),)
143 ICUDATA_SOURCE_ARCHIVE = $(OUTDIR)/$(ICUDATA_PLATFORM_NAME).dat
144 $(ICUDATA_SOURCE_ARCHIVE): $(ICUDATA_ARCHIVE) $(OUTDIR)
145 $(INVOKE) $(BINDIR)/icupkg -t$(ICUDATA_CHAR) $(ICUDATA_ARCHIVE) $(ICUDATA_SOURCE_ARCHIVE)
146 endif
147 else
148 ifneq ($(ENABLE_STATIC),YES)
149 ifeq ($(PKGDATA_MODE),common)
150 # We have a source data common archive in the native endianess,
151 # and it's what we want to build. Try to not run any of ICU's tools.
152 ICUDATA_SOURCE_IS_NATIVE_TARGET=YES
153 endif
154 endif
155 endif
156
157 # During this INVOKE we only want to use stubdata.
158 # We don't want to try to write over files that we are using.
159 PKGDATA_INVOKE:=$(subst $(LIBDIR):$(top_builddir)/stubdata,$(top_builddir)/stubdata:$(LIBDIR),$(INVOKE)) $(PKGDATA_INVOKE_OPTS)
160
161 packagedata: icupkg.inc $(OUTTMPDIR)/icudata.lst build-local
162 ifneq ($(ENABLE_STATIC),)
163 $(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) -m static $(OUTTMPDIR)/icudata.lst
164 endif
165 ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES)
166 $(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) $(PKGDATA_LIBNAME) $(OUTTMPDIR)/icudata.lst
167 else
168 $(INSTALL_DATA) $(ICUDATA_SOURCE_ARCHIVE) $(OUTDIR)
169 endif
170
171 ## Install ICU data.
172 install-local: $(OUTTMPDIR)/icudata.lst ./icupkg.inc packagedata $(OS390INSTALL)
173 $(MKINSTALLDIRS) $(TMPDATADIR) $(DESTDIR)$(ICUPKGDATA_DIR)
174 ifneq ($(ENABLE_STATIC),)
175 $(PKGDATA_INVOKE) $(PKGDATA) -m static -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) $(OUTTMPDIR)/icudata.lst -I $(ICUPKGDATA_INSTALL_LIBDIR)
176 endif
177 ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES)
178 $(PKGDATA_INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(OUTTMPDIR)/icudata.lst -I $(ICUPKGDATA_INSTALL_DIR)
179 else
180 $(INSTALL_DATA) $(ICUDATA_SOURCE_ARCHIVE) $(DESTDIR)$(ICUPKGDATA_DIR)
181 endif
182
183
184 ####
185 ####
186 #### 390 support
187 install390: package390
188 $(MKINSTALLDIRS) $(TMPDATADIR) $(DESTDIR)$(libdir)
189 $(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)
190 ifeq ($(PKGDATA_MODE),dll)
191 $(INSTALL-L) $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX)$(SO_TARGET_VERSION)$(IMPORT_LIB_EXT) $(DESTDIR)$(ICUPKGDATA_DIR)/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX)$(SO_TARGET_VERSION)$(IMPORT_LIB_EXT)
192 endif
193
194 #### $(LIB_ICUDATA_NAME)$(STUB_SUFFIX) is the subset data for batch mode
195 package390: $(OUTTMPDIR)/icudata390.lst $(OUTTMPDIR)/icudata.lst ./icupkg.inc packagedata
196 ln -s $(ICUDATA_NAME) $(OUTDIR)/build/$(ICUDATA_NAME)$(STUB_SUFFIX)
197 $(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)
198 cp $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX).$(SO) $(top_builddir)/stubdata/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX).$(SO)
199
200
201 ##### Define all the data files. the build rule that depends on them is below.
202 # X_FILES_SHORT = just the base names (for lists)
203 # X_FILES = full paths (for dependency)
204
205 ## DAT files - Misc. data files.
206 # 2005-may-05 Removed Unicode properties files (unorm.icu, uprops.icu, ucase.icu, ubidi.icu)
207 # from data build. See Jitterbug 4497. (makedata.mak revision 1.117)
208 #
209 DAT_FILES_SHORT=pnames.icu unames.icu cnvalias.icu ucadata.icu invuca.icu uidna.spp
210 DAT_FILES=$(DAT_FILES_SHORT:%=$(BUILDDIR)/%)
211
212 ## BRK files
213 BREAK_TREE=brkitr
214 -include $(BRKSRCDIR)/brkfiles.mk
215 -include $(BRKSRCDIR)/brklocal.mk
216 ALL_BRK_SOURCE= $(BRK_SOURCE) $(BRK_SOURCE_LOCAL)
217 BRK_FILES_SHORT=$(ALL_BRK_SOURCE:%.txt=$(BREAK_TREE)/%.brk)
218 BRK_FILES=$(ALL_BRK_SOURCE:%.txt=$(BRKBLDDIR)/%.brk)
219 ifdef BRK_CTD_SOURCE
220 ALL_CTD_SOURCE=$(BRK_CTD_SOURCE) $(BRK_CTD_SOURCE_LOCAL)
221 CTD_FILES_SHORT=$(ALL_CTD_SOURCE:%.txt=$(BREAK_TREE)/%.ctd)
222 CTD_FILES=$(ALL_CTD_SOURCE:%.txt=$(BRKBLDDIR)/%.ctd)
223 endif
224 ifdef BRK_RES_SOURCE
225 BRS_SRC= root.txt $(BRK_RES_SOURCE) $(BRK_RES_SOURCE_LOCAL)
226 BRS_SRC_FILES = $(BRS_SRC:%=$(BRKSRCDIR)/%)
227 INSTALLED_BRS_FILES = $(BRK_RES_SOURCE:%.txt=%) $(BRK_RES_SOURCE_LOCAL:%.txt=%)
228 endif
229
230 ## UCM files
231 -include $(UCMSRCDIR)/ucmcore.mk
232 -include $(UCMSRCDIR)/ucmfiles.mk
233 -include $(UCMSRCDIR)/ucmebcdic.mk
234 -include $(UCMSRCDIR)/ucmlocal.mk
235 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)
236 UCM_FILES = $(ALL_UCM_SOURCE:%=$(SRCDATADIR)/%)
237 CNV_FILES = $(ALL_UCM_SOURCE:%.ucm=$(BUILDDIR)/%.cnv)
238 CNV_FILES_SHORT = $(ALL_UCM_SOURCE:%.ucm=%.cnv)
239
240 ## RES files
241 -include $(LOCSRCDIR)/resfiles.mk
242 -include $(COLSRCDIR)/colfiles.mk
243 -include $(RBNFSRCDIR)/rbnffiles.mk
244 -include $(TRANSLITSRCDIR)/trnsfiles.mk
245 -include $(LOCSRCDIR)/reslocal.mk
246 -include $(COLSRCDIR)/collocal.mk
247 -include $(BRKSRCDIR)/brslocal.mk
248 -include $(RBNFSRCDIR)/rbnflocal.mk
249 -include $(TRANSLITSRCDIR)/trnslocal.mk
250 ifdef GENRB_SOURCE
251 RES_SRC= root.txt $(GENRB_SOURCE) $(GENRB_ALIAS_SOURCE) $(GENRB_SOURCE_LOCAL)
252 RES_SRC_FILES = $(RES_SRC:%=$(LOCSRCDIR)/%)
253 INSTALLED_RB_FILES = $(GENRB_SOURCE:%.txt=%) $(GENRB_SOURCE_LOCAL:%.txt=%)
254 endif
255 ifdef COLLATION_SOURCE
256 COL_SRC= root.txt $(COLLATION_SOURCE) $(COLLATION_ALIAS_SOURCE) $(COLLATION_SOURCE_LOCAL)
257 COL_SRC_FILES = $(COL_SRC:%=$(COLSRCDIR)/%)
258 INSTALLED_COL_FILES = $(COLLATION_SOURCE:%.txt=%) $(COLLATION_SOURCE_LOCAL:%.txt=%)
259 endif
260 ifdef RBNF_SOURCE
261 RBNF_SRC= root.txt $(RBNF_SOURCE) $(RBNF_ALIAS_SOURCE) $(RBNF_SOURCE_LOCAL)
262 RBNF_SRC_FILES = $(RBNF_SRC:%=$(RBNFSRCDIR)/%)
263 INSTALLED_RBNF_FILES = $(RBNF_SOURCE:%.txt=%) $(RBNF_SOURCE_LOCAL:%.txt=%)
264 endif
265 ifdef TRANSLIT_SOURCE
266 TRANSLIT_SRC= $(TRANSLIT_SOURCE) $(TRANSLIT_ALIAS_SOURCE) $(TRANSLIT_SOURCE_LOCAL)
267 TRANSLIT_SRC_FILES = $(TRANSLIT_SRC:%=$(TRANSLITSRCDIR)/%)
268 INSTALLED_TRANSLIT_FILES = $(TRANSLIT_SOURCE:%.txt=%) $(TRANSLIT_SOURCE_LOCAL:%.txt=%)
269 endif
270 GENRBOPTS=-k
271
272 ## MISC files
273 -include $(MISCSRCDIR)/miscfiles.mk
274 -include $(MISCSRCDIR)/misclocal.mk
275 MSC_SOURCE= $(MISC_SOURCE) $(MISC_SOURCE_LOCAL)
276 MSC_SRC_FILES=$(MSC_SOURCE:%=$(MISCSRCDIR)/%)
277
278 ifeq ($(ENABLE_SO_VERSION_DATA),1)
279 ifeq ($(PKGDATA_MODE),dll)
280 SO_VERSION_DATA = $(OUTTMPDIR)/icudata.res
281 $(SO_VERSION_DATA) : $(MISCSRCDIR)/icudata.rc
282 rc.exe /i$(srcdir)/../common /fo$@ $(CPPFLAGS) $(SOURCE_FILE)
283 endif
284 endif
285
286 ALL_RES_SRC= $(RES_SRC) $(TRNS_SOURCE) $(MSC_SOURCE)
287 RES_FILES = $(ALL_RES_SRC:%.txt=$(BUILDDIR)/%.res)
288 RES_FILES_SHORT = $(ALL_RES_SRC:%.txt=%.res)
289
290 INDEX_NAME=res_index
291 INDEX_FILE=$(OUTTMPDIR)/$(INDEX_NAME).txt
292 INDEX_RES_FILE=$(INDEX_FILE:$(OUTTMPDIR)/%.txt=$(BUILDDIR)/%.res)
293 INDEX_RES_FILE_SHORT=$(INDEX_FILE:$(OUTTMPDIR)/%.txt=%.res)
294
295 COLLATION_TREE=coll
296 COLLATION_INDEX_FILE=$(OUTTMPDIR)/$(COLLATION_TREE)/$(INDEX_NAME).txt
297 COLLATION_INDEX_RES=$(COLBLDDIR)/$(INDEX_NAME).res
298 COLLATION_INDEX_RES_SHORT=$(COLLATION_TREE)/$(INDEX_NAME).res
299 COLLATION_FILES = $(COL_SRC:%.txt=$(COLBLDDIR)/%.res) $(COLLATION_INDEX_RES)
300 COLLATION_FILES_SHORT = $(COL_SRC:%.txt=$(COLLATION_TREE)/%.res)
301
302 BRK_RES_INDEX_FILE=$(OUTTMPDIR)/$(BREAK_TREE)/$(INDEX_NAME).txt
303 BRK_RES_INDEX_RES=$(BRKBLDDIR)/$(INDEX_NAME).res
304 BRK_RES_INDEX_RES_SHORT=$(BREAK_TREE)/$(INDEX_NAME).res
305 BRK_RES_FILES = $(BRS_SRC:%.txt=$(BRKBLDDIR)/%.res) $(BRK_RES_INDEX_RES)
306 BRK_RES_FILES_SHORT = $(BRS_SRC:%.txt=$(BREAK_TREE)/%.res)
307
308 RBNF_TREE=rbnf
309 RBNF_INDEX_FILE=$(OUTTMPDIR)/$(RBNF_TREE)/$(INDEX_NAME).txt
310 RBNF_INDEX_RES=$(RBNFBLDDIR)/$(INDEX_NAME).res
311 RBNF_INDEX_RES_SHORT=$(RBNF_TREE)/$(INDEX_NAME).res
312 RBNF_FILES = $(RBNF_SRC:%.txt=$(RBNFBLDDIR)/%.res) $(RBNF_INDEX_RES)
313 RBNF_FILES_SHORT = $(RBNF_SRC:%.txt=$(RBNF_TREE)/%.res)
314
315 TRANSLIT_TREE=translit
316 #TRANSLIT_INDEX_FILE=$(OUTTMPDIR)/$(TRANSLIT_TREE)/$(INDEX_NAME).txt
317 #TRANSLIT_INDEX_RES=$(TRANSLITBLDDIR)/$(INDEX_NAME).res
318 #TRANSLIT_INDEX_RES_SHORT=$(TRANSLIT_TREE)/$(INDEX_NAME).res
319 TRANSLIT_FILES = $(TRANSLIT_SRC:%.txt=$(TRANSLITBLDDIR)/%.res)
320 TRANSLIT_FILES_SHORT = $(TRANSLIT_SRC:%.txt=$(TRANSLIT_TREE)/%.res)
321
322 ## All generated files
323 ALL_FILES = $(DAT_FILES) $(CNV_FILES) $(BRK_FILES) $(CTD_FILES) $(RES_FILES) $(INDEX_RES_FILE) $(COLLATION_FILES) $(BRK_RES_FILES) $(RBNF_FILES) $(TRANSLIT_FILES)
324 # a list to use in the .lst files (package-relative)
325 ALL_FILES_LIST = $(DAT_FILES_SHORT) $(CNV_FILES_SHORT) $(BRK_FILES_SHORT) $(CTD_FILES_SHORT) $(RES_FILES_SHORT) $(INDEX_RES_FILE_SHORT) $(COLLATION_FILES_SHORT) $(COLLATION_INDEX_RES_SHORT) $(BRK_RES_FILES_SHORT) $(BRK_RES_INDEX_RES_SHORT) $(RBNF_FILES_SHORT) $(RBNF_INDEX_RES_SHORT) $(TRANSLIT_FILES_SHORT)
326
327 #####################################################
328 # General data build rules
329
330 ## Files to remove for 'make clean'
331 CLEANFILES = *~ icupkg.inc
332
333 ifeq ($(ICUDATA_SOURCE_ARCHIVE),)
334 build-local: build-dir $(SO_VERSION_DATA) $(ALL_FILES) $(OUTTMPDIR)/icudata.lst $(OS390LIST)
335 $(OUTTMPDIR)/icudata.lst: $(SRCLISTDEPS)
336 @echo "generating $@ (list of data files)"
337 @-$(RMV) $@
338 @for file in $(ALL_FILES_LIST); do \
339 echo $$file >> $@; \
340 done;
341 else
342 build-local: build-dir $(SO_VERSION_DATA) $(OUTTMPDIR)/icudata.lst $(OS390LIST)
343 $(OUTTMPDIR)/icudata.lst: $(SRCLISTDEPS) $(ICUDATA_SOURCE_ARCHIVE) $(MAINBUILDDIR)
344 ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES)
345 @echo "Unpacking $(ICUDATA_SOURCE_ARCHIVE) and generating $@ (list of data files)"
346 @-$(RMV) $@
347 $(INVOKE) $(BINDIR)/icupkg -d $(BUILDDIR) --list -x \* $(ICUDATA_SOURCE_ARCHIVE) > $@
348 else
349 @echo "$@" > $@
350 endif
351 endif
352
353
354 build-dir: $(BUILD_DIRS)
355 $(BUILD_DIRS):
356 -$(MKINSTALLDIRS) $(BUILD_DIRS)
357
358
359 # Now, sections for building each kind of data.
360
361 #################################################### DAT
362 # DAT FILES
363
364 # uprops.icu
365 $(BUILDDIR)/uprops.icu: $(UNICODEDATADIR)/UnicodeData.txt $(UNICODEDATADIR)/BidiMirroring.txt $(BINDIR)/genprops$(EXEEXT) $(BUILDDIR)/$(ICUDT)pnames.icu
366 $(INVOKE) $(BINDIR)/genprops -s $(UNICODEDATADIR) -i $(BUILDDIR) -d $(BUILDDIR) -u $(UNICODE_VERSION)
367 $(INVOKE) $(BINDIR)/genprops --csource -s $(UNICODEDATADIR) -i $(BUILDDIR) -d $(OUTTMPDIR) -u $(UNICODE_VERSION)
368
369 # ubidi.icu
370 $(BUILDDIR)/ubidi.icu: $(UNICODEDATADIR)/UnicodeData.txt $(BINDIR)/genbidi$(EXEEXT)
371 $(INVOKE) $(BINDIR)/genbidi -s $(UNICODEDATADIR) -i $(BUILDDIR) -d $(BUILDDIR) -u $(UNICODE_VERSION)
372 $(INVOKE) $(BINDIR)/genbidi --csource -s $(UNICODEDATADIR) -i $(BUILDDIR) -d $(OUTTMPDIR) -u $(UNICODE_VERSION)
373
374 # ucase.icu
375 $(BUILDDIR)/ucase.icu: $(UNICODEDATADIR)/UnicodeData.txt $(BINDIR)/gencase$(EXEEXT)
376 $(INVOKE) $(BINDIR)/gencase -s $(UNICODEDATADIR) -i $(BUILDDIR) -d $(BUILDDIR) -u $(UNICODE_VERSION)
377 $(INVOKE) $(BINDIR)/gencase --csource -s $(UNICODEDATADIR) -i $(BUILDDIR) -d $(OUTTMPDIR) -u $(UNICODE_VERSION)
378
379 # pnames.icu
380 $(BUILDDIR)/pnames.icu: $(UNICODEDATADIR)/PropertyAliases.txt $(UNICODEDATADIR)/PropertyValueAliases.txt $(UNICODEDATADIR)/Blocks.txt $(COMINCDIR)/uscript.h $(COMINCDIR)/uchar.h $(BINDIR)/genpname$(EXEEXT)
381 $(INVOKE) $(BINDIR)/genpname -d $(BUILDDIR)
382
383 # unorm.icu
384 $(BUILDDIR)/unorm.icu: $(UNICODEDATADIR)/UnicodeData.txt $(UNICODEDATADIR)/DerivedNormalizationProps.txt $(UNICODEDATADIR)/BidiMirroring.txt $(BINDIR)/gennorm$(EXEEXT) $(BUILDDIR)/$(ICUDT)pnames.icu $(BUILDDIR)/$(ICUDT)uprops.icu $(BUILDDIR)/$(ICUDT)ucase.icu
385 $(INVOKE) $(BINDIR)/gennorm -s $(UNICODEDATADIR) -i $(BUILDDIR) -d $(BUILDDIR) -u $(UNICODE_VERSION)
386 $(INVOKE) $(BINDIR)/gennorm --csource -s $(UNICODEDATADIR) -i $(BUILDDIR) -d $(OUTTMPDIR) -u $(UNICODE_VERSION)
387
388 # ucadata.icu
389 # used to depend on $(BUILDDIR)/$(ICUDT)unorm.icu $(BUILDDIR)/$(ICUDT)ucase.icu
390 # see Jitterbug 4497
391 $(BUILDDIR)/ucadata.icu $(BUILDDIR)/$(ICUDT)invuca.icu: $(UNICODEDATADIR)/FractionalUCA.txt $(BINDIR)/genuca$(EXEEXT)
392 $(INVOKE) $(BINDIR)/genuca -s $(UNICODEDATADIR) -d $(BUILDDIR) -i $(BUILDDIR)
393
394 # unames.icu
395 $(BUILDDIR)/unames.icu: $(UNICODEDATADIR)/UnicodeData.txt $(BINDIR)/gennames$(EXEEXT)
396 $(INVOKE) $(BINDIR)/gennames -1 -d $(BUILDDIR) $(UNICODEDATADIR)/UnicodeData.txt -u $(UNICODE_VERSION)
397
398 # cnvalias.icu
399 $(BUILDDIR)/cnvalias.icu: $(UCMSRCDIR)/convrtrs.txt $(BINDIR)/gencnval$(EXEEXT)
400 $(INVOKE) $(BINDIR)/gencnval -d $(BUILDDIR) $(UCMSRCDIR)/convrtrs.txt
401
402 # uidna.spp
403 $(BUILDDIR)/uidna.spp: $(MISCSRCDIR)/NamePrepProfile.txt $(BINDIR)/gensprep$(EXEEXT) $(BUILDDIR)/unames.icu $(BUILDDIR)/pnames.icu
404 $(INVOKE) $(BINDIR)/gensprep -d $(BUILDDIR) -i $(BUILDDIR) -s $(MISCSRCDIR) -b uidna -n $(UNICODEDATADIR) -u 3.2.0 -k NamePrepProfile.txt
405
406 #################################################### BRK
407 # BRK FILES
408
409 #thaidict.brk: $(SRCDATADIR)/thaidict.brk
410 # $(RMV) $@ && ln -s $(BUILDDIR) $@
411
412 $(BRKBLDDIR)/%.brk: $(BRKSRCDIR)/%.txt $(BINDIR)/genbrk$(EXEEXT) $(DAT_FILES)
413 $(INVOKE) $(BINDIR)/genbrk -c -i $(BUILDDIR) -r $< -o $@
414
415 #################################################### CTD
416 # CTD FILES
417
418 $(BRKBLDDIR)/%.ctd: $(BRKSRCDIR)/%.txt $(BINDIR)/genctd$(EXEEXT) $(DAT_FILES)
419 $(INVOKE) $(BINDIR)/genctd -c -i $(BUILDDIR) -o $@ $<
420
421 #################################################### CNV
422 # CNV FILES
423 $(BUILDDIR)/%.cnv: $(UCMSRCDIR)/%.ucm $(BINDIR)/makeconv$(EXEEXT)
424 $(INVOKE) $(BINDIR)/makeconv -c -d $(BUILDDIR) $(UCMSRCDIR)/$(<F)
425
426 #################################################### RES
427 # RES FILES
428
429 ### collation res
430 $(COLBLDDIR)/%.res: $(COLSRCDIR)/%.txt $(BINDIR)/genrb$(EXEEXT) $(DAT_FILES)
431 $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(COLSRCDIR) -d $(COLBLDDIR) $(<F)
432
433 $(COLBLDDIR)/$(INDEX_NAME).res: $(OUTTMPDIR)/$(COLLATION_TREE)/$(INDEX_NAME).txt $(BINDIR)/genrb$(EXEEXT)
434 $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(OUTTMPDIR)/$(COLLATION_TREE) -d $(COLBLDDIR) $(INDEX_NAME).txt
435
436 $(OUTTMPDIR)/$(COLLATION_TREE)/$(INDEX_NAME).txt: $(SRCLISTDEPS)
437 @echo "generating $@ (list of installed collation locales)"; \
438 $(RMV) $@; \
439 echo "// Warning this file is automatically generated" > $@; \
440 echo "$(INDEX_NAME):table(nofallback) {" >> $@; \
441 echo " InstalledLocales {" >> $@; \
442 for file in $(INSTALLED_COL_FILES); do \
443 echo " $$file {\"\"}" >> $@; \
444 done; \
445 echo " }" >> $@; \
446 echo "}" >> $@;
447
448 ### brk res
449 $(BRKBLDDIR)/%.res: $(BRKSRCDIR)/%.txt $(BINDIR)/genrb$(EXEEXT) $(DAT_FILES)
450 $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(BRKSRCDIR) -d $(BRKBLDDIR) $(<F)
451
452 $(BRKBLDDIR)/$(INDEX_NAME).res: $(OUTTMPDIR)/$(BREAK_TREE)/$(INDEX_NAME).txt $(BINDIR)/genrb$(EXEEXT)
453 $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(OUTTMPDIR)/$(BREAK_TREE) -d $(BRKBLDDIR) $(INDEX_NAME).txt
454
455 $(OUTTMPDIR)/$(BREAK_TREE)/$(INDEX_NAME).txt: $(SRCLISTDEPS)
456 @echo "generating $@ (list of installed break locales)"; \
457 $(RMV) $@; \
458 echo "// Warning this file is automatically generated" > $@; \
459 echo "$(INDEX_NAME):table(nofallback) {" >> $@; \
460 echo " InstalledLocales {" >> $@; \
461 for file in $(INSTALLED_BRS_FILES); do \
462 echo " $$file {\"\"}" >> $@; \
463 done; \
464 echo " }" >> $@; \
465 echo "}" >> $@;
466
467 ### RBNF res
468 $(RBNFBLDDIR)/%.res: $(RBNFSRCDIR)/%.txt $(BINDIR)/genrb$(EXEEXT) $(DAT_FILES)
469 $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(RBNFSRCDIR) -d $(RBNFBLDDIR) $(<F)
470
471 $(RBNFBLDDIR)/$(INDEX_NAME).res: $(OUTTMPDIR)/$(RBNF_TREE)/$(INDEX_NAME).txt $(BINDIR)/genrb$(EXEEXT)
472 $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(OUTTMPDIR)/$(RBNF_TREE) -d $(RBNFBLDDIR) $(INDEX_NAME).txt
473
474 $(OUTTMPDIR)/$(RBNF_TREE)/$(INDEX_NAME).txt: $(SRCLISTDEPS)
475 @echo "generating $@ (list of installed RBNF locales)"; \
476 $(RMV) $@; \
477 echo "// Warning this file is automatically generated" > $@; \
478 echo "$(INDEX_NAME):table(nofallback) {" >> $@; \
479 echo " InstalledLocales {" >> $@; \
480 for file in $(INSTALLED_RBNF_FILES); do \
481 echo " $$file {\"\"}" >> $@; \
482 done; \
483 echo " }" >> $@; \
484 echo "}" >> $@;
485
486 ### TRANSLIT res
487 $(TRANSLITBLDDIR)/%.res: $(TRANSLITSRCDIR)/%.txt $(BINDIR)/genrb$(EXEEXT) $(DAT_FILES)
488 $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(TRANSLITSRCDIR) -d $(TRANSLITBLDDIR) $(<F)
489
490 ### normal (locale) res
491 all-RES: $(RES_FILES)
492
493 $(BUILDDIR)/%.res: $(LOCSRCDIR)/%.txt $(BINDIR)/genrb$(EXEEXT) $(DAT_FILES)
494 $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(LOCSRCDIR) -d $(BUILDDIR) $(<F)
495
496 # if the tzcode directory contains a new tzdata*.tar.gz file, use it for zoneinfo.txt
497 TZDATA = $(firstword $(wildcard $(top_builddir)/tools/tzcode/tzdata*.tar.gz) $(wildcard $(top_srcdir)/tools/tzcode/tzdata*.tar.gz))
498
499 ifneq ($(TZDATA),)
500
501 TZCODE_DIR=$(top_builddir)/tools/tzcode
502 ZONEINFO=$(TZCODE_DIR)/zoneinfo.txt
503
504 # Override the normal genrb for zoneinfo.txt to always pull from
505 # icu/source/tools/tzcode/zoneinfo.txt
506 $(BUILDDIR)/zoneinfo.res: $(ZONEINFO) $(BINDIR)/genrb$(EXEEXT)
507 @echo Note: $(MISCSRCDIR)/zoneinfo.txt is IGNORED because $(TZDATA) is present.
508 $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -q -i $(BUILDDIR) -d $(BUILDDIR) $(ZONEINFO)
509
510 # Create the tzcode tool and zoneinfo.txt as needed.
511 $(ZONEINFO): $(TZDATA)
512 @echo "$(MAKE)[$(MAKELEVEL)]: Making \`$(ZONEINFO)' in \`$(TZCODE_DIR)'"; \
513 (cd $(TZCODE_DIR) && $(MAKE)) || exit; \
514
515 # end of zoneinfo.txt-generation
516 endif
517
518 # zoneinfo has some issues. Ignore some warnings with -q
519 $(BUILDDIR)/%.res: $(MISCSRCDIR)/%.txt $(BINDIR)/genrb$(EXEEXT)
520 $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -q -i $(BUILDDIR) -s $(MISCSRCDIR) -d $(BUILDDIR) $(<F)
521
522
523
524 $(OUTTMPDIR)/$(INDEX_NAME).txt: $(SRCLISTDEPS)
525 @echo "generating $@ (list of installed locales)"; \
526 $(RMV) $@; \
527 echo "// Warning this file is automatically generated" > $@; \
528 echo "$(INDEX_NAME):table(nofallback) {" >> $@; \
529 echo " InstalledLocales {" >> $@; \
530 for file in $(INSTALLED_RB_FILES); do \
531 echo " $$file {\"\"}" >> $@; \
532 done; \
533 echo " }" >> $@; \
534 echo "}" >> $@;
535
536 clean-resindex:
537 -$(RMV) $(BUILDDIR)/$(INDEX_NAME).txt $(OUTTMPDIR)/icudata.lst
538
539 $(INDEX_RES_FILE): $(INDEX_FILE) $(BINDIR)/genrb$(EXEEXT)
540 $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -d $(BUILDDIR) $(INDEX_FILE)
541
542 ###################################################################
543 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
544 cd $(top_builddir) \
545 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
546
547 icupkg.inc: $(srcdir)/icupkg.inc.in $(top_builddir)/config.status
548 cd $(top_builddir) \
549 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
550
551 ###########
552 ########### 390 (z/OS) support
553 UCMFILES390=ebcdic-xml-us.ucm ibm-37_P100-1995.ucm ibm-1047_P100-1995.ucm ibm-4909_P100-1999.ucm
554 # used to depend on uprops.icu ucase.icu ubidi.icu unorm.icu
555 # see Jitterbug 4497
556 ALLFILES390=pnames.icu cnvalias.icu $(UCMFILES390:.ucm=.cnv)
557
558 $(OUTTMPDIR)/icudata390.lst: $(SRCLISTDEPS)
559 @echo "generating $@ (list of 390 data files)"
560 @-$(RMV) $@
561 @for file in $(ALLFILES390); do \
562 echo $$file >> $@; \
563 done;
564
565 ifeq ($(POST_DATA_BUILD), os400-data-rebind)
566 os400-data-rebind: $(LIBICUUC)
567
568 $(LIBICUUC): $(LIBICUDT)
569 $(RMV) $(LIBICUUC)
570 (cd ../common && $(MAKE) RECURSIVE=YES) || exit;
571 endif
572