jdk/make/gendata/GendataBreakIterator.gmk
8142968: Module System implementation
Summary: Initial integration of JEP 200, JEP 260, JEP 261, and JEP 282
Reviewed-by: alanb, mchung, naoto, rriggs, psandoz, plevart, mullan, ascarpino, vinnie, prr, sherman, dfuchs, mhaupt
Contributed-by: alan.bateman@oracle.com, alex.buckley@oracle.com, jonathan.gibbons@oracle.com, karen.kinnear@oracle.com, mandy.chung@oracle.com, mark.reinhold@oracle.com, chris.hegarty@oracle.com, alexandr.scherbatiy@oracle.com, amy.lu@oracle.com, calvin.cheung@oracle.com, daniel.fuchs@oracle.com, erik.joelsson@oracle.com, harold.seigel@oracle.com, jaroslav.bachorik@oracle.com, jean-francois.denise@oracle.com, jan.lahoda@oracle.com, james.laskey@oracle.com, lois.foltan@oracle.com, miroslav.kos@oracle.com, huaming.li@oracle.com, sean.mullan@oracle.com, naoto.sato@oracle.com, masayoshi.okutsu@oracle.com, peter.levart@gmail.com, philip.race@oracle.com, claes.redestad@oracle.com, sergey.bylokhov@oracle.com, alexandre.iline@oracle.com, volker.simonis@gmail.com, staffan.larsen@oracle.com, stuart.marks@oracle.com, semyon.sadetsky@oracle.com, serguei.spitsyn@oracle.com, sundararajan.athijegannathan@oracle.com, valerie.peng@oracle.com, vincent.x.ryan@oracle.com, weijun.wang@oracle.com, yuri.nesterenko@oracle.com, yekaterina.kantserova@oracle.com, alexander.kulyakhtin@oracle.com, felix.yang@oracle.com, andrei.eremeev@oracle.com, frank.yuan@oracle.com, sergei.pikalev@oracle.com, sibabrata.sahoo@oracle.com, tiantian.du@oracle.com, sha.jiang@oracle.com
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Make file for generating BreakIterator data files.
#
# input
#
# Notes: sun.text.resources.BreakIteratorRules no longer goes to runtime.
# They are used at JDK build phase in order to create $(BIFILES) which
# are used on runtime instead.
#
TEXT_PKG := sun/text/resources
TEXT_PKG_LD := $(TEXT_PKG)/ext
TEXT_SOURCES := $(TEXT_PKG)/BreakIteratorRules.java \
$(TEXT_PKG)/BreakIteratorInfo.java \
$(TEXT_PKG_LD)/BreakIteratorRules_th.java \
$(TEXT_PKG_LD)/BreakIteratorInfo_th.java
# Generate BreakIteratorData
BREAK_ITERATOR_CLASSES := $(BUILDTOOLS_OUTPUTDIR)/break_iterator_classes
# These two files should be moved out to a build tool!
$(eval $(call SetupJavaCompilation,BUILD_BREAKITERATOR_BASE, \
SETUP := GENERATE_OLDBYTECODE, \
SRC := $(JDK_TOPDIR)/src/java.base/share/classes, \
INCLUDE_FILES := \
$(TEXT_PKG)/BreakIteratorRules.java \
$(TEXT_PKG)/BreakIteratorInfo.java, \
BIN := $(BREAK_ITERATOR_CLASSES)/java.base))
$(eval $(call SetupJavaCompilation,BUILD_BREAKITERATOR_LD, \
SETUP := GENERATE_OLDBYTECODE, \
SRC := $(JDK_TOPDIR)/src/jdk.localedata/share/classes, \
INCLUDES := $(TEXT_PKG_LD), \
INCLUDE_FILES := \
$(TEXT_PKG_LD)/BreakIteratorRules_th.java \
$(TEXT_PKG_LD)/BreakIteratorInfo_th.java, \
BIN := $(BREAK_ITERATOR_CLASSES)/jdk.localedata))
ifeq ($(BOOT_JDK_MODULAR), true)
BREAK_ITERATOR_BOOTCLASSPATH := -Xpatch:$(BREAK_ITERATOR_CLASSES) \
-XaddExports:$(subst $(SPACE),$(COMMA),$(strip \
java.base/sun.text=ALL-UNNAMED \
java.base/sun.text.resources=ALL-UNNAMED \
jdk.localedata/sun.text.resources.ext=ALL-UNNAMED \
))
else
BREAK_ITERATOR_BOOTCLASSPATH := -Xbootclasspath/p:$(call PathList, \
$(BREAK_ITERATOR_CLASSES)/java.base \
$(BREAK_ITERATOR_CLASSES)/jdk.localedata)
endif
# Generate data resource files.
# input
UNICODEDATA := $(JDK_TOPDIR)/make/data/unicodedata/UnicodeData.txt
# output
BASE_DATA_PKG_DIR := $(JDK_OUTPUTDIR)/modules/java.base/sun/text/resources
LD_DATA_PKG_DIR := $(JDK_OUTPUTDIR)/modules/jdk.localedata/sun/text/resources
BIFILES := $(BASE_DATA_PKG_DIR)/CharacterBreakIteratorData \
$(BASE_DATA_PKG_DIR)/WordBreakIteratorData \
$(BASE_DATA_PKG_DIR)/LineBreakIteratorData \
$(BASE_DATA_PKG_DIR)/SentenceBreakIteratorData
BIFILES_TH := $(LD_DATA_PKG_DIR)/WordBreakIteratorData_th \
$(LD_DATA_PKG_DIR)/LineBreakIteratorData_th
$(BIFILES): $(BASE_DATA_PKG_DIR)/_the.bifiles
$(BASE_DATA_PKG_DIR)/_the.bifiles: JAVA_FLAGS += $(BREAK_ITERATOR_BOOTCLASSPATH)
$(BASE_DATA_PKG_DIR)/_the.bifiles: $(BUILD_TOOLS) $(UNICODEDATA) \
$(BUILD_BREAKITERATOR_BASE) $(BUILD_BREAKITERATOR_LD)
$(call LogInfo, Generating BreakIteratorData)
$(call MakeDir, $(@D))
$(RM) $(BIFILES)
$(TOOL_GENERATEBREAKITERATORDATA) \
-o $(@D) \
-spec $(UNICODEDATA)
$(TOUCH) $@
$(BIFILES_TH): $(LD_DATA_PKG_DIR)/_the.bifiles_th
$(LD_DATA_PKG_DIR)/_the.bifiles_th: JAVA_FLAGS += $(BREAK_ITERATOR_BOOTCLASSPATH)
$(LD_DATA_PKG_DIR)/_the.bifiles_th: $(BUILD_TOOLS) $(UNICODEDATA) \
$(BUILD_BREAKITERATOR_BASE) $(BUILD_BREAKITERATOR_LD)
$(call LogInfo, Generating BreakIteratorData_th)
$(RM) $(BIFILES_TH)
$(TOOL_GENERATEBREAKITERATORDATA) \
-o $(@D) \
-spec $(UNICODEDATA) \
-language th
$(TOUCH) $@
TARGETS += $(BIFILES) $(BIFILES_TH)