13583
|
1 |
#
|
|
2 |
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 |
#
|
|
5 |
# This code is free software; you can redistribute it and/or modify it
|
|
6 |
# under the terms of the GNU General Public License version 2 only, as
|
|
7 |
# published by the Free Software Foundation. Oracle designates this
|
|
8 |
# particular file as subject to the "Classpath" exception as provided
|
|
9 |
# by Oracle in the LICENSE file that accompanied this code.
|
|
10 |
#
|
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that
|
|
15 |
# accompanied this code).
|
|
16 |
#
|
|
17 |
# You should have received a copy of the GNU General Public License version
|
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
20 |
#
|
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
22 |
# or visit www.oracle.com if you need additional information or have any
|
|
23 |
# questions.
|
|
24 |
#
|
|
25 |
|
|
26 |
#
|
|
27 |
# Makefile for CLDR locale data.
|
|
28 |
#
|
|
29 |
|
|
30 |
BUILDDIR = ../..
|
|
31 |
|
|
32 |
PACKAGE = sun.text.resources.cldr
|
|
33 |
PRODUCT = sun
|
|
34 |
JAVAC_MAX_WARNINGS = true
|
|
35 |
JAVAC_WARNINGS_FATAL = true
|
|
36 |
|
|
37 |
include $(BUILDDIR)/common/Defs.gmk
|
|
38 |
|
|
39 |
# Re-direct classes to another location (we are building cldrdata.jar)
|
|
40 |
CLASSDESTDIR = $(TEMPDIR)/classes
|
|
41 |
CLDRVERSION = 21.0.1
|
|
42 |
CLDRSRCDIR = $(SHARE_SRC)/classes/sun/util/cldr/resources/$(subst .,_,$(CLDRVERSION))
|
|
43 |
CLDRDATA_JAR = $(EXTDIR)/cldrdata.jar
|
|
44 |
CLDRCONVERTER_JAR = $(BUILDTOOLJARDIR)/cldrconverter.jar
|
|
45 |
|
|
46 |
#
|
|
47 |
# Files
|
|
48 |
#
|
|
49 |
CLDRGENSRCDIR = $(GENSRCDIR)/sun/text/resources/cldr \
|
|
50 |
$(GENSRCDIR)/sun/util/cldr \
|
|
51 |
$(GENSRCDIR)/sun/util/resources/cldr
|
|
52 |
MANIFEST_FILE = $(TEMPDIR)/manifest.mf
|
|
53 |
|
|
54 |
#
|
|
55 |
# Rules
|
|
56 |
#
|
|
57 |
include $(BUILDDIR)/common/Classes.gmk
|
|
58 |
|
|
59 |
gensrc: $(GENSRCDIR)/sun/util/cldr/CLDRLocaleDataMetaInfo.java
|
|
60 |
|
|
61 |
$(GENSRCDIR)/sun/util/cldr/CLDRLocaleDataMetaInfo.java: \
|
|
62 |
$(wildcard $(CLDRSRCDIR)/common/dtd/*.dtd) \
|
|
63 |
$(wildcard $(CLDRSRCDIR)/common/main/*.xml) \
|
|
64 |
$(wildcard $(CLDRSRCDIR)/common/supplemental/*.xml)
|
|
65 |
$(prep-target)
|
|
66 |
@$(BOOT_JAVA_CMD) -jar $(CLDRCONVERTER_JAR) \
|
|
67 |
-base $(CLDRSRCDIR) \
|
|
68 |
-o $(GENSRCDIR)
|
|
69 |
@$(java-vm-cleanup)
|
|
70 |
|
|
71 |
$(CLDRDATA_JAR): $(EXTDIR) $(GENSRCDIR)/sun/util/cldr/CLDRLocaleDataMetaInfo.java $(MANIFEST_FILE)
|
|
72 |
$(prep-target)
|
|
73 |
$(MKDIR) -p $(CLASSDESTDIR)
|
|
74 |
$(shell \
|
|
75 |
for dir in $(GENSRCDIR); do \
|
|
76 |
if [ -d $$dir ] ; then \
|
|
77 |
( $(CD) $$dir; \
|
|
78 |
for sdir in $(CLDRGENSRCDIR); do \
|
|
79 |
if [ -d $$sdir ] ; then \
|
|
80 |
$(FIND) $$sdir \
|
|
81 |
-name '*.java' -print >> $(JAVA_SOURCE_LIST) ; \
|
|
82 |
fi ; \
|
|
83 |
done \
|
|
84 |
); \
|
|
85 |
fi; \
|
|
86 |
done \
|
|
87 |
)
|
|
88 |
$(JAVAC_CMD) -sourcepath "$(SOURCEPATH)" -d $(CLASSDESTDIR) @$(JAVA_SOURCE_LIST)
|
|
89 |
$(BOOT_JAR_CMD) -cmf $(MANIFEST_FILE) $@ -C $(CLASSDESTDIR) sun \
|
|
90 |
$(BOOT_JAR_JFLAGS)
|
|
91 |
@$(java-vm-cleanup)
|
|
92 |
|
|
93 |
$(MANIFEST_FILE):
|
|
94 |
@$(prep-target)
|
|
95 |
$(ECHO) "CLDR-Version: $(CLDRVERSION)" > $@
|
|
96 |
|
|
97 |
build: gensrc $(CLDRDATA_JAR)
|
|
98 |
|
|
99 |
clean clobber::
|
|
100 |
$(RM) -r $(CLASSDESTDIR)
|
|
101 |
$(RM) -r $(GENSRCDIR)/sun/text/resources/cldr
|
|
102 |
$(RM) -r $(GENSRCDIR)/sun/util/cldr
|
|
103 |
$(RM) -r $(GENSRCDIR)/sun/util/resources/cldr
|
|
104 |
$(RM) $(MANIFEST_FILE)
|
|
105 |
$(RM) $(CLDRDATA_JAR)
|
|
106 |
|
|
107 |
.PHONY: gensrc
|