blob: 04bc1c1afad796848acc85fd6b8c3d4d85c4a580 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
|
# Copyright (C) 2016 and later: Unicode, Inc. and others.
# License & terms of use: http://www.unicode.org/copyright.html
#******************************************************************************
#
# Copyright (C) 1998-2015, International Business Machines
# Corporation and others. All Rights Reserved.
#
#******************************************************************************
## Top-level Makefile.in for ICU
## Stephen F. Booth
## Source directory information
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ../..
include $(top_builddir)/icudefs.mk
## Build directory information
subdir = test/testdata
## Files to remove for 'make clean'
CLEANFILES = *~
SUBDIRS =
-include Makefile.local
## List of phony targets
.PHONY : all all-local all-recursive install install-local \
install-recursive clean clean-local clean-recursive distclean \
distclean-local distclean-recursive doc dist dist-local dist-recursive \
check check-local check-recursive build-dir testdata.jar xcheck check-exhaustive
xcheck: all-local
.NOTPARALLEL: build-dir
## Clear suffix list
.SUFFIXES :
## List of standard targets
all: all-local
install: install-local
clean: clean-local
distclean : distclean-local
dist: dist-local
check: all check-local
check-exhaustive: check
all-local: build-dir build-testdata testdata packagetest
install-local:
dist-local:
clean-local:
test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
$(RMV) $(TESTOUTDIR)
distclean-local: clean-local
$(RMV) Makefile pkgdata.inc
check-local:
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
pkgdata.inc: pkgdataMakefile
$(MAKE) -f pkgdataMakefile
pkgdataMakefile:
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
#########################################################################
############################## Test ## stuff ############################
# relative lib links from pkgdata are the same as for tmp
GENRBOPTS=-k
# use the cross root, in case we are cross compiling. Otherwise it is equal to top_builddir
TOOLDIR=$(cross_buildroot)/tools
SRCDATADIR=$(top_srcdir)/data
UNICODEDATADIR=$(SRCDATADIR)/unidata
OUTDIR=$(top_builddir)/data/out
OUTTMPDIR=$(top_builddir)/data/out/tmp
BUILDDIR=$(OUTDIR)/build/$(ICUDATA_PLATFORM_NAME)
TESTSRCDATADIR=$(top_srcdir)/test/testdata
TESTOUTDIR=$(top_builddir)/test/testdata/out
BUILD_DIRS = $(TESTOUTDIR) $(TESTBUILDDIR) $(TESTOUTDIR)/$(TESTDT)
GENTEST=$(TOOLDIR)/gentest/gentest$(TOOLEXEEXT)
ifeq ($(PKGDATA_MODE),common)
ICU_DATA_OPT = -i $(OUTDIR)
else
ifeq ($(PKGDATA_MODE),dll)
ifneq ($(ENABLE_SHARED),YES)
ICU_DATA_OPT = -i $(BUILDDIR)
else
ICU_DATA_OPT =
endif
else
ICU_DATA_OPT = -i $(BUILDDIR)
endif
endif
CURDIR:=$(CURR_FULL_DIR)
# current directory should not be blank
ifeq ($(CURDIR),)
CURDIR=.
endif
PKGDATA = $(TOOLBINDIR)/pkgdata -q -c -s $(CURDIR)/out/build/$(ICUDATA_PLATFORM_NAME)
PKGDATA_INVOKE:=$(INVOKE) $(PKGDATA_INVOKE_OPTS)
# Contains all 'intermediate' files (and temp files) except for 'unpackaged data' below
TESTBUILDDIR=$(TESTOUTDIR)/build
# unpackaged files - live in 'out' so that the path can find them as part of the pkg
UNPACKAGEDTESTDATA=$(TESTOUTDIR)/$(TESTDT)/nam.typ
# pkg name for testdata
TESTDATA=testdata
# prefix for files that are testdata
TESTDT=$(TESTDATA)
# Variable names for rules.mk
OUT_DIR=$(TESTBUILDDIR)
TMP_DIR=$(TESTOUTDIR)/$(TESTDT)
## Include the Python-generated rules
include $(top_builddir)/$(subdir)/rules.mk
build-testdata: build-dir $(TESTDATA_ALL_OUTPUT_FILES)
testdata: build-testdata
packagetest: build-dir testdata pkgdata.inc $(TMP_DIR)/testdata.lst
$(PKGDATA_INVOKE) $(PKGDATA) -T $(TESTBUILDDIR) -d $(TESTOUTDIR) -s $(TESTBUILDDIR) -p $(TESTDATA) -m common $(TMP_DIR)/testdata.lst
build-dir: $(BUILD_DIRS)
$(BUILD_DIRS):
-$(MKINSTALLDIRS) $(BUILD_DIRS)
# Build the ICU4J testdata.jar.
# Command line:
# (Run this from the output testdata folder which may not be .../source/test/testdata in an out-of-source build.)
# ~/svn.icu/trunk/source/test/testdata> make JAR=jar ICU4J_ROOT=~/svn.icu4j/trunk testdata.jar
# You can omit the ICU4J_ROOT for just building the .jar files without copying them.
# You can omit the JAR if it's just jar.
JAR=jar
# Build testdata.jar:
# - swap the test data
# - extract all data items
# - package them into the .jar file
$(OUTDIR)/icu4j/testdata.jar: build-dir testdata $(TESTOUTDIR)/testdata.dat
mkdir -p $(OUTDIR)/icu4j/com/ibm/icu/dev/data/testdata
$(INVOKE) $(TOOLBINDIR)/icupkg $(TESTOUTDIR)/testdata.dat -r test.icu -x '*' -tb -d $(OUTDIR)/icu4j/com/ibm/icu/dev/data/testdata
$(JAR) cf $(OUTDIR)/icu4j/testdata.jar -C $(OUTDIR)/icu4j com/ibm/icu/dev/data/testdata
DEBUGUTILITIESDATA_DIR=main/tests/core/src/com/ibm/icu/dev/test/util
DEBUGUTILITIESDATA_SRC=DebugUtilitiesData.java
ICU4J_DATA=$(OUTDIR)/icu4j/src/$(DEBUGUTILITIESDATA_SRC) $(OUTDIR)/icu4j/testdata.jar
$(OUTDIR)/icu4j/src/$(DEBUGUTILITIESDATA_SRC): $(GENTEST)
mkdir -p $(OUTDIR)/icu4j/src
$(INVOKE) $(GENTEST) -j -d $(OUTDIR)/icu4j/src
ifdef ICU4J_ROOT
icu4j-data-install: $(ICU4J_ROOT)/main/shared/data/testdata.jar $(ICU4J_ROOT)/$(DEBUGUTILITIESDATA_DIR)/$(DEBUGUTILITIESDATA_SRC)
@echo ICU4J test data installed in $(ICU4J_ROOT)
$(ICU4J_ROOT)/main/shared/data/testdata.jar: $(OUTDIR)/icu4j/testdata.jar
mkdir -p $(ICU4J_ROOT)/main/shared/data
cp $(OUTDIR)/icu4j/testdata.jar $(ICU4J_ROOT)/main/shared/data
$(ICU4J_ROOT)/$(DEBUGUTILITIESDATA_DIR)/$(DEBUGUTILITIESDATA_SRC): $(OUTDIR)/icu4j/src/$(DEBUGUTILITIESDATA_SRC)
mkdir -p $(ICU4J_ROOT)/$(DEBUGUTILITIESDATA_DIR)
cp $^ $@
else
icu4j-data-install: $(ICU4J_DATA)
@echo ICU4J data was built into $(OUTDIR)/icu4j
@echo '** Error:' ICU4J_ROOT was not set, could not install
exit 1
endif
icu4j-data: $(ICU4J_DATA)
|