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