1 ## Makefile.in for ICU data
2 ## Copyright (c) 1999-2006, International Business Machines Corporation and
3 ## others. All Rights Reserved.
5 ## Source directory information
7 top_srcdir = @top_srcdir@
9 # So that you have $(top_builddir)/config.status
12 ## All the flags and other definitions are included here.
13 include $(top_builddir)/icudefs.mk
15 ## Build directory information
16 # So that $(top_builddir)/$(subdir) ~= "here"
19 #lib icu data for link
20 LIB_ICUDATA_NAME=$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX)
21 LIB_STATIC_ICUDATA_NAME=$(LIBSICU)$(DATA_STUBNAME)$(ICULIBSUFFIX)
23 # Allow Windows to override these options
24 ifeq ($(PKGDATA_OPTS),)
25 PKGDATA_OPTS = -O $(top_builddir)/data/icupkg.inc
27 ifeq ($(PKGDATA_VERSIONING),)
28 PKGDATA_VERSIONING = -r $(SO_TARGET_VERSION)
31 # This allows all the data to be in one directory
32 ifeq ($(PKGDATA_MODE),dll)
33 ICUPKGDATA_OUTDIR = $(LIBDIR)
35 ICUPKGDATA_OUTDIR = $(OUTDIR)
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)"'
41 ifeq ($(OS390_STUBDATA),1)
43 OS390INSTALL=install390
45 # Additional data for 390
46 OS390LIST=$(OUTTMPDIR)/icudata390.lst
47 OUTTMPDIR_390STUB=$(top_builddir)/data/out/tmp_390stub
50 # OBJDATADIR must be a short path (with ..'s) to the data.
52 ifeq ($(top_srcdir),..)
55 SRCDATADIR=$(top_srcdir)/data
57 ifeq ($(top_builddir),..)
60 OUTDIR=$(top_builddir)/data/out
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)
83 # relative lib links from pkgdata are the same as for tmp
84 TOOLDIR=$(top_builddir)/tools
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
95 ## List of standard targets
97 install: all-local install-local
99 distclean : distclean-local
104 distclean-local: clean
107 all-local: build-dir icupkg.inc build-local packagedata $(POST_DATA_BUILD) $(OS390PKG)
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)
121 -test -z *.map || $(RMV) *.map
123 clean-local: cleanpackage cleanfiles clean-map
126 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
130 $(RMV) $(LIBDIR)/$(LIB_ICUDATA_NAME)*.$(SO)* $(LIBDIR)/$(LIB_STATIC_ICUDATA_NAME).$(A)
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)
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
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)
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
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
168 $(INSTALL_DATA) $(ICUDATA_SOURCE_ARCHIVE) $(OUTDIR)
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)
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)
180 $(INSTALL_DATA) $(ICUDATA_SOURCE_ARCHIVE) $(DESTDIR)$(ICUPKGDATA_DIR)
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)
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)
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)
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)
209 DAT_FILES_SHORT=pnames.icu unames.icu cnvalias.icu ucadata.icu invuca.icu uidna.spp
210 DAT_FILES=$(DAT_FILES_SHORT:%=$(BUILDDIR)/%)
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)
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)
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=%)
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)
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
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=%)
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=%)
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=%)
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=%)
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)/%)
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)
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)
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)
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)
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)
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)
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)
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)
327 #####################################################
328 # General data build rules
330 ## Files to remove for 'make clean'
331 CLEANFILES = *~ icupkg.inc
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)"
338 @for file in $(ALL_FILES_LIST); do \
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)"
347 $(INVOKE) $(BINDIR)/icupkg -d $(BUILDDIR) --list -x \* $(ICUDATA_SOURCE_ARCHIVE) > $@
354 build-dir: $(BUILD_DIRS)
356 -$(MKINSTALLDIRS) $(BUILD_DIRS)
359 # Now, sections for building each kind of data.
361 #################################################### DAT
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)
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)
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)
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)
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)
389 # used to depend on $(BUILDDIR)/$(ICUDT)unorm.icu $(BUILDDIR)/$(ICUDT)ucase.icu
391 $(BUILDDIR)/ucadata.icu $(BUILDDIR)/$(ICUDT)invuca.icu: $(UNICODEDATADIR)/FractionalUCA.txt $(BINDIR)/genuca$(EXEEXT)
392 $(INVOKE) $(BINDIR)/genuca -s $(UNICODEDATADIR) -d $(BUILDDIR) -i $(BUILDDIR)
395 $(BUILDDIR)/unames.icu: $(UNICODEDATADIR)/UnicodeData.txt $(BINDIR)/gennames$(EXEEXT)
396 $(INVOKE) $(BINDIR)/gennames -1 -d $(BUILDDIR) $(UNICODEDATADIR)/UnicodeData.txt -u $(UNICODE_VERSION)
399 $(BUILDDIR)/cnvalias.icu: $(UCMSRCDIR)/convrtrs.txt $(BINDIR)/gencnval$(EXEEXT)
400 $(INVOKE) $(BINDIR)/gencnval -d $(BUILDDIR) $(UCMSRCDIR)/convrtrs.txt
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
406 #################################################### BRK
409 #thaidict.brk: $(SRCDATADIR)/thaidict.brk
410 # $(RMV) $@ && ln -s $(BUILDDIR) $@
412 $(BRKBLDDIR)/%.brk: $(BRKSRCDIR)/%.txt $(BINDIR)/genbrk$(EXEEXT) $(DAT_FILES)
413 $(INVOKE) $(BINDIR)/genbrk -c -i $(BUILDDIR) -r $< -o $@
415 #################################################### CTD
418 $(BRKBLDDIR)/%.ctd: $(BRKSRCDIR)/%.txt $(BINDIR)/genctd$(EXEEXT) $(DAT_FILES)
419 $(INVOKE) $(BINDIR)/genctd -c -i $(BUILDDIR) -o $@ $<
421 #################################################### CNV
423 $(BUILDDIR)/%.cnv: $(UCMSRCDIR)/%.ucm $(BINDIR)/makeconv$(EXEEXT)
424 $(INVOKE) $(BINDIR)/makeconv -c -d $(BUILDDIR) $(UCMSRCDIR)/$(<F)
426 #################################################### RES
430 $(COLBLDDIR)/%.res: $(COLSRCDIR)/%.txt $(BINDIR)/genrb$(EXEEXT) $(DAT_FILES)
431 $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(COLSRCDIR) -d $(COLBLDDIR) $(<F)
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
436 $(OUTTMPDIR)/$(COLLATION_TREE)/$(INDEX_NAME).txt: $(SRCLISTDEPS)
437 @echo "generating $@ (list of installed collation locales)"; \
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 {\"\"}" >> $@; \
449 $(BRKBLDDIR)/%.res: $(BRKSRCDIR)/%.txt $(BINDIR)/genrb$(EXEEXT) $(DAT_FILES)
450 $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(BRKSRCDIR) -d $(BRKBLDDIR) $(<F)
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
455 $(OUTTMPDIR)/$(BREAK_TREE)/$(INDEX_NAME).txt: $(SRCLISTDEPS)
456 @echo "generating $@ (list of installed break locales)"; \
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 {\"\"}" >> $@; \
468 $(RBNFBLDDIR)/%.res: $(RBNFSRCDIR)/%.txt $(BINDIR)/genrb$(EXEEXT) $(DAT_FILES)
469 $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(RBNFSRCDIR) -d $(RBNFBLDDIR) $(<F)
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
474 $(OUTTMPDIR)/$(RBNF_TREE)/$(INDEX_NAME).txt: $(SRCLISTDEPS)
475 @echo "generating $@ (list of installed RBNF locales)"; \
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 {\"\"}" >> $@; \
487 $(TRANSLITBLDDIR)/%.res: $(TRANSLITSRCDIR)/%.txt $(BINDIR)/genrb$(EXEEXT) $(DAT_FILES)
488 $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(TRANSLITSRCDIR) -d $(TRANSLITBLDDIR) $(<F)
490 ### normal (locale) res
491 all-RES: $(RES_FILES)
493 $(BUILDDIR)/%.res: $(LOCSRCDIR)/%.txt $(BINDIR)/genrb$(EXEEXT) $(DAT_FILES)
494 $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(LOCSRCDIR) -d $(BUILDDIR) $(<F)
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))
501 TZCODE_DIR=$(top_builddir)/tools/tzcode
502 ZONEINFO=$(TZCODE_DIR)/zoneinfo.txt
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)
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; \
515 # end of zoneinfo.txt-generation
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)
524 $(OUTTMPDIR)/$(INDEX_NAME).txt: $(SRCLISTDEPS)
525 @echo "generating $@ (list of installed locales)"; \
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 {\"\"}" >> $@; \
537 -$(RMV) $(BUILDDIR)/$(INDEX_NAME).txt $(OUTTMPDIR)/icudata.lst
539 $(INDEX_RES_FILE): $(INDEX_FILE) $(BINDIR)/genrb$(EXEEXT)
540 $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -d $(BUILDDIR) $(INDEX_FILE)
542 ###################################################################
543 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
545 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
547 icupkg.inc: $(srcdir)/icupkg.inc.in $(top_builddir)/config.status
549 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
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
556 ALLFILES390=pnames.icu cnvalias.icu $(UCMFILES390:.ucm=.cnv)
558 $(OUTTMPDIR)/icudata390.lst: $(SRCLISTDEPS)
559 @echo "generating $@ (list of 390 data files)"
561 @for file in $(ALLFILES390); do \
565 ifeq ($(POST_DATA_BUILD), os400-data-rebind)
566 os400-data-rebind: $(LIBICUUC)
568 $(LIBICUUC): $(LIBICUDT)
570 (cd ../common && $(MAKE) RECURSIVE=YES) || exit;