diff --git a/make/ToolsJdk.gmk b/make/ToolsJdk.gmk index 9eef6969125..7eb2a4efa7e 100644 --- a/make/ToolsJdk.gmk +++ b/make/ToolsJdk.gmk @@ -44,9 +44,6 @@ TOOL_COMPILEFONTCONFIG = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_cla --add-exports java.desktop/sun.awt=ALL-UNNAMED \ build.tools.compilefontconfig.CompileFontConfig -TOOL_COMPILEPROPERTIES = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \ - build.tools.compileproperties.CompileProperties - TOOL_GENERATECHARACTER = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \ build.tools.generatecharacter.GenerateCharacter diff --git a/make/common/modules/GensrcCommonJdk.gmk b/make/common/modules/GensrcCommon.gmk similarity index 64% rename from make/common/modules/GensrcCommonJdk.gmk rename to make/common/modules/GensrcCommon.gmk index 652ba8f860e..b14e96293ba 100644 --- a/make/common/modules/GensrcCommonJdk.gmk +++ b/make/common/modules/GensrcCommon.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2022, 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 @@ -24,7 +24,20 @@ # include Execute.gmk -include JavaCompilation.gmk -include NativeCompilation.gmk include TextFileProcessing.gmk include ToolsJdk.gmk + +################################################################################ +# Sets up a rule that creates a version.properties file in the gensrc output +# directory. +# Param 1 - Variable to add generated file name to +# Param 2 - Name of version.properties file including packages from the src +# root. +define SetupVersionProperties + $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/$$(strip $2): + $$(call MakeTargetDir) + $(PRINTF) "jdk=$(VERSION_NUMBER)\nfull=$(VERSION_STRING)\nrelease=$(VERSION_SHORT)\n" \ + > $$@ + + $$(strip $1) += $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/$$(strip $2) +endef diff --git a/make/common/modules/GensrcCommonLangtools.gmk b/make/common/modules/GensrcCommonLangtools.gmk deleted file mode 100644 index fc4be633351..00000000000 --- a/make/common/modules/GensrcCommonLangtools.gmk +++ /dev/null @@ -1,129 +0,0 @@ -# -# Copyright (c) 2014, 2020, 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. -# -include JavaCompilation.gmk - -################################################################################ -# The compileprops tools compiles a properties file into a resource bundle. -TOOL_COMPILEPROPS_CMD := $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/langtools_tools_classes \ - compileproperties.CompileProperties -quiet - -################################################################################ -# The compileprops tools compiles a properties file into an enum-like class. -TOOL_PARSEPROPS_CMD := $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/langtools_tools_classes \ - propertiesparser.PropertiesParser - - -################################################################################ -# Sets up a rule that creates a version.properties file in the gensrc output -# directory. -# Param 1 - Variable to add generated file name to -# Param 2 - Name of version.properties file including packages from the src -# root. -define SetupVersionProperties - $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/$$(strip $2): - $$(call MakeTargetDir) - $(PRINTF) "jdk=$(VERSION_NUMBER)\nfull=$(VERSION_STRING)\nrelease=$(VERSION_SHORT)\n" \ - > $$@ - - $$(strip $1) += $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/$$(strip $2) -endef - -################################################################################ -# Finds all properties files in the module source and creates a rule that runs -# CompileProperties on them into the gensrc dir. -# Param 1 - Variable to add targets to -# Param 2 - Extra properties files to process -define SetupCompileProperties - # Lookup the properties that need to be compiled into resource bundles. - PROPSOURCES := $2 \ - $$(call FindFiles, $(TOPDIR)/src/$(MODULE)/share/classes, *.properties) - - # Filter out any excluded translations - PROPSOURCES := $$(call FilterExcludedTranslations, $$(PROPSOURCES), .properties) - - # Convert .../src//share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties - # to .../langtools/gensrc//com/sun/tools/javac/resources/javac_zh_CN.java - # Strip away prefix and suffix, leaving for example only: - # "/share/classes/com/sun/tools/javac/resources/javac_zh_CN" - PROPJAVAS := $$(patsubst $(TOPDIR)/src/%, \ - $(SUPPORT_OUTPUTDIR)/gensrc/%, \ - $$(patsubst %.properties, %.java, \ - $$(subst /share/classes,, $$(PROPSOURCES)))) - - # Generate the package dirs for the to be generated java files. Sort to remove - # duplicates. - PROPDIRS := $$(sort $$(dir $$(PROPJAVAS))) - - # Now generate a sequence of: - # "-compile ...javac_zh_CN.properties ...javac_zh_CN.java java.util.ListResourceBundle" - # suitable to be fed into the CompileProperties command. - PROPCMDLINE := $$(subst _SPACE_, $(SPACE), \ - $$(join $$(addprefix -compile_SPACE_, $$(PROPSOURCES)), \ - $$(addsuffix _SPACE_java.util.ListResourceBundle, \ - $$(addprefix _SPACE_, $$(PROPJAVAS))))) - - # Now setup the rule for the generation of the resource bundles. - PROPS_BASE := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the_props - $$(PROPS_BASE): $$(PROPSOURCES) - $$(call MakeDir, $$(@D) $$(PROPDIRS)) - $(FIND) $$(@D) -name "*.java" -a ! -name "*Properties.java" $(FIND_DELETE) - $(ECHO) Compiling $$(words $$(PROPSOURCES)) properties into resource bundles for $(MODULE) - $$(call ExecuteWithLog, $$(PROPS_BASE)_exec, \ - $(TOOL_COMPILEPROPS_CMD) $$(PROPCMDLINE)) - $(TOUCH) $$@ - - $$(strip $1) += $$(PROPS_BASE) -endef - -################################################################################ -# Parse property files in given location and generate a Java-like enum in the gensrc folder. -# Param 1 - Variable to add targets to -# Param 2 - Extra properties files to process -define SetupParseProperties - # property files to process - PARSEPROPSOURCES := $$(addprefix $(TOPDIR)/src/$(MODULE)/share/classes/, $2) - PARSEPROPSOURCES := $$(call FilterExcludedTranslations, $$(PARSEPROPSOURCES), .properties) - - PARSEPROPALLDIRS := $$(patsubst $(TOPDIR)/src/$(MODULE)/share/classes/%, \ - $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/%, \ - $$(dir $$(PARSEPROPSOURCES))) - - PARSEPROPDIRS := $$(sort $$(PARSEPROPALLDIRS)) - - PARSEPROPCMDLINE := $$(subst _SPACE_, $$(SPACE), \ - $$(join $$(foreach var,$$(PARSEPROPSOURCES),$$(addprefix -compile_SPACE_,$$(var))), \ - $$(addprefix _SPACE_, $$(PARSEPROPALLDIRS)))) - - # Now setup the rule for the generation of the resource bundles. - $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the_parsed_props: $$(PARSEPROPSOURCES) - $$(call MakeDir, $$(@D) $$(PARSEPROPDIRS)) - $(FIND) $$(@D) -name "*Properties.java" $(FIND_DELETE) - $(ECHO) Parsing $$(words $$(PARSEPROPSOURCES)) properties into enum-like class for $(MODULE) - $(TOOL_PARSEPROPS_CMD) $$(PARSEPROPCMDLINE) - $(TOUCH) $$@ - - $$(strip $1) += $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the_parsed_props -endef - diff --git a/make/common/modules/GensrcProperties.gmk b/make/common/modules/GensrcProperties.gmk index decd5dedd4c..7c2c4035ccc 100644 --- a/make/common/modules/GensrcProperties.gmk +++ b/make/common/modules/GensrcProperties.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2022, 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 @@ -26,6 +26,8 @@ # This file defines macros that sets up rules for generating java classes # from resource bundle properties files. +include JavaCompilation.gmk + ################################################################################ # Helper macro for SetupCopy-zh_HK. define SetupOneCopy-zh_HK @@ -56,8 +58,10 @@ endef # # Remaining parameters are named arguments. These include: # SRC_DIRS Directories containing properties files to process. +# EXTRA_FILES Also include these specifically named files # EXCLUDE Exclude files matching this pattern. # CLASS The super class for the generated classes. +# TYPE Wether to use "langtools" or normal compiler. # MODULE_PATH_ROOT Module path root, defaults to $(TOPDIR)/src. # KEEP_ALL_TRANSLATIONS Set to true to skip filtering of excluded translations. SetupCompileProperties = $(NamedParamsMacroTemplate) @@ -70,6 +74,8 @@ define SetupCompilePropertiesBody # Locate all properties files in the given source dirs. $1_SRC_FILES := $$(call FindFiles, $$($1_SRC_DIRS), *.properties) + $1_SRC_FILES += $$($1_EXTRA_FILES) + ifneq ($$($1_EXCLUDE), ) $1_SRC_FILES := $$(filter-out $$($1_EXCLUDE), $$($1_SRC_FILES)) endif @@ -102,13 +108,29 @@ define SetupCompilePropertiesBody $1_TARGET := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the.$1.marker $1_CMDLINE_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the.$1.cmdline + $1_EXEC_MARKER := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the.$1.exec + + ifeq ($$($1_TYPE), langtools) + $1_TOOL := -cp $(BUILDTOOLS_OUTPUTDIR)/langtools_tools_classes \ + compileproperties.CompileProperties + $1_TOOL_DEPS := $(BUILD_TOOLS_LANGTOOLS) + else + $1_TOOL := -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \ + build.tools.compileproperties.CompileProperties + $1_TOOL_DEPS := $(BUILD_TOOLS_JDK) + endif + + ifeq ($(findstring $(LOG_LEVEL), debug trace), ) + $1_QUIET := -quiet + endif # Now setup the rule for the generation of the resource bundles. - $$($1_TARGET): $$($1_SRC_FILES) $$($1_JAVAS) $(BUILD_TOOLS_JDK) + $$($1_TARGET): $$($1_SRC_FILES) $$($1_JAVAS) $$($1_TOOL_DEPS) $$(call LogWarn, Compiling $$(words $$($1_SRC_FILES)) properties into resource bundles for $(MODULE)) $$(call MakeDir, $$(@D) $$($1_DIRS)) $$(eval $$(call ListPathsSafely, $1_CMDLINE, $$($1_CMDLINE_FILE))) - $(TOOL_COMPILEPROPERTIES) -quiet @$$($1_CMDLINE_FILE) + $$(call ExecuteWithLog, $$($1_EXEC_MARKER), \ + $(JAVA_SMALL) $$($1_TOOL) $$($1_QUIET) @$$($1_CMDLINE_FILE)) $(TOUCH) $$@ $$($1_JAVAS): $$($1_SRC_FILES) @@ -120,5 +142,3 @@ define SetupCompilePropertiesBody $1 += $$($1_JAVAS) $$($1_TARGET) $$($1_HK) endef - -################################################################################ diff --git a/make/langtools/tools/compileproperties/CompileProperties.java b/make/langtools/tools/compileproperties/CompileProperties.java index 7d69f9b47b2..de17b3ba3cf 100644 --- a/make/langtools/tools/compileproperties/CompileProperties.java +++ b/make/langtools/tools/compileproperties/CompileProperties.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2022, 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 @@ -101,31 +101,22 @@ public class CompileProperties { } boolean ok = true; - /* Original usage */ - if (args.length == 2 && args[0].charAt(0) != '-' ) { - ok = createFile(args[0], args[1], "java.util.ListResourceBundle"); - } else if (args.length == 3) { - ok = createFile(args[0], args[1], args[2]); - } else if (args.length == 0) { - usage(log); + + ok = parseOptions(args); + if ( ok && compileCount == 0 ) { + log.error("options parsed but no files to compile", null); ok = false; + } + /* Need at least one file. */ + if ( !ok ) { + usage(log); } else { - /* New batch usage */ - ok = parseOptions(args); - if ( ok && compileCount == 0 ) { - log.error("options parsed but no files to compile", null); - ok = false; - } - /* Need at least one file. */ - if ( !ok ) { - usage(log); - } else { - /* Process files */ - for ( int i = 0; i < compileCount && ok ; i++ ) { - ok = createFile(propfiles[i], outfiles[i], supers[i]); - } + /* Process files */ + for ( int i = 0; i < compileCount && ok ; i++ ) { + ok = createFile(propfiles[i], outfiles[i], supers[i]); } } + return ok; } @@ -153,21 +144,21 @@ public class CompileProperties { outfiles[compileCount] = args[++i]; supers[compileCount] = args[++i]; compileCount++; - } else if ( "-optionsfile".equals(args[i]) && i+1 < args.length ) { - String filename = args[++i]; + } else if ( args[i].startsWith("@") && args[i].length() > 1 ) { + String filename = args[i].substring(1); FileInputStream finput = null; byte contents[] = null; try { finput = new FileInputStream(filename); int byteCount = finput.available(); if ( byteCount <= 0 ) { - log.error("The -optionsfile file is empty", null); + log.error("The @-file file is empty", null); ok = false; } else { contents = new byte[byteCount]; int bytesRead = finput.read(contents); if ( byteCount != bytesRead ) { - log.error("Cannot read all of -optionsfile file", null); + log.error("Cannot read all of @-file file", null); ok = false; } } @@ -283,14 +274,12 @@ public class CompileProperties { private static void usage(Log log) { log.info("usage:"); - log.info(" java CompileProperties path_to_properties_file path_to_java_output_file [super_class]"); - log.info(" -OR-"); - log.info(" java CompileProperties {-compile path_to_properties_file path_to_java_output_file super_class} -or- -optionsfile filename"); + log.info(" java CompileProperties {-compile path_to_properties_file path_to_java_output_file super_class} -or- @optionsfile"); log.info(""); log.info("Example:"); log.info(" java CompileProperties -compile test.properties test.java java.util.ListResourceBundle"); - log.info(" java CompileProperties -optionsfile option_file"); - log.info("option_file contains: -compile test.properties test.java java.util.ListResourceBundle"); + log.info(" java CompileProperties @optionsfile"); + log.info("optionsfile contains: -compile test.properties test.java java.util.ListResourceBundle"); } private static String escape(String theString) { diff --git a/make/modules/java.base/Gensrc.gmk b/make/modules/java.base/Gensrc.gmk index 9c9576bdd4a..c85347fbf68 100644 --- a/make/modules/java.base/Gensrc.gmk +++ b/make/modules/java.base/Gensrc.gmk @@ -23,7 +23,7 @@ # questions. # -include GensrcCommonJdk.gmk +include GensrcCommon.gmk include gensrc/GensrcLocaleData.gmk include gensrc/GensrcCharacterData.gmk diff --git a/make/modules/java.desktop/Gensrc.gmk b/make/modules/java.desktop/Gensrc.gmk index 1fc36f005c2..f7609107973 100644 --- a/make/modules/java.desktop/Gensrc.gmk +++ b/make/modules/java.desktop/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2022, 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 @@ -23,7 +23,7 @@ # questions. # -include GensrcCommonJdk.gmk +include GensrcCommon.gmk # Hook to include the corresponding custom file, if present. $(eval $(call IncludeCustomExtension, modules/java.desktop/Gensrc.gmk)) diff --git a/make/modules/java.logging/Gensrc.gmk b/make/modules/java.logging/Gensrc.gmk index 0839fcfd9ec..c28edd822b6 100644 --- a/make/modules/java.logging/Gensrc.gmk +++ b/make/modules/java.logging/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2022, 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 @@ -23,7 +23,7 @@ # questions. # -include GensrcCommonJdk.gmk +include GensrcCommon.gmk ################################################################################ diff --git a/make/modules/jdk.charsets/Gensrc.gmk b/make/modules/jdk.charsets/Gensrc.gmk index 1fac37b2c4b..e93ea19219d 100644 --- a/make/modules/jdk.charsets/Gensrc.gmk +++ b/make/modules/jdk.charsets/Gensrc.gmk @@ -23,7 +23,7 @@ # questions. # -include GensrcCommonJdk.gmk +include GensrcCommon.gmk ################################################################################ # diff --git a/make/modules/jdk.compiler/Gensrc.gmk b/make/modules/jdk.compiler/Gensrc.gmk index 2312449751e..14cc4f55a2b 100644 --- a/make/modules/jdk.compiler/Gensrc.gmk +++ b/make/modules/jdk.compiler/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2022, 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 @@ -23,16 +23,52 @@ # questions. # -include GensrcCommonLangtools.gmk +include GensrcCommon.gmk +include GensrcProperties.gmk +include Execute.gmk -$(eval $(call SetupVersionProperties,JAVAC_VERSION, \ +$(eval $(call SetupVersionProperties, JAVAC_VERSION, \ com/sun/tools/javac/resources/version.properties)) -$(eval $(call SetupCompileProperties,COMPILE_PROPERTIES, \ - $(JAVAC_VERSION))) +$(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \ + SRC_DIRS := $(TOPDIR)/src/$(MODULE)/share/classes, \ + EXTRA_FILES := $(JAVAC_VERSION), \ + CLASS := java.util.ListResourceBundle, \ + TYPE := langtools, \ +)) -$(eval $(call SetupParseProperties,PARSE_PROPERTIES, \ - com/sun/tools/javac/resources/compiler.properties \ - com/sun/tools/javac/resources/launcher.properties)) +TARGETS += $(COMPILE_PROPERTIES) -TARGETS += $(COMPILE_PROPERTIES) $(PARSE_PROPERTIES) +################################################################################ +# +# Compile properties files into enum-like classes using the propertiesparser tool +# + +# To avoid reevaluating the compilation setup for the tools each time this file +# is included, the following trick is used to be able to declare a dependency on +# the built tools. +BUILD_TOOLS_LANGTOOLS := $(call SetupJavaCompilationCompileTarget, \ + BUILD_TOOLS_LANGTOOLS, $(BUILDTOOLS_OUTPUTDIR)/langtools_tools_classes) + +TOOL_PARSEPROPERTIES_CMD := $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/langtools_tools_classes \ + propertiesparser.PropertiesParser + +PARSEPROPERTIES_PACKAGE := com/sun/tools/javac/resources +PARSEPROPERTIES_FILES := compiler.properties launcher.properties + +PARSEPROPERTIES_SRC := $(addprefix \ + $(MODULE_SRC)/share/classes/$(PARSEPROPERTIES_PACKAGE)/, \ + $(PARSEPROPERTIES_FILES)) + +PARSEPROPERTIES_ARGS := $(foreach file, $(PARSEPROPERTIES_SRC), \ + -compile $(file) \ + $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/$(PARSEPROPERTIES_PACKAGE)/) + +$(eval $(call SetupExecute, PARSEPROPERTIES, \ + WARN := Generating classes for $(PARSEPROPERTIES_FILES), \ + DEPS := $(PARSEPROPERTIES_SRC) $(BUILD_TOOLS_LANGTOOLS), \ + OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE), \ + COMMAND := $(TOOL_PARSEPROPERTIES_CMD) $(PARSEPROPERTIES_ARGS), \ +)) + +TARGETS += $(PARSEPROPERTIES) diff --git a/make/modules/jdk.httpserver/Gensrc.gmk b/make/modules/jdk.httpserver/Gensrc.gmk index 6e90917db33..37b51bb1d45 100644 --- a/make/modules/jdk.httpserver/Gensrc.gmk +++ b/make/modules/jdk.httpserver/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2021, 2022, 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 @@ -23,7 +23,7 @@ # questions. # -include GensrcCommonJdk.gmk +include GensrcCommon.gmk include GensrcProperties.gmk include Modules.gmk diff --git a/make/modules/jdk.jartool/Gensrc.gmk b/make/modules/jdk.jartool/Gensrc.gmk index f059f4ac43f..06fbedfa40c 100644 --- a/make/modules/jdk.jartool/Gensrc.gmk +++ b/make/modules/jdk.jartool/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2022, 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 @@ -23,7 +23,7 @@ # questions. # -include GensrcCommonJdk.gmk +include GensrcCommon.gmk ################################################################################ diff --git a/make/modules/jdk.javadoc/Gensrc.gmk b/make/modules/jdk.javadoc/Gensrc.gmk index 4fd6bff8f88..7aa92545fee 100644 --- a/make/modules/jdk.javadoc/Gensrc.gmk +++ b/make/modules/jdk.javadoc/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2022, 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 @@ -23,14 +23,17 @@ # questions. # -include GensrcCommonLangtools.gmk +include GensrcCommon.gmk +include GensrcProperties.gmk -$(eval $(call SetupVersionProperties,OLD_JAVADOC_VERSION,\ - com/sun/tools/javadoc/resources/version.properties)) - -$(eval $(call SetupVersionProperties,JAVADOC_VERSION,\ +$(eval $(call SetupVersionProperties, JAVADOC_VERSION,\ jdk/javadoc/internal/tool/resources/version.properties)) -$(eval $(call SetupCompileProperties,COMPILE_PROPERTIES, $(JAVADOC_VERSION))) +$(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \ + SRC_DIRS := $(TOPDIR)/src/$(MODULE)/share/classes, \ + EXTRA_FILES := $(JAVADOC_VERSION), \ + CLASS := java.util.ListResourceBundle, \ + TYPE := langtools, \ +)) TARGETS += $(COMPILE_PROPERTIES) diff --git a/make/modules/jdk.jdeps/Gensrc.gmk b/make/modules/jdk.jdeps/Gensrc.gmk index a819ad4296e..f26d1c2fa02 100644 --- a/make/modules/jdk.jdeps/Gensrc.gmk +++ b/make/modules/jdk.jdeps/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2022, 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 @@ -23,15 +23,20 @@ # questions. # -include GensrcCommonLangtools.gmk +include GensrcCommon.gmk +include GensrcProperties.gmk -$(eval $(call SetupVersionProperties,JAVAP_VERSION, \ +$(eval $(call SetupVersionProperties, JAVAP_VERSION, \ com/sun/tools/javap/resources/version.properties)) -$(eval $(call SetupVersionProperties,JDEPS_VERSION,\ +$(eval $(call SetupVersionProperties, JDEPS_VERSION,\ com/sun/tools/jdeps/resources/version.properties)) -$(eval $(call SetupCompileProperties,COMPILE_PROPERTIES,\ - $(JDEPS_VERSION) $(JAVAP_VERSION))) +$(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \ + SRC_DIRS := $(TOPDIR)/src/$(MODULE)/share/classes, \ + EXTRA_FILES := $(JDEPS_VERSION) $(JAVAP_VERSION), \ + CLASS := java.util.ListResourceBundle, \ + TYPE := langtools, \ +)) TARGETS += $(COMPILE_PROPERTIES) diff --git a/make/modules/jdk.jdi/Gensrc.gmk b/make/modules/jdk.jdi/Gensrc.gmk index 7db06b5c958..47f975064ad 100644 --- a/make/modules/jdk.jdi/Gensrc.gmk +++ b/make/modules/jdk.jdi/Gensrc.gmk @@ -23,7 +23,7 @@ # questions. # -include GensrcCommonJdk.gmk +include GensrcCommon.gmk ################################################################################ # Translate the Java debugger wire protocol (jdwp.spec) file into a front-end diff --git a/make/modules/jdk.jlink/Gensrc.gmk b/make/modules/jdk.jlink/Gensrc.gmk index 0cca1b9ba29..c450ceea073 100644 --- a/make/modules/jdk.jlink/Gensrc.gmk +++ b/make/modules/jdk.jlink/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2022, 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 @@ -23,7 +23,7 @@ # questions. # -include GensrcCommonJdk.gmk +include GensrcCommon.gmk include GensrcProperties.gmk include Modules.gmk diff --git a/make/modules/jdk.jpackage/Gensrc.gmk b/make/modules/jdk.jpackage/Gensrc.gmk index 6f3e8b08119..434b42dc0bf 100644 --- a/make/modules/jdk.jpackage/Gensrc.gmk +++ b/make/modules/jdk.jpackage/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2022, 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 @@ -23,7 +23,7 @@ # questions. # -include GensrcCommonJdk.gmk +include GensrcCommon.gmk ################################################################################ # Copy the entitlements file for the java launcher to jpackage as a resource. diff --git a/make/modules/jdk.jshell/Gensrc.gmk b/make/modules/jdk.jshell/Gensrc.gmk index a30fb018e76..71d1ad42817 100644 --- a/make/modules/jdk.jshell/Gensrc.gmk +++ b/make/modules/jdk.jshell/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2022, 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 @@ -23,12 +23,17 @@ # questions. # -include GensrcCommonLangtools.gmk +include GensrcCommon.gmk +include GensrcProperties.gmk -$(eval $(call SetupVersionProperties,JSHELL_VERSION, \ +$(eval $(call SetupVersionProperties, JSHELL_VERSION, \ jdk/internal/jshell/tool/resources/version.properties)) -$(eval $(call SetupCompileProperties,COMPILE_PROPERTIES, \ - $(JSHELL_VERSION) $(JAVAH_VERSION))) +$(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \ + SRC_DIRS := $(TOPDIR)/src/$(MODULE)/share/classes, \ + EXTRA_FILES := $(JSHELL_VERSION), \ + CLASS := java.util.ListResourceBundle, \ + TYPE := langtools, \ +)) TARGETS += $(COMPILE_PROPERTIES) diff --git a/make/modules/jdk.localedata/Gensrc.gmk b/make/modules/jdk.localedata/Gensrc.gmk index 233572c8a54..fc0e09dd8bb 100644 --- a/make/modules/jdk.localedata/Gensrc.gmk +++ b/make/modules/jdk.localedata/Gensrc.gmk @@ -23,7 +23,7 @@ # questions. # -include GensrcCommonJdk.gmk +include GensrcCommon.gmk include modules/java.base/gensrc/GensrcLocaleData.gmk diff --git a/make/modules/jdk.management.agent/Gensrc.gmk b/make/modules/jdk.management.agent/Gensrc.gmk index 12fdb4c7137..c13f4da75fe 100644 --- a/make/modules/jdk.management.agent/Gensrc.gmk +++ b/make/modules/jdk.management.agent/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2022, 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 @@ -23,7 +23,7 @@ # questions. # -include GensrcCommonJdk.gmk +include GensrcCommon.gmk ################################################################################