]>
Commit | Line | Data |
---|---|---|
b75a7d8f | 1 | ## Makefile.in for ICU data |
f3c0d7a5 A |
2 | ## Copyright (C) 2016 and later: Unicode, Inc. and others. |
3 | ## License & terms of use: http://www.unicode.org/copyright.html | |
b331163b | 4 | ## Copyright (c) 1999-2015, International Business Machines Corporation and |
b75a7d8f A |
5 | ## others. All Rights Reserved. |
6 | ||
7 | ## Source directory information | |
8 | srcdir = @srcdir@ | |
9 | top_srcdir = @top_srcdir@ | |
10 | ||
11 | # So that you have $(top_builddir)/config.status | |
12 | top_builddir = .. | |
13 | ||
14 | ## All the flags and other definitions are included here. | |
15 | include $(top_builddir)/icudefs.mk | |
16 | ||
17 | ## Build directory information | |
18 | # So that $(top_builddir)/$(subdir) ~= "here" | |
19 | subdir = data | |
20 | ||
21 | #lib icu data for link | |
374ca955 A |
22 | LIB_ICUDATA_NAME=$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX) |
23 | LIB_STATIC_ICUDATA_NAME=$(LIBSICU)$(DATA_STUBNAME)$(ICULIBSUFFIX) | |
b75a7d8f | 24 | |
374ca955 A |
25 | # Allow Windows to override these options |
26 | ifeq ($(PKGDATA_OPTS),) | |
27 | PKGDATA_OPTS = -O $(top_builddir)/data/icupkg.inc | |
28 | endif | |
29 | ifeq ($(PKGDATA_VERSIONING),) | |
30 | PKGDATA_VERSIONING = -r $(SO_TARGET_VERSION) | |
31 | endif | |
32 | ||
33 | # This allows all the data to be in one directory | |
34 | ifeq ($(PKGDATA_MODE),dll) | |
35 | ICUPKGDATA_OUTDIR = $(LIBDIR) | |
36 | else | |
729e4ab9 A |
37 | ifeq ($(PKGDATA_MODE),static) |
38 | ICUPKGDATA_OUTDIR = $(LIBDIR) | |
39 | else | |
374ca955 A |
40 | ICUPKGDATA_OUTDIR = $(OUTDIR) |
41 | endif | |
729e4ab9 | 42 | endif |
b75a7d8f | 43 | |
374ca955 | 44 | CURDIR:=$(CURR_FULL_DIR) |
729e4ab9 A |
45 | # current directory should not be blank |
46 | ifeq ($(CURDIR),) | |
47 | CURDIR=. | |
48 | endif | |
57a6839d A |
49 | ifeq ($(OS390BATCH),1) |
50 | PKGDATA = $(TOOLBINDIR)/pkgdata $(PKGDATA_OPTS) -z -q -c -s $(CURDIR)/out/build/$(ICUDATA_PLATFORM_NAME) -d $(ICUPKGDATA_OUTDIR) | |
51 | else | |
729e4ab9 | 52 | PKGDATA = $(TOOLBINDIR)/pkgdata $(PKGDATA_OPTS) -q -c -s $(CURDIR)/out/build/$(ICUDATA_PLATFORM_NAME) -d $(ICUPKGDATA_OUTDIR) |
57a6839d | 53 | endif |
4388f060 | 54 | OS390_PDS_NAME = -z -L $(BATCH_STUB_TARGET) |
374ca955 | 55 | |
73c04bcf A |
56 | ifeq ($(OS390_STUBDATA),1) |
57 | OS390PKG=package390 | |
58 | OS390INSTALL=install390 | |
59 | ||
60 | # Additional data for 390 | |
61 | OS390LIST=$(OUTTMPDIR)/icudata390.lst | |
62 | OUTTMPDIR_390STUB=$(top_builddir)/data/out/tmp_390stub | |
63 | endif | |
b75a7d8f | 64 | |
51004dcb A |
65 | ifeq ($(OS390BATCH),1) |
66 | CPPFLAGS += -Wc,'ros,roc' | |
67 | endif | |
68 | ||
b75a7d8f A |
69 | # OBJDATADIR must be a short path (with ..'s) to the data. |
70 | ||
374ca955 A |
71 | ifeq ($(top_srcdir),..) |
72 | SRCDATADIR=. | |
73 | else | |
b75a7d8f | 74 | SRCDATADIR=$(top_srcdir)/data |
374ca955 A |
75 | endif |
76 | ifeq ($(top_builddir),..) | |
77 | OUTDIR=./out | |
78 | else | |
b75a7d8f | 79 | OUTDIR=$(top_builddir)/data/out |
374ca955 A |
80 | endif |
81 | ||
82 | OUTTMPDIR=$(OUTDIR)/tmp | |
73c04bcf A |
83 | MAINBUILDDIR=$(OUTDIR)/build |
84 | BUILDDIR=$(MAINBUILDDIR)/$(ICUDATA_PLATFORM_NAME) | |
374ca955 | 85 | MISCSRCDIR=$(SRCDATADIR)/misc |
b75a7d8f | 86 | SRCLISTDEPS=Makefile $(srcdir)/Makefile.in |
3d1f044b A |
87 | |
88 | # Variable names for rules.mk | |
89 | OUT_DIR=$(BUILDDIR) | |
90 | TMP_DIR=$(OUTTMPDIR) | |
b75a7d8f A |
91 | |
92 | # relative lib links from pkgdata are the same as for tmp | |
93 | TOOLDIR=$(top_builddir)/tools | |
94 | ||
95 | ## List of phony targets | |
374ca955 | 96 | .PHONY : all all-local all-recursive install install-local install-files \ |
b75a7d8f A |
97 | install-recursive clean clean-local clean-recursive distclean \ |
98 | distclean-local distclean-recursive dist dist-local dist-recursive \ | |
57a6839d | 99 | check check-local check-recursive clean-resindex icudata.jar \ |
4388f060 | 100 | check-exhaustive |
b75a7d8f A |
101 | |
102 | ## Clear suffix list | |
103 | .SUFFIXES : | |
104 | ||
105 | ## List of standard targets | |
106 | all: all-local | |
107 | install: all-local install-local | |
108 | clean: clean-local | |
109 | distclean : distclean-local | |
110 | dist: | |
3d1f044b | 111 | check: all check-local |
b75a7d8f | 112 | |
4388f060 A |
113 | check-exhaustive: check |
114 | ||
729e4ab9 A |
115 | -include Makefile.local |
116 | ||
b75a7d8f A |
117 | |
118 | distclean-local: clean | |
119 | $(RMV) Makefile | |
120 | ||
3d1f044b | 121 | all-local: icupkg.inc build-local packagedata $(POST_DATA_BUILD) $(OS390PKG) |
b75a7d8f A |
122 | |
123 | dist-local: | |
124 | ||
125 | clean-map: | |
126 | -test -z *.map || $(RMV) *.map | |
127 | ||
128 | clean-local: cleanpackage cleanfiles clean-map | |
3d1f044b | 129 | $(RMV) $(OUTDIR) build-local packagedata uni-core-data |
b75a7d8f A |
130 | |
131 | cleanfiles: | |
132 | test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) | |
133 | ||
134 | cleanpackage: | |
135 | $(RMV) $(OUTDIR) | |
b331163b | 136 | $(RMV) $(LIBDIR)/*$(LIB_ICUDATA_NAME)*.$(SO)* $(LIBDIR)/$(LIB_STATIC_ICUDATA_NAME).$(A) |
b75a7d8f A |
137 | |
138 | check-local: | |
340931cb | 139 | PYTHONPATH=$(top_srcdir)/python @PYTHON@ -m icutools.databuilder.test |
b75a7d8f | 140 | |
73c04bcf A |
141 | # Find out if we have a source archive. |
142 | # If we have that, then use that instead of building everything from scratch. | |
143 | ICUDATA_SOURCE_ARCHIVE = $(wildcard $(srcdir)/in/$(ICUDATA_PLATFORM_NAME).dat) | |
144 | ifeq ($(ICUDATA_SOURCE_ARCHIVE),) | |
145 | ICUDATA_ARCHIVE = $(firstword $(wildcard $(srcdir)/in/$(ICUDATA_BASENAME_VERSION)*.dat)) | |
146 | # We don't have the data in the current endianess or charset. | |
147 | # See if we can find data of any archive type, | |
148 | # and convert it to the current type. | |
149 | ifneq ($(ICUDATA_ARCHIVE),) | |
150 | ICUDATA_SOURCE_ARCHIVE = $(OUTDIR)/$(ICUDATA_PLATFORM_NAME).dat | |
151 | $(ICUDATA_SOURCE_ARCHIVE): $(ICUDATA_ARCHIVE) $(OUTDIR) | |
729e4ab9 | 152 | $(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $(ICUDATA_ARCHIVE) $(ICUDATA_SOURCE_ARCHIVE) |
73c04bcf A |
153 | endif |
154 | else | |
155 | ifneq ($(ENABLE_STATIC),YES) | |
156 | ifeq ($(PKGDATA_MODE),common) | |
157 | # We have a source data common archive in the native endianess, | |
158 | # and it's what we want to build. Try to not run any of ICU's tools. | |
159 | ICUDATA_SOURCE_IS_NATIVE_TARGET=YES | |
160 | endif | |
161 | endif | |
162 | endif | |
163 | ||
46f4442e | 164 | packagedata: icupkg.inc $(PKGDATA_LIST) build-local |
b75a7d8f | 165 | ifneq ($(ENABLE_STATIC),) |
46f4442e | 166 | ifeq ($(PKGDATA_MODE),dll) |
729e4ab9 | 167 | $(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) -m static $(PKGDATA_VERSIONING) $(PKGDATA_LIST) |
46f4442e | 168 | endif |
b75a7d8f | 169 | endif |
73c04bcf | 170 | ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES) |
46f4442e | 171 | $(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) |
73c04bcf A |
172 | else |
173 | $(INSTALL_DATA) $(ICUDATA_SOURCE_ARCHIVE) $(OUTDIR) | |
174 | endif | |
57a6839d | 175 | echo timestamp > $@ |
b75a7d8f A |
176 | |
177 | ## Install ICU data. | |
46f4442e | 178 | install-local: $(PKGDATA_LIST) ./icupkg.inc packagedata $(OS390INSTALL) |
b75a7d8f | 179 | $(MKINSTALLDIRS) $(TMPDATADIR) $(DESTDIR)$(ICUPKGDATA_DIR) |
729e4ab9 A |
180 | ifeq ($(PKGDATA_MODE),files) |
181 | $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME) | |
182 | $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(CURR_TREE) | |
183 | $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(LANG_TREE) | |
184 | $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(REGION_TREE) | |
185 | $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(ZONE_TREE) | |
b331163b | 186 | $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(UNIT_TREE) |
729e4ab9 A |
187 | $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(BREAK_TREE) |
188 | $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(COLLATION_TREE) | |
189 | $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(RBNF_TREE) | |
190 | $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(TRANSLIT_TREE) | |
191 | endif | |
b75a7d8f | 192 | ifneq ($(ENABLE_STATIC),) |
46f4442e A |
193 | ifeq ($(PKGDATA_MODE),dll) |
194 | $(PKGDATA_INVOKE) $(PKGDATA) -m static -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_LIBDIR) | |
195 | endif | |
b75a7d8f | 196 | endif |
73c04bcf | 197 | ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES) |
46f4442e | 198 | $(PKGDATA_INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_DIR) |
73c04bcf A |
199 | else |
200 | $(INSTALL_DATA) $(ICUDATA_SOURCE_ARCHIVE) $(DESTDIR)$(ICUPKGDATA_DIR) | |
201 | endif | |
b75a7d8f | 202 | |
b75a7d8f A |
203 | |
204 | #### | |
205 | #### | |
206 | #### 390 support | |
374ca955 | 207 | install390: package390 |
b75a7d8f | 208 | $(MKINSTALLDIRS) $(TMPDATADIR) $(DESTDIR)$(libdir) |
374ca955 | 209 | $(INVOKE) $(PKGDATA) -s $(BUILDDIR)$(STUB_SUFFIX) -T $(OUTTMPDIR_390STUB) -p $(ICUDATA_NAME)$(STUB_SUFFIX) $(PKGDATA_LIBNAME)$(STUB_SUFFIX) -e $(ICUDATA_ENTRY_POINT) $(OS390LIST) -m dll $(PKGDATA_VERSIONING) -I $(DESTDIR)$(ICUPKGDATA_DIR) |
b75a7d8f | 210 | ifeq ($(PKGDATA_MODE),dll) |
729e4ab9 | 211 | $(INSTALL-L) $(ICUPKGDATA_OUTDIR)/$(FINAL_IMPORT_LIB) $(DESTDIR)$(ICUPKGDATA_DIR)/$(FINAL_IMPORT_LIB) |
b75a7d8f A |
212 | endif |
213 | ||
374ca955 | 214 | #### $(LIB_ICUDATA_NAME)$(STUB_SUFFIX) is the subset data for batch mode |
46f4442e | 215 | package390: $(OUTTMPDIR)/icudata390.lst $(PKGDATA_LIST) ./icupkg.inc packagedata |
374ca955 A |
216 | ln -s $(ICUDATA_NAME) $(OUTDIR)/build/$(ICUDATA_NAME)$(STUB_SUFFIX) |
217 | $(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) | |
218 | cp $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX).$(SO) $(top_builddir)/stubdata/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX).$(SO) | |
b75a7d8f A |
219 | |
220 | ||
3d1f044b A |
221 | ## Include the main build rules for data files |
222 | include $(top_builddir)/$(subdir)/rules.mk | |
374ca955 | 223 | |
374ca955 A |
224 | |
225 | ifeq ($(ENABLE_SO_VERSION_DATA),1) | |
226 | ifeq ($(PKGDATA_MODE),dll) | |
227 | SO_VERSION_DATA = $(OUTTMPDIR)/icudata.res | |
3d1f044b | 228 | $(SO_VERSION_DATA) : $(MISCSRCDIR)/icudata.rc |
b331163b A |
229 | ifeq ($(MSYS_RC_MODE),1) |
230 | rc.exe -i$(srcdir)/../common -i$(top_builddir)/common -fo$@ $(CPPFLAGS) $< | |
231 | else | |
4388f060 | 232 | rc.exe /i$(srcdir)/../common /i$(top_builddir)/common /fo$@ $(CPPFLAGS) $(SOURCE_FILE) |
374ca955 A |
233 | endif |
234 | endif | |
b331163b | 235 | endif |
b75a7d8f | 236 | |
3d1f044b A |
237 | PKGDATA_LIST = $(TMP_DIR)/icudata.lst |
238 | ||
46f4442e | 239 | |
b75a7d8f A |
240 | ##################################################### |
241 | # General data build rules | |
242 | ||
243 | ## Files to remove for 'make clean' | |
57a6839d | 244 | CLEANFILES = *~ icupkg.inc *.x |
b75a7d8f | 245 | |
73c04bcf | 246 | ifeq ($(ICUDATA_SOURCE_ARCHIVE),) |
3d1f044b | 247 | build-local: $(SO_VERSION_DATA) $(ICUDATA_ALL_OUTPUT_FILES) $(PKGDATA_LIST) $(OS390LIST) |
57a6839d | 248 | echo timestamp > $@ |
73c04bcf | 249 | else |
3d1f044b | 250 | build-local: $(SO_VERSION_DATA) $(PKGDATA_LIST) $(OS390LIST) |
57a6839d | 251 | echo timestamp > $@ |
46f4442e | 252 | $(PKGDATA_LIST): $(SRCLISTDEPS) $(ICUDATA_SOURCE_ARCHIVE) |
73c04bcf | 253 | ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES) |
3d1f044b | 254 | $(MKINSTALLDIRS) $(OUTTMPDIR) $(BUILDDIR) |
73c04bcf A |
255 | @echo "Unpacking $(ICUDATA_SOURCE_ARCHIVE) and generating $@ (list of data files)" |
256 | @-$(RMV) $@ | |
729e4ab9 | 257 | $(INVOKE) $(TOOLBINDIR)/icupkg -d $(BUILDDIR) --list -x \* $(ICUDATA_SOURCE_ARCHIVE) -o $@ |
73c04bcf A |
258 | else |
259 | @echo "$@" > $@ | |
260 | endif | |
261 | endif | |
b75a7d8f | 262 | |
b75a7d8f | 263 | |
729e4ab9 A |
264 | # if the tzcode directory contains a new tzdata*.tar.gz file, use it for zoneinfo |
265 | ifeq ($(TZDATA),) | |
73c04bcf | 266 | TZDATA = $(firstword $(wildcard $(top_builddir)/tools/tzcode/tzdata*.tar.gz) $(wildcard $(top_srcdir)/tools/tzcode/tzdata*.tar.gz)) |
729e4ab9 | 267 | endif |
73c04bcf | 268 | |
340931cb | 269 | # TODO(ICU-20466): Make the TZDATA override part of Python icutools.databuilder |
73c04bcf A |
270 | ifneq ($(TZDATA),) |
271 | ||
272 | TZCODE_DIR=$(top_builddir)/tools/tzcode | |
729e4ab9 | 273 | ZONEINFO=$(TZCODE_DIR)/zoneinfo64.txt |
73c04bcf | 274 | |
729e4ab9 A |
275 | # Override the normal genrb for zoneinfo to always pull from |
276 | # icu/source/tools/tzcode/zoneinfo64.txt | |
0f5d89e8 | 277 | $(BUILDDIR)/zoneinfo64.res: $(ZONEINFO) $(TOOLBINDIR)/genrb$(TOOLEXEEXT) | $(BUILDDIR)/cnvalias.icu |
73c04bcf | 278 | @echo Note: $(MISCSRCDIR)/zoneinfo.txt is IGNORED because $(TZDATA) is present. |
729e4ab9 | 279 | $(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -q -i $(BUILDDIR) -d $(BUILDDIR) $(ZONEINFO) |
73c04bcf | 280 | |
729e4ab9 | 281 | # Create the tzcode tool and zoneinfo as needed. |
73c04bcf A |
282 | $(ZONEINFO): $(TZDATA) |
283 | @echo "$(MAKE)[$(MAKELEVEL)]: Making \`$(ZONEINFO)' in \`$(TZCODE_DIR)'"; \ | |
284 | (cd $(TZCODE_DIR) && $(MAKE)) || exit; \ | |
285 | ||
729e4ab9 | 286 | # end of zoneinfo-generation |
73c04bcf A |
287 | endif |
288 | ||
729e4ab9 A |
289 | # Build the ICU4J icudata.jar. |
290 | # Command line: | |
291 | # (Run this from the output data folder which may not be .../source/data in an out-of-source build.) | |
292 | # ~/svn.icu/trunk/source/data> make JAR=jar ICU4J_ROOT=~/svn.icu4j/trunk icudata.jar | |
293 | # You can omit the ICU4J_ROOT for just building the .jar files without copying them. | |
294 | # You can omit the JAR if it's just jar. | |
295 | JAR=jar | |
296 | ||
297 | # For building the testdata.jar see ../test/testdata/Makefile. | |
298 | ||
4388f060 A |
299 | ICU4J_TZDATA=$(OUTDIR)/icu4j/icutzdata.jar |
300 | ICU4J_TZDATA_FILES=zoneinfo64 metaZones timezoneTypes windowsZones | |
301 | ICU4J_DATA_DIRNAME=com/ibm/icu/impl/data/$(ICUDATA_BASENAME_VERSION)b | |
302 | ICU4J_TZDATA_PATHS=$(ICU4J_TZDATA_FILES:%="$(ICU4J_DATA_DIRNAME)/%.res") | |
303 | ||
304 | # generate icu4j-related data to $(OUTDIR)/icu4j/com/ibm/icu/impl/data/... | |
3d1f044b | 305 | generate-data: packagedata $(OUTTMPDIR)/$(ICUDATA_PLATFORM_NAME).dat |
4388f060 A |
306 | mkdir -p $(OUTDIR)/icu4j/$(ICU4J_DATA_DIRNAME) |
307 | mkdir -p $(OUTDIR)/icu4j/tzdata/$(ICU4J_DATA_DIRNAME) | |
3d1f044b | 308 | $(INVOKE) $(TOOLBINDIR)/icupkg $(OUTTMPDIR)/$(ICUDATA_PLATFORM_NAME).dat $(OUTDIR)/icu4j/$(ICUDATA_BASENAME_VERSION)b.dat -s $(BUILDDIR) -x '*' -tb -d $(OUTDIR)/icu4j/$(ICU4J_DATA_DIRNAME) |
4388f060 A |
309 | mv $(ICU4J_TZDATA_PATHS:%=$(OUTDIR)/icu4j/%) "$(OUTDIR)/icu4j/tzdata/$(ICU4J_DATA_DIRNAME)" |
310 | ||
311 | $(OUTDIR)/icu4j/icutzdata.jar: generate-data | |
312 | $(JAR) cf $(OUTDIR)/icu4j/icutzdata.jar -C $(OUTDIR)/icu4j/tzdata $(ICU4J_DATA_DIRNAME)/ | |
313 | ||
729e4ab9 A |
314 | # Build icudata.jar: |
315 | # - add the uni-core-data to the ICU package | |
316 | # - swap the ICU data | |
317 | # - extract all data items | |
318 | # - package them into the .jar file | |
3d1f044b A |
319 | # TODO(ICU-20466): Move this to Python |
320 | # NOTE: If you get the error "No rule to make target 'out/build/icudt64l/uprops.icu'", | |
321 | # you need to reconfigure with unicore data. See icu4j-readme.txt | |
322 | $(OUTDIR)/icu4j/icudata.jar: generate-data | $(OUT_DIR)/uprops.icu | |
4388f060 | 323 | $(JAR) cf $(OUTDIR)/icu4j/icudata.jar -C $(OUTDIR)/icu4j $(ICU4J_DATA_DIRNAME)/ |
729e4ab9 A |
324 | |
325 | ICU4J_DATA=$(OUTDIR)/icu4j/icudata.jar | |
326 | ||
327 | ifdef ICU4J_ROOT | |
328 | ||
4388f060 | 329 | ICU4J_DATA_INSTALLED=$(ICU4J_ROOT)/main/shared/data/icudata.jar $(ICU4J_ROOT)/main/shared/data/icutzdata.jar |
729e4ab9 A |
330 | |
331 | $(ICU4J_ROOT)/main/shared/data/icudata.jar: $(OUTDIR)/icu4j/icudata.jar | |
332 | mkdir -p $(ICU4J_ROOT)/main/shared/data | |
333 | cp $(OUTDIR)/icu4j/icudata.jar $(ICU4J_ROOT)/main/shared/data | |
334 | ||
4388f060 A |
335 | $(ICU4J_ROOT)/main/shared/data/icutzdata.jar: $(OUTDIR)/icu4j/icutzdata.jar |
336 | mkdir -p $(ICU4J_ROOT)/main/shared/data | |
337 | cp $(OUTDIR)/icu4j/icutzdata.jar $(ICU4J_ROOT)/main/shared/data | |
338 | ||
729e4ab9 A |
339 | icu4j-data-install: $(ICU4J_DATA_INSTALLED) |
340 | ||
341 | else | |
342 | ||
343 | icu4j-data-install: icu4j-data | |
344 | @echo data is built into $(OUTDIR)/icu4j | |
345 | @echo '** Error:' ICU4J_ROOT was not set, could not install | |
346 | exit 1 | |
347 | ||
348 | endif | |
349 | ||
4388f060 | 350 | icu4j-data: $(ICU4J_DATA) $(ICU4J_TZDATA) |
729e4ab9 | 351 | |
46f4442e | 352 | |
b75a7d8f A |
353 | ################################################################### |
354 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | |
355 | cd $(top_builddir) \ | |
356 | && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status | |
357 | ||
729e4ab9 A |
358 | icupkg.inc: pkgdataMakefile |
359 | $(MAKE) -f pkgdataMakefile | |
360 | ||
361 | pkgdataMakefile: | |
b75a7d8f A |
362 | cd $(top_builddir) \ |
363 | && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status | |
364 | ||
365 | ########### | |
366 | ########### 390 (z/OS) support | |
367 | UCMFILES390=ebcdic-xml-us.ucm ibm-37_P100-1995.ucm ibm-1047_P100-1995.ucm ibm-4909_P100-1999.ucm | |
4388f060 A |
368 | # used to depend on pnames.icu uprops.icu ucase.icu ubidi.icu |
369 | # These are now hardcoded in ICU4C and only loaded in ICU4J. | |
370 | ALLFILES390=cnvalias.icu $(UCMFILES390:.ucm=.cnv) | |
b75a7d8f | 371 | |
374ca955 | 372 | $(OUTTMPDIR)/icudata390.lst: $(SRCLISTDEPS) |
b75a7d8f A |
373 | @echo "generating $@ (list of 390 data files)" |
374 | @-$(RMV) $@ | |
375 | @for file in $(ALLFILES390); do \ | |
b75a7d8f A |
376 | echo $$file >> $@; \ |
377 | done; | |
378 | ||
374ca955 A |
379 | ifeq ($(POST_DATA_BUILD), os400-data-rebind) |
380 | os400-data-rebind: $(LIBICUUC) | |
b75a7d8f | 381 | |
374ca955 A |
382 | $(LIBICUUC): $(LIBICUDT) |
383 | $(RMV) $(LIBICUUC) | |
384 | (cd ../common && $(MAKE) RECURSIVE=YES) || exit; | |
385 | endif | |
b75a7d8f | 386 |