intl/icu/source/data/Makefile.in

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/intl/icu/source/data/Makefile.in	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,881 @@
     1.4 +## Makefile.in for ICU data
     1.5 +## Copyright (c) 1999-2013, International Business Machines Corporation and
     1.6 +## others. All Rights Reserved.
     1.7 +
     1.8 +## Source directory information
     1.9 +srcdir = @srcdir@
    1.10 +top_srcdir = @top_srcdir@
    1.11 +
    1.12 +# So that you have $(top_builddir)/config.status
    1.13 +top_builddir = ..
    1.14 +
    1.15 +## All the flags and other definitions are included here.
    1.16 +include $(top_builddir)/icudefs.mk
    1.17 +
    1.18 +## Build directory information
    1.19 +# So that  $(top_builddir)/$(subdir) ~= "here"
    1.20 +subdir = data
    1.21 +
    1.22 +#lib icu data for link
    1.23 +LIB_ICUDATA_NAME=$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX)
    1.24 +LIB_STATIC_ICUDATA_NAME=$(LIBSICU)$(DATA_STUBNAME)$(ICULIBSUFFIX)
    1.25 +
    1.26 +# Allow Windows to override these options
    1.27 +ifeq ($(PKGDATA_OPTS),)
    1.28 +PKGDATA_OPTS = -O $(top_builddir)/data/icupkg.inc
    1.29 +endif
    1.30 +ifeq ($(PKGDATA_VERSIONING),)
    1.31 +PKGDATA_VERSIONING = -r $(SO_TARGET_VERSION)
    1.32 +endif
    1.33 +
    1.34 +# This allows all the data to be in one directory
    1.35 +ifeq ($(PKGDATA_MODE),dll)
    1.36 +ICUPKGDATA_OUTDIR = $(LIBDIR)
    1.37 +else
    1.38 +ifeq ($(PKGDATA_MODE),static)
    1.39 +ICUPKGDATA_OUTDIR = $(LIBDIR)
    1.40 +else
    1.41 +ICUPKGDATA_OUTDIR = $(OUTDIR)
    1.42 +endif
    1.43 +endif
    1.44 +
    1.45 +CURDIR:=$(CURR_FULL_DIR)
    1.46 +# current directory should not be blank
    1.47 +ifeq ($(CURDIR),)
    1.48 +CURDIR=.
    1.49 +endif
    1.50 +PKGDATA = $(TOOLBINDIR)/pkgdata $(PKGDATA_OPTS) -q -c -s $(CURDIR)/out/build/$(ICUDATA_PLATFORM_NAME) -d $(ICUPKGDATA_OUTDIR)
    1.51 +OS390_PDS_NAME = -z -L $(BATCH_STUB_TARGET)
    1.52 +
    1.53 +ifeq ($(OS390_STUBDATA),1)
    1.54 +OS390PKG=package390
    1.55 +OS390INSTALL=install390
    1.56 +
    1.57 +# Additional data for 390
    1.58 +OS390LIST=$(OUTTMPDIR)/icudata390.lst
    1.59 +OUTTMPDIR_390STUB=$(top_builddir)/data/out/tmp_390stub
    1.60 +endif
    1.61 +
    1.62 +ifeq ($(OS390BATCH),1)
    1.63 +CPPFLAGS += -Wc,'ros,roc'
    1.64 +endif
    1.65 +
    1.66 +# OBJDATADIR must be a short path (with ..'s) to the data.
    1.67 +
    1.68 +ifeq ($(top_srcdir),..)
    1.69 +SRCDATADIR=.
    1.70 +else
    1.71 +SRCDATADIR=$(top_srcdir)/data
    1.72 +endif
    1.73 +ifeq ($(top_builddir),..)
    1.74 +OUTDIR=./out
    1.75 +else
    1.76 +OUTDIR=$(top_builddir)/data/out
    1.77 +endif
    1.78 +
    1.79 +OUTTMPDIR=$(OUTDIR)/tmp
    1.80 +MAINBUILDDIR=$(OUTDIR)/build
    1.81 +BUILDDIR=$(MAINBUILDDIR)/$(ICUDATA_PLATFORM_NAME)
    1.82 +UNICODEDATADIR=$(SRCDATADIR)/unidata
    1.83 +LOCSRCDIR=$(SRCDATADIR)/locales
    1.84 +CURRSRCDIR=$(SRCDATADIR)/curr
    1.85 +CURRBLDDIR=$(BUILDDIR)/curr
    1.86 +LANGSRCDIR=$(SRCDATADIR)/lang
    1.87 +LANGBLDDIR=$(BUILDDIR)/lang
    1.88 +REGIONSRCDIR=$(SRCDATADIR)/region
    1.89 +REGIONBLDDIR=$(BUILDDIR)/region
    1.90 +ZONESRCDIR=$(SRCDATADIR)/zone
    1.91 +ZONEBLDDIR=$(BUILDDIR)/zone
    1.92 +COLSRCDIR=$(SRCDATADIR)/coll
    1.93 +COLBLDDIR=$(BUILDDIR)/coll
    1.94 +RBNFSRCDIR=$(SRCDATADIR)/rbnf
    1.95 +RBNFBLDDIR=$(BUILDDIR)/rbnf
    1.96 +TRANSLITSRCDIR=$(SRCDATADIR)/translit
    1.97 +TRANSLITBLDDIR=$(BUILDDIR)/translit
    1.98 +MISCSRCDIR=$(SRCDATADIR)/misc
    1.99 +BRKSRCDIR=$(SRCDATADIR)/brkitr
   1.100 +BRKBLDDIR=$(BUILDDIR)/brkitr
   1.101 +MISCSRCDIR=$(SRCDATADIR)/misc
   1.102 +UCMSRCDIR=$(SRCDATADIR)/mappings
   1.103 +SPREPSRCDIR=$(SRCDATADIR)/sprep
   1.104 +COMINCDIR=$(top_srcdir)/common/unicode
   1.105 +SRCLISTDEPS=Makefile $(srcdir)/Makefile.in
   1.106 +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)
   1.107 +
   1.108 +# relative lib links from pkgdata are the same as for tmp
   1.109 +TOOLDIR=$(top_builddir)/tools
   1.110 +
   1.111 +## List of phony targets
   1.112 +.PHONY : all all-local all-recursive install install-local install-files	\
   1.113 +install-recursive clean clean-local clean-recursive distclean		\
   1.114 +distclean-local distclean-recursive dist dist-local dist-recursive	\
   1.115 +check check-local check-recursive build-local clean-resindex build-dir icudata.jar	\
   1.116 +check-exhaustive
   1.117 +
   1.118 +## Clear suffix list
   1.119 +.SUFFIXES :
   1.120 +
   1.121 +## List of standard targets
   1.122 +all: all-local
   1.123 +install: all-local install-local 
   1.124 +clean: clean-local
   1.125 +distclean : distclean-local
   1.126 +dist: 
   1.127 +check: all
   1.128 +
   1.129 +check-exhaustive: check
   1.130 +
   1.131 +-include Makefile.local
   1.132 +
   1.133 +
   1.134 +distclean-local: clean
   1.135 +	$(RMV) Makefile
   1.136 +
   1.137 +all-local: build-dir icupkg.inc build-local packagedata $(POST_DATA_BUILD) $(OS390PKG)
   1.138 +
   1.139 +dist-local:
   1.140 +
   1.141 +clean-map:
   1.142 +	-test -z *.map || $(RMV) *.map
   1.143 +
   1.144 +clean-local: cleanpackage cleanfiles clean-map
   1.145 +
   1.146 +cleanfiles:
   1.147 +	test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
   1.148 +
   1.149 +cleanpackage:
   1.150 +	$(RMV) $(OUTDIR)
   1.151 +	$(RMV) $(LIBDIR)/$(LIB_ICUDATA_NAME)*.$(SO)* $(LIBDIR)/$(LIB_STATIC_ICUDATA_NAME).$(A)
   1.152 +
   1.153 +check-local:
   1.154 +
   1.155 +# Find out if we have a source archive.
   1.156 +# If we have that, then use that instead of building everything from scratch.
   1.157 +ICUDATA_SOURCE_ARCHIVE = $(wildcard $(srcdir)/in/$(ICUDATA_PLATFORM_NAME).dat)
   1.158 +ifeq ($(ICUDATA_SOURCE_ARCHIVE),)
   1.159 +ICUDATA_ARCHIVE = $(firstword $(wildcard $(srcdir)/in/$(ICUDATA_BASENAME_VERSION)*.dat))
   1.160 +# We don't have the data in the current endianess or charset.
   1.161 +# See if we can find data of any archive type,
   1.162 +# and convert it to the current type.
   1.163 +ifneq ($(ICUDATA_ARCHIVE),)
   1.164 +ICUDATA_SOURCE_ARCHIVE = $(OUTDIR)/$(ICUDATA_PLATFORM_NAME).dat
   1.165 +$(ICUDATA_SOURCE_ARCHIVE): $(ICUDATA_ARCHIVE) $(OUTDIR)
   1.166 +	$(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $(ICUDATA_ARCHIVE) $(ICUDATA_SOURCE_ARCHIVE)
   1.167 +endif
   1.168 +else
   1.169 +ifneq ($(ENABLE_STATIC),YES)
   1.170 +ifeq ($(PKGDATA_MODE),common)
   1.171 +# We have a source data common archive in the native endianess,
   1.172 +# and it's what we want to build. Try to not run any of ICU's tools.
   1.173 +ICUDATA_SOURCE_IS_NATIVE_TARGET=YES
   1.174 +endif
   1.175 +endif
   1.176 +endif
   1.177 +
   1.178 +packagedata: icupkg.inc $(PKGDATA_LIST) build-local
   1.179 +ifneq ($(ENABLE_STATIC),)
   1.180 +ifeq ($(PKGDATA_MODE),dll)
   1.181 +	$(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) -m static $(PKGDATA_VERSIONING) $(PKGDATA_LIST)
   1.182 +endif
   1.183 +endif
   1.184 +ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES)
   1.185 +	$(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) $(PKGDATA_LIBNAME) $(PKGDATA_LIST)
   1.186 +ifeq ($(OS390BATCH),1)
   1.187 +	$(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) $(OS390_PDS_NAME) $(PKGDATA_LIST)
   1.188 +endif
   1.189 +else
   1.190 +	$(INSTALL_DATA) $(ICUDATA_SOURCE_ARCHIVE) $(OUTDIR)
   1.191 +endif
   1.192 +
   1.193 +## Install ICU data.
   1.194 +install-local: $(PKGDATA_LIST) ./icupkg.inc packagedata $(OS390INSTALL)
   1.195 +	$(MKINSTALLDIRS) $(TMPDATADIR) $(DESTDIR)$(ICUPKGDATA_DIR)
   1.196 +ifeq ($(PKGDATA_MODE),files)
   1.197 +	$(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)
   1.198 +	$(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(CURR_TREE)
   1.199 +	$(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(LANG_TREE)
   1.200 +	$(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(REGION_TREE)
   1.201 +	$(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(ZONE_TREE)
   1.202 +	$(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(BREAK_TREE)
   1.203 +	$(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(COLLATION_TREE)
   1.204 +	$(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(RBNF_TREE)
   1.205 +	$(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(TRANSLIT_TREE)
   1.206 +endif
   1.207 +ifneq ($(ENABLE_STATIC),)
   1.208 +ifeq ($(PKGDATA_MODE),dll)
   1.209 +	$(PKGDATA_INVOKE) $(PKGDATA) -m static -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_LIBDIR)
   1.210 +endif
   1.211 +endif
   1.212 +ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES)
   1.213 +	$(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)
   1.214 +else
   1.215 +	$(INSTALL_DATA) $(ICUDATA_SOURCE_ARCHIVE) $(DESTDIR)$(ICUPKGDATA_DIR)
   1.216 +endif
   1.217 +
   1.218 +
   1.219 +####
   1.220 +####
   1.221 +#### 390 support
   1.222 +install390: package390
   1.223 +	$(MKINSTALLDIRS) $(TMPDATADIR) $(DESTDIR)$(libdir)
   1.224 +	$(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)
   1.225 +ifeq ($(PKGDATA_MODE),dll)
   1.226 +	$(INSTALL-L) $(ICUPKGDATA_OUTDIR)/$(FINAL_IMPORT_LIB) $(DESTDIR)$(ICUPKGDATA_DIR)/$(FINAL_IMPORT_LIB)
   1.227 +endif
   1.228 +
   1.229 +#### $(LIB_ICUDATA_NAME)$(STUB_SUFFIX) is the subset data for batch mode
   1.230 +package390: $(OUTTMPDIR)/icudata390.lst $(PKGDATA_LIST) ./icupkg.inc packagedata
   1.231 +	ln -s $(ICUDATA_NAME) $(OUTDIR)/build/$(ICUDATA_NAME)$(STUB_SUFFIX)
   1.232 +	$(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)
   1.233 +	cp $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX).$(SO) $(top_builddir)/stubdata/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX).$(SO)
   1.234 +
   1.235 +
   1.236 +##### Define all the data files. the build rule that depends on them is below.
   1.237 +# X_FILES_SHORT = just the base names (for lists)
   1.238 +# X_FILES = full paths (for dependency)
   1.239 +
   1.240 +## DAT files - Misc. data files.
   1.241 +#  2005-may-05 Removed Unicode properties files (unorm.icu, uprops.icu, ucase.icu, ubidi.icu)
   1.242 +#  from data build. See Jitterbug 4497. (makedata.mak revision 1.117)
   1.243 +#  2010-dec Removed pnames.icu.
   1.244 +# These are now hardcoded in ICU4C and only loaded in ICU4J.
   1.245 +#
   1.246 +DAT_FILES_SHORT=unames.icu cnvalias.icu coll/ucadata.icu coll/invuca.icu nfc.nrm nfkc.nrm nfkc_cf.nrm uts46.nrm
   1.247 +DAT_FILES=$(DAT_FILES_SHORT:%=$(BUILDDIR)/%)
   1.248 +
   1.249 +## BRK files
   1.250 +BREAK_TREE=brkitr
   1.251 +-include $(BRKSRCDIR)/brkfiles.mk
   1.252 +-include $(BRKSRCDIR)/brklocal.mk
   1.253 +ALL_BRK_SOURCE= $(BRK_SOURCE) $(BRK_SOURCE_LOCAL)
   1.254 +BRK_FILES_SHORT=$(ALL_BRK_SOURCE:%.txt=$(BREAK_TREE)/%.brk)
   1.255 +BRK_FILES=$(ALL_BRK_SOURCE:%.txt=$(BRKBLDDIR)/%.brk)
   1.256 +ifdef BRK_DICT_SOURCE
   1.257 +ALL_DICT_SOURCE=$(BRK_DICT_SOURCE) $(BRK_DICT_SOURCE_LOCAL)
   1.258 +DICT_FILES_SHORT=$(ALL_DICT_SOURCE:%.txt=$(BREAK_TREE)/%.dict)
   1.259 +DICT_FILES=$(ALL_DICT_SOURCE:%.txt=$(BRKBLDDIR)/%.dict)
   1.260 +endif
   1.261 +ifdef BRK_RES_SOURCE
   1.262 +BRS_SRC= root.txt $(BRK_RES_SOURCE) $(BRK_RES_SOURCE_LOCAL)
   1.263 +BRS_SRC_FILES = $(BRS_SRC:%=$(BRKSRCDIR)/%)
   1.264 +INSTALLED_BRS_FILES = $(BRK_RES_SOURCE:%.txt=%)  $(BRK_RES_SOURCE_LOCAL:%.txt=%)
   1.265 +endif
   1.266 +
   1.267 +## Confusables (Spoofing) files
   1.268 +ALL_CFU_SOURCE=$(UNICODEDATADIR)/confusables.txt $(UNICODEDATADIR)/confusablesWholeScript.txt
   1.269 +CFU_FILES_SHORT=confusables.cfu
   1.270 +CFU_FILES=$(BUILDDIR)/$(CFU_FILES_SHORT)
   1.271 +
   1.272 +## UCM files
   1.273 +-include $(UCMSRCDIR)/ucmcore.mk
   1.274 +-include $(UCMSRCDIR)/ucmfiles.mk
   1.275 +-include $(UCMSRCDIR)/ucmebcdic.mk
   1.276 +-include $(UCMSRCDIR)/ucmlocal.mk
   1.277 +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)
   1.278 +UCM_FILES = $(ALL_UCM_SOURCE:%=$(SRCDATADIR)/%)
   1.279 +CNV_FILES = $(ALL_UCM_SOURCE:%.ucm=$(BUILDDIR)/%.cnv)
   1.280 +CNV_FILES_SHORT = $(ALL_UCM_SOURCE:%.ucm=%.cnv)
   1.281 +UCM_SOURCE_SPECIAL=$(UCM_SOURCE_EBCDIC_IGNORE_SISO) $(UCM_SOURCE_EBCDIC_IGNORE_SISO_LOCAL)
   1.282 +UCM_FILES_SPECIAL=$(UCM_SOURCE_SPECIAL:%=$(UCMSRCDIR)/%) 
   1.283 +CNV_FILES_SPECIAL=$(UCM_SOURCE_SPECIAL:%.ucm=$(BUILDDIR)/%.cnv) 
   1.284 +CNV_FILES_SHORT_SPECIAL=$(UCM_SOURCE_SPECIAL:%.ucm=%.cnv) 
   1.285 +
   1.286 +## RES files
   1.287 +-include $(LOCSRCDIR)/resfiles.mk
   1.288 +-include $(CURRSRCDIR)/resfiles.mk
   1.289 +-include $(LANGSRCDIR)/resfiles.mk
   1.290 +-include $(REGIONSRCDIR)/resfiles.mk
   1.291 +-include $(ZONESRCDIR)/resfiles.mk
   1.292 +-include $(COLSRCDIR)/colfiles.mk
   1.293 +-include $(RBNFSRCDIR)/rbnffiles.mk
   1.294 +-include $(TRANSLITSRCDIR)/trnsfiles.mk
   1.295 +-include $(LOCSRCDIR)/reslocal.mk
   1.296 +-include $(CURRSRCDIR)/reslocal.mk
   1.297 +-include $(LANGSRCDIR)/reslocal.mk
   1.298 +-include $(REGIONSRCDIR)/reslocal.mk
   1.299 +-include $(ZONESRCDIR)/reslocal.mk
   1.300 +-include $(COLSRCDIR)/collocal.mk
   1.301 +-include $(BRKSRCDIR)/brslocal.mk
   1.302 +-include $(RBNFSRCDIR)/rbnflocal.mk
   1.303 +-include $(TRANSLITSRCDIR)/trnslocal.mk
   1.304 +ifdef GENRB_SOURCE
   1.305 +RES_SRC= root.txt $(GENRB_SOURCE) $(GENRB_ALIAS_SOURCE) $(GENRB_SOURCE_LOCAL) $(GENRB_ALIAS_SOURCE_LOCAL)
   1.306 +RES_SRC_FILES = $(RES_SRC:%=$(LOCSRCDIR)/%)
   1.307 +INSTALLED_RB_FILES = $(GENRB_SOURCE:%.txt=%) $(GENRB_SOURCE_LOCAL:%.txt=%)
   1.308 +endif
   1.309 +ifdef CURR_SOURCE
   1.310 +CURR_SRC= root.txt supplementalData.txt $(CURR_SOURCE) $(CURR_ALIAS_SOURCE) $(CURR_SOURCE_LOCAL)
   1.311 +CURR_SRC_FILES = $(CURR_SRC:%=$(CURRSRCDIR)/%)
   1.312 +INSTALLED_CURR_FILES = $(CURR_SOURCE:%.txt=%)  $(CURR_SOURCE_LOCAL:%.txt=%)
   1.313 +endif
   1.314 +ifdef LANG_SOURCE
   1.315 +LANG_SRC= root.txt $(LANG_SOURCE) $(LANG_ALIAS_SOURCE) $(LANG_SOURCE_LOCAL)
   1.316 +LANG_SRC_FILES = $(LANG_SRC:%=$(LANGSRCDIR)/%)
   1.317 +INSTALLED_LANG_FILES = $(LANG_SOURCE:%.txt=%)  $(LANG_SOURCE_LOCAL:%.txt=%)
   1.318 +endif
   1.319 +ifdef REGION_SOURCE
   1.320 +REGION_SRC= root.txt $(REGION_SOURCE) $(REGION_ALIAS_SOURCE) $(REGION_SOURCE_LOCAL)
   1.321 +REGION_SRC_FILES = $(REGION_SRC:%=$(REGIONSRCDIR)/%)
   1.322 +INSTALLED_REGION_FILES = $(REGION_SOURCE:%.txt=%)  $(REGION_SOURCE_LOCAL:%.txt=%)
   1.323 +endif
   1.324 +ifdef ZONE_SOURCE
   1.325 +ZONE_SRC= root.txt $(ZONE_SOURCE) $(ZONE_ALIAS_SOURCE) $(ZONE_SOURCE_LOCAL)
   1.326 +ZONE_SRC_FILES = $(ZONE_SRC:%=$(ZONESRCDIR)/%)
   1.327 +INSTALLED_ZONE_FILES = $(ZONE_SOURCE:%.txt=%)  $(ZONE_SOURCE_LOCAL:%.txt=%)
   1.328 +endif
   1.329 +ifdef COLLATION_SOURCE
   1.330 +COL_SRC= root.txt $(COLLATION_SOURCE) $(COLLATION_ALIAS_SOURCE) $(COLLATION_SOURCE_LOCAL)
   1.331 +COL_SRC_FILES = $(COL_SRC:%=$(COLSRCDIR)/%)
   1.332 +INSTALLED_COL_FILES = $(COLLATION_SOURCE:%.txt=%)  $(COLLATION_SOURCE_LOCAL:%.txt=%)
   1.333 +endif
   1.334 +ifdef RBNF_SOURCE
   1.335 +RBNF_SRC= root.txt $(RBNF_SOURCE) $(RBNF_ALIAS_SOURCE) $(RBNF_SOURCE_LOCAL)
   1.336 +RBNF_SRC_FILES = $(RBNF_SRC:%=$(RBNFSRCDIR)/%)
   1.337 +INSTALLED_RBNF_FILES = $(RBNF_SOURCE:%.txt=%)  $(RBNF_SOURCE_LOCAL:%.txt=%)
   1.338 +endif
   1.339 +ifdef TRANSLIT_SOURCE
   1.340 +TRANSLIT_SRC= $(TRANSLIT_SOURCE) $(TRANSLIT_ALIAS_SOURCE) $(TRANSLIT_SOURCE_LOCAL)
   1.341 +TRANSLIT_SRC_FILES = $(TRANSLIT_SRC:%=$(TRANSLITSRCDIR)/%)
   1.342 +INSTALLED_TRANSLIT_FILES = $(TRANSLIT_SOURCE:%.txt=%)  $(TRANSLIT_SOURCE_LOCAL:%.txt=%)
   1.343 +endif
   1.344 +GENRBOPTS=-k
   1.345 +
   1.346 +## MISC files
   1.347 +-include $(MISCSRCDIR)/miscfiles.mk
   1.348 +-include $(MISCSRCDIR)/misclocal.mk
   1.349 +MSC_SOURCE= $(MISC_SOURCE) $(MISC_SOURCE_LOCAL)
   1.350 +MSC_SRC_FILES=$(MSC_SOURCE:%=$(MISCSRCDIR)/%)
   1.351 +
   1.352 +ifeq ($(ENABLE_SO_VERSION_DATA),1)
   1.353 +ifeq ($(PKGDATA_MODE),dll)
   1.354 +SO_VERSION_DATA = $(OUTTMPDIR)/icudata.res
   1.355 +$(SO_VERSION_DATA) : $(MISCSRCDIR)/icudata.rc
   1.356 +        # fixme: need to tell whether to use - or /, $(SOURCEFILE) or $<
   1.357 +	rc.exe -i$(srcdir)/../common -i$(top_builddir)/common -fo$@ $(CPPFLAGS) $<
   1.358 +endif
   1.359 +endif
   1.360 +
   1.361 +INDEX_NAME=res_index
   1.362 +INDEX_FILE=$(OUTTMPDIR)/$(INDEX_NAME).txt
   1.363 +
   1.364 +ALL_RES_SRC= $(RES_SRC) $(TRNS_SOURCE) $(MSC_SOURCE)
   1.365 +RES_FILES = $(ALL_RES_SRC:%.txt=$(BUILDDIR)/%.res) $(BUILDDIR)/$(INDEX_NAME).res $(BUILDDIR)/pool.res
   1.366 +RES_FILES_SHORT = $(ALL_RES_SRC:%.txt=%.res) $(INDEX_NAME).res pool.res
   1.367 +PKGDATA_LIST = $(OUTTMPDIR)/icudata.lst
   1.368 +
   1.369 +CURR_TREE=curr
   1.370 +CURR_INDEX_FILE=$(OUTTMPDIR)/$(CURR_TREE)/$(INDEX_NAME).txt
   1.371 +CURR_FILES = $(CURR_SRC:%.txt=$(CURRBLDDIR)/%.res) $(CURRBLDDIR)/$(INDEX_NAME).res $(CURRBLDDIR)/pool.res
   1.372 +CURR_FILES_SHORT = $(CURR_SRC:%.txt=$(CURR_TREE)/%.res) $(CURR_TREE)/$(INDEX_NAME).res $(CURR_TREE)/pool.res
   1.373 +
   1.374 +LANG_TREE=lang
   1.375 +LANG_INDEX_FILE=$(OUTTMPDIR)/$(LANG_TREE)/$(INDEX_NAME).txt
   1.376 +LANG_FILES = $(LANG_SRC:%.txt=$(LANGBLDDIR)/%.res) $(LANGBLDDIR)/$(INDEX_NAME).res $(LANGBLDDIR)/pool.res
   1.377 +LANG_FILES_SHORT = $(LANG_SRC:%.txt=$(LANG_TREE)/%.res) $(LANG_TREE)/$(INDEX_NAME).res $(LANG_TREE)/pool.res
   1.378 +
   1.379 +REGION_TREE=region
   1.380 +REGION_INDEX_FILE=$(OUTTMPDIR)/$(REGION_TREE)/$(INDEX_NAME).txt
   1.381 +REGION_FILES = $(REGION_SRC:%.txt=$(REGIONBLDDIR)/%.res) $(REGIONBLDDIR)/$(INDEX_NAME).res $(REGIONBLDDIR)/pool.res
   1.382 +REGION_FILES_SHORT = $(REGION_SRC:%.txt=$(REGION_TREE)/%.res) $(REGION_TREE)/$(INDEX_NAME).res $(REGION_TREE)/pool.res
   1.383 +
   1.384 +ZONE_TREE=zone
   1.385 +ZONE_INDEX_FILE=$(OUTTMPDIR)/$(ZONE_TREE)/$(INDEX_NAME).txt
   1.386 +ZONE_FILES = $(ZONE_SRC:%.txt=$(ZONEBLDDIR)/%.res) $(ZONEBLDDIR)/$(INDEX_NAME).res $(ZONEBLDDIR)/pool.res
   1.387 +ZONE_FILES_SHORT = $(ZONE_SRC:%.txt=$(ZONE_TREE)/%.res) $(ZONE_TREE)/$(INDEX_NAME).res $(ZONE_TREE)/pool.res
   1.388 +
   1.389 +COLLATION_TREE=coll
   1.390 +COLLATION_INDEX_FILE=$(OUTTMPDIR)/$(COLLATION_TREE)/$(INDEX_NAME).txt
   1.391 +COLLATION_INDEX_RES=$(COLBLDDIR)/$(INDEX_NAME).res
   1.392 +COLLATION_INDEX_RES_SHORT=$(COLLATION_TREE)/$(INDEX_NAME).res
   1.393 +COLLATION_FILES = $(COL_SRC:%.txt=$(COLBLDDIR)/%.res) $(COLLATION_INDEX_RES)
   1.394 +COLLATION_FILES_SHORT = $(COL_SRC:%.txt=$(COLLATION_TREE)/%.res)
   1.395 +
   1.396 +BRK_RES_INDEX_FILE=$(OUTTMPDIR)/$(BREAK_TREE)/$(INDEX_NAME).txt
   1.397 +BRK_RES_INDEX_RES=$(BRKBLDDIR)/$(INDEX_NAME).res
   1.398 +BRK_RES_INDEX_RES_SHORT=$(BREAK_TREE)/$(INDEX_NAME).res
   1.399 +BRK_RES_FILES = $(BRS_SRC:%.txt=$(BRKBLDDIR)/%.res) $(BRK_RES_INDEX_RES)
   1.400 +BRK_RES_FILES_SHORT = $(BRS_SRC:%.txt=$(BREAK_TREE)/%.res)
   1.401 +
   1.402 +RBNF_TREE=rbnf
   1.403 +RBNF_INDEX_FILE=$(OUTTMPDIR)/$(RBNF_TREE)/$(INDEX_NAME).txt
   1.404 +RBNF_INDEX_RES=$(RBNFBLDDIR)/$(INDEX_NAME).res
   1.405 +RBNF_INDEX_RES_SHORT=$(RBNF_TREE)/$(INDEX_NAME).res
   1.406 +RBNF_FILES = $(RBNF_SRC:%.txt=$(RBNFBLDDIR)/%.res) $(RBNF_INDEX_RES)
   1.407 +RBNF_FILES_SHORT = $(RBNF_SRC:%.txt=$(RBNF_TREE)/%.res)
   1.408 +
   1.409 +TRANSLIT_TREE=translit
   1.410 +#TRANSLIT_INDEX_FILE=$(OUTTMPDIR)/$(TRANSLIT_TREE)/$(INDEX_NAME).txt
   1.411 +#TRANSLIT_INDEX_RES=$(TRANSLITBLDDIR)/$(INDEX_NAME).res
   1.412 +#TRANSLIT_INDEX_RES_SHORT=$(TRANSLIT_TREE)/$(INDEX_NAME).res
   1.413 +TRANSLIT_FILES = $(TRANSLIT_SRC:%.txt=$(TRANSLITBLDDIR)/%.res)
   1.414 +TRANSLIT_FILES_SHORT = $(TRANSLIT_SRC:%.txt=$(TRANSLIT_TREE)/%.res)
   1.415 +
   1.416 +## SPP files
   1.417 +-include $(SPREPSRCDIR)/sprepfiles.mk
   1.418 +-include $(SPREPSRCDIR)/spreplocal.mk
   1.419 +ALL_SPREP_SOURCE=$(SPREP_SOURCE) $(SPREP_SOURCE_LOCAL)
   1.420 +SPREP_FILES = $(ALL_SPREP_SOURCE:%.txt=$(BUILDDIR)/%.spp)
   1.421 +SPREP_FILES_SHORT = $(ALL_SPREP_SOURCE:%.txt=%.spp)
   1.422 +
   1.423 +## All generated files
   1.424 +ALL_FILES = $(DAT_FILES) $(CNV_FILES) $(CNV_FILES_SPECIAL) $(BRK_FILES) $(DICT_FILES) $(RES_FILES) $(INDEX_RES_FILE) $(CURR_FILES) $(LANG_FILES) $(REGION_FILES) $(ZONE_FILES) $(COLLATION_FILES) $(BRK_RES_FILES) $(RBNF_FILES) $(TRANSLIT_FILES) $(SPREP_FILES) $(CFU_FILES)
   1.425 +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)
   1.426 +# a list to use in the .lst files (package-relative)
   1.427 +COLL_FILES_LIST=$(COLLATION_FILES_SHORT) $(COLLATION_INDEX_RES_SHORT)
   1.428 +BRK_FILES_LIST=$(BRK_FILES_SHORT) $(BRK_RES_FILES_SHORT) $(BRK_RES_INDEX_RES_SHORT) $(DICT_FILES_SHORT)
   1.429 +LOCALE_FILES_LIST= $(RES_FILES_SHORT) $(LANG_FILES_SHORT) $(REGION_FILES_SHORT) $(ZONE_FILES_SHORT)
   1.430 +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)
   1.431 +UNI_CORE_DATA=pnames.icu uprops.icu ucase.icu ubidi.icu
   1.432 +UNI_CORE_TARGET_DATA=$(UNI_CORE_DATA:%=$(BUILDDIR)/%)
   1.433 +
   1.434 +ifneq ($(INCLUDE_UNI_CORE_DATA),)
   1.435 +MISC_FILES_LIST+=$(UNI_CORE_DATA)
   1.436 +build-local: uni-core-data
   1.437 +endif
   1.438 +
   1.439 +#####################################################
   1.440 +# General data build rules
   1.441 +
   1.442 +## Files to remove for 'make clean'
   1.443 +CLEANFILES = *~ icupkg.inc
   1.444 +
   1.445 +ifeq ($(ICUDATA_SOURCE_ARCHIVE),)
   1.446 +build-local: build-dir $(SO_VERSION_DATA) $(ALL_FILES) $(PKGDATA_LIST) $(OS390LIST)
   1.447 +$(PKGDATA_LIST): $(SRCLISTDEPS)
   1.448 +	@echo "generating $@ (list of data files)"
   1.449 +	@-$(RMV) $@
   1.450 +	@for file in $(COLL_FILES_LIST); do \
   1.451 +	  echo $$file >> $@; \
   1.452 +	done;
   1.453 +	@for file in $(BRK_FILES_LIST); do \
   1.454 +	  echo $$file >> $@; \
   1.455 +	done;
   1.456 +	@for file in $(LOCALE_FILES_LIST); do \
   1.457 +	  echo $$file >> $@; \
   1.458 +	done;
   1.459 +	@for file in $(MISC_FILES_LIST); do \
   1.460 +	  echo $$file >> $@; \
   1.461 +	done;
   1.462 +else
   1.463 +build-local: build-dir $(SO_VERSION_DATA) $(PKGDATA_LIST) $(OS390LIST)
   1.464 +$(PKGDATA_LIST): $(SRCLISTDEPS) $(ICUDATA_SOURCE_ARCHIVE)
   1.465 +ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES)
   1.466 +	@echo "Unpacking $(ICUDATA_SOURCE_ARCHIVE) and generating $@ (list of data files)"
   1.467 +	@-$(RMV) $@
   1.468 +	$(INVOKE) $(TOOLBINDIR)/icupkg -d $(BUILDDIR) --list -x \* $(ICUDATA_SOURCE_ARCHIVE) -o $@
   1.469 +else
   1.470 +	@echo "$@" > $@
   1.471 +endif
   1.472 +endif
   1.473 +
   1.474 +
   1.475 +$(BUILD_DIRS): build-dir
   1.476 +
   1.477 +build-dir:
   1.478 +	@list='$(BUILD_DIRS)'; \
   1.479 +	for dir in $$list; do \
   1.480 +	  if ! test -d $$dir; then \
   1.481 +	    echo $(MKINSTALLDIRS) $(BUILD_DIRS); \
   1.482 +	    $(MKINSTALLDIRS) $(BUILD_DIRS); \
   1.483 +	  fi; \
   1.484 +	done
   1.485 +
   1.486 +# The | is an order-only prerequisite. This helps when the -j option is used,
   1.487 +# and we don't want the files to be built before the directories are built.
   1.488 +ifneq ($(filter order-only,$(.FEATURES)),)
   1.489 +$(ALL_FILES) $(ALL_INDEX_SRC_FILES): | build-dir
   1.490 +endif
   1.491 +
   1.492 +# Now, sections for building each kind of data.
   1.493 +
   1.494 +####################################################    DAT
   1.495 +# DAT FILES
   1.496 +
   1.497 +# cnvalias.icu
   1.498 +$(BUILDDIR)/cnvalias.icu: $(UCMSRCDIR)/convrtrs.txt $(TOOLBINDIR)/gencnval$(TOOLEXEEXT)
   1.499 +	$(INVOKE) $(TOOLBINDIR)/gencnval -d $(BUILDDIR) $(UCMSRCDIR)/convrtrs.txt
   1.500 +
   1.501 +# Targets for prebuilt Unicode data
   1.502 +$(BUILDDIR)/%.icu: $(SRCDATADIR)/in/%.icu
   1.503 +	$(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $< $@
   1.504 +
   1.505 +$(BUILDDIR)/%.nrm: $(SRCDATADIR)/in/%.nrm
   1.506 +	$(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $< $@
   1.507 +
   1.508 +$(BUILDDIR)/coll/%.icu: $(SRCDATADIR)/in/coll/%.icu
   1.509 +	$(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $< $@
   1.510 +
   1.511 +####################################################    SPP
   1.512 +# SPP FILES
   1.513 +
   1.514 +$(BUILDDIR)/%.spp: $(SPREPSRCDIR)/%.txt $(TOOLBINDIR)/gensprep$(TOOLEXEEXT) $(BUILDDIR)/unames.icu
   1.515 +	$(INVOKE) $(TOOLBINDIR)/gensprep -d $(BUILDDIR) -i $(BUILDDIR) -s $(SPREPSRCDIR) -b $(@F:%.spp=%) -m $(UNICODEDATADIR) -u 3.2.0 $(<F)
   1.516 +
   1.517 +####################################################    BRK
   1.518 +# BRK FILES
   1.519 +
   1.520 +$(BRKBLDDIR)/%.brk: $(BRKSRCDIR)/%.txt $(TOOLBINDIR)/genbrk$(TOOLEXEEXT) $(DAT_FILES)
   1.521 +	$(INVOKE) $(TOOLBINDIR)/genbrk -c -i $(BUILDDIR) -r $< -o $@
   1.522 +
   1.523 +####################################################    DICT
   1.524 +# DICT FILES
   1.525 +
   1.526 +# .dict file generated regardless of whether dictionary file exists
   1.527 +
   1.528 +$(BRKBLDDIR)/%.dict: $(TOOLBINDIR)/gendict$(TOOLEXEEXT) $(DAT_FILES)
   1.529 +	$(INVOKE) $(TOOLBINDIR)/gendict --uchars -c -i $(BUILDDIR) $(BRKSRCDIR)/$(*F).txt $@
   1.530 +
   1.531 +$(BRKBLDDIR)/thaidict.dict: $(TOOLBINDIR)/gendict$(TOOLEXEEXT) $(DAT_FILES)
   1.532 +	$(INVOKE) $(TOOLBINDIR)/gendict --bytes --transform offset-0x0e00 -c -i $(BUILDDIR) $(BRKSRCDIR)/thaidict.txt $(BRKBLDDIR)/thaidict.dict
   1.533 +
   1.534 +$(BRKBLDDIR)/laodict.dict: $(TOOLBINDIR)/gendict$(TOOLEXEEXT) $(DAT_FILES)
   1.535 +	$(INVOKE) $(TOOLBINDIR)/gendict --bytes --transform offset-0x0e80 -c -i $(BUILDDIR) $(BRKSRCDIR)/laodict.txt $(BRKBLDDIR)/laodict.dict
   1.536 +
   1.537 +# TODO: figure out why combining characters are here?
   1.538 +$(BRKBLDDIR)/khmerdict.dict: $(TOOLBINDIR)/gendict$(TOOLEXEEXT) $(DAT_FILES)
   1.539 +	$(INVOKE) $(TOOLBINDIR)/gendict --bytes --transform offset-0x1780 -c -i $(BUILDDIR) $(BRKSRCDIR)/khmerdict.txt $(BRKBLDDIR)/khmerdict.dict
   1.540 +
   1.541 +####################################################    CFU
   1.542 +# CFU FILES
   1.543 +#    Note: gencfu requires two input files to produce a single output file.
   1.544 +#          There will be exactly one target file and two source files.
   1.545 +#          The $(word n, ...) selects the nth word from the following stuff.
   1.546 +#          There must be a nicer way to do this.
   1.547 +
   1.548 +$(CFU_FILES): $(ALL_CFU_SOURCE) $(TOOLBINDIR)/gencfu$(TOOLEXEEXT) $(DAT_FILES)
   1.549 +	$(INVOKE) echo ALL_CFU_SOURCE: $(ALL_CFU_SOURCE)
   1.550 +	$(INVOKE) echo CFU_FILES: $(CFU_FILES)
   1.551 +	$(INVOKE) echo CFU_FILES_SHORT: $(CFU_FILES_SHORT)
   1.552 +	$(INVOKE) $(TOOLBINDIR)/gencfu -c -i $(BUILDDIR) -r $(word 1,$(ALL_CFU_SOURCE)) -w $(word 2,$(ALL_CFU_SOURCE)) -o $@
   1.553 +
   1.554 +
   1.555 +####################################################    CNV
   1.556 +# CNV FILES
   1.557 +$(CNV_FILES_SPECIAL) : $(UCM_FILES_SPECIAL) $(TOOLBINDIR)/makeconv$(TOOLEXEEXT) 
   1.558 +	$(INVOKE) $(TOOLBINDIR)/makeconv --ignore-siso-check -c -d $(BUILDDIR) $(UCMSRCDIR)/$(@F:%.cnv=%.ucm) 
   1.559 +$(BUILDDIR)/%.cnv: $(UCMSRCDIR)/%.ucm $(TOOLBINDIR)/makeconv$(TOOLEXEEXT)
   1.560 +	$(INVOKE) $(TOOLBINDIR)/makeconv -c -d $(BUILDDIR) $(UCMSRCDIR)/$(<F)
   1.561 +
   1.562 +####################################################    RES
   1.563 +# RES FILES
   1.564 +
   1.565 +### curr res
   1.566 +$(CURRBLDDIR)/%.res: $(CURRSRCDIR)/%.txt  $(TOOLBINDIR)/genrb$(TOOLEXEEXT) $(DAT_FILES)
   1.567 +	$(INVOKE) $(TOOLBINDIR)/genrb --usePoolBundle $(GENRBOPTS) -i $(BUILDDIR) -s $(CURRSRCDIR) -d $(CURRBLDDIR) $(<F)
   1.568 +
   1.569 +# copy the curr/pool.res file from the source folder to the build output folder
   1.570 +# and swap it to native endianness
   1.571 +$(CURRBLDDIR)/pool.res: $(CURRSRCDIR)/pool.res
   1.572 +	$(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $(CURRSRCDIR)/pool.res $(CURRBLDDIR)/pool.res
   1.573 +
   1.574 +$(CURRBLDDIR)/$(INDEX_NAME).res: $(OUTTMPDIR)/$(CURR_TREE)/$(INDEX_NAME).txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT)
   1.575 +	$(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(OUTTMPDIR)/$(CURR_TREE) -d $(CURRBLDDIR) $(INDEX_NAME).txt
   1.576 +
   1.577 +$(CURR_INDEX_FILE): $(SRCLISTDEPS)
   1.578 +	@echo "generating $@ (list of installed currency name locales)"; \
   1.579 +	$(RMV) $@; \
   1.580 +	echo "// Warning this file is automatically generated" > $@; \
   1.581 +	echo "$(INDEX_NAME):table(nofallback) {" >> $@; \
   1.582 +	echo "    InstalledLocales {" >> $@; \
   1.583 +	for file in $(INSTALLED_CURR_FILES); do \
   1.584 +	  echo "        $$file {\"\"}" >> $@; \
   1.585 +	done; \
   1.586 +	echo "    }" >> $@; \
   1.587 +	echo "}" >> $@;
   1.588 +
   1.589 +### lang res
   1.590 +$(LANGBLDDIR)/%.res: $(LANGSRCDIR)/%.txt  $(TOOLBINDIR)/genrb$(TOOLEXEEXT) $(DAT_FILES)
   1.591 +	$(INVOKE) $(TOOLBINDIR)/genrb --usePoolBundle $(GENRBOPTS) -i $(BUILDDIR) -s $(LANGSRCDIR) -d $(LANGBLDDIR) $(<F)
   1.592 +
   1.593 +# copy the lang/pool.res file from the source folder to the build output folder
   1.594 +# and swap it to native endianness
   1.595 +$(LANGBLDDIR)/pool.res: $(LANGSRCDIR)/pool.res
   1.596 +	$(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $(LANGSRCDIR)/pool.res $(LANGBLDDIR)/pool.res
   1.597 +
   1.598 +$(LANGBLDDIR)/$(INDEX_NAME).res: $(OUTTMPDIR)/$(LANG_TREE)/$(INDEX_NAME).txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT)
   1.599 +	$(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(OUTTMPDIR)/$(LANG_TREE) -d $(LANGBLDDIR) $(INDEX_NAME).txt
   1.600 +
   1.601 +$(LANG_INDEX_FILE): $(SRCLISTDEPS)
   1.602 +	@echo "generating $@ (list of installed language name locales)"; \
   1.603 +	$(RMV) $@; \
   1.604 +	echo "// Warning this file is automatically generated" > $@; \
   1.605 +	echo "$(INDEX_NAME):table(nofallback) {" >> $@; \
   1.606 +	echo "    InstalledLocales {" >> $@; \
   1.607 +	for file in $(INSTALLED_LANG_FILES); do \
   1.608 +	  echo "        $$file {\"\"}" >> $@; \
   1.609 +	done; \
   1.610 +	echo "    }" >> $@; \
   1.611 +	echo "}" >> $@;
   1.612 +
   1.613 +### region res
   1.614 +$(REGIONBLDDIR)/%.res: $(REGIONSRCDIR)/%.txt  $(TOOLBINDIR)/genrb$(TOOLEXEEXT) $(DAT_FILES)
   1.615 +	$(INVOKE) $(TOOLBINDIR)/genrb --usePoolBundle $(GENRBOPTS) -i $(BUILDDIR) -s $(REGIONSRCDIR) -d $(REGIONBLDDIR) $(<F)
   1.616 +
   1.617 +# copy the region/pool.res file from the source folder to the build output folder
   1.618 +# and swap it to native endianness
   1.619 +$(REGIONBLDDIR)/pool.res: $(REGIONSRCDIR)/pool.res
   1.620 +	$(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $(REGIONSRCDIR)/pool.res $(REGIONBLDDIR)/pool.res
   1.621 +
   1.622 +$(REGIONBLDDIR)/$(INDEX_NAME).res: $(OUTTMPDIR)/$(REGION_TREE)/$(INDEX_NAME).txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT)
   1.623 +	$(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(OUTTMPDIR)/$(REGION_TREE) -d $(REGIONBLDDIR) $(INDEX_NAME).txt
   1.624 +
   1.625 +$(REGION_INDEX_FILE): $(SRCLISTDEPS)
   1.626 +	@echo "generating $@ (list of installed region name locales)"; \
   1.627 +	$(RMV) $@; \
   1.628 +	echo "// Warning this file is automatically generated" > $@; \
   1.629 +	echo "$(INDEX_NAME):table(nofallback) {" >> $@; \
   1.630 +	echo "    InstalledLocales {" >> $@; \
   1.631 +	for file in $(INSTALLED_REGION_FILES); do \
   1.632 +	  echo "        $$file {\"\"}" >> $@; \
   1.633 +	done; \
   1.634 +	echo "    }" >> $@; \
   1.635 +	echo "}" >> $@;
   1.636 +
   1.637 +### zone res
   1.638 +$(ZONEBLDDIR)/%.res: $(ZONESRCDIR)/%.txt  $(TOOLBINDIR)/genrb$(TOOLEXEEXT) $(DAT_FILES)
   1.639 +	$(INVOKE) $(TOOLBINDIR)/genrb --usePoolBundle $(GENRBOPTS) -i $(BUILDDIR) -s $(ZONESRCDIR) -d $(ZONEBLDDIR) $(<F)
   1.640 +
   1.641 +# copy the zone/pool.res file from the source folder to the build output folder
   1.642 +# and swap it to native endianness
   1.643 +$(ZONEBLDDIR)/pool.res: $(ZONESRCDIR)/pool.res
   1.644 +	$(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $(ZONESRCDIR)/pool.res $(ZONEBLDDIR)/pool.res
   1.645 +
   1.646 +$(ZONEBLDDIR)/$(INDEX_NAME).res: $(OUTTMPDIR)/$(ZONE_TREE)/$(INDEX_NAME).txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT)
   1.647 +	$(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(OUTTMPDIR)/$(ZONE_TREE) -d $(ZONEBLDDIR) $(INDEX_NAME).txt
   1.648 +
   1.649 +$(ZONE_INDEX_FILE): $(SRCLISTDEPS)
   1.650 +	@echo "generating $@ (list of installed time zone name locales)"; \
   1.651 +	$(RMV) $@; \
   1.652 +	echo "// Warning this file is automatically generated" > $@; \
   1.653 +	echo "$(INDEX_NAME):table(nofallback) {" >> $@; \
   1.654 +	echo "    InstalledLocales {" >> $@; \
   1.655 +	for file in $(INSTALLED_ZONE_FILES); do \
   1.656 +	  echo "        $$file {\"\"}" >> $@; \
   1.657 +	done; \
   1.658 +	echo "    }" >> $@; \
   1.659 +	echo "}" >> $@;
   1.660 +
   1.661 +### collation res
   1.662 +$(COLBLDDIR)/%.res: $(COLSRCDIR)/%.txt  $(TOOLBINDIR)/genrb$(TOOLEXEEXT) $(DAT_FILES)
   1.663 +	$(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(COLSRCDIR) -d $(COLBLDDIR) $(<F)
   1.664 +
   1.665 +$(COLBLDDIR)/$(INDEX_NAME).res: $(OUTTMPDIR)/$(COLLATION_TREE)/$(INDEX_NAME).txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT)
   1.666 +	$(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(OUTTMPDIR)/$(COLLATION_TREE) -d $(COLBLDDIR) $(INDEX_NAME).txt
   1.667 +
   1.668 +$(COLLATION_INDEX_FILE): $(SRCLISTDEPS)
   1.669 +	@echo "generating $@ (list of installed collation locales)"; \
   1.670 +	$(RMV) $@; \
   1.671 +	echo "// Warning this file is automatically generated" > $@; \
   1.672 +	echo "$(INDEX_NAME):table(nofallback) {" >> $@; \
   1.673 +	echo "    InstalledLocales {" >> $@; \
   1.674 +	for file in $(INSTALLED_COL_FILES); do \
   1.675 +	  echo "        $$file {\"\"}" >> $@; \
   1.676 +	done; \
   1.677 +	echo "    }" >> $@; \
   1.678 +	echo "}" >> $@;
   1.679 +
   1.680 +### brk res
   1.681 +$(BRKBLDDIR)/%.res: $(BRKSRCDIR)/%.txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT) $(BRK_FILES) $(DICT_FILES) $(DAT_FILES)
   1.682 +	$(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(BRKSRCDIR) -d $(BRKBLDDIR) $(<F)
   1.683 +
   1.684 +$(BRKBLDDIR)/$(INDEX_NAME).res: $(OUTTMPDIR)/$(BREAK_TREE)/$(INDEX_NAME).txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT)
   1.685 +	$(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(OUTTMPDIR)/$(BREAK_TREE) -d $(BRKBLDDIR) $(INDEX_NAME).txt
   1.686 +
   1.687 +$(BRK_RES_INDEX_FILE): $(SRCLISTDEPS)
   1.688 +	@echo "generating $@ (list of installed break locales)"; \
   1.689 +	$(RMV) $@; \
   1.690 +	echo "// Warning this file is automatically generated" > $@; \
   1.691 +	echo "$(INDEX_NAME):table(nofallback) {" >> $@; \
   1.692 +	echo "    InstalledLocales {" >> $@; \
   1.693 +	for file in $(INSTALLED_BRS_FILES); do \
   1.694 +	  echo "        $$file {\"\"}" >> $@; \
   1.695 +	done; \
   1.696 +	echo "    }" >> $@; \
   1.697 +	echo "}" >> $@;
   1.698 +
   1.699 +### RBNF res
   1.700 +$(RBNFBLDDIR)/%.res: $(RBNFSRCDIR)/%.txt  $(TOOLBINDIR)/genrb$(TOOLEXEEXT) $(DAT_FILES)
   1.701 +	$(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(RBNFSRCDIR) -d $(RBNFBLDDIR) $(<F)
   1.702 +
   1.703 +$(RBNFBLDDIR)/$(INDEX_NAME).res: $(OUTTMPDIR)/$(RBNF_TREE)/$(INDEX_NAME).txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT)
   1.704 +	$(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(OUTTMPDIR)/$(RBNF_TREE) -d $(RBNFBLDDIR) $(INDEX_NAME).txt
   1.705 +
   1.706 +$(RBNF_INDEX_FILE): $(SRCLISTDEPS)
   1.707 +	@echo "generating $@ (list of installed RBNF locales)"; \
   1.708 +	$(RMV) $@; \
   1.709 +	echo "// Warning this file is automatically generated" > $@; \
   1.710 +	echo "$(INDEX_NAME):table(nofallback) {" >> $@; \
   1.711 +	echo "    InstalledLocales {" >> $@; \
   1.712 +	for file in $(INSTALLED_RBNF_FILES); do \
   1.713 +	  echo "        $$file {\"\"}" >> $@; \
   1.714 +	done; \
   1.715 +	echo "    }" >> $@; \
   1.716 +	echo "}" >> $@;
   1.717 +
   1.718 +### TRANSLIT res
   1.719 +$(TRANSLITBLDDIR)/%.res: $(TRANSLITSRCDIR)/%.txt  $(TOOLBINDIR)/genrb$(TOOLEXEEXT) $(DAT_FILES)
   1.720 +	$(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(TRANSLITSRCDIR) -d $(TRANSLITBLDDIR) $(<F)
   1.721 +
   1.722 +### normal (locale) res
   1.723 +all-RES:  $(RES_FILES)
   1.724 +
   1.725 +$(BUILDDIR)/%.res: $(LOCSRCDIR)/%.txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT) $(DAT_FILES)
   1.726 +	$(INVOKE) $(TOOLBINDIR)/genrb --usePoolBundle $(GENRBOPTS) -i $(BUILDDIR) -s $(LOCSRCDIR) -d $(BUILDDIR) $(<F)
   1.727 +
   1.728 +# copy the locales/pool.res file from the source folder to the build output folder
   1.729 +# and swap it to native endianness
   1.730 +$(BUILDDIR)/pool.res: $(LOCSRCDIR)/pool.res
   1.731 +	$(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $(LOCSRCDIR)/pool.res $(BUILDDIR)/pool.res
   1.732 +
   1.733 +# if the tzcode directory contains a new tzdata*.tar.gz file, use it for zoneinfo
   1.734 +ifeq ($(TZDATA),)
   1.735 +TZDATA = $(firstword $(wildcard $(top_builddir)/tools/tzcode/tzdata*.tar.gz) $(wildcard $(top_srcdir)/tools/tzcode/tzdata*.tar.gz))
   1.736 +endif
   1.737 +
   1.738 +ifneq ($(TZDATA),)
   1.739 +
   1.740 +TZCODE_DIR=$(top_builddir)/tools/tzcode
   1.741 +ZONEINFO=$(TZCODE_DIR)/zoneinfo64.txt
   1.742 +
   1.743 +# Override the normal genrb for zoneinfo to always pull from
   1.744 +# icu/source/tools/tzcode/zoneinfo64.txt
   1.745 +$(BUILDDIR)/zoneinfo64.res: $(ZONEINFO) $(TOOLBINDIR)/genrb$(TOOLEXEEXT)
   1.746 +	@echo Note: $(MISCSRCDIR)/zoneinfo.txt is IGNORED because $(TZDATA) is present.
   1.747 +	$(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -q -i $(BUILDDIR) -d $(BUILDDIR) $(ZONEINFO)
   1.748 +
   1.749 +# Create the tzcode tool and zoneinfo as needed.
   1.750 +$(ZONEINFO): $(TZDATA)
   1.751 +	@echo "$(MAKE)[$(MAKELEVEL)]: Making \`$(ZONEINFO)' in \`$(TZCODE_DIR)'"; \
   1.752 +	(cd $(TZCODE_DIR) && $(MAKE)) || exit; \
   1.753 +
   1.754 +# end of zoneinfo-generation
   1.755 +endif
   1.756 +
   1.757 +# zoneinfo has some issues. Ignore some warnings with -q
   1.758 +$(BUILDDIR)/%.res: $(MISCSRCDIR)/%.txt $(TOOLBINDIR)/genrb$(TOOLEXEEXT)
   1.759 +	$(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -q -i $(BUILDDIR) -s $(MISCSRCDIR) -d $(BUILDDIR) $(<F)
   1.760 +
   1.761 +
   1.762 +
   1.763 +$(INDEX_FILE): $(SRCLISTDEPS)
   1.764 +	@echo "generating $@ (list of installed locales)"; \
   1.765 +	$(RMV) $@; \
   1.766 +	echo "// Warning this file is automatically generated" > $@; \
   1.767 +	echo "$(INDEX_NAME):table(nofallback) {" >> $@; \
   1.768 +        echo "    CLDRVersion { \"$(GENRB_CLDR_VERSION)\" }" >> $@; \
   1.769 +	echo "    InstalledLocales {" >> $@; \
   1.770 +	for file in $(INSTALLED_RB_FILES); do \
   1.771 +	  echo "        $$file {\"\"}" >> $@; \
   1.772 +	done; \
   1.773 +	echo "    }" >> $@; \
   1.774 +	echo "}" >> $@;
   1.775 +
   1.776 +clean-resindex:
   1.777 +	-$(RMV) $(BUILDDIR)/$(INDEX_NAME).txt $(PKGDATA_LIST)
   1.778 +
   1.779 +$(BUILDDIR)/$(INDEX_NAME).res: $(INDEX_FILE) $(TOOLBINDIR)/genrb$(TOOLEXEEXT)
   1.780 +	$(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -d $(BUILDDIR) $(INDEX_FILE)
   1.781 +
   1.782 +# The core Unicode properties files (pnames.icu, uprops.icu, ucase.icu, ubidi.icu)
   1.783 +# are hardcoded in the common DLL and therefore not included in the data package any more.
   1.784 +# They are not built by default but need to be built for ICU4J data and for getting the .c source files
   1.785 +# when updating the Unicode data.
   1.786 +uni-core-data: build-dir $(UNI_CORE_TARGET_DATA)
   1.787 +	@echo Unicode .icu files built to $(BUILDDIR)
   1.788 +
   1.789 +# Build the ICU4J icudata.jar.
   1.790 +# Command line:
   1.791 +#   (Run this from the output data folder which may not be .../source/data in an out-of-source build.)
   1.792 +#   ~/svn.icu/trunk/source/data> make JAR=jar ICU4J_ROOT=~/svn.icu4j/trunk icudata.jar
   1.793 +# You can omit the ICU4J_ROOT for just building the .jar files without copying them.
   1.794 +# You can omit the JAR if it's just jar.
   1.795 +JAR=jar
   1.796 +
   1.797 +# For building the testdata.jar see ../test/testdata/Makefile.
   1.798 +
   1.799 +ICU4J_TZDATA=$(OUTDIR)/icu4j/icutzdata.jar
   1.800 +ICU4J_TZDATA_FILES=zoneinfo64 metaZones timezoneTypes windowsZones
   1.801 +ICU4J_DATA_DIRNAME=com/ibm/icu/impl/data/$(ICUDATA_BASENAME_VERSION)b
   1.802 +ICU4J_TZDATA_PATHS=$(ICU4J_TZDATA_FILES:%="$(ICU4J_DATA_DIRNAME)/%.res")
   1.803 +
   1.804 +# generate icu4j-related data to $(OUTDIR)/icu4j/com/ibm/icu/impl/data/...
   1.805 +generate-data: build-dir packagedata $(OUTTMPDIR)/$(ICUDATA_PLATFORM_NAME).dat uni-core-data
   1.806 +	mkdir -p $(OUTDIR)/icu4j/$(ICU4J_DATA_DIRNAME)
   1.807 +	mkdir -p $(OUTDIR)/icu4j/tzdata/$(ICU4J_DATA_DIRNAME)
   1.808 +	echo pnames.icu ubidi.icu ucase.icu uprops.icu > $(OUTDIR)/icu4j/add.txt
   1.809 +	$(INVOKE) $(TOOLBINDIR)/icupkg $(OUTTMPDIR)/$(ICUDATA_PLATFORM_NAME).dat $(OUTDIR)/icu4j/$(ICUDATA_BASENAME_VERSION)b.dat -a $(OUTDIR)/icu4j/add.txt -s $(BUILDDIR) -x '*' -tb -d $(OUTDIR)/icu4j/$(ICU4J_DATA_DIRNAME)
   1.810 +	mv $(ICU4J_TZDATA_PATHS:%=$(OUTDIR)/icu4j/%) "$(OUTDIR)/icu4j/tzdata/$(ICU4J_DATA_DIRNAME)"
   1.811 +
   1.812 +$(OUTDIR)/icu4j/icutzdata.jar: generate-data
   1.813 +	$(JAR) cf $(OUTDIR)/icu4j/icutzdata.jar -C $(OUTDIR)/icu4j/tzdata $(ICU4J_DATA_DIRNAME)/
   1.814 +
   1.815 +# Build icudata.jar:
   1.816 +# - add the uni-core-data to the ICU package
   1.817 +# - swap the ICU data
   1.818 +# - extract all data items
   1.819 +# - package them into the .jar file
   1.820 +$(OUTDIR)/icu4j/icudata.jar: generate-data
   1.821 +	$(JAR) cf $(OUTDIR)/icu4j/icudata.jar -C $(OUTDIR)/icu4j $(ICU4J_DATA_DIRNAME)/
   1.822 +
   1.823 +ICU4J_DATA=$(OUTDIR)/icu4j/icudata.jar
   1.824 +
   1.825 +ifdef ICU4J_ROOT
   1.826 +
   1.827 +ICU4J_DATA_INSTALLED=$(ICU4J_ROOT)/main/shared/data/icudata.jar $(ICU4J_ROOT)/main/shared/data/icutzdata.jar
   1.828 +
   1.829 +$(ICU4J_ROOT)/main/shared/data/icudata.jar: $(OUTDIR)/icu4j/icudata.jar
   1.830 +	mkdir -p $(ICU4J_ROOT)/main/shared/data
   1.831 +	cp $(OUTDIR)/icu4j/icudata.jar $(ICU4J_ROOT)/main/shared/data
   1.832 +
   1.833 +$(ICU4J_ROOT)/main/shared/data/icutzdata.jar: $(OUTDIR)/icu4j/icutzdata.jar
   1.834 +	mkdir -p $(ICU4J_ROOT)/main/shared/data
   1.835 +	cp $(OUTDIR)/icu4j/icutzdata.jar $(ICU4J_ROOT)/main/shared/data
   1.836 +
   1.837 +icu4j-data-install: $(ICU4J_DATA_INSTALLED)
   1.838 +
   1.839 +else
   1.840 +
   1.841 +icu4j-data-install: icu4j-data
   1.842 +	@echo data is built into $(OUTDIR)/icu4j
   1.843 +	@echo '** Error:' ICU4J_ROOT was not set, could not install
   1.844 +	exit 1
   1.845 +
   1.846 +endif
   1.847 +
   1.848 +icu4j-data: $(ICU4J_DATA) $(ICU4J_TZDATA)
   1.849 +
   1.850 +
   1.851 +###################################################################
   1.852 +Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
   1.853 +	cd $(top_builddir) \
   1.854 +	&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
   1.855 +
   1.856 +icupkg.inc: pkgdataMakefile
   1.857 +	$(MAKE) -f pkgdataMakefile
   1.858 +
   1.859 +pkgdataMakefile:
   1.860 +	cd $(top_builddir) \
   1.861 +	&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
   1.862 +
   1.863 +###########
   1.864 +########### 390 (z/OS) support
   1.865 +UCMFILES390=ebcdic-xml-us.ucm ibm-37_P100-1995.ucm ibm-1047_P100-1995.ucm ibm-4909_P100-1999.ucm
   1.866 +# used to depend on pnames.icu uprops.icu ucase.icu ubidi.icu
   1.867 +# These are now hardcoded in ICU4C and only loaded in ICU4J.
   1.868 +ALLFILES390=cnvalias.icu $(UCMFILES390:.ucm=.cnv)
   1.869 +
   1.870 +$(OUTTMPDIR)/icudata390.lst: $(SRCLISTDEPS)
   1.871 +	@echo "generating $@ (list of 390 data files)"
   1.872 +	@-$(RMV) $@
   1.873 +	@for file in $(ALLFILES390); do \
   1.874 +	  echo $$file >> $@; \
   1.875 +	done;
   1.876 +
   1.877 +ifeq ($(POST_DATA_BUILD), os400-data-rebind)
   1.878 +os400-data-rebind: $(LIBICUUC)
   1.879 +
   1.880 +$(LIBICUUC): $(LIBICUDT)
   1.881 +	$(RMV) $(LIBICUUC)
   1.882 +	(cd ../common && $(MAKE) RECURSIVE=YES) || exit;
   1.883 +endif
   1.884 +

mercurial