blob: 76955e22d81ae0e67a5e702a658238685e4a82ee [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001#
2# Copyright 1996-2006 Sun Microsystems, Inc. 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. Sun designates this
8# particular file as subject to the "Classpath" exception as provided
9# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22# CA 95054 USA or visit www.sun.com if you need additional information or
23# have any questions.
24#
25
26BUILDDIR = ../..
27
28PACKAGE = java.text
29PRODUCT = sun
30
31include $(BUILDDIR)/common/Defs.gmk
32
33#
34# Files
35#
36include FILES_java.gmk
37
38#
39# Include
40#
41include $(BUILDDIR)/common/Classes.gmk
42
43#
44# Rules to add data files BreakIterator
45#
46TEXT_CLASSES = $(BUILDTOOLCLASSDIR)/java.text/classes
47
48# input
49#
50# Notes: sun.text.resources.BreakIteratorRules no longer goes to runtime.
51# They are used at JDK build phase in order to create $(BIFILES) which
52# are used on runtime instead.
53#
54TEXT_SRCDIR = $(SHARE_SRC)/classes/sun/text/resources
55TEXT_SOURCES = $(TEXT_SRCDIR)/BreakIteratorRules.java \
56 $(TEXT_SRCDIR)/BreakIteratorInfo.java
57UNICODEDATA = $(BUILDDIR)/tools/UnicodeData
58
59# output
60TEXT_CLASSDIR = $(CLASSBINDIR)/sun/text/resources
61BIFILES = $(TEXT_CLASSDIR)/CharacterBreakIteratorData \
62 $(TEXT_CLASSDIR)/WordBreakIteratorData \
63 $(TEXT_CLASSDIR)/LineBreakIteratorData \
64 $(TEXT_CLASSDIR)/SentenceBreakIteratorData
65
66ICU_FILES = $(TEXT_CLASSDIR)/unorm.icu \
67 $(TEXT_CLASSDIR)/uprops.icu
68
69# builder
70GENERATEBREAKITERATORDATA_JARFILE = \
71 $(BUILDTOOLJARDIR)/generatebreakiteratordata.jar
72
73$(BIFILES): $(GENERATEBREAKITERATORDATA_JARFILE) \
74 $(UNICODEDATA)/UnicodeData.txt \
75 $(TEXT_SOURCES)
76 $(prep-target)
77 $(RM) -r $(TEXT_CLASSES)
78 $(MKDIR) -p $(TEXT_CLASSES)
79 $(BOOT_JAVAC_CMD) -d $(TEXT_CLASSES) \
80 -sourcepath $(TEXT_SRCDIR) \
81 $(TEXT_SOURCES)
82 $(MKDIR) -p $(TEXT_CLASSDIR)
83 $(BOOT_JAVA_CMD) -Xbootclasspath/p:$(TEXT_CLASSES) \
84 -jar $(GENERATEBREAKITERATORDATA_JARFILE) \
85 -o $(TEXT_CLASSDIR) \
86 -spec $(UNICODEDATA)/UnicodeData.txt
87 @$(java-vm-cleanup)
88
89build: $(BIFILES) $(ICU_FILES)
90
91#
92# Extra rules to copy unorm.icu and uprops.icu
93#
94$(TEXT_CLASSDIR)/unorm.icu: $(TEXT_SRCDIR)/unorm.icu
95 $(install-file)
96
97$(TEXT_CLASSDIR)/uprops.icu: $(TEXT_SRCDIR)/uprops.icu
98 $(install-file)
99
100clean clobber::
101 $(RM) -r $(TEXT_CLASSES)
102 $(RM) -r $(BIFILES)
103 $(RM) $(ICU_FILES)
104