Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8257733: Move module-specific data from make to respective module #1611

Closed
wants to merge 9 commits into from
Closed
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
@@ -53,7 +53,7 @@ TOOL_GENERATECHARACTER = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_cla
TOOL_CHARACTERNAME = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.generatecharacter.CharacterName

TOOL_DTDBUILDER = $(JAVA_SMALL) -Ddtd_home=$(TOPDIR)/src/java.desktop/data/dtdbuilder \
TOOL_DTDBUILDER = $(JAVA_SMALL) -Ddtd_home=$(TOPDIR)/src/java.desktop/share/data/dtdbuilder \
-Djava.awt.headless=true \
-cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes build.tools.dtdbuilder.DTDBuilder

@@ -50,7 +50,7 @@ endif
X11WRAPPERS_OUTPUT := $(SUPPORT_OUTPUTDIR)/x11wrappers
GENERATOR_SOURCE_FILE := $(X11WRAPPERS_OUTPUT)/src/data_generator.c

GENSRC_X11WRAPPERS_DATADIR := $(TOPDIR)/src/java.desktop/data/x11wrappergen
GENSRC_X11WRAPPERS_DATADIR := $(TOPDIR)/src/java.desktop/share/data/x11wrappergen
WRAPPER_OUTPUT_FILE := $(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(BITS).txt

BITS := $(OPENJDK_TARGET_CPU_BITS)
@@ -149,15 +149,15 @@
* A tool for processing the .sym.txt files.
*
* To add historical data for JDK N, N >= 11, do the following:
* * cd <open-jdk-checkout>/src/jdk.compiler/data/symbols
* * cd <open-jdk-checkout>/src/jdk.compiler/share/data/symbols
* * <jdk-N>/bin/java --add-exports jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED \
* --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
* --add-exports jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
* --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
* --add-modules jdk.jdeps \
* ../../../make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java \
* build-description-incremental symbols include.list
* * sanity-check the new and updates files in src/jdk.compiler/data/symbols and commit them
* * sanity-check the new and updates files in src/jdk.compiler/share/data/symbols and commit them
*
* The tools allows to:
* * convert the .sym.txt into class/sig files for ct.sym
@@ -205,8 +205,8 @@
* To generate the .sym.txt files for OpenJDK 7 and 8:
* <jdk-7>/bin/java build.tools.symbolgenerator.Probe OpenJDK7.classes
* <jdk-8>/bin/java build.tools.symbolgenerator.Probe OpenJDK8.classes
* java build.tools.symbolgenerator.CreateSymbols build-description src/jdk.compiler/data/symbols
* $TOPDIR src/jdk.compiler/data/symbols/include.list
* java build.tools.symbolgenerator.CreateSymbols build-description src/jdk.compiler/share/data/symbols
* $TOPDIR src/jdk.compiler/share/data/symbols/include.list
* 8 OpenJDK8.classes '<none>'
* 7 OpenJDK7.classes 8
*
@@ -39,7 +39,7 @@ include gendata/GendataPublicSuffixList.gmk

GENDATA_UNINAME := $(JDK_OUTPUTDIR)/modules/java.base/java/lang/uniName.dat

$(GENDATA_UNINAME): $(MODULE_SRC)/data/unicodedata/UnicodeData.txt $(BUILD_TOOLS_JDK)
$(GENDATA_UNINAME): $(MODULE_SRC)/share/data/unicodedata/UnicodeData.txt $(BUILD_TOOLS_JDK)
$(call MakeDir, $(@D))
$(TOOL_CHARACTERNAME) $< $@

@@ -49,7 +49,7 @@ TARGETS += $(GENDATA_UNINAME)

GENDATA_CURDATA := $(JDK_OUTPUTDIR)/modules/java.base/java/util/currency.data

$(GENDATA_CURDATA): $(MODULE_SRC)/data/currency/CurrencyData.properties $(BUILD_TOOLS_JDK)
$(GENDATA_CURDATA): $(MODULE_SRC)/share/data/currency/CurrencyData.properties $(BUILD_TOOLS_JDK)
$(call MakeDir, $(@D))
$(RM) $@
$(TOOL_GENERATECURRENCYDATA) -o $@.tmp -i $<
@@ -60,7 +60,7 @@ TARGETS += $(GENDATA_CURDATA)

################################################################################

GENDATA_CACERTS_SRC := $(MODULE_SRC)/data/cacerts/
GENDATA_CACERTS_SRC := $(MODULE_SRC)/share/data/cacerts/
GENDATA_CACERTS := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/security/cacerts

$(GENDATA_CACERTS): $(BUILD_TOOLS_JDK) $(wildcard $(GENDATA_CACERTS_SRC)/*)
@@ -43,10 +43,10 @@ TARGETS += $(GENSRC_BASELOCALEDATA)

################################################################################

CLDR_DATA_DIR := $(MODULE_SRC)/data/cldr/common
CLDR_DATA_DIR := $(MODULE_SRC)/share/data/cldr/common
GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.base
CLDR_GEN_DONE := $(GENSRC_DIR)/_cldr-gensrc.marker
TZ_DATA_DIR := $(MODULE_SRC)/data/tzdata
TZ_DATA_DIR := $(MODULE_SRC)/share/data/tzdata
ZONENAME_TEMPLATE := $(MODULE_SRC)/share/classes/java/time/format/ZoneName.java.template

$(CLDR_GEN_DONE): $(wildcard $(CLDR_DATA_DIR)/dtd/*.dtd) \
@@ -97,7 +97,7 @@ TARGETS += $(COPY_ZH_HK)

GENSRC_LSREQUIVMAPS := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/locale/LocaleEquivalentMaps.java

$(GENSRC_LSREQUIVMAPS): $(MODULE_SRC)/data/lsrdata/language-subtag-registry.txt $(BUILD_TOOLS_JDK)
$(GENSRC_LSREQUIVMAPS): $(MODULE_SRC)/share/data/lsrdata/language-subtag-registry.txt $(BUILD_TOOLS_JDK)
$(call MakeDir, $(@D))
$(TOOL_GENERATELSREQUIVMAPS) $< $@

@@ -23,7 +23,7 @@
# questions.
#

GENDATA_BLACKLISTED_CERTS_SRC += $(MODULE_SRC)/data/blacklistedcertsconverter/blacklisted.certs.pem
GENDATA_BLACKLISTED_CERTS_SRC += $(MODULE_SRC)/share/data/blacklistedcertsconverter/blacklisted.certs.pem
GENDATA_BLACKLISTED_CERTS := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/security/blacklisted.certs

$(GENDATA_BLACKLISTED_CERTS): $(BUILD_TOOLS_JDK) $(GENDATA_BLACKLISTED_CERTS_SRC)
@@ -74,7 +74,7 @@ BREAK_ITERATOR_BOOTCLASSPATH := \

# Generate data resource files.
# input
UNICODEDATA := $(MODULE_SRC)/data/unicodedata/UnicodeData.txt
UNICODEDATA := $(MODULE_SRC)/share/data/unicodedata/UnicodeData.txt

# output
BASE_DATA_PKG_DIR := $(JDK_OUTPUTDIR)/modules/java.base/sun/text/resources
@@ -25,7 +25,7 @@

include $(SPEC)

GENDATA_PUBLICSUFFIXLIST_SRC += $(MODULE_SRC)/data/publicsuffixlist/public_suffix_list.dat
GENDATA_PUBLICSUFFIXLIST_SRC += $(MODULE_SRC)/share/data/publicsuffixlist/public_suffix_list.dat
GENDATA_PUBLICSUFFIXLIST := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/security/public_suffix_list.dat

$(GENDATA_PUBLICSUFFIXLIST): $(GENDATA_PUBLICSUFFIXLIST_SRC) $(BUILD_TOOLS_JDK)
@@ -28,7 +28,7 @@ GENDATA_TZDB :=
#
# Time zone data file creation
#
TZDATA_DIR := $(MODULE_SRC)/data/tzdata
TZDATA_DIR := $(MODULE_SRC)/share/data/tzdata
TZDATA_TZFILE := africa antarctica asia australasia europe northamerica southamerica backward etcetera gmt jdk11_backward
TZDATA_TZFILES := $(addprefix $(TZDATA_DIR)/,$(TZDATA_TZFILE))

@@ -29,8 +29,8 @@

GENSRC_CHARACTERDATA :=

CHARACTERDATA = $(MODULE_SRC)/data/characterdata
UNICODEDATA = $(MODULE_SRC)/data/unicodedata
CHARACTERDATA = $(MODULE_SRC)/share/data/characterdata
UNICODEDATA = $(MODULE_SRC)/share/data/unicodedata

define SetupCharacterData
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/$1.java: \
@@ -28,7 +28,7 @@
# Generate StandardCharsets.java and individul sun.nio.cs charset class using
# the charsetmapping tool
#
CHARSET_DATA_DIR := $(MODULE_SRC)/data/charsetmapping
CHARSET_DATA_DIR := $(MODULE_SRC)/share/data/charsetmapping
CHARSET_EXTSRC_DIR := $(TOPDIR)/src/jdk.charsets/share/classes/sun/nio/cs/ext
CHARSET_GENSRC_JAVA_DIR_BASE := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/cs
CHARSET_DONE_BASE := $(CHARSET_GENSRC_JAVA_DIR_BASE)/_the.charsetmapping
@@ -30,7 +30,7 @@
GENSRC_EMOJIDATA := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/util/regex/EmojiData.java

EMOJIDATATEMP = $(MODULE_SRC)/share/classes/java/util/regex/EmojiData.java.template
UNICODEDATA = $(MODULE_SRC)/data/unicodedata
UNICODEDATA = $(MODULE_SRC)/share/data/unicodedata

$(GENSRC_EMOJIDATA): $(BUILD_TOOLS_JDK) $(EMOJIDATATEMP) $(UNICODEDATA)/emoji/emoji-data.txt
$(call LogInfo, Generating $@)
@@ -25,7 +25,7 @@

GENDATA_FONT_CONFIG_DST := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)

GENDATA_FONT_CONFIG_DATA_DIR ?= $(MODULE_SRC)/data/fontconfig
GENDATA_FONT_CONFIG_DATA_DIR ?= $(MODULE_SRC)/share/data/fontconfig

GENDATA_FONT_CONFIG_SRC_FILES := \
$(wildcard $(GENDATA_FONT_CONFIG_DATA_DIR)/$(OPENJDK_TARGET_OS).*)
@@ -111,7 +111,7 @@ ifeq ($(call isTargetOs, macosx), true)
GENSRC_OSX_ICONS_DST := $(SUPPORT_OUTPUTDIR)/headers/java.desktop
GENSRC_OSX_ICONS := $(GENSRC_OSX_ICONS_DST)/AWTIconData.h

GENSRC_OSX_ICONS_SRC ?= $(MODULE_SRC)/data/macosxicons/JavaApp.icns
GENSRC_OSX_ICONS_SRC ?= $(MODULE_SRC)/share/data/macosxicons/JavaApp.icns


$(GENSRC_OSX_ICONS): $(GENSRC_OSX_ICONS_SRC) $(BUILD_TOOLS_JDK)
@@ -24,13 +24,13 @@
#

# Generate java sources using the X11 offsets that are precalculated in files
# src/java.desktop/data/x11wrappergen/sizes-<address size>.txt.
# src/java.desktop/share/data/x11wrappergen/sizes-<address size>.txt.

# Put the generated Java classes used to interface X11 from awt here.
GENSRC_X11WRAPPERS_OUTPUTDIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/sun/awt/X11

# The pre-calculated offset file are stored here:
GENSRC_X11WRAPPERS_DATADIR := $(MODULE_SRC)/data/x11wrappergen
GENSRC_X11WRAPPERS_DATADIR := $(MODULE_SRC)/share/data/x11wrappergen
GENSRC_X11WRAPPERS_DATA := $(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(OPENJDK_TARGET_CPU_BITS).txt

# Run the tool on the offset files to generate several Java classes used in awt.
@@ -29,7 +29,7 @@ include GensrcCommonJdk.gmk
#
# Generate files using the charsetmapping tool
#
CHARSET_DATA_DIR := $(TOPDIR)/src/java.base/data/charsetmapping
CHARSET_DATA_DIR := $(TOPDIR)/src/java.base/share/data/charsetmapping

CHARSET_GENSRC_JAVA_DIR_CS := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.charsets/sun/nio/cs/ext
CHARSET_DONE_CS := $(CHARSET_GENSRC_JAVA_DIR_CS)/_the.charsetmapping
@@ -41,7 +41,7 @@ CT_MODULES := $(DOCS_MODULES)
# Get the complete module source path:
CT_MODULESOURCEPATH := $(call GetModuleSrcPath)

CT_DATA_DESCRIPTION += $(MODULE_SRC)/data/symbols/symbols
CT_DATA_DESCRIPTION += $(MODULE_SRC)/share/data/symbols/symbols

COMPILECREATESYMBOLS_ADD_EXPORTS := \
--add-exports java.base/jdk.internal=java.compiler.interim,jdk.compiler.interim \
@@ -66,7 +66,7 @@ $(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \

$(SUPPORT_OUTPUTDIR)/symbols/ct.sym: \
$(COMPILE_CREATE_SYMBOLS) \
$(wildcard $(MODULE_SRC)/data/symbols/*) \
$(wildcard $(MODULE_SRC)/share/data/symbols/*) \
$(MODULE_INFOS)
$(RM) -r $(@D)
$(MKDIR) -p $(@D)
@@ -39,7 +39,7 @@ JAVADOC_MODULES := $(DOCS_MODULES)
# Get the complete module source path:
JAVADOC_MODULESOURCEPATH := $(call GetModuleSrcPath)

CT_DATA_DESCRIPTION += $(TOPDIR)/src/jdk.compiler/data/symbols/symbols
CT_DATA_DESCRIPTION += $(TOPDIR)/src/jdk.compiler/share/data/symbols/symbols

COMPILECREATESYMBOLS_ADD_EXPORTS := \
--add-exports java.base/jdk.internal=java.compiler.interim,jdk.compiler.interim \
@@ -64,7 +64,7 @@ $(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \

$(SUPPORT_OUTPUTDIR)/javadoc-symbols/symbols: \
$(COMPILE_CREATE_SYMBOLS) \
$(wildcard $(TOPDIR)/src/jdk.compiler/data/symbols/*) \
$(wildcard $(TOPDIR)/src/jdk.compiler/share/data/symbols/*) \
$(MODULE_INFOS)
$(RM) -r $(@D)
$(MKDIR) -p $(@D)
@@ -26,10 +26,11 @@
include GensrcCommonJdk.gmk

################################################################################
# Translate the Java debugger wire protocol (jdwp.spec) file into a JDWP.java file
# and a JDWPCommands.h C-header file.
# Translate the Java debugger wire protocol (jdwp.spec) file into a front-end
# Java implementation (JDWP.java), a back-end C header file (JDWPCommands.h) and
# an HTML documentation file (jdwp-protocol.html).

JDWP_SPEC_FILE := $(MODULE_SRC)/data/jdwp/jdwp.spec
JDWP_SPEC_FILE := $(TOPDIR)/src/java.se/share/data/jdwp/jdwp.spec
HEADER_FILE := $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h
JAVA_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java
HTML_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html
@@ -33,7 +33,7 @@ TARGETS += $(GENSRC_LOCALEDATA)

################################################################################

CLDR_DATA_DIR := $(TOPDIR)/src/java.base/data/cldr/common
CLDR_DATA_DIR := $(TOPDIR)/src/java.base/share/data/cldr/common
GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata
CLDR_GEN_DONE := $(GENSRC_DIR)/_cldr-gensrc.marker

@@ -34,19 +34,19 @@
# - have a checkout the JDK to which the data should be added (or in which the data should be updated).
# The checkout directory will be denoted as "${JDK_CHECKOUT}" in the further text.
# The checkout must not have any local changes that could interfere with the new data. In particular,
# there must be absolutely no changed, new or removed files under the ${JDK_CHECKOUT}/src/jdk.compiler/data/symbols
# there must be absolutely no changed, new or removed files under the ${JDK_CHECKOUT}/src/jdk.compiler/share/data/symbols
# directory.
# - open a terminal program and run these commands:
# cd "${JDK_CHECKOUT}"/src/jdk.compiler/data/symbols
# cd "${JDK_CHECKOUT}"/src/jdk.compiler/share/data/symbols
# bash ../../scripts/generate-symbol-data.sh "${JDK_N_INSTALL}"
# - this command will generate or update data for "--release N" into the ${JDK_CHECKOUT}/src/jdk.compiler/data/symbols
# - this command will generate or update data for "--release N" into the ${JDK_CHECKOUT}/src/jdk.compiler/share/data/symbols
# directory, updating all registration necessary. If the goal was to update the data, and there are no
# new or changed files in the ${JDK_CHECKOUT}/src/jdk.compiler/data/symbols directory after running this script,
# new or changed files in the ${JDK_CHECKOUT}/src/jdk.compiler/share/data/symbols directory after running this script,
# there were no relevant changes and no further action is necessary. Note that version for N > 9 are encoded
# using capital letters, i.e. A represents version 10, B represents 11, and so on. The version numbers are in
# the names of the files in the ${JDK_CHECKOUT}/src/jdk.compiler/data/symbols directory, as well as in
# the ${JDK_CHECKOUT}/src/jdk.compiler/data/symbols/symbols file.
# - if there are any changed/new files in the ${JDK_CHECKOUT}/src/jdk.compiler/data/symbols directory after running this script,
# the names of the files in the ${JDK_CHECKOUT}/src/jdk.compiler/share/data/symbols directory, as well as in
# the ${JDK_CHECKOUT}/src/jdk.compiler/share/data/symbols/symbols file.
# - if there are any changed/new files in the ${JDK_CHECKOUT}/src/jdk.compiler/share/data/symbols directory after running this script,
# then all the changes in this directory, including any new files, need to be sent for review and eventually pushed.
# The commit message should specify which binary build was installed in the ${JDK_N_INSTALL} directory and also
# include the SCM state that was used to build it, which can be found in ${JDK_N_INSTALL}/release,
@@ -59,12 +59,12 @@ if [ "$1x" = "x" ] ; then
fi;

if [ ! -f symbols ] ; then
echo "Must run inside the src/jdk.compiler/data/symbols directory" >&2
echo "Must run inside the src/jdk.compiler/share/data/symbols directory" >&2
exit 1
fi;

if [ "`git status --porcelain=v1 .`x" != "x" ] ; then
echo "The src/jdk.compiler/data/symbols directory contains local changes!" >&2
echo "The src/jdk.compiler/share/data/symbols directory contains local changes!" >&2
exit 1
fi;