From 964dd18fd2ba998e5c1efed48e15e516b0c22b19 Mon Sep 17 00:00:00 2001 From: Magnus Ihse Bursie Date: Tue, 11 Feb 2025 10:55:47 +0000 Subject: [PATCH] 8349515: [REDO] Framework for tracing makefile inclusion and parsing Reviewed-by: erikj --- .github/actions/get-gtest/action.yml | 4 +- .github/actions/get-jtreg/action.yml | 4 +- Makefile | 4 +- make/Bundles.gmk | 20 ++--- make/CompileCommands.gmk | 11 ++- make/CompileDemos.gmk | 19 ++--- make/CompileInterimLangtools.gmk | 11 +-- make/CompileJavaModules.gmk | 25 +++--- make/CompileModuleTools.gmk | 12 ++- make/CompileToolsHotspot.gmk | 18 ++-- make/CompileToolsJdk.gmk | 17 ++-- make/CopyImportModules.gmk | 15 ++-- make/CopyInterimTZDB.gmk | 15 ++-- make/Coverage.gmk | 7 +- make/CreateJmods.gmk | 23 ++--- make/Docs.gmk | 47 +++++------ make/Doctor.gmk | 19 ++--- make/ExplodedImageOptimize.gmk | 20 ++--- make/GenerateLinkOptData.gmk | 11 +-- make/GenerateModuleSummary.gmk | 15 ++-- make/Global.gmk | 4 +- make/GraalBuilderImage.gmk | 19 ++--- make/Hsdis.gmk | 17 ++-- make/Images.gmk | 22 ++--- make/Init.gmk | 34 ++++---- make/InitSupport.gmk | 42 +++++----- make/InterimImage.gmk | 11 +-- make/JrtfsJar.gmk | 13 +-- make/MacBundles.gmk | 11 ++- make/Main.gmk | 42 ++++------ make/MainSupport.gmk | 11 +-- make/ModuleTools.gmk | 13 ++- make/ModuleWrapper.gmk | 28 ++++--- make/PreInit.gmk | 67 ++++++++------- make/PreInitSupport.gmk | 32 +++---- make/ReleaseFile.gmk | 16 +--- make/RunTests.gmk | 17 ++-- make/RunTestsPrebuilt.gmk | 19 ++--- make/RunTestsPrebuiltFindTests.gmk | 38 +++++++++ make/SourceRevision.gmk | 16 ++-- make/StaticLibs.gmk | 13 +-- make/StaticLibsImage.gmk | 19 ++--- make/TestImage.gmk | 16 ++-- make/ToolsHotspot.gmk | 11 ++- make/ToolsJdk.gmk | 17 ++-- make/ToolsLangtools.gmk | 13 +-- make/UpdateBuildDocs.gmk | 19 ++--- make/UpdateSleefSource.gmk | 19 ++--- make/UpdateX11Wrappers.gmk | 20 ++--- make/ZipSecurity.gmk | 12 ++- make/ZipSource.gmk | 17 ++-- make/common/CopyFiles.gmk | 14 ++-- make/common/DebugInfoUtils.gmk | 12 +-- make/common/Execute.gmk | 15 ++-- make/common/FileUtils.gmk | 14 ++-- make/common/FindTests.gmk | 22 ++--- make/common/JarArchive.gmk | 15 ++-- make/common/JavaCompilation.gmk | 13 +-- make/common/JdkNativeCompilation.gmk | 16 ++-- make/common/LogUtils.gmk | 13 ++- make/common/MakeBase.gmk | 20 ++--- make/common/MakeFileEnd.gmk | 42 ++++++++++ make/common/MakeFileStart.gmk | 66 +++++++++++++++ make/common/MakeIO.gmk | 15 ++-- make/common/MakeIncludeEnd.gmk | 45 ++++++++++ make/common/MakeIncludeStart.gmk | 83 +++++++++++++++++++ make/common/MakeSnippetEnd.gmk | 45 ++++++++++ make/common/MakeSnippetStart.gmk | 46 ++++++++++ make/common/Modules.gmk | 12 +-- make/common/NativeCompilation.gmk | 18 ++-- make/common/ProcessMarkdown.gmk | 14 +++- make/common/TestFilesCompilation.gmk | 16 ++-- make/common/TextFileProcessing.gmk | 14 +++- make/common/Utils.gmk | 14 ++-- make/common/ZipArchive.gmk | 19 +++-- make/common/modules/CopyCommon.gmk | 12 ++- make/common/modules/GendataCommon.gmk | 15 +++- make/common/modules/GensrcCommon.gmk | 14 +++- make/common/modules/GensrcModuleInfo.gmk | 11 +-- make/common/modules/GensrcProperties.gmk | 12 ++- make/common/modules/LauncherCommon.gmk | 12 ++- make/common/modules/LibCommon.gmk | 12 ++- make/common/native/CompileFile.gmk | 9 ++ make/common/native/DebugSymbols.gmk | 11 ++- make/common/native/Flags.gmk | 11 ++- make/common/native/Link.gmk | 11 ++- make/common/native/LinkMicrosoft.gmk | 11 ++- make/common/native/Paths.gmk | 11 ++- make/hotspot/CopyToExplodedJdk.gmk | 12 ++- make/hotspot/HotspotCommon.gmk | 12 ++- make/hotspot/gensrc/GenerateSources.gmk | 17 ++-- make/hotspot/gensrc/GensrcAdlc.gmk | 10 ++- make/hotspot/gensrc/GensrcDtrace.gmk | 11 ++- make/hotspot/gensrc/GensrcJfr.gmk | 12 ++- make/hotspot/gensrc/GensrcJvmti.gmk | 15 +++- make/hotspot/lib/CompileGtest.gmk | 9 +- make/hotspot/lib/CompileJvm.gmk | 10 +++ make/hotspot/lib/CompileLibraries.gmk | 14 ++-- make/hotspot/lib/JvmFeatures.gmk | 13 ++- make/hotspot/lib/JvmFlags.gmk | 9 +- make/hotspot/lib/JvmOverrideFiles.gmk | 9 +- make/hotspot/test/GtestImage.gmk | 11 +-- make/ide/eclipse/CreateWorkspace.gmk | 14 ++-- make/ide/idea/jdk/IdeaGenConfig.gmk | 11 ++- .../visualstudio/hotspot/CreateVSProject.gmk | 17 ++-- .../vscode/hotspot/CreateVSCodeProject.gmk | 14 ++-- make/ide/xcode/hotspot/CreateXcodeProject.gmk | 17 ++-- make/modules/java.base/Copy.gmk | 9 +- make/modules/java.base/Gendata.gmk | 13 ++- make/modules/java.base/Gensrc.gmk | 18 ++-- make/modules/java.base/Java.gmk | 6 +- make/modules/java.base/Launcher.gmk | 9 +- make/modules/java.base/Lib.gmk | 9 +- .../java.base/gendata/GendataBlockedCerts.gmk | 12 ++- .../gendata/GendataBreakIterator.gmk | 14 +++- .../java.base/gendata/GendataCryptoPolicy.gmk | 16 ++-- .../gendata/GendataPublicSuffixList.gmk | 12 ++- .../modules/java.base/gendata/GendataTZDB.gmk | 12 ++- .../modules/java.base/gensrc/GensrcBuffer.gmk | 12 ++- .../java.base/gensrc/GensrcCharacterData.gmk | 14 +++- .../java.base/gensrc/GensrcCharsetCoder.gmk | 12 ++- .../java.base/gensrc/GensrcCharsetMapping.gmk | 14 +++- .../java.base/gensrc/GensrcExceptions.gmk | 12 ++- make/modules/java.base/gensrc/GensrcMisc.gmk | 12 ++- .../gensrc/GensrcModuleLoaderMap.gmk | 10 ++- make/modules/java.base/gensrc/GensrcRegex.gmk | 14 +++- .../gensrc/GensrcScopedMemoryAccess.gmk | 12 ++- .../java.base/gensrc/GensrcVarHandles.gmk | 12 ++- make/modules/java.base/lib/CoreLibraries.gmk | 12 ++- make/modules/java.compiler/Java.gmk | 6 +- make/modules/java.datatransfer/Java.gmk | 6 +- make/modules/java.desktop/Copy.gmk | 6 +- make/modules/java.desktop/Gendata.gmk | 8 +- make/modules/java.desktop/Gensrc.gmk | 9 +- make/modules/java.desktop/Java.gmk | 6 +- make/modules/java.desktop/Lib.gmk | 9 +- .../gendata/GendataFontConfig.gmk | 12 ++- .../java.desktop/gendata/GendataHtml32dtd.gmk | 12 ++- .../java.desktop/gensrc/GensrcIcons.gmk | 12 ++- .../java.desktop/gensrc/GensrcSwing.gmk | 15 +++- .../java.desktop/gensrc/GensrcX11Wrappers.gmk | 12 ++- .../modules/java.desktop/lib/AwtLibraries.gmk | 13 ++- .../java.desktop/lib/ClientLibraries.gmk | 9 ++ make/modules/java.instrument/Java.gmk | 6 +- make/modules/java.instrument/Lib.gmk | 6 +- make/modules/java.logging/Copy.gmk | 6 +- make/modules/java.logging/Gensrc.gmk | 7 +- make/modules/java.logging/Java.gmk | 6 +- make/modules/java.management.rmi/Java.gmk | 6 +- make/modules/java.management/Java.gmk | 6 +- make/modules/java.management/Lib.gmk | 6 +- make/modules/java.naming/Java.gmk | 6 +- make/modules/java.prefs/Java.gmk | 6 +- make/modules/java.prefs/Lib.gmk | 6 +- make/modules/java.rmi/Java.gmk | 6 +- make/modules/java.rmi/Launcher.gmk | 6 +- make/modules/java.rmi/Lib.gmk | 6 +- make/modules/java.scripting/Java.gmk | 6 +- make/modules/java.scripting/Launcher.gmk | 6 +- make/modules/java.security.jgss/Java.gmk | 6 +- make/modules/java.security.jgss/Launcher.gmk | 6 +- make/modules/java.security.jgss/Lib.gmk | 6 +- make/modules/java.security.sasl/Java.gmk | 6 +- make/modules/java.smartcardio/Java.gmk | 6 +- make/modules/java.smartcardio/Lib.gmk | 6 +- make/modules/java.sql.rowset/Java.gmk | 6 +- make/modules/java.sql/Java.gmk | 6 +- make/modules/java.transaction.xa/Java.gmk | 6 +- make/modules/java.xml.crypto/Java.gmk | 6 +- make/modules/java.xml/Copy.gmk | 6 +- make/modules/java.xml/Java.gmk | 6 +- make/modules/jdk.accessibility/Copy.gmk | 6 +- make/modules/jdk.accessibility/Java.gmk | 6 +- make/modules/jdk.accessibility/Launcher.gmk | 6 +- make/modules/jdk.accessibility/Lib.gmk | 6 +- make/modules/jdk.attach/Lib.gmk | 6 +- make/modules/jdk.charsets/Gensrc.gmk | 12 +-- make/modules/jdk.charsets/Java.gmk | 6 +- make/modules/jdk.compiler/Gendata.gmk | 9 +- make/modules/jdk.compiler/Gensrc.gmk | 6 +- make/modules/jdk.compiler/Java.gmk | 6 +- make/modules/jdk.compiler/Launcher.gmk | 6 +- make/modules/jdk.crypto.cryptoki/Java.gmk | 6 +- make/modules/jdk.crypto.cryptoki/Lib.gmk | 6 +- make/modules/jdk.crypto.mscapi/Java.gmk | 6 +- make/modules/jdk.crypto.mscapi/Lib.gmk | 6 +- make/modules/jdk.dev/Java.gmk | 6 +- make/modules/jdk.dynalink/Java.gmk | 6 +- make/modules/jdk.editpad/Java.gmk | 6 +- make/modules/jdk.hotspot.agent/Gensrc.gmk | 4 +- make/modules/jdk.hotspot.agent/Java.gmk | 6 +- make/modules/jdk.hotspot.agent/Launcher.gmk | 6 +- make/modules/jdk.hotspot.agent/Lib.gmk | 6 +- make/modules/jdk.httpserver/Gensrc.gmk | 8 +- make/modules/jdk.httpserver/Java.gmk | 6 +- make/modules/jdk.httpserver/Jmod.gmk | 6 +- make/modules/jdk.httpserver/Launcher.gmk | 6 +- make/modules/jdk.incubator.vector/Java.gmk | 6 +- make/modules/jdk.incubator.vector/Lib.gmk | 4 + make/modules/jdk.internal.jvmstat/Java.gmk | 6 +- make/modules/jdk.internal.le/Java.gmk | 6 +- make/modules/jdk.internal.md/Java.gmk | 6 +- make/modules/jdk.internal.opt/Java.gmk | 6 +- make/modules/jdk.internal.vm.ci/Java.gmk | 6 +- make/modules/jdk.jartool/Gensrc.gmk | 7 +- make/modules/jdk.jartool/Java.gmk | 6 +- make/modules/jdk.jartool/Jmod.gmk | 6 +- make/modules/jdk.jartool/Launcher.gmk | 6 +- make/modules/jdk.javadoc/Copy.gmk | 4 +- make/modules/jdk.javadoc/Gendata.gmk | 11 ++- make/modules/jdk.javadoc/Gensrc.gmk | 6 +- make/modules/jdk.javadoc/Java.gmk | 6 +- make/modules/jdk.javadoc/Launcher.gmk | 6 +- make/modules/jdk.jcmd/Java.gmk | 6 +- make/modules/jdk.jcmd/Launcher.gmk | 6 +- make/modules/jdk.jconsole/Java.gmk | 6 +- make/modules/jdk.jconsole/Launcher.gmk | 6 +- make/modules/jdk.jdeps/Gensrc.gmk | 6 +- make/modules/jdk.jdeps/Java.gmk | 6 +- make/modules/jdk.jdeps/Launcher.gmk | 6 +- make/modules/jdk.jdi/Gensrc.gmk | 6 +- make/modules/jdk.jdi/Java.gmk | 6 +- make/modules/jdk.jdi/Launcher.gmk | 6 +- make/modules/jdk.jdi/Lib.gmk | 6 +- make/modules/jdk.jdwp.agent/Copy.gmk | 6 +- make/modules/jdk.jdwp.agent/Lib.gmk | 6 +- make/modules/jdk.jfr/Copy.gmk | 6 +- make/modules/jdk.jfr/Gendata.gmk | 6 +- make/modules/jdk.jfr/Java.gmk | 6 +- make/modules/jdk.jfr/Jmod.gmk | 6 +- make/modules/jdk.jfr/Launcher.gmk | 6 +- make/modules/jdk.jlink/Gensrc.gmk | 8 +- make/modules/jdk.jlink/Launcher.gmk | 6 +- make/modules/jdk.jpackage/Gensrc.gmk | 8 +- make/modules/jdk.jpackage/Java.gmk | 6 +- make/modules/jdk.jpackage/Jmod.gmk | 6 +- make/modules/jdk.jpackage/Launcher.gmk | 6 +- make/modules/jdk.jpackage/Lib.gmk | 8 +- make/modules/jdk.jshell/Gensrc.gmk | 6 +- make/modules/jdk.jshell/Java.gmk | 6 +- make/modules/jdk.jshell/Jmod.gmk | 6 +- make/modules/jdk.jshell/Launcher.gmk | 6 +- make/modules/jdk.jstatd/Jmod.gmk | 6 +- make/modules/jdk.jstatd/Launcher.gmk | 6 +- make/modules/jdk.localedata/Gensrc.gmk | 6 +- make/modules/jdk.localedata/Java.gmk | 6 +- make/modules/jdk.management.agent/Copy.gmk | 4 +- make/modules/jdk.management.agent/Gensrc.gmk | 7 +- make/modules/jdk.management.agent/Lib.gmk | 6 +- make/modules/jdk.management/Java.gmk | 6 +- make/modules/jdk.management/Lib.gmk | 6 +- make/modules/jdk.net/Lib.gmk | 6 +- make/modules/jdk.sctp/Java.gmk | 6 +- make/modules/jdk.sctp/Lib.gmk | 6 +- make/modules/jdk.security.auth/Java.gmk | 6 +- make/modules/jdk.security.auth/Lib.gmk | 6 +- make/modules/sun.charsets/Java.gmk | 6 +- make/test/BuildFailureHandler.gmk | 17 ++-- make/test/BuildJtregTestThreadFactory.gmk | 17 ++-- make/test/BuildMicrobenchmark.gmk | 10 +-- make/test/BuildTestLib.gmk | 16 ++-- make/test/BuildTestLibNative.gmk | 15 ++-- make/test/JtregNativeHotspot.gmk | 17 ++-- make/test/JtregNativeJdk.gmk | 17 ++-- make/test/JtregNativeLibTest.gmk | 17 ++-- test/make/TestCompileCommands.gmk | 13 +-- test/make/TestCopyFiles.gmk | 12 ++- test/make/TestFixDepsFile.gmk | 12 ++- test/make/TestIdea.gmk | 12 +-- test/make/TestJavaCompilation.gmk | 12 +-- test/make/TestMake.gmk | 14 ++-- test/make/TestMakeBase.gmk | 12 ++- test/make/UtilsForTests.gmk | 12 ++- 273 files changed, 2222 insertions(+), 1062 deletions(-) create mode 100644 make/RunTestsPrebuiltFindTests.gmk create mode 100644 make/common/MakeFileEnd.gmk create mode 100644 make/common/MakeFileStart.gmk create mode 100644 make/common/MakeIncludeEnd.gmk create mode 100644 make/common/MakeIncludeStart.gmk create mode 100644 make/common/MakeSnippetEnd.gmk create mode 100644 make/common/MakeSnippetStart.gmk diff --git a/.github/actions/get-gtest/action.yml b/.github/actions/get-gtest/action.yml index 5de2b10cd32..d38d33eabd8 100644 --- a/.github/actions/get-gtest/action.yml +++ b/.github/actions/get-gtest/action.yml @@ -49,6 +49,6 @@ runs: - name: 'Export path to where GTest is installed' id: path-name run: | - # Export the path - echo 'path=gtest' >> $GITHUB_OUTPUT + # Export the absolute path + echo "path=`pwd`/gtest" >> $GITHUB_OUTPUT shell: bash diff --git a/.github/actions/get-jtreg/action.yml b/.github/actions/get-jtreg/action.yml index 78a3a4c9edd..4bb671d25d1 100644 --- a/.github/actions/get-jtreg/action.yml +++ b/.github/actions/get-jtreg/action.yml @@ -49,6 +49,6 @@ runs: - name: 'Export path to where JTReg is installed' id: path-name run: | - # Export the path - echo 'path=jtreg/installed' >> $GITHUB_OUTPUT + # Export the absolute path + echo "path=`pwd`/jtreg/installed" >> $GITHUB_OUTPUT shell: bash diff --git a/Makefile b/Makefile index b094e14efbd..751574e9620 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,7 @@ ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))),) else makefile_path := $(lastword $(MAKEFILE_LIST)) endif -topdir := $(strip $(patsubst %/, %, $(dir $(makefile_path)))) +TOPDIR := $(strip $(patsubst %/, %, $(dir $(makefile_path)))) # ... and then we can include the real makefile to bootstrap the build -include $(topdir)/make/PreInit.gmk +include $(TOPDIR)/make/PreInit.gmk diff --git a/make/Bundles.gmk b/make/Bundles.gmk index 2ed04c19064..58950b5fb1f 100644 --- a/make/Bundles.gmk +++ b/make/Bundles.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2025, 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,10 +23,9 @@ # questions. # -default: all +include MakeFileStart.gmk -include $(SPEC) -include MakeBase.gmk +################################################################################ include CopyFiles.gmk include MakeIO.gmk @@ -43,8 +42,6 @@ ifeq ($(call isBuildOs, windows), true) TAR_IGNORE_EXIT_VALUE := || test "$$$$?" = "1" endif -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, Bundles-pre.gmk)) ################################################################################ # BUNDLE : Name of bundle to create # FILES : Files in BASE_DIRS to add to bundle @@ -502,11 +499,6 @@ endif ################################################################################ -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, Bundles.gmk)) - -################################################################################ - product-bundles: $(PRODUCT_TARGETS) legacy-bundles: $(LEGACY_TARGETS) test-bundles: $(TEST_TARGETS) @@ -517,6 +509,10 @@ static-libs-bundles: $(STATIC_LIBS_TARGETS) static-libs-graal-bundles: $(STATIC_LIBS_GRAAL_TARGETS) jcov-bundles: $(JCOV_TARGETS) -.PHONY: all default product-bundles test-bundles \ +.PHONY: product-bundles test-bundles \ docs-jdk-bundles docs-javase-bundles docs-reference-bundles \ static-libs-bundles static-libs-graal-bundles jcov-bundles + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/CompileCommands.gmk b/make/CompileCommands.gmk index 180bc76d4b8..baf07cf2e94 100644 --- a/make/CompileCommands.gmk +++ b/make/CompileCommands.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, 2025, 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,10 +23,9 @@ # questions. # -default: all +include MakeFileStart.gmk -include $(SPEC) -include MakeBase.gmk +################################################################################ # When FIXPATH is set, let it process the file to make sure all paths are usable # by system native tools. The FIXPATH tool assumes arguments preceded by an @ @@ -50,6 +49,6 @@ $(OUTPUTDIR)/compile_commands.json: $(wildcard $(MAKESUPPORT_OUTPUTDIR)/compile- TARGETS += $(OUTPUTDIR)/compile_commands.json -all: $(TARGETS) +################################################################################ -.PHONY: all +include MakeFileEnd.gmk diff --git a/make/CompileDemos.gmk b/make/CompileDemos.gmk index 6c95aa08c2b..503edf18e00 100644 --- a/make/CompileDemos.gmk +++ b/make/CompileDemos.gmk @@ -23,23 +23,17 @@ # questions. # +include MakeFileStart.gmk + ################################################################################ # Build demos for the JDK into $(SUPPORT_OUTPUTDIR)/demos/image. ################################################################################ -default: all - -include $(SPEC) -include MakeBase.gmk - include CopyFiles.gmk include JavaCompilation.gmk include TextFileProcessing.gmk include ZipArchive.gmk -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, CompileDemos-pre.gmk)) - # Prepare the find cache. DEMO_SRC_DIRS += $(TOPDIR)/src/demo @@ -264,11 +258,8 @@ ifneq ($(filter images, $(MAKECMDGOALS)), ) IMAGES_TARGETS := $(COPY_TO_TEST_IMAGE) endif -################################################################################ -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, CompileDemos-post.gmk)) - -all: $(TARGETS) images: $(IMAGES_TARGETS) -.PHONY: all +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/CompileInterimLangtools.gmk b/make/CompileInterimLangtools.gmk index dbb23de093c..c869ea160c7 100644 --- a/make/CompileInterimLangtools.gmk +++ b/make/CompileInterimLangtools.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,11 +23,9 @@ # questions. # -# This must be the first rule -default: all +include MakeFileStart.gmk -include $(SPEC) -include MakeBase.gmk +################################################################################ include CopyFiles.gmk include JavaCompilation.gmk @@ -148,5 +146,4 @@ TARGETS += $(BUILD_JAVAC_SERVER) ################################################################################ - -all: $(TARGETS) +include MakeFileEnd.gmk diff --git a/make/CompileJavaModules.gmk b/make/CompileJavaModules.gmk index 7c86b77dd31..b4a193dfade 100644 --- a/make/CompileJavaModules.gmk +++ b/make/CompileJavaModules.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,13 +23,12 @@ # questions. # -# This must be the first rule -default: all +include MakeFileStart.gmk + +################################################################################ -include $(SPEC) -include MakeBase.gmk -include Modules.gmk include JavaCompilation.gmk +include Modules.gmk ################################################################################ # If this is an imported module that has prebuilt classes, only compile @@ -86,7 +85,15 @@ CreateHkTargets = \ ################################################################################ # Include module specific build settings --include Java.gmk +THIS_SNIPPET := modules/$(MODULE)/Java.gmk + +ifneq ($(wildcard $(THIS_SNIPPET)), ) + include MakeSnippetStart.gmk + + include $(THIS_SNIPPET) + + include MakeSnippetEnd.gmk +endif ################################################################################ # Setup the main compilation @@ -148,6 +155,4 @@ endif ################################################################################ -all: $(TARGETS) - -.PHONY: all +include MakeFileEnd.gmk diff --git a/make/CompileModuleTools.gmk b/make/CompileModuleTools.gmk index 888b8418eea..12088553055 100644 --- a/make/CompileModuleTools.gmk +++ b/make/CompileModuleTools.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2025, 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,12 @@ # questions. # -default: all - -include $(SPEC) -include MakeBase.gmk -include JavaCompilation.gmk +include MakeFileStart.gmk ################################################################################ +include JavaCompilation.gmk + TOOLS_CLASSES_DIR := $(BUILDTOOLS_OUTPUTDIR)/tools_jigsaw_classes # When using an external BUILDJDK, make it possible to shortcut building of @@ -64,4 +62,4 @@ TARGETS += $(BUILD_JIGSAW_TOOLS) ################################################################################ -all: $(TARGETS) +include MakeFileEnd.gmk diff --git a/make/CompileToolsHotspot.gmk b/make/CompileToolsHotspot.gmk index 3fd3e5e8b88..1ce6578de07 100644 --- a/make/CompileToolsHotspot.gmk +++ b/make/CompileToolsHotspot.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2025, 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,19 +23,12 @@ # questions. # -# This must be the first rule -default: all +include MakeFileStart.gmk -include $(SPEC) -include MakeBase.gmk +################################################################################ include JavaCompilation.gmk -TARGETS := - -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, hotspot/CompileTools.gmk)) - ################################################################################ # Build tools needed for the JFR source code generation @@ -51,7 +44,6 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_HOTSPOT, \ TARGETS += $(BUILD_TOOLS_HOTSPOT) +################################################################################ -all: $(TARGETS) - -.PHONY: all +include MakeFileEnd.gmk diff --git a/make/CompileToolsJdk.gmk b/make/CompileToolsJdk.gmk index 41a19f90ace..c291dbdba0a 100644 --- a/make/CompileToolsJdk.gmk +++ b/make/CompileToolsJdk.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,21 +23,14 @@ # questions. # -default: all +include MakeFileStart.gmk -include $(SPEC) -include MakeBase.gmk +################################################################################ include CopyFiles.gmk include JavaCompilation.gmk include TextFileProcessing.gmk -################################################################################ - -$(eval $(call IncludeCustomExtension, CompileTools.gmk)) - -################################################################################ - # Use += to be able to add to this from a custom extension BUILD_TOOLS_SRC_DIRS += \ $(TOPDIR)/make/jdk/src/classes \ @@ -160,4 +153,6 @@ ifeq ($(ENABLE_PANDOC), true) TARGETS += $(PANDOC_HTML_MANPAGE_FILTER_SETUP) endif -all: $(TARGETS) +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/CopyImportModules.gmk b/make/CopyImportModules.gmk index 69a42f166ba..435468e48db 100644 --- a/make/CopyImportModules.gmk +++ b/make/CopyImportModules.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2025, 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,13 +23,12 @@ # questions. # +include MakeFileStart.gmk + +################################################################################ # This makefile is called for every imported module to copy the non class # contents into the exploded jdk image. - -default: all - -include $(SPEC) -include MakeBase.gmk +################################################################################ include CopyFiles.gmk @@ -103,4 +102,6 @@ ifneq ($(CONF_DIR), ) TARGETS += $(COPY_CONF) endif -all: $(TARGETS) +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/CopyInterimTZDB.gmk b/make/CopyInterimTZDB.gmk index 1e54cd8af11..9305ca4c4ed 100644 --- a/make/CopyInterimTZDB.gmk +++ b/make/CopyInterimTZDB.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2019, 2025, 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,12 @@ # questions. # -default: all - -include $(SPEC) -include MakeBase.gmk - -include CopyFiles.gmk +include MakeFileStart.gmk ################################################################################ +include CopyFiles.gmk + ### TZDB tool needs files from java.time.zone package define tzdb_copyfiles @@ -51,3 +48,7 @@ $(eval $(call SetupCopyFiles, COPY_INTERIM_TZDB, \ ################################################################################ all: $(COPY_INTERIM_TZDB) + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/Coverage.gmk b/make/Coverage.gmk index c6c82af2401..2fd4e4ec6d4 100644 --- a/make/Coverage.gmk +++ b/make/Coverage.gmk @@ -22,8 +22,7 @@ # or visit www.oracle.com if you need additional information or have any # questions. -include $(SPEC) -include MakeBase.gmk +include MakeFileStart.gmk ################################################################################ @@ -54,3 +53,7 @@ $(JCOV_IMAGE_DIR)/release: $(JCOV_INPUT_IMAGE_DIR)/release $(RMDIR) $(JCOV_TEMP) jcov-image: $(JCOV_IMAGE_DIR)/release + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/CreateJmods.gmk b/make/CreateJmods.gmk index 86bc3b8335e..40bceda69a9 100644 --- a/make/CreateJmods.gmk +++ b/make/CreateJmods.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,10 +23,9 @@ # questions. # -default: all +include MakeFileStart.gmk -include $(SPEC) -include MakeBase.gmk +################################################################################ include CopyFiles.gmk include Execute.gmk @@ -36,8 +35,6 @@ ifeq ($(MODULE), ) $(error MODULE must be set when calling CreateJmods.gmk) endif -$(eval $(call IncludeCustomExtension, CreateJmods.gmk)) - ################################################################################ JMODS_DIR := $(IMAGES_OUTPUTDIR)/jmods @@ -187,7 +184,15 @@ endif ################################################################################ # Include module specific build settings --include Jmod.gmk +THIS_SNIPPET := modules/$(MODULE)/Jmod.gmk + +ifneq ($(wildcard $(THIS_SNIPPET)), ) + include MakeSnippetStart.gmk + + include $(THIS_SNIPPET) + + include MakeSnippetEnd.gmk +endif # Set main class ifneq ($(JMOD_FLAGS_main_class), ) @@ -266,6 +271,4 @@ TARGETS += $(create_$(JMOD_FILE)) ################################################################################ -all: $(TARGETS) - -################################################################################ +include MakeFileEnd.gmk diff --git a/make/Docs.gmk b/make/Docs.gmk index fb2726e6dad..5c67393fb66 100644 --- a/make/Docs.gmk +++ b/make/Docs.gmk @@ -1,4 +1,4 @@ -# Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2025, 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 @@ -22,26 +22,7 @@ # questions. # -default: all - -include $(SPEC) -include MakeBase.gmk - -include CopyFiles.gmk -include Execute.gmk -include Modules.gmk -include ModuleTools.gmk -include ProcessMarkdown.gmk -include ToolsJdk.gmk -include ZipArchive.gmk -include TextFileProcessing.gmk - -# This is needed to properly setup DOCS_MODULES. -$(eval $(call ReadImportMetaData)) - -################################################################################ -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, Docs.gmk)) +include MakeFileStart.gmk ################################################################################ # This file generates all documentation for OpenJDK. @@ -54,7 +35,19 @@ $(eval $(call IncludeCustomExtension, Docs.gmk)) # # We will also generate separate, free-standing specifications from either # markdown or existing html files. -# +################################################################################ + +include CopyFiles.gmk +include Execute.gmk +include Modules.gmk +include ProcessMarkdown.gmk +include TextFileProcessing.gmk +include ZipArchive.gmk +include $(TOPDIR)/make/ModuleTools.gmk +include $(TOPDIR)/make/ToolsJdk.gmk + +# This is needed to properly setup DOCS_MODULES. +$(eval $(call ReadImportMetaData)) ################################################################################ # Javadoc settings @@ -761,10 +754,6 @@ $(eval $(call SetupZipArchive, BUILD_JAVADOC_ZIP, \ ZIP_TARGETS += $(BUILD_JAVADOC_ZIP) -################################################################################ -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, Docs-post.gmk)) - ################################################################################ # Bundles all generated specs into a zip archive, skipping javadocs. @@ -806,7 +795,11 @@ all: docs-jdk-api-javadoc docs-jdk-api-graphs docs-javase-api-javadoc \ docs-reference-api-graphs docs-jdk-specs docs-jdk-index docs-zip \ docs-specs-zip -.PHONY: default all docs-jdk-api-javadoc docs-jdk-api-graphs \ +.PHONY: docs-jdk-api-javadoc docs-jdk-api-graphs \ docs-javase-api-javadoc docs-javase-api-graphs \ docs-reference-api-javadoc docs-reference-api-graphs docs-jdk-specs \ docs-jdk-index docs-zip docs-specs-zip + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/Doctor.gmk b/make/Doctor.gmk index 39953cd28db..05de0730fa1 100644 --- a/make/Doctor.gmk +++ b/make/Doctor.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2022, 2025, 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,18 +23,11 @@ # questions. # -default: all - -include $(SPEC) -include MakeBase.gmk - -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, Doctor.gmk)) +include MakeFileStart.gmk ################################################################################ -# # Help user diagnose possible errors and problems with the build environment. -# +################################################################################ prologue: $(ECHO) @@ -145,4 +138,8 @@ doctor: $(TARGETS) all: doctor -.PHONY: default all doctor $(TARGETS) +.PHONY: doctor $(TARGETS) + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/ExplodedImageOptimize.gmk b/make/ExplodedImageOptimize.gmk index a67b987d91d..928ff86f10f 100644 --- a/make/ExplodedImageOptimize.gmk +++ b/make/ExplodedImageOptimize.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2025, 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,14 @@ # questions. # -# Runs a tool on the exploded image to improve performance - -default: all - -include $(SPEC) -include MakeBase.gmk -include Execute.gmk -include $(TOPDIR)/make/ModuleTools.gmk +include MakeFileStart.gmk ################################################################################ +# Runs a tool on the exploded image to improve performance +################################################################################ + +include Execute.gmk +include $(TOPDIR)/make/ModuleTools.gmk ALL_MODULEINFO_CLASSES := $(wildcard $(JDK_OUTPUTDIR)/modules/*/module-info.class) @@ -47,6 +45,4 @@ TARGETS := $(optimize_image_TARGET) ################################################################################ -all: $(TARGETS) - -.PHONY: all default +include MakeFileEnd.gmk diff --git a/make/GenerateLinkOptData.gmk b/make/GenerateLinkOptData.gmk index b6989042d6a..5fc745ba223 100644 --- a/make/GenerateLinkOptData.gmk +++ b/make/GenerateLinkOptData.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2025, 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,12 @@ # questions. # +include MakeFileStart.gmk + ################################################################################ # Generate classlist ################################################################################ -default: all - -include $(SPEC) -include MakeBase.gmk - include CopyFiles.gmk include JavaCompilation.gmk @@ -148,4 +145,4 @@ TARGETS += $(COPY_JLI_TRACE) ################################################################################ -all: $(TARGETS) +include MakeFileEnd.gmk diff --git a/make/GenerateModuleSummary.gmk b/make/GenerateModuleSummary.gmk index 854d938c9ca..5c6ec055c45 100644 --- a/make/GenerateModuleSummary.gmk +++ b/make/GenerateModuleSummary.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,11 @@ # questions. # -# Default target declared first -default: all +include MakeFileStart.gmk -include $(SPEC) -include MakeBase.gmk -include ModuleTools.gmk +################################################################################ + +include $(TOPDIR)/make/ModuleTools.gmk GENGRAPHS_DIR := $(IMAGES_OUTPUTDIR)/gengraphs SPEC_DOTFILES_DIR := $(GENGRAPHS_DIR)/spec-dotfiles @@ -50,3 +49,7 @@ $(GENGRAPHS_DIR)/module-summary.html: $(BUILD_JIGSAW_TOOLS) $(GENGRAPHS_DIR)/tec $(TOOL_MODULESUMMARY) -o $@ --module-path $(IMAGES_OUTPUTDIR)/jmods all: $(GENGRAPHS_DIR)/jdk.dot $(GENGRAPHS_DIR)/module-summary.html $(SPEC_DOTFILES_DIR)/java.se.dot + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/Global.gmk b/make/Global.gmk index 25753f1ae57..512c5b963aa 100644 --- a/make/Global.gmk +++ b/make/Global.gmk @@ -121,12 +121,12 @@ print-configurations: @true test-prebuilt: - @( cd $(topdir) && \ + @( cd $(TOPDIR) && \ $(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \ test-prebuilt CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" ) test-prebuilt-with-exit-code: - @( cd $(topdir) && \ + @( cd $(TOPDIR) && \ $(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \ test-prebuilt-with-exit-code CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" ) diff --git a/make/GraalBuilderImage.gmk b/make/GraalBuilderImage.gmk index 7fa90c66019..d707e067a55 100644 --- a/make/GraalBuilderImage.gmk +++ b/make/GraalBuilderImage.gmk @@ -23,19 +23,14 @@ # questions. # -# This makefile creates a jdk image overlaid with statically linked core -# libraries. - -default: all - -include $(SPEC) -include MakeBase.gmk - -include CopyFiles.gmk +include MakeFileStart.gmk +################################################################################ +# This makefile creates a jdk image overlaid with statically linked core +# libraries. ################################################################################ -TARGETS := +include CopyFiles.gmk $(eval $(call SetupCopyFiles, COPY_JDK_IMG, \ SRC := $(JDK_IMAGE_DIR)/, \ @@ -54,6 +49,4 @@ TARGETS += $(COPY_STATIC_LIBS) ################################################################################ -all: $(TARGETS) - -.PHONY: all +include MakeFileEnd.gmk diff --git a/make/Hsdis.gmk b/make/Hsdis.gmk index 13d84f964bc..a0fc031be1b 100644 --- a/make/Hsdis.gmk +++ b/make/Hsdis.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,17 +23,14 @@ # questions. # -default: all - -include $(SPEC) -include MakeBase.gmk -include JdkNativeCompilation.gmk +include MakeFileStart.gmk ################################################################################ # This makefile compiles and installs the hsdis library -# ################################################################################ +include JdkNativeCompilation.gmk + HSDIS_OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/hsdis REAL_HSDIS_NAME := hsdis-$(OPENJDK_TARGET_CPU_LEGACY_LIB)$(SHARED_LIBRARY_SUFFIX) BUILT_HSDIS_LIB := $(HSDIS_OUTPUT_DIR)/$(REAL_HSDIS_NAME) @@ -201,8 +198,8 @@ endif TARGETS += install +.PHONY: build install + ################################################################################ -all: $(TARGETS) - -.PHONY: all default build install +include MakeFileEnd.gmk diff --git a/make/Images.gmk b/make/Images.gmk index c5d0ef11b5d..6c859fce7a5 100644 --- a/make/Images.gmk +++ b/make/Images.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,10 +23,9 @@ # questions. # -default: all +include MakeFileStart.gmk -include $(SPEC) -include MakeBase.gmk +################################################################################ include CopyFiles.gmk include DebugInfoUtils.gmk @@ -37,9 +36,6 @@ include Utils.gmk JDK_TARGETS := JRE_TARGETS := -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, Images-pre.gmk)) - ################################################################################ # All modules for the current target platform. @@ -309,12 +305,6 @@ $(call SetupCopyDebuginfo,SYMBOLS) ################################################################################ -# Include custom post hook here to make it possible to augment the target lists -# before actual target prerequisites are declared. -$(eval $(call IncludeCustomExtension, Images-post.gmk)) - -################################################################################ - $(JRE_TARGETS): $(JLINK_JRE_TARGETS) $(JDK_TARGETS): $(JLINK_JDK_TARGETS) @@ -324,4 +314,8 @@ symbols: $(SYMBOLS_TARGETS) all: jdk jre symbols -.PHONY: default all jdk jre symbols +.PHONY: jdk jre symbols + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/Init.gmk b/make/Init.gmk index 5a10f42482f..6da2fb985b6 100644 --- a/make/Init.gmk +++ b/make/Init.gmk @@ -23,6 +23,8 @@ # questions. # +include MakeFileStart.gmk + ################################################################################ # Init.gmk sits between PreInit.gmk and Main.gmk when bootstrapping the build. # It is called from PreInit.gmk, and its main responsibility is to launch @@ -31,28 +33,20 @@ # value of $(MAKE) for all further make calls. ################################################################################ -# This must be the first rule -default: -.PHONY: default +# Our helper functions. +include $(TOPDIR)/make/InitSupport.gmk +include LogUtils.gmk + +# Force early generation of module-deps.gmk and find-tests.gmk +GENERATE_MODULE_DEPS_FILE := true +include Modules.gmk +GENERATE_FIND_TESTS_FILE := true +include FindTests.gmk # Inclusion of this pseudo-target will cause make to execute this file # serially, regardless of -j. .NOTPARALLEL: -include $(SPEC) - -include $(TOPDIR)/make/common/MakeBase.gmk - -# Our helper functions. -include $(TOPDIR)/make/InitSupport.gmk -include $(TOPDIR)/make/common/LogUtils.gmk - -# Force early generation of module-deps.gmk and find-tests.gmk -GENERATE_MODULE_DEPS_FILE := true -include $(TOPDIR)/make/common/Modules.gmk -GENERATE_FIND_TESTS_FILE := true -include $(TOPDIR)/make/common/FindTests.gmk - # Parse COMPARE_BUILD (for makefile development) $(eval $(call ParseCompareBuild)) @@ -169,7 +163,7 @@ main: $(INIT_TARGETS) $(PRINTF) "\nERROR: Build failed for $(TARGET_DESCRIPTION) (exit code $$exitcode) \n" \ $(BUILD_LOG_PIPE_SIMPLE) && \ cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -j 1 -f make/Init.gmk \ - HAS_SPEC=true on-failure ; \ + on-failure ; \ exit $$exitcode ) ) $(call CleanupJavacServer) $(call StopGlobalTimer) @@ -205,3 +199,7 @@ post-compare-build: $(call CompareBuildDoComparison) .PHONY: main on-failure pre-compare-build post-compare-build + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/InitSupport.gmk b/make/InitSupport.gmk index a4b4f2ca964..a9af44e4225 100644 --- a/make/InitSupport.gmk +++ b/make/InitSupport.gmk @@ -23,6 +23,9 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + ################################################################################ # This file contains helper functions for Init.gmk. ################################################################################ @@ -36,12 +39,6 @@ BUILD_LOG_PIPE := > >($(TEE) -a $(BUILD_LOG)) 2> >($(TEE) -a $(BUILD_LOG) >&2) & # to stderr. BUILD_LOG_PIPE_SIMPLE := | $(TEE) -a $(BUILD_LOG) -ifneq ($(CUSTOM_ROOT), ) - topdir = $(CUSTOM_ROOT) -else - topdir = $(TOPDIR) -endif - # Setup the build environment to match the requested specification on # level of reproducible builds define SetupReproducibleBuild @@ -64,7 +61,7 @@ endef # FAIL can be set to false to have the return value of compare be ignored. define ParseCompareBuild ifneq ($$(COMPARE_BUILD), ) - COMPARE_BUILD_OUTPUTDIR := $(topdir)/build/compare-build/$(CONF_NAME) + COMPARE_BUILD_OUTPUTDIR := $(WORKSPACE_ROOT)/build/compare-build/$(CONF_NAME) COMPARE_BUILD_FAIL := true ifneq ($$(findstring :, $$(COMPARE_BUILD)), ) @@ -106,14 +103,14 @@ define ParseCompareBuild endif endif ifneq ($$(COMPARE_BUILD_PATCH), ) - ifneq ($$(wildcard $$(topdir)/$$(COMPARE_BUILD_PATCH)), ) + ifneq ($$(wildcard $$(WORKSPACE_ROOT)/$$(COMPARE_BUILD_PATCH)), ) # Assume relative path, if file exists - COMPARE_BUILD_PATCH := $$(wildcard $$(topdir)/$$(COMPARE_BUILD_PATCH)) + COMPARE_BUILD_PATCH := $$(wildcard $$(WORKSPACE_ROOT)/$$(COMPARE_BUILD_PATCH)) else ifeq ($$(wildcard $$(COMPARE_BUILD_PATCH)), ) $$(error Patch file $$(COMPARE_BUILD_PATCH) does not exist) endif ifneq ($$(COMPARE_BUILD_NODRYRUN), true) - PATCH_DRY_RUN := $$(shell cd $$(topdir) && $$(PATCH) --dry-run -p1 < $$(COMPARE_BUILD_PATCH) > /dev/null 2>&1 || $$(ECHO) FAILED) + PATCH_DRY_RUN := $$(shell cd $$(WORKSPACE_ROOT) && $$(PATCH) --dry-run -p1 < $$(COMPARE_BUILD_PATCH) > /dev/null 2>&1 || $$(ECHO) FAILED) ifeq ($$(PATCH_DRY_RUN), FAILED) $$(error Patch file $$(COMPARE_BUILD_PATCH) does not apply cleanly) endif @@ -129,11 +126,11 @@ endef define PrepareCompareBuild $(ECHO) "Preparing for comparison rebuild" # Apply patch, if any - $(if $(COMPARE_BUILD_PATCH), cd $(topdir) && $(PATCH) -p1 < $(COMPARE_BUILD_PATCH)) + $(if $(COMPARE_BUILD_PATCH), cd $(WORKSPACE_ROOT) && $(PATCH) -p1 < $(COMPARE_BUILD_PATCH)) # Move the first build away temporarily - $(RM) -r $(topdir)/build/.compare-build-temp - $(MKDIR) -p $(topdir)/build/.compare-build-temp - $(MV) $(OUTPUTDIR) $(topdir)/build/.compare-build-temp + $(RM) -r $(WORKSPACE_ROOT)/build/.compare-build-temp + $(MKDIR) -p $(WORKSPACE_ROOT)/build/.compare-build-temp + $(MV) $(OUTPUTDIR) $(WORKSPACE_ROOT)/build/.compare-build-temp # Restore an old compare-build, or create a new compare-build directory. if test -d $(COMPARE_BUILD_OUTPUTDIR); then \ $(MV) $(COMPARE_BUILD_OUTPUTDIR) $(OUTPUTDIR); \ @@ -143,19 +140,19 @@ define PrepareCompareBuild # Re-run configure with the same arguments (and possibly some additional), # must be done after patching. ( cd $(CONFIGURE_START_DIR) && PATH="$(ORIGINAL_PATH)" \ - $(BASH) $(topdir)/configure $(CONFIGURE_COMMAND_LINE) $(COMPARE_BUILD_CONF)) + $(BASH) $(WORKSPACE_ROOT)/configure $(CONFIGURE_COMMAND_LINE) $(COMPARE_BUILD_CONF)) endef # Cleanup after a compare build define CleanupCompareBuild # If running with a COMPARE_BUILD patch, reverse-apply it, but continue # even if that fails (can happen with removed files). - $(if $(COMPARE_BUILD_PATCH), cd $(topdir) && $(PATCH) -R -p1 < $(COMPARE_BUILD_PATCH) || true) + $(if $(COMPARE_BUILD_PATCH), cd $(WORKSPACE_ROOT) && $(PATCH) -R -p1 < $(COMPARE_BUILD_PATCH) || true) # Move this build away and restore the original build - $(MKDIR) -p $(topdir)/build/compare-build + $(MKDIR) -p $(WORKSPACE_ROOT)/build/compare-build $(MV) $(OUTPUTDIR) $(COMPARE_BUILD_OUTPUTDIR) - $(MV) $(topdir)/build/.compare-build-temp/$(CONF_NAME) $(OUTPUTDIR) - $(RM) -r $(topdir)/build/.compare-build-temp + $(MV) $(WORKSPACE_ROOT)/build/.compare-build-temp/$(CONF_NAME) $(OUTPUTDIR) + $(RM) -r $(WORKSPACE_ROOT)/build/.compare-build-temp endef # Do the actual comparison of two builds @@ -265,7 +262,7 @@ endif ############################################################################## # Store the build times in this directory. -BUILDTIMESDIR = $(OUTPUTDIR)/make-support/build-times +BUILDTIMESDIR := $(OUTPUTDIR)/make-support/build-times # Record starting time for build of a sub repository. define RecordStartTime @@ -318,3 +315,8 @@ define ReportProfileTimes $(BUILD_LOG_PIPE_SIMPLE) ) endef + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/InterimImage.gmk b/make/InterimImage.gmk index e046f060513..5fd685509ae 100644 --- a/make/InterimImage.gmk +++ b/make/InterimImage.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2025, 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,10 +23,9 @@ # questions. # -default: all +include MakeFileStart.gmk -include $(SPEC) -include MakeBase.gmk +################################################################################ include Execute.gmk include Modules.gmk @@ -58,6 +57,4 @@ TARGETS += $(jlink_interim_image) ################################################################################ -all: $(TARGETS) - -.PHONY: all +include MakeFileEnd.gmk diff --git a/make/JrtfsJar.gmk b/make/JrtfsJar.gmk index e1b3965ba04..54e2b094318 100644 --- a/make/JrtfsJar.gmk +++ b/make/JrtfsJar.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,13 @@ # questions. # -default: all +include MakeFileStart.gmk -include $(SPEC) -include MakeBase.gmk +################################################################################ include CopyFiles.gmk -include JavaCompilation.gmk include JarArchive.gmk +include JavaCompilation.gmk include TextFileProcessing.gmk # This rule will be depended on due to the MANIFEST line @@ -78,3 +77,7 @@ $(eval $(call SetupJarArchive, BUILD_JRTFS_JAR, \ )) all: $(BUILD_JRTFS_JAR) + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/MacBundles.gmk b/make/MacBundles.gmk index 13b80b8e56e..f80ca1e2735 100644 --- a/make/MacBundles.gmk +++ b/make/MacBundles.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,8 +23,9 @@ # questions. # -include $(SPEC) -include MakeBase.gmk +include MakeFileStart.gmk + +################################################################################ include CopyFiles.gmk include TextFileProcessing.gmk @@ -118,3 +119,7 @@ else # Not macosx endif # macosx .PHONY: jdk-bundle jre-bundle bundles + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/Main.gmk b/make/Main.gmk index e49db6e78a2..4690139e6ad 100644 --- a/make/Main.gmk +++ b/make/Main.gmk @@ -24,44 +24,35 @@ # ################################################################################ -# This is the main makefile containing most actual top level targets. It needs -# to be called with a SPEC file defined. +# This is the main makefile containing most actual top level targets. ################################################################################ -# Declare default target -default: +# Declare ALL_TARGETS as an immediate variable. This variable is a list of all +# valid top level targets. It's used to declare them all as PHONY and to +# generate the -only targets. -ifeq ($(wildcard $(SPEC)), ) - $(error Main.gmk needs SPEC set to a proper spec.gmk) -endif +ALL_TARGETS := -# Now load the spec -include $(SPEC) +DEFAULT_TARGET := default-target -# Load the vital tools for all the makefiles. -include $(TOPDIR)/make/common/MakeBase.gmk -include $(TOPDIR)/make/common/Modules.gmk -include $(TOPDIR)/make/common/FindTests.gmk +include MakeFileStart.gmk + +################################################################################ include $(TOPDIR)/make/MainSupport.gmk +include FindTests.gmk +include Modules.gmk + # Are we requested to ignore dependencies? ifneq ($(findstring -only, $(MAKECMDGOALS)), ) DEPS := none endif -# Declare ALL_TARGETS as an immediate variable. This variable is a list of all -# valid top level targets. It's used to declare them all as PHONY and to -# generate the -only targets. -ALL_TARGETS := - -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, Main.gmk)) # All modules for the current target platform. ALL_MODULES := $(call FindAllModules) -################################################################################ ################################################################################ # # Recipes for all targets. Only recipes, dependencies are declared later. @@ -1342,7 +1333,7 @@ ALL_TARGETS += buildtools hotspot hotspot-libs hotspot-static-libs \ # Traditional targets typically run by users. # These can be considered aliases for the targets now named by a more # "modern" naming scheme. -default: $(DEFAULT_MAKE_TARGET) +default-target: $(DEFAULT_MAKE_TARGET) jdk: exploded-image images: product-images docs: docs-image @@ -1377,7 +1368,6 @@ ALL_TARGETS += $(RUN_TEST_TARGETS) run-test exploded-run-test check \ test-hotspot-jtreg test-hotspot-jtreg-native test-hotspot-gtest \ test-jdk-jtreg-native test-docs -################################################################################ ################################################################################ # # Clean targets @@ -1487,10 +1477,8 @@ create-main-targets-include: @$(ECHO) ALL_MAIN_TARGETS := $(sort $(ALL_TARGETS)) > \ $(MAKESUPPORT_OUTPUTDIR)/main-targets.gmk -################################################################################ -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, Main-post.gmk)) - .PHONY: $(ALL_TARGETS) FRC: # Force target + +include MakeFileEnd.gmk diff --git a/make/MainSupport.gmk b/make/MainSupport.gmk index 5a5e40d025a..f7ba4de2d53 100644 --- a/make/MainSupport.gmk +++ b/make/MainSupport.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,13 +23,13 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + ################################################################################ # This file contains helper functions for Main.gmk. ################################################################################ -ifndef _MAINSUPPORT_GMK -_MAINSUPPORT_GMK := 1 - # Setup make rules for creating a top-level target. # Parameter 1 is the name of the rule. This name is used as variable prefix. # @@ -218,4 +218,5 @@ endef ################################################################################ -endif # _MAINSUPPORT_GMK +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/ModuleTools.gmk b/make/ModuleTools.gmk index 020e12d6e4b..3b26ce86c28 100644 --- a/make/ModuleTools.gmk +++ b/make/ModuleTools.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2025, 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,8 +23,10 @@ # questions. # -ifndef _MODULE_TOOLS_GMK -_MODULE_TOOLS_GMK := 1 +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ include JavaCompilation.gmk @@ -49,4 +51,7 @@ TOOL_ADD_PACKAGES_ATTRIBUTE := $(BUILD_JAVA) $(JAVA_FLAGS_SMALL_BUILDJDK) \ --add-exports java.base/jdk.internal.module=ALL-UNNAMED \ build.tools.jigsaw.AddPackagesAttribute -endif # _MODULE_TOOLS_GMK +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/ModuleWrapper.gmk b/make/ModuleWrapper.gmk index 51208432ea0..b3ddf940e00 100644 --- a/make/ModuleWrapper.gmk +++ b/make/ModuleWrapper.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,27 +23,29 @@ # questions. # +include MakeFileStart.gmk + ################################################################################ # This makefile is called from Main.gmk, through a macro in MakeHelpers.gmk # and wraps calls to makefiles for specific modules and build phases. Having # this wrapper reduces the need for boilerplate code. It also provides # opportunity for automatic copying of files to an interim exploded runnable # image. - -default: all - -include $(SPEC) -include MakeBase.gmk +################################################################################ include CopyFiles.gmk MODULE_SRC := $(TOPDIR)/src/$(MODULE) -# All makefiles should add the targets to be built to this variable. -TARGETS := +# Define the snippet for MakeSnippetStart/End +THIS_SNIPPET := modules/$(MODULE)/$(MAKEFILE_PREFIX).gmk + +include MakeSnippetStart.gmk # Include the file being wrapped. -include $(MAKEFILE_PREFIX).gmk +include $(THIS_SNIPPET) + +include MakeSnippetEnd.gmk ifeq ($(MAKEFILE_PREFIX), Lib) # We need to keep track of what libraries are generated/needed by this @@ -128,8 +130,12 @@ $(eval $(call SetupCopyFiles, COPY_CONF, \ )) ifeq ($(GENERATE_COMPILE_COMMANDS_ONLY), true) - all: $(filter $(MAKESUPPORT_OUTPUTDIR)/compile-commands/%, $(TARGETS)) + TARGETS := $(filter $(MAKESUPPORT_OUTPUTDIR)/compile-commands/%, $(TARGETS)) else - all: $(TARGETS) $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB) \ + TARGETS += $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB) \ $(COPY_INCLUDE) $(COPY_CMDS) $(COPY_MAN) $(COPY_CONF) $(LINK_LIBS_TO_LIB) endif + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/PreInit.gmk b/make/PreInit.gmk index 6a424894802..b4c0402da3d 100644 --- a/make/PreInit.gmk +++ b/make/PreInit.gmk @@ -38,13 +38,15 @@ default: # serially, regardless of -j. .NOTPARALLEL: +IS_PREINIT_ENV := true + # Include our helper functions. -include $(topdir)/make/PreInitSupport.gmk -include $(topdir)/make/common/LogUtils.gmk +include $(TOPDIR)/make/PreInitSupport.gmk +include $(TOPDIR)/make/common/LogUtils.gmk # Here are "global" targets, i.e. targets that can be executed without having # a configuration. This will define ALL_GLOBAL_TARGETS. -include $(topdir)/make/Global.gmk +include $(TOPDIR)/make/Global.gmk # CALLED_TARGETS is the list of targets that the user provided, # or "default" if unspecified. @@ -79,7 +81,8 @@ ifneq ($(SKIP_SPEC), true) # Check that CONF_CHECK is valid. $(eval $(call ParseConfCheckOption)) - # Check that the LOG given is valid, and set LOG_LEVEL, LOG_NOFILE, MAKE_LOG_VARS and MAKE_LOG_FLAGS. + # Check that the LOG given is valid, and set LOG_LEVEL, LOG_NOFILE, + # MAKE_LOG_VARS and MAKE_LOG_FLAGS. $(eval $(call ParseLogLevel)) # After this SPECS contain 1..N spec files (otherwise ParseConfAndSpec fails). @@ -101,25 +104,26 @@ ifneq ($(SKIP_SPEC), true) SEQUENTIAL_TARGETS := $(filter dist-clean clean%, $(MAIN_TARGETS)) PARALLEL_TARGETS := $(filter-out $(SEQUENTIAL_TARGETS), $(MAIN_TARGETS)) + MAKE_INIT_ARGS := $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -I $(TOPDIR)/make/common + # The spec files depend on the autoconf source code. This check makes sure # the configuration is up to date after changes to configure. - $(SPECS): $(wildcard $(topdir)/make/autoconf/*) \ + $(SPECS): $(wildcard $(TOPDIR)/make/autoconf/*) \ $(if $(CUSTOM_CONFIG_DIR), $(wildcard $(CUSTOM_CONFIG_DIR)/*)) \ - $(addprefix $(topdir)/make/conf/, version-numbers.conf branding.conf) \ + $(addprefix $(TOPDIR)/make/conf/, version-numbers.conf branding.conf) \ $(if $(CUSTOM_CONF_DIR), $(wildcard $(addprefix $(CUSTOM_CONF_DIR)/, \ version-numbers.conf branding.conf))) ifeq ($(CONF_CHECK), fail) - @echo Error: The configuration is not up to date for \ - "'$(lastword $(subst /, , $(dir $@)))'." - $(call PrintConfCheckFailed) - @exit 2 + @echo Error: The configuration is not up to date for \ + "'$(lastword $(subst /, , $(dir $@)))'." + $(call PrintConfCheckFailed) + @exit 2 else ifeq ($(CONF_CHECK), auto) - @echo Note: The configuration is not up to date for \ - "'$(lastword $(subst /, , $(dir $@)))'." - @( cd $(topdir) && \ - $(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -f $(topdir)/make/Init.gmk \ - SPEC=$@ HAS_SPEC=true ACTUAL_TOPDIR=$(topdir) \ - reconfigure ) + @echo Note: The configuration is not up to date for \ + "'$(lastword $(subst /, , $(dir $@)))'." + @( cd $(TOPDIR) && \ + $(MAKE) $(MAKE_INIT_ARGS) -f $(TOPDIR)/make/Init.gmk SPEC=$@ \ + reconfigure ) else ifeq ($(CONF_CHECK), ignore) # Do nothing endif @@ -139,7 +143,7 @@ ifneq ($(SKIP_SPEC), true) $(COMMAND_LINE_VARIABLES) $(MAKECMDGOALS))') endif - MAKE_INIT_WITH_SPEC_ARGUMENTS := ACTUAL_TOPDIR=$(topdir) \ + MAKE_INIT_MAIN_TARGET_ARGS := \ USER_MAKE_VARS="$(USER_MAKE_VARS)" MAKE_LOG_FLAGS=$(MAKE_LOG_FLAGS) \ $(MAKE_LOG_VARS) \ INIT_TARGETS="$(INIT_TARGETS)" \ @@ -155,21 +159,24 @@ ifneq ($(SKIP_SPEC), true) @$(if $(TARGET_DONE), \ true \ , \ - ( cd $(topdir) && \ + ( cd $(TOPDIR) && \ $(foreach spec, $(SPECS), \ - $(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -j 1 -f $(topdir)/make/Init.gmk \ - SPEC=$(spec) HAS_SPEC=true $(MAKE_INIT_WITH_SPEC_ARGUMENTS) \ + $(MAKE) $(MAKE_INIT_ARGS) -j 1 -f $(TOPDIR)/make/Init.gmk \ + SPEC=$(spec) $(MAKE_INIT_MAIN_TARGET_ARGS) \ main && \ $(if $(and $(COMPARE_BUILD), $(PARALLEL_TARGETS)), \ - $(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -f $(topdir)/make/Init.gmk \ - SPEC=$(spec) HAS_SPEC=true ACTUAL_TOPDIR=$(topdir) \ - COMPARE_BUILD="$(COMPARE_BUILD)" pre-compare-build && \ - $(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -j 1 -f $(topdir)/make/Init.gmk \ - SPEC=$(spec) HAS_SPEC=true $(MAKE_INIT_WITH_SPEC_ARGUMENTS) \ - COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" main && \ - $(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -f $(topdir)/make/Init.gmk \ - SPEC=$(spec) HAS_SPEC=true ACTUAL_TOPDIR=$(topdir) \ - COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" post-compare-build && \ + $(MAKE) $(MAKE_INIT_ARGS) -f $(TOPDIR)/make/Init.gmk \ + SPEC=$(spec) \ + COMPARE_BUILD="$(COMPARE_BUILD)" \ + pre-compare-build && \ + $(MAKE) $(MAKE_INIT_ARGS) -j 1 -f $(TOPDIR)/make/Init.gmk \ + SPEC=$(spec) $(MAKE_INIT_MAIN_TARGET_ARGS) \ + COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" \ + main && \ + $(MAKE) $(MAKE_INIT_ARGS) -f $(TOPDIR)/make/Init.gmk \ + SPEC=$(spec) \ + COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" \ + post-compare-build && \ ) \ ) true ) \ $(eval TARGET_DONE=true) \ @@ -213,3 +220,5 @@ else # SKIP_SPEC=true .PHONY: $(ALL_TARGETS) endif # $(SKIP_SPEC)!=true + +################################################################################ diff --git a/make/PreInitSupport.gmk b/make/PreInitSupport.gmk index 5acc2163af1..c3741589330 100644 --- a/make/PreInitSupport.gmk +++ b/make/PreInitSupport.gmk @@ -23,20 +23,20 @@ # questions. # -############################################################################## +################################################################################ # Helper functions for PreInit.gmk, the initial part of initialization before # the SPEC file is loaded. Most of these functions provide parsing and setting # up make options from the command-line. -############################################################################## - -# COMMA is defined in spec.gmk, but that is not included yet -COMMA := , +################################################################################ # Include the corresponding closed file, if present. ifneq ($(CUSTOM_MAKE_DIR), ) - -include $(CUSTOM_MAKE_DIR)/InitSupport.gmk + -include $(CUSTOM_MAKE_DIR)/PreInitSupport-pre.gmk endif +# COMMA is defined in spec.gmk, but that is not included yet +COMMA := , + # Essential control variables that are handled by PreInit.gmk or Init.gmk INIT_CONTROL_VARIABLES := LOG CONF CONF_NAME SPEC JOBS CONF_CHECK ALLOW \ COMPARE_BUILD @@ -68,13 +68,13 @@ USER_MAKE_VARS := $(subst §,\ , $(filter-out $(addsuffix =%, $(ALL_CONTROL_VARI # Setup information about available configurations, if any. ifneq ($(CUSTOM_ROOT), ) - build_dir = $(CUSTOM_ROOT)/build + build_dir := $(CUSTOM_ROOT)/build else - build_dir = $(topdir)/build + build_dir := $(TOPDIR)/build endif -all_spec_files = $(wildcard $(build_dir)/*/spec.gmk) +all_spec_files := $(wildcard $(build_dir)/*/spec.gmk) # Extract the configuration names from the path -all_confs = $(patsubst %/spec.gmk, %, $(patsubst $(build_dir)/%, %, $(all_spec_files))) +all_confs := $(patsubst %/spec.gmk, %, $(patsubst $(build_dir)/%, %, $(all_spec_files))) # Check for unknown command-line variables define CheckControlVariables @@ -110,7 +110,7 @@ endef define CheckInvalidMakeFlags # This is a trick to get this rule to execute before any other rules # MAKEFLAGS only indicate -j if read in a recipe (!) - $$(topdir)/make/PreInit.gmk: .FORCE + $$(TOPDIR)/make/PreInit.gmk: .FORCE $$(if $$(findstring --jobserver, $$(MAKEFLAGS)), \ $$(info Error: 'make -jN' is not supported, use 'make JOBS=N') \ $$(error Cannot continue) \ @@ -162,7 +162,7 @@ define ParseConfAndSpec ifneq ($(CUSTOM_ROOT), ) $$(info Error: No configurations found for $$(CUSTOM_ROOT).) else - $$(info Error: No configurations found for $$(topdir).) + $$(info Error: No configurations found for $$(TOPDIR).) endif $$(info Please run 'bash configure' to create a configuration.) $$(info ) @@ -278,9 +278,9 @@ define DefineMainTargets endif $$(main_targets_file): - @( cd $$(topdir) && \ - $$(MAKE) $$(MAKE_LOG_FLAGS) -r -R -f $$(topdir)/make/Main.gmk \ - -I $$(topdir)/make/common SPEC=$(strip $2) NO_RECIPES=true \ + @( cd $$(TOPDIR) && \ + $$(MAKE) $$(MAKE_LOG_FLAGS) -r -R -f $$(TOPDIR)/make/Main.gmk \ + -I $$(TOPDIR)/make/common SPEC=$(strip $2) NO_RECIPES=true \ $$(MAKE_LOG_VARS) \ create-main-targets-include ) @@ -295,3 +295,5 @@ define PrintConfCheckFailed @echo "This behavior may also be changed using CONF_CHECK=." @echo ' ' endef + +################################################################################ diff --git a/make/ReleaseFile.gmk b/make/ReleaseFile.gmk index dc6f66a69a2..4204dfc76d5 100644 --- a/make/ReleaseFile.gmk +++ b/make/ReleaseFile.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2025, 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,12 @@ # questions. # -default: all - -include $(SPEC) -include MakeBase.gmk +include MakeFileStart.gmk ################################################################################ # This makefile generates the "release" file into the exploded image. Jlink is # then responsible for using this as the base for release files in each linked # image. -# ################################################################################ BASE_RELEASE_FILE := $(JDK_OUTPUTDIR)/release @@ -85,10 +81,4 @@ TARGETS += $(BASE_RELEASE_FILE) ################################################################################ -$(eval $(call IncludeCustomExtension, ReleaseFile.gmk)) - -################################################################################ - -all: $(TARGETS) - -.PHONY: all default +include MakeFileEnd.gmk diff --git a/make/RunTests.gmk b/make/RunTests.gmk index 27a3c9b8b45..f541f0c0757 100644 --- a/make/RunTests.gmk +++ b/make/RunTests.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2025, 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,10 +23,10 @@ # questions. # -default: all +include MakeFileStart.gmk + +################################################################################ -include $(SPEC) -include MakeBase.gmk include FindTests.gmk # We will always run multiple tests serially @@ -71,9 +71,6 @@ ifeq ($(call isTargetOs, windows), true) endif endif -################################################################################ -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, RunTests.gmk)) ################################################################################ # This is the JDK that we will test @@ -1357,4 +1354,8 @@ endif all: run-test -.PHONY: default all $(TARGETS) +.PHONY: $(TARGETS) + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/RunTestsPrebuilt.gmk b/make/RunTestsPrebuilt.gmk index 3bfcebd4be4..1ca22276c75 100644 --- a/make/RunTestsPrebuilt.gmk +++ b/make/RunTestsPrebuilt.gmk @@ -27,6 +27,8 @@ # Initial bootstrapping, copied and stripped down from Makefile and PreInit.gmk. ################################################################################ +IS_PREINIT_ENV := true + # In Cygwin, the MAKE variable gets prepended with the current directory if the # make executable is called using a Windows mixed path (c:/cygwin/bin/make.exe). ifneq ($(findstring :, $(MAKE)), ) @@ -57,7 +59,7 @@ TOPDIR := $(strip $(patsubst %/make/, %, $(dir $(makefile_path)))) define SetupVariable ifeq ($$($1), ) ifeq ($2, ) - $$(info Error: Prebuilt variable $1 is missing, needed for run-tests-prebuilt) + $$(info Error: Prebuilt variable $1 is missing, needed for test-prebuilt) $$(error Cannot continue.) else ifeq ($2, OPTIONAL) ifneq ($$(findstring $$(LOG), info debug trace), ) @@ -135,7 +137,6 @@ $(eval $(call SetupVariable,JIB_JAR,OPTIONAL)) # can include the prebuilt spec file ourselves, without an ephemeral spec # wrapper. This is required so we can include MakeBase which is needed for # CreateNewSpec. -HAS_SPEC := include $(TOPDIR)/make/PreInitSupport.gmk include $(TOPDIR)/make/common/LogUtils.gmk @@ -246,7 +247,7 @@ endif # Now we can include additional custom support. # This might define CUSTOM_NEW_SPEC_LINE ifneq ($(CUSTOM_MAKE_DIR), ) - include $(CUSTOM_MAKE_DIR)/RunTestsPrebuilt.gmk + include $(CUSTOM_MAKE_DIR)/RunTestsPrebuilt-pre.gmk endif NEW_SPEC := $(OUTPUTDIR)/run-test-spec.gmk @@ -296,14 +297,10 @@ test-prebuilt: # is unfortunately not available at this point. $(call MakeDir, $(MAKESUPPORT_OUTPUTDIR)/failure-logs) @$(RM) -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error - # The lazy initialization of the cache file in FindTests.gmk does not - # always work with RunTests.gmk. To guarantee that the jtreg test groups - # are always found and parsed, call FindTests.gmk stand alone once - # before calling RunTests.gmk. - @cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -f make/common/FindTests.gmk \ - SPEC=$(SPEC) FINDTESTS_STAND_ALONE=true \ - GENERATE_FIND_TESTS_FILE=true - @cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -f make/RunTests.gmk run-test \ + # We need to fill the FindTest cache before entering RunTests.gmk. + @cd $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) SPEC=$(SPEC) \ + -f RunTestsPrebuiltFindTests.gmk + @cd $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test \ TEST="$(TEST)" test-prebuilt-with-exit-code: test-prebuilt diff --git a/make/RunTestsPrebuiltFindTests.gmk b/make/RunTestsPrebuiltFindTests.gmk new file mode 100644 index 00000000000..d8faa5cd0cd --- /dev/null +++ b/make/RunTestsPrebuiltFindTests.gmk @@ -0,0 +1,38 @@ +# +# Copyright (c) 2025, 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 MakeFileStart.gmk + +################################################################################ +# This makefile is a thin wrapper around FindTests.gmk, just to make FindTest +# fill the cache. +################################################################################ + +GENERATE_FIND_TESTS_FILE := true +include FindTests.gmk + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/SourceRevision.gmk b/make/SourceRevision.gmk index 79c438987f7..285aaae17b5 100644 --- a/make/SourceRevision.gmk +++ b/make/SourceRevision.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2025, 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,10 +23,7 @@ # questions. # -include $(SPEC) -include MakeBase.gmk - -$(eval $(call IncludeCustomExtension, SourceRevision-pre.gmk)) +include MakeFileStart.gmk ################################################################################ # Keep track of what source revision is used to create the build, by creating @@ -38,6 +35,7 @@ $(eval $(call IncludeCustomExtension, SourceRevision-pre.gmk)) # bundle. As a part of creating this source bundle, the current SCM revisions of # all repos will be stored in a file in the top dir, which is then used when # creating the tracker file. +################################################################################ STORED_SOURCE_REVISION := $(TOPDIR)/.src-rev @@ -156,10 +154,6 @@ endif ################################################################################ -$(eval $(call IncludeCustomExtension, SourceRevision-post.gmk)) - -################################################################################ - store-source-revision: $(STORE_SOURCE_REVISION_TARGET) create-source-revision-tracker: $(CREATE_SOURCE_REVISION_TRACKER_TARGET) @@ -167,3 +161,7 @@ create-source-revision-tracker: $(CREATE_SOURCE_REVISION_TRACKER_TARGET) FRC: # Force target .PHONY: store-source-revision create-source-revision-tracker + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/StaticLibs.gmk b/make/StaticLibs.gmk index e4b8e422caf..3fcbd0565c3 100644 --- a/make/StaticLibs.gmk +++ b/make/StaticLibs.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024, 2025, 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,10 +23,9 @@ # questions. # -default: all +include MakeFileStart.gmk -include $(SPEC) -include MakeBase.gmk +################################################################################ include CopyFiles.gmk include DebugInfoUtils.gmk @@ -185,6 +184,8 @@ static-jdk-image: $(copy-from-jdk-image) $(copy-static-launcher) $(copy-static-l TARGETS += static-jdk-image -all: $(TARGETS) +.PHONY: static-launcher static-jdk-image -.PHONY: all static-launcher static-jdk-image +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/StaticLibsImage.gmk b/make/StaticLibsImage.gmk index 6a181ff262f..1f50c5b7f1b 100644 --- a/make/StaticLibsImage.gmk +++ b/make/StaticLibsImage.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2019, 2025, 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,13 +23,12 @@ # questions. # +include MakeFileStart.gmk + +################################################################################ # This makefile creates an image of the optional static versions of certain JDK # libraries. - -default: all - -include $(SPEC) -include MakeBase.gmk +################################################################################ include CopyFiles.gmk include Modules.gmk @@ -38,8 +37,6 @@ ALL_MODULES = $(call FindAllModules) ################################################################################ -TARGETS := - ifneq ($(filter static-libs-image, $(MAKECMDGOALS)), ) IMAGE_DEST_DIR = $(STATIC_LIBS_IMAGE_DIR)/lib else ifneq ($(filter static-libs-graal-image, $(MAKECMDGOALS)), ) @@ -72,11 +69,9 @@ ifneq ($(filter static-libs-image, $(MAKECMDGOALS)), ) ) endif -################################################################################ - static-libs-image: $(HOTSPOT_VARIANT_STATIC_LIBS_TARGETS) $(STATIC_LIBS_TARGETS) static-libs-graal-image: $(STATIC_LIBS_TARGETS) -all: $(TARGETS) +################################################################################ -.PHONY: all +include MakeFileEnd.gmk diff --git a/make/TestImage.gmk b/make/TestImage.gmk index 5c788a8d0a6..869cce1d558 100644 --- a/make/TestImage.gmk +++ b/make/TestImage.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, 2025, 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,13 +23,7 @@ # questions. # -default: all - -include $(SPEC) -include MakeBase.gmk - -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, TestImage-pre.gmk)) +include MakeFileStart.gmk ################################################################################ @@ -54,4 +48,8 @@ TARGETS += $(BUILD_INFO_PROPERTIES) $(README) prepare-test-image: $(TARGETS) all: prepare-test-image -.PHONY: default all prepare-test-image +.PHONY: prepare-test-image + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/ToolsHotspot.gmk b/make/ToolsHotspot.gmk index f53d851c0b7..60ef0f2e35e 100644 --- a/make/ToolsHotspot.gmk +++ b/make/ToolsHotspot.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,8 +23,10 @@ # questions. # -ifndef _TOOLS_HOTSPOT_GMK -_TOOLS_HOTSPOT_GMK := 1 +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ include JavaCompilation.gmk @@ -44,4 +46,5 @@ TOOL_JFR_GEN := $(JAVA_SMALL) -cp $(HOTSPOT_TOOLS_OUTPUTDIR) \ ################################################################################ -endif # _TOOLS_HOTSPOT_GMK +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/ToolsJdk.gmk b/make/ToolsJdk.gmk index 98287473f3e..f301ddb53d1 100644 --- a/make/ToolsJdk.gmk +++ b/make/ToolsJdk.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,13 @@ # questions. # -ifndef _TOOLS_GMK -_TOOLS_GMK := 1 +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ include JavaCompilation.gmk -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, Tools.gmk)) - ################################################################################ # To avoid reevaluating the compilation setup for the tools each time this file # is included, the actual compilation is handled by CompileTools.gmk. The @@ -137,7 +136,5 @@ PANDOC_HTML_MANPAGE_FILTER := $(BUILDTOOLS_OUTPUTDIR)/manpages/pandoc-html-manpa ################################################################################ -# Hook to include the corresponding custom post file, if present. -$(eval $(call IncludeCustomExtension, ToolsJdk-post.gmk)) - -endif # _TOOLS_GMK +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/ToolsLangtools.gmk b/make/ToolsLangtools.gmk index 86fb364a7cd..4146652bf8b 100644 --- a/make/ToolsLangtools.gmk +++ b/make/ToolsLangtools.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,11 +23,10 @@ # questions. # -# This must be the first rule -default: all +include MakeFileStart.gmk + +################################################################################ -include $(SPEC) -include MakeBase.gmk include JavaCompilation.gmk ################################################################################ @@ -43,3 +42,7 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_LANGTOOLS, \ )) all: $(BUILD_TOOLS_LANGTOOLS) + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/UpdateBuildDocs.gmk b/make/UpdateBuildDocs.gmk index 7fed72e7311..b507789489f 100644 --- a/make/UpdateBuildDocs.gmk +++ b/make/UpdateBuildDocs.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, 2025, 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,17 +23,14 @@ # questions. # -default: all - -include $(SPEC) -include MakeBase.gmk -include ProcessMarkdown.gmk +include MakeFileStart.gmk ################################################################################ # This makefile updates the generated build html documentation. -# ################################################################################ +include ProcessMarkdown.gmk + ifeq ($(ENABLE_PANDOC), false) $(info No pandoc executable was detected by configure) $(error Cannot continue) @@ -55,10 +52,4 @@ TARGETS += $(md_docs) ################################################################################ -$(eval $(call IncludeCustomExtension, UpdateBuildDocs.gmk)) - -################################################################################ - -all: $(TARGETS) - -.PHONY: all default +include MakeFileEnd.gmk diff --git a/make/UpdateSleefSource.gmk b/make/UpdateSleefSource.gmk index 37a28abcb85..c7fdfdb41d9 100644 --- a/make/UpdateSleefSource.gmk +++ b/make/UpdateSleefSource.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024, 2025, 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,7 @@ # questions. # -################################################################################ - -default: all - -include $(SPEC) -include MakeBase.gmk - -include CopyFiles.gmk -include Execute.gmk +include MakeFileStart.gmk ################################################################################ # This file is responsible for updating the generated sleef source code files @@ -40,6 +32,9 @@ include Execute.gmk # updated from upstream. ################################################################################ +include CopyFiles.gmk +include Execute.gmk + ifneq ($(COMPILE_TYPE), cross) $(error Only cross-compilation of libsleef is currently supported) endif @@ -148,6 +143,4 @@ TARGETS := $(copy_generated_sleef_source) ################################################################################ -all: $(TARGETS) - -.PHONY: all default +include MakeFileEnd.gmk diff --git a/make/UpdateX11Wrappers.gmk b/make/UpdateX11Wrappers.gmk index f6f43ac2b53..3ff2fc148fb 100644 --- a/make/UpdateX11Wrappers.gmk +++ b/make/UpdateX11Wrappers.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2025, 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,7 @@ # questions. # -################################################################################ - -default: all - -include $(SPEC) -include MakeBase.gmk -include Execute.gmk -include JdkNativeCompilation.gmk -include ToolsJdk.gmk +include MakeFileStart.gmk ################################################################################ # This file is responsible for extracting the x11 native struct offsets to @@ -43,6 +35,10 @@ include ToolsJdk.gmk # GensrcX11Wrappers.gmk to generate the Java code during the build. ################################################################################ +include Execute.gmk +include JdkNativeCompilation.gmk +include $(TOPDIR)/make/ToolsJdk.gmk + ifeq ($(COMPILE_TYPE), cross) $(error It is not possible to update the x11wrappers when cross-compiling) endif @@ -108,6 +104,4 @@ TARGETS += $(run_wrappergen) wrapper-information ################################################################################ -all: $(TARGETS) - -.PHONY: all default +include MakeFileEnd.gmk diff --git a/make/ZipSecurity.gmk b/make/ZipSecurity.gmk index 08f9caadd9a..fa5e4125290 100644 --- a/make/ZipSecurity.gmk +++ b/make/ZipSecurity.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,10 +23,10 @@ # questions. # -default: all +include MakeFileStart.gmk + +################################################################################ -include $(SPEC) -include MakeBase.gmk include ZipArchive.gmk ################################################################################ @@ -100,6 +100,4 @@ endif ################################################################################ -all: $(TARGETS) - -.PHONY: default all +include MakeFileEnd.gmk diff --git a/make/ZipSource.gmk b/make/ZipSource.gmk index c1df6af7583..519339f2078 100644 --- a/make/ZipSource.gmk +++ b/make/ZipSource.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,19 +23,16 @@ # questions. # -default: all +include MakeFileStart.gmk + +################################################################################ -include $(SPEC) -include MakeBase.gmk include Modules.gmk include ZipArchive.gmk SRC_ZIP_WORK_DIR := $(SUPPORT_OUTPUTDIR)/src $(if $(filter $(TOPDIR)/%, $(SUPPORT_OUTPUTDIR)), $(eval SRC_ZIP_BASE := $(TOPDIR)), $(eval SRC_ZIP_BASE := $(SUPPORT_OUTPUTDIR))) -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, ZipSource.gmk)) - ################################################################################ # Create the directory structure for src.zip using symlinks. # //.java @@ -95,8 +92,8 @@ zip: $(SRC_ZIP_SRCS) TARGETS += zip +.PHONY: zip + ################################################################################ -all: $(TARGETS) - -.PHONY: default all zip +include MakeFileEnd.gmk diff --git a/make/common/CopyFiles.gmk b/make/common/CopyFiles.gmk index 8ba21677245..f56947f01f5 100644 --- a/make/common/CopyFiles.gmk +++ b/make/common/CopyFiles.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,11 @@ # questions. # -ifeq ($(_MAKEBASE_GMK), ) - $(error You must include MakeBase.gmk prior to including CopyFiles.gmk) -endif +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) ################################################################################ -# # Code for handling the SetupCopyFiles macro. -# ################################################################################ define AddFileToCopy @@ -110,3 +107,8 @@ define SetupCopyFilesBody ) endef + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/DebugInfoUtils.gmk b/make/common/DebugInfoUtils.gmk index 69d6c24b5e0..721dd06e587 100644 --- a/make/common/DebugInfoUtils.gmk +++ b/make/common/DebugInfoUtils.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024, 2025, 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,11 @@ # questions. # -ifeq ($(_MAKEBASE_GMK), ) - $(error You must include MakeBase.gmk prior to including DebugInfoUtils.gmk) -endif +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) ################################################################################ -# # Common debuginfo utility functions -# ################################################################################ ################################################################################ @@ -56,3 +53,6 @@ else $(if $(wildcard $1), $(call containing, .dSYM/, $(call FindFiles, $1))) endif endif + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/Execute.gmk b/make/common/Execute.gmk index aa3c2e58813..bf108c30c05 100644 --- a/make/common/Execute.gmk +++ b/make/common/Execute.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2019, 2025, 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,17 +23,13 @@ # questions. # -ifeq ($(_MAKEBASE_GMK), ) - $(error You must include MakeBase.gmk prior to including Execute.gmk) -endif +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) ################################################################################ -# # Code for handling the SetupExecute macro. -# ################################################################################ - ################################################################################ # Setup make rules for executing an arbitrary command. # @@ -196,3 +192,8 @@ define SetupExecuteBody $1_TARGET := $$($1_FINAL_RESULT) endef + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/FileUtils.gmk b/make/common/FileUtils.gmk index d3cc4872ebb..fa934797fc7 100644 --- a/make/common/FileUtils.gmk +++ b/make/common/FileUtils.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,11 @@ # questions. # -ifeq ($(_MAKEBASE_GMK), ) - $(error You must include MakeBase.gmk prior to including FileUtils.gmk) -endif +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) ################################################################################ -# # Common file utility functions -# ################################################################################ ################################################################################ @@ -307,3 +304,8 @@ ifeq ($(DISABLE_CACHE_FIND), true) else FindFiles = $(CacheFindFiles) endif + +################################################################################ + +include MakeIncludeEnd.gmk +endif # include guard diff --git a/make/common/FindTests.gmk b/make/common/FindTests.gmk index 5dfe49e5901..1f3a70b3035 100644 --- a/make/common/FindTests.gmk +++ b/make/common/FindTests.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, 2025, 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,21 +23,10 @@ # questions. # -ifndef _FIND_TESTS_GMK -_FIND_TESTS_GMK := 1 +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) -# This makefile can be called directly to just trigger generation of the cache -# makefile. If so, SPEC and MakeBase.gmk need to be included. -ifeq ($(FINDTESTS_STAND_ALONE), true) - include $(SPEC) - include MakeBase.gmk -endif - -# Make sure this variable is not lazy evaled. -ALL_NAMED_TESTS := - -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, common/FindTests.gmk)) +################################################################################ # TEST_BASEDIRS might have been set by a custom extension TEST_BASEDIRS += $(TOPDIR)/test $(TOPDIR) @@ -105,4 +94,5 @@ ALL_NAMED_TESTS += failure-handler make ################################################################################ -endif # _FIND_TESTS_GMK +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/JarArchive.gmk b/make/common/JarArchive.gmk index 68e9eaca32c..1f8ed1bc002 100644 --- a/make/common/JarArchive.gmk +++ b/make/common/JarArchive.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,10 @@ # questions. # -ifndef _JAR_ARCHIVE_GMK -_JAR_ARCHIVE_GMK := 1 +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) -ifeq ($(_MAKEBASE_GMK), ) - $(error You must include MakeBase.gmk prior to including JarArchive.gmk) -endif +################################################################################ include MakeIO.gmk @@ -283,4 +281,7 @@ define SetupJarArchiveBody $1 += $$($1_JAR) endef -endif # _JAR_ARCHIVE_GMK +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/JavaCompilation.gmk b/make/common/JavaCompilation.gmk index c56217b9f33..f48aefcd517 100644 --- a/make/common/JavaCompilation.gmk +++ b/make/common/JavaCompilation.gmk @@ -23,12 +23,10 @@ # questions. # -ifndef _JAVA_COMPILATION_GMK -_JAVA_COMPILATION_GMK := 1 +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) -ifeq ($(_MAKEBASE_GMK), ) - $(error You must include MakeBase.gmk prior to including JavaCompilation.gmk) -endif +################################################################################ include MakeIO.gmk @@ -540,4 +538,7 @@ SetupJavaCompilationCompileTarget = \ SetupJavaCompilationApiTarget = \ $(strip $2)/_the.$(strip $1)_pubapi -endif # _JAVA_COMPILATION_GMK +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/JdkNativeCompilation.gmk b/make/common/JdkNativeCompilation.gmk index a4f48385f41..372ad39305c 100644 --- a/make/common/JdkNativeCompilation.gmk +++ b/make/common/JdkNativeCompilation.gmk @@ -23,18 +23,13 @@ # questions. # -ifndef _JDK_NATIVE_COMPILATION_GMK -_JDK_NATIVE_COMPILATION_GMK := 1 +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) -ifeq ($(_MAKEBASE_GMK), ) - $(error You must include MakeBase.gmk prior to including JdkNativeCompilation.gmk) -endif +################################################################################ include NativeCompilation.gmk -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, common/JdkNativeCompilation.gmk)) - FindSrcDirsForComponent += \ $(call uniq, $(wildcard \ $(TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS)/native/$(strip $2) \ @@ -499,4 +494,7 @@ define SetupJdkExecutableBody $$(eval $$(call SetupJdkNativeCompilation, $1)) endef -endif # _JDK_NATIVE_COMPILATION_GMK +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/LogUtils.gmk b/make/common/LogUtils.gmk index 2815cf9d495..b32f6179ac7 100644 --- a/make/common/LogUtils.gmk +++ b/make/common/LogUtils.gmk @@ -23,6 +23,9 @@ # questions. # +include $(TOPDIR)/make/common/MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + ################################################################################ # This file contains helper functions for logging. ################################################################################ @@ -94,6 +97,9 @@ define ParseLogLevel # Error: LOG contains unknown option or log level: debug-to-log. $$(eval $$(call ParseLogOption, profile, LOG_PROFILE_TIMES_FILE)) + # If "flow" is present, log makefile execution flow + $$(eval $$(call ParseLogOption, flow, LOG_FLOW)) + # Treat LOG=profile-to-log as if it were LOG=profile,profile-to-log LOG_PROFILE_TIMES_FILE := $$(firstword $$(LOG_PROFILE_TIMES_FILE) $$(LOG_PROFILE_TIMES_LOG)) @@ -122,6 +128,11 @@ endef MAKE_LOG_VARS = $(foreach v, \ LOG_LEVEL LOG_NOFILE LOG_CMDLINES LOG_REPORT LOG_PROFILE_TIMES_LOG \ - LOG_PROFILE_TIMES_FILE, \ + LOG_PROFILE_TIMES_FILE LOG_FLOW, \ $v=$($v) \ ) + +################################################################################ + +endif # include guard +include $(TOPDIR)/make/common/MakeIncludeEnd.gmk diff --git a/make/common/MakeBase.gmk b/make/common/MakeBase.gmk index aec7396cd65..d1bb0396943 100644 --- a/make/common/MakeBase.gmk +++ b/make/common/MakeBase.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,11 @@ # questions. # +MAKEBASE_INCLUDED := true + +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + ################################################################################ # MakeBase provides the core functionality needed and used by all makefiles. It # should be included by all makefiles. MakeBase provides essential @@ -30,13 +35,6 @@ # execution, logging and fixpath functionality. ################################################################################ -ifndef _MAKEBASE_GMK -_MAKEBASE_GMK := 1 - -ifeq ($(wildcard $(SPEC)), ) - $(error MakeBase.gmk needs SPEC set to a proper spec.gmk) -endif - # By defining this pseudo target, make will automatically remove targets # if their recipe fails so that a rebuild is automatically triggered on the # next make invocation. @@ -312,7 +310,5 @@ ExecuteWithLog = \ ################################################################################ -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, common/MakeBase.gmk)) - -endif # _MAKEBASE_GMK +include MakeIncludeEnd.gmk +endif # include guard diff --git a/make/common/MakeFileEnd.gmk b/make/common/MakeFileEnd.gmk new file mode 100644 index 00000000000..0c02ae79373 --- /dev/null +++ b/make/common/MakeFileEnd.gmk @@ -0,0 +1,42 @@ +# +# Copyright (c) 2025, 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. +# + +################################################################################ +# MakeFileEnd.gmk should be included last of all in all top-level makefiles +################################################################################ + +# Hook to include the corresponding custom file, if present. +ifneq ($(NO_CUSTOM_EXTENSIONS), true) + CUSTOM_POST_NAME := $(subst .gmk,-post.gmk, $(THIS_MAKEFILE)) + $(eval $(call IncludeCustomExtension, $(CUSTOM_POST_NAME))) +endif + +all: $(TARGETS) + +ifeq ($(LOG_FLOW), true) + $(info :Leave $(THIS_MAKEFILE) [now executing rules]) +endif + +.PHONY: default all diff --git a/make/common/MakeFileStart.gmk b/make/common/MakeFileStart.gmk new file mode 100644 index 00000000000..f1dd0abb792 --- /dev/null +++ b/make/common/MakeFileStart.gmk @@ -0,0 +1,66 @@ +# +# Copyright (c) 2025, 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. +# + +################################################################################ +# MakeFileStart.gmk should be included first of all in all top-level makefiles +################################################################################ + +# This must be the first rule +default: $(if $(DEFAULT_TARGET), $(DEFAULT_TARGET), all) + +THIS_MAKEFILE_PATH := $(firstword $(MAKEFILE_LIST)) + +ifeq ($(SPEC), ) + $(error $(THIS_MAKEFILE_PATH): SPEC is not set) +endif + +ifeq ($(wildcard $(SPEC)), ) + $(error $(THIS_MAKEFILE_PATH): spec.gmk file $(SPEC) is missing) +endif + +ifneq ($(words $(MAKEFILE_LIST)), 2) + $(error $(THIS_MAKEFILE_PATH): This file is not supposed to be included) +endif + +# We need spec.gmk to get $(TOPDIR) +include $(SPEC) + +THIS_MAKEFILE := $(patsubst make/%,%,$(patsubst $(TOPDIR)/%,%,$(THIS_MAKEFILE_PATH))) + +ifeq ($(LOG_FLOW), true) + $(info :Enter $(THIS_MAKEFILE)) +endif + +include $(TOPDIR)/make/common/MakeBase.gmk + +TARGETS := + +all: + +# Hook to include the corresponding custom file, if present. +ifneq ($(NO_CUSTOM_EXTENSIONS), true) + CUSTOM_PRE_NAME := $(subst .gmk,-pre.gmk, $(THIS_MAKEFILE)) + $(eval $(call IncludeCustomExtension, $(CUSTOM_PRE_NAME))) +endif diff --git a/make/common/MakeIO.gmk b/make/common/MakeIO.gmk index e1806e9259a..b32f427226a 100644 --- a/make/common/MakeIO.gmk +++ b/make/common/MakeIO.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,18 +23,14 @@ # questions. # -ifeq ($(_MAKEBASE_GMK), ) - $(error You must include MakeBase.gmk prior to including MakeIO.gmk) -endif +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) ################################################################################ -# # Functions for dealing with reading and writing from makefiles. Prior to GNU # Make 4.0, this was tricky business. -# ################################################################################ - ################################################################################ # ListPathsSafely can be used to print command parameters to a file. This is # typically done if the command line length risk being too long for the @@ -241,3 +237,8 @@ else # HAS_FILE_FUNCTION = false $$(call ListPathsSafely_IfPrintf,$1,$2,29751,30000) endef endif # HAS_FILE_FUNCTION + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/MakeIncludeEnd.gmk b/make/common/MakeIncludeEnd.gmk new file mode 100644 index 00000000000..f0520d84b6c --- /dev/null +++ b/make/common/MakeIncludeEnd.gmk @@ -0,0 +1,45 @@ +# +# Copyright (c) 2025, 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. +# + +################################################################################ +# MakeIncludeEnd.gmk should be included last of all in all include files +################################################################################ + +# Hook to include the corresponding custom file, if present. +ifneq ($(NO_CUSTOM_EXTENSIONS), true) + CUSTOM_POST_NAME := $(subst .gmk,-post.gmk, $(THIS_INCLUDE)) + $(eval $(call IncludeCustomExtension, $(CUSTOM_POST_NAME))) +endif + +# Pop our helper name off the stack +HELPER_STACK := $(wordlist 2, $(words $(HELPER_STACK)), $(HELPER_STACK)) + +# Print an indented message, also counting the top-level makefile as a level +ifeq ($(LOG_FLOW), true) + $(info :$(foreach s, top $(HELPER_STACK), )Leave $(THIS_INCLUDE)) +endif + +# Restore the previous helper name +THIS_INCLUDE := $(firstword $(HELPER_STACK)) diff --git a/make/common/MakeIncludeStart.gmk b/make/common/MakeIncludeStart.gmk new file mode 100644 index 00000000000..e754114211c --- /dev/null +++ b/make/common/MakeIncludeStart.gmk @@ -0,0 +1,83 @@ +# +# Copyright (c) 2025, 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. +# + +################################################################################ +# MakeIncludeStart.gmk should be included first of all in all include files +################################################################################ + +# Get the next to last word (by prepending a padding element) +THIS_INCLUDE_PATH := $(word $(words ${MAKEFILE_LIST}),padding ${MAKEFILE_LIST}) +THIS_INCLUDE := $(patsubst $(TOPDIR)/make/%,%,$(THIS_INCLUDE_PATH)) + +# Print an indented message, also counting the top-level makefile as a level +ifneq ($(INCLUDE_GUARD_$(THIS_INCLUDE)), true) + THIS_INCLUDE_MSG := include +else + THIS_INCLUDE_MSG := included already +endif + +ifeq ($(LOG_FLOW), true) + $(info :$(foreach s, top $(HELPER_STACK), )Enter $(THIS_INCLUDE) [$(THIS_INCLUDE_MSG)]) +endif + +ifneq ($(filter $(THIS_INCLUDE), $(HELPER_STACK)), ) + $(error Internal makefile error: Include loop detected: $(THIS_INCLUDE) $(HELPER_STACK)) +endif + +ifeq ($(words $(MAKEFILE_LIST)), 2) + $(error $(THIS_INCLUDE_PATH): This file is supposed to be included) +endif + +# In a preinit environment, we do not have any SPEC +ifneq ($(IS_PREINIT_ENV), true) + ifeq ($(SPEC), ) + $(error $(THIS_INCLUDE_PATH): SPEC is not set) + endif + + ifeq ($(wildcard $(SPEC)), ) + $(error $(THIS_INCLUDE_PATH): spec.gmk file $(SPEC) is missing) + endif + + ifneq ($(MAKEBASE_INCLUDED), true) + $(error $(THIS_INCLUDE_PATH): MakeBase.gmk is not included) + endif +endif + +# Push our helper name onto the stack +HELPER_STACK := $(THIS_INCLUDE) $(HELPER_STACK) + +# Setup an automatic include guard +ifneq ($(INCLUDE_GUARD_$(THIS_INCLUDE)), true) + INCLUDE_GUARD_$(THIS_INCLUDE) := true + INCLUDE := true + + # Hook to include the corresponding custom file, if present. + ifneq ($(NO_CUSTOM_EXTENSIONS), true) + CUSTOM_PRE_NAME := $(subst .gmk,-pre.gmk, $(THIS_INCLUDE)) + $(eval $(call IncludeCustomExtension, $(CUSTOM_PRE_NAME))) + endif +else + INCLUDE := false +endif diff --git a/make/common/MakeSnippetEnd.gmk b/make/common/MakeSnippetEnd.gmk new file mode 100644 index 00000000000..833df2e9edb --- /dev/null +++ b/make/common/MakeSnippetEnd.gmk @@ -0,0 +1,45 @@ +# +# Copyright (c) 2025, 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. +# + +################################################################################ +# MakeSnippetEnd.gmk should be included after including a makefile snippet +################################################################################ + +# Hook to include the corresponding custom file, if present. +ifneq ($(NO_CUSTOM_EXTENSIONS), true) + CUSTOM_POST_NAME := $(subst .gmk,-post.gmk, $(THIS_SNIPPET)) + $(eval $(call IncludeCustomExtension, $(CUSTOM_POST_NAME))) +endif + +# Pop our helper name off the stack +HELPER_STACK := $(wordlist 2, $(words $(HELPER_STACK)), $(HELPER_STACK)) + +# Print an indented message, also counting the top-level makefile as a level +ifeq ($(LOG_FLOW), true) + $(info :$(foreach s, top $(HELPER_STACK), )Leave $(THIS_SNIPPET)) +endif + +# Restore the previous helper name +THIS_SNIPPET := $(firstword $(HELPER_STACK)) diff --git a/make/common/MakeSnippetStart.gmk b/make/common/MakeSnippetStart.gmk new file mode 100644 index 00000000000..dfe7f9f0007 --- /dev/null +++ b/make/common/MakeSnippetStart.gmk @@ -0,0 +1,46 @@ +# +# Copyright (c) 2025, 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. +# + +################################################################################ +# MakeSnippetStart.gmk should be included before including a makefile snippet +################################################################################ + +ifeq ($(THIS_SNIPPET), ) + $(error Internal makefile error: THIS_SNIPPET is not defined) +endif + +# Print an indented message, also counting the top-level makefile as a level +ifeq ($(LOG_FLOW), true) + $(info :$(foreach s, top $(HELPER_STACK), )Enter $(THIS_SNIPPET) [snippet]) +endif + +# Push our helper name onto the stack +HELPER_STACK := $(THIS_SNIPPET) $(HELPER_STACK) + +# Hook to include the corresponding custom file, if present. +ifneq ($(NO_CUSTOM_EXTENSIONS), true) + CUSTOM_PRE_NAME := $(subst .gmk,-pre.gmk, $(THIS_SNIPPET)) + $(eval $(call IncludeCustomExtension, $(CUSTOM_PRE_NAME))) +endif diff --git a/make/common/Modules.gmk b/make/common/Modules.gmk index 4fc0288f251..03548ca8778 100644 --- a/make/common/Modules.gmk +++ b/make/common/Modules.gmk @@ -23,8 +23,8 @@ # questions. # -ifndef _MODULES_GMK -_MODULES_GMK := 1 +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) ################################################################################ # Setup module sets for classloaders @@ -45,11 +45,6 @@ include $(TOPDIR)/make/conf/docs-modules.conf include $(TOPDIR)/make/conf/build-module-sets.conf -################################################################################ -# Hook to include the corresponding custom file, if present. -# Allowing MODULE list extensions setup above. -$(eval $(call IncludeCustomExtension, common/Modules.gmk)) - ################################################################################ # Depending on the configuration, we might need to filter out some modules that # normally should have been included @@ -316,4 +311,5 @@ endef ################################################################################ -endif # _MODULES_GMK +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk index 66d07df3b78..9721f1c0aca 100644 --- a/make/common/NativeCompilation.gmk +++ b/make/common/NativeCompilation.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,19 +23,15 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + ################################################################################ # This is the top-level entry point for our native compilation and linking. # It contains the SetupNativeCompilation macro, but is supported by helper # macros in the make/common/native directory. ################################################################################ -ifndef _NATIVE_COMPILATION_GMK -_NATIVE_COMPILATION_GMK := 1 - -ifeq ($(_MAKEBASE_GMK), ) - $(error You must include MakeBase.gmk prior to including NativeCompilation.gmk) -endif - include MakeIO.gmk include native/CompileFile.gmk include native/DebugSymbols.gmk @@ -223,6 +219,7 @@ define SetupNativeCompilationBody ifeq ($(GENERATE_COMPILE_COMMANDS_ONLY), true) # Override all targets (this is a hack) $1 := $$($1_ALL_OBJS_JSON) $$($1_LDFLAGS_FILE) + TARGETS := $(filter $(MAKESUPPORT_OUTPUTDIR)/compile-commands/%, $(TARGETS)) endif endef @@ -409,4 +406,7 @@ define ImportDependencyFile endif endef -endif # _NATIVE_COMPILATION_GMK +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/ProcessMarkdown.gmk b/make/common/ProcessMarkdown.gmk index d14c3ce4f76..1b4a5b76ea1 100644 --- a/make/common/ProcessMarkdown.gmk +++ b/make/common/ProcessMarkdown.gmk @@ -1,4 +1,4 @@ -# Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, 2025, 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 @@ -22,9 +22,10 @@ # questions. # -ifeq ($(_MAKEBASE_GMK), ) - $(error You must include MakeBase.gmk prior to including ProcessMarkdown.gmk) -endif +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ include TextFileProcessing.gmk @@ -181,3 +182,8 @@ define SetupProcessMarkdownBody ) endif endef + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/TestFilesCompilation.gmk b/make/common/TestFilesCompilation.gmk index e09e144fa06..9e076590cf3 100644 --- a/make/common/TestFilesCompilation.gmk +++ b/make/common/TestFilesCompilation.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2025, 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,13 +23,10 @@ # questions. # -ifndef _TEST_FILES_COMPILATION_GMK -_TEST_FILES_COMPILATION_GMK := 1 - -ifeq ($(_MAKEBASE_GMK), ) - $(error You must include MakeBase.gmk prior to including TestFilesCompilation.gmk) -endif +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) +################################################################################ include JdkNativeCompilation.gmk @@ -142,4 +139,7 @@ define SetupTestFilesCompilationBody endef -endif # _TEST_FILES_COMPILATION_GMK +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/TextFileProcessing.gmk b/make/common/TextFileProcessing.gmk index 94aa259bebc..462d8756650 100644 --- a/make/common/TextFileProcessing.gmk +++ b/make/common/TextFileProcessing.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2025, 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,9 +23,10 @@ # questions. # -ifeq ($(_MAKEBASE_GMK), ) - $(error You must include MakeBase.gmk prior to including TextFileProcessing.gmk) -endif +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ # Helper function for SetupTextFileProcessing; adds a rule for a single file # to be processed. @@ -222,3 +223,8 @@ define SetupTextFileProcessingBody endif endif endef + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/Utils.gmk b/make/common/Utils.gmk index 26d05ed91be..03009ec3ca4 100644 --- a/make/common/Utils.gmk +++ b/make/common/Utils.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,11 @@ # questions. # -ifeq ($(_MAKEBASE_GMK), ) - $(error You must include MakeBase.gmk prior to including Utils.gmk) -endif +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) ################################################################################ -# # Basic utility functions available to MakeBase.gmk itself -# ################################################################################ # String equals @@ -398,3 +395,8 @@ FilterExcludedTranslations = \ ), \ $1 \ )) + +################################################################################ + +include MakeIncludeEnd.gmk +endif # include guard diff --git a/make/common/ZipArchive.gmk b/make/common/ZipArchive.gmk index 22fd6722fa2..e6bc99eb4c1 100644 --- a/make/common/ZipArchive.gmk +++ b/make/common/ZipArchive.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,13 @@ # questions. # -ifndef _ZIP_ARCHIVE_GMK -_ZIP_ARCHIVE_GMK := 1 +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ # Depends on build tools for MakeZipReproducible -include ../ToolsJdk.gmk - -ifeq ($(_MAKEBASE_GMK), ) - $(error You must include MakeBase.gmk prior to including ZipArchive.gmk) -endif +include $(TOPDIR)/make/ToolsJdk.gmk # Setup make rules for creating a zip archive. # @@ -192,4 +190,7 @@ define SetupZipArchiveBody $1 += $$($1_ZIP) endef -endif # _ZIP_ARCHIVE_GMK +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/modules/CopyCommon.gmk b/make/common/modules/CopyCommon.gmk index f4df1ce3a30..9dc03f08e59 100644 --- a/make/common/modules/CopyCommon.gmk +++ b/make/common/modules/CopyCommon.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,11 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ + include CopyFiles.gmk LIB_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE) @@ -88,3 +93,8 @@ define SetupCopyLegalFilesBody ) \ ) endef + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/modules/GendataCommon.gmk b/make/common/modules/GendataCommon.gmk index 0d5d39ea973..ad1d1c7f7a5 100644 --- a/make/common/modules/GendataCommon.gmk +++ b/make/common/modules/GendataCommon.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,15 @@ # questions. # -include JavaCompilation.gmk -include ToolsJdk.gmk +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) +################################################################################ + +include JavaCompilation.gmk +include $(TOPDIR)/make/ToolsJdk.gmk + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/modules/GensrcCommon.gmk b/make/common/modules/GensrcCommon.gmk index b14e96293ba..64d1f71d82e 100644 --- a/make/common/modules/GensrcCommon.gmk +++ b/make/common/modules/GensrcCommon.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,9 +23,14 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ + include Execute.gmk include TextFileProcessing.gmk -include ToolsJdk.gmk +include $(TOPDIR)/make/ToolsJdk.gmk ################################################################################ # Sets up a rule that creates a version.properties file in the gensrc output @@ -41,3 +46,8 @@ define SetupVersionProperties $$(strip $1) += $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/$$(strip $2) endef + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/modules/GensrcModuleInfo.gmk b/make/common/modules/GensrcModuleInfo.gmk index 56b5fb54eb8..f2097c34766 100644 --- a/make/common/modules/GensrcModuleInfo.gmk +++ b/make/common/modules/GensrcModuleInfo.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2025, 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,6 +23,8 @@ # questions. # +include MakeFileStart.gmk + ################################################################################ # This file makes modifications to module-info.java files based on the build # configuration. @@ -41,13 +43,8 @@ # # The modified module-info.java files are put in the gensrc directory where # they will automatically override the static versions in the src tree. -# ################################################################################ -default: all - -include $(SPEC) -include MakeBase.gmk include Modules.gmk ################################################################################ @@ -101,4 +98,4 @@ endif ################################################################################ -all: $(TARGETS) +include MakeFileEnd.gmk diff --git a/make/common/modules/GensrcProperties.gmk b/make/common/modules/GensrcProperties.gmk index 5db10af27b1..4d4fc0460f0 100644 --- a/make/common/modules/GensrcProperties.gmk +++ b/make/common/modules/GensrcProperties.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,8 +23,13 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ # This file defines macros that sets up rules for generating java classes # from resource bundle properties files. +################################################################################ include JavaCompilation.gmk @@ -142,3 +147,8 @@ define SetupCompilePropertiesBody $1 += $$($1_JAVAS) $$($1_TARGET) $$($1_HK) endef + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/modules/LauncherCommon.gmk b/make/common/modules/LauncherCommon.gmk index 32b14353b52..700c0de74d5 100644 --- a/make/common/modules/LauncherCommon.gmk +++ b/make/common/modules/LauncherCommon.gmk @@ -23,11 +23,16 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ + include CopyFiles.gmk include JdkNativeCompilation.gmk include Modules.gmk include ProcessMarkdown.gmk -include ToolsJdk.gmk +include $(TOPDIR)/make/ToolsJdk.gmk LAUNCHER_SRC := $(TOPDIR)/src/java.base/share/native/launcher LAUNCHER_CFLAGS += -I$(TOPDIR)/src/java.base/share/native/launcher \ @@ -234,3 +239,8 @@ ifeq ($(call isTargetOsType, unix)+$(MAKEFILE_PREFIX), true+Launcher) endif endif endif + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/modules/LibCommon.gmk b/make/common/modules/LibCommon.gmk index 4e3570d9cd7..0320450c934 100644 --- a/make/common/modules/LibCommon.gmk +++ b/make/common/modules/LibCommon.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,4 +23,14 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ + include JdkNativeCompilation.gmk + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/native/CompileFile.gmk b/make/common/native/CompileFile.gmk index 498a04a0fda..9c3d39d6edf 100644 --- a/make/common/native/CompileFile.gmk +++ b/make/common/native/CompileFile.gmk @@ -23,11 +23,15 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + ################################################################################ # This file contains functionality related to compiling a single native source # file (C, C++ or Objective-C) into an object file. It also harbours related # functionality for generating PCH (precompiled headers) and Windows resource # files. +################################################################################ ################################################################################ # Creates a recipe that creates a compile_commands.json fragment. Remove any @@ -352,3 +356,8 @@ define CreateWindowsResourceFile > $$($1_RES_DEPS_TARGETS_FILE) endif endef + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/native/DebugSymbols.gmk b/make/common/native/DebugSymbols.gmk index f7a5a4021e2..7f21fd8cbf3 100644 --- a/make/common/native/DebugSymbols.gmk +++ b/make/common/native/DebugSymbols.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,8 +23,12 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + ################################################################################ # This file contains functionality related to native debug symbol handling. +################################################################################ ################################################################################ define CreateDebugSymbols @@ -98,3 +102,8 @@ define CreateDebugSymbols endif # $1_DEBUG_SYMBOLS != false endif # COPY_DEBUG_SYMBOLS endef + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/native/Flags.gmk b/make/common/native/Flags.gmk index daa9a83d62b..747e090b816 100644 --- a/make/common/native/Flags.gmk +++ b/make/common/native/Flags.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,10 +23,14 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + ################################################################################ # This file contains functionality related to setting up compiler and linker # flags, based on various more abstract sources of compilation description, # like optimization level. +################################################################################ ################################################################################ # $1 is the prefix of the file to be compiled @@ -223,3 +227,8 @@ define SetupLinkerFlags $1_EXTRA_LIBS += $$($1_LIBS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LIBS_$(OPENJDK_TARGET_OS)) \ $$($1_LIBS_$(TOOLCHAIN_TYPE)) $$($1_LIBS_$(TOOLCHAIN_TYPE)_$(OPENJDK_TARGET_OS)) endef + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/native/Link.gmk b/make/common/native/Link.gmk index 1461f7302dc..7cf6c97b27c 100644 --- a/make/common/native/Link.gmk +++ b/make/common/native/Link.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,9 +23,13 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + ################################################################################ # This file contains functionality related to linking a native binary; # creating either a dynamic library, a static library or an executable. +################################################################################ ################################################################################ # GetEntitlementsFile @@ -212,3 +216,8 @@ define CreateDynamicLibraryOrExecutable $$(ECHO) $$($1_ALL_LD_ARGS) > $$@ endef + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/native/LinkMicrosoft.gmk b/make/common/native/LinkMicrosoft.gmk index 7c895a9507d..55f8e5684e7 100644 --- a/make/common/native/LinkMicrosoft.gmk +++ b/make/common/native/LinkMicrosoft.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,9 +23,13 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + ################################################################################ # This file contains functionality related to linking a native binary; # creating either a dynamic library, a static library or an executable. +################################################################################ ################################################################################ define CreateLinkedResultMicrosoft @@ -114,3 +118,8 @@ define CreateDynamicLibraryOrExecutableMicrosoft -outputresource:$$@;#1 endif endef + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/common/native/Paths.gmk b/make/common/native/Paths.gmk index e021a390289..ee097b2e134 100644 --- a/make/common/native/Paths.gmk +++ b/make/common/native/Paths.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,9 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + ################################################################################ # This file contains functionality related to handling paths for source files # and object files. This is complicated by the fact that we usually, but not @@ -31,6 +34,7 @@ # "@-files", which we normally use to avoid hitting command line length limits. # Finally this file contains functionality for locating all source code files # that should be included in the compilation. +################################################################################ ################################################################################ # When absolute paths are not allowed in the output, and the compiler does not @@ -240,3 +244,8 @@ define SetupObjectFileList endif endif endef + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/hotspot/CopyToExplodedJdk.gmk b/make/hotspot/CopyToExplodedJdk.gmk index 21d68c7b06f..2848ed24b93 100644 --- a/make/hotspot/CopyToExplodedJdk.gmk +++ b/make/hotspot/CopyToExplodedJdk.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2025, 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,6 +23,11 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ + include CopyFiles.gmk # Copy all built libraries into exploded jdk @@ -57,3 +62,8 @@ else TARGETS += $(COPY_LIBS) $(LINK_LIBS) endif + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/hotspot/HotspotCommon.gmk b/make/hotspot/HotspotCommon.gmk index 3aacdf30c4c..661af26221c 100644 --- a/make/hotspot/HotspotCommon.gmk +++ b/make/hotspot/HotspotCommon.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2025, 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,6 +23,11 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ + ifeq ($(JVM_VARIANT), ) $(error This makefile must be called with JVM_VARIANT set) endif @@ -46,3 +51,8 @@ check-jvm-feature = \ $(if $(filter-out $(VALID_JVM_FEATURES), $1), \ $(error Internal error: Invalid feature tested: $1)) \ $(if $(filter $1, $(JVM_FEATURES_$(JVM_VARIANT))), true, false)) + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/hotspot/gensrc/GenerateSources.gmk b/make/hotspot/gensrc/GenerateSources.gmk index 48fe7e25507..48715c8e71a 100644 --- a/make/hotspot/gensrc/GenerateSources.gmk +++ b/make/hotspot/gensrc/GenerateSources.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2025, 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,17 +23,16 @@ # questions. # -default: all +include MakeFileStart.gmk + +################################################################################ -include $(SPEC) -include MakeBase.gmk include Execute.gmk +include HotspotCommon.gmk include JavaCompilation.gmk include JdkNativeCompilation.gmk include TextFileProcessing.gmk -include HotspotCommon.gmk - # The real work is done in these files include gensrc/GensrcJfr.gmk @@ -41,8 +40,6 @@ include gensrc/GensrcAdlc.gmk include gensrc/GensrcDtrace.gmk include gensrc/GensrcJvmti.gmk -$(eval $(call IncludeCustomExtension, hotspot/gensrc/GenerateSources.gmk)) - # While technically the rules below are "gendata" which can be done in parallel # with native compilation, let's keep it here for simplicity. @@ -63,6 +60,6 @@ $(CHMOD_HOTSPOT_LAUNCHER): $(CREATE_HOTSPOT_LAUNCHER) TARGETS += $(CREATE_HOTSPOT_LAUNCHER) $(CHMOD_HOTSPOT_LAUNCHER) -all: $(TARGETS) +################################################################################ -.PHONY: all +include MakeFileEnd.gmk diff --git a/make/hotspot/gensrc/GensrcAdlc.gmk b/make/hotspot/gensrc/GensrcAdlc.gmk index 2be368e2694..4cecc3070e7 100644 --- a/make/hotspot/gensrc/GensrcAdlc.gmk +++ b/make/hotspot/gensrc/GensrcAdlc.gmk @@ -23,7 +23,10 @@ # questions. # -$(eval $(call IncludeCustomExtension, hotspot/gensrc/GensrcAdlc.gmk)) +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ ifeq ($(call check-jvm-feature, compiler2), true) @@ -260,3 +263,8 @@ ifeq ($(call check-jvm-feature, compiler2), true) TARGETS += $(ADLC_GENERATED_FILES) endif + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/hotspot/gensrc/GensrcDtrace.gmk b/make/hotspot/gensrc/GensrcDtrace.gmk index 0cc0ff11093..fd243ea8269 100644 --- a/make/hotspot/gensrc/GensrcDtrace.gmk +++ b/make/hotspot/gensrc/GensrcDtrace.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2025, 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,8 +23,12 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + ################################################################################ # Gensrc support for dtrace. The files generated here are included by dtrace.hpp +################################################################################ ifeq ($(call check-jvm-feature, dtrace), true) @@ -52,3 +56,8 @@ ifeq ($(call check-jvm-feature, dtrace), true) $(DTRACE_GENSRC_DIR)/%.h, $(wildcard $(DTRACE_SOURCE_DIR)/*.d)) endif + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/hotspot/gensrc/GensrcJfr.gmk b/make/hotspot/gensrc/GensrcJfr.gmk index 545c6876ad6..d1d9eb5ec77 100644 --- a/make/hotspot/gensrc/GensrcJfr.gmk +++ b/make/hotspot/gensrc/GensrcJfr.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2025, 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,9 +23,12 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + ################################################################################ # Setup make rules for JFR gensrc file generation. -# +################################################################################ include $(TOPDIR)/make/ToolsHotspot.gmk @@ -44,3 +47,8 @@ $(eval $(call SetupExecute, jfr_gen_headers, \ )) TARGETS += $(jfr_gen_headers) + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/hotspot/gensrc/GensrcJvmti.gmk b/make/hotspot/gensrc/GensrcJvmti.gmk index b9c2e38b820..19eb4540947 100644 --- a/make/hotspot/gensrc/GensrcJvmti.gmk +++ b/make/hotspot/gensrc/GensrcJvmti.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2025, 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,14 @@ # questions. # -include CopyFiles.gmk - -$(eval $(call IncludeCustomExtension, hotspot/gensrc/GensrcJvmti.gmk)) +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) ################################################################################ # Build tools needed for the JVMTI source code generation +################################################################################ + +include CopyFiles.gmk # FIXME: jvmtiGen.java should move to make/src, jvmtiEnvFill.java should be removed. JVMTI_TOOLS_SRCDIR := $(TOPDIR)/src/hotspot/share/prims @@ -120,3 +122,8 @@ ifeq ($(JVM_VARIANT), $(firstword $(JVM_VARIANTS))) TARGETS += $(COPY_JVMTI_H) endif + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/hotspot/lib/CompileGtest.gmk b/make/hotspot/lib/CompileGtest.gmk index 8e55c9b669b..5c576cbbf0d 100644 --- a/make/hotspot/lib/CompileGtest.gmk +++ b/make/hotspot/lib/CompileGtest.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2025, 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 @@ -22,8 +22,10 @@ # or visit www.oracle.com if you need additional information or have any # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) -$(eval $(call IncludeCustomExtension, hotspot/lib/CompileGtest.gmk)) +################################################################################ GTEST_TEST_SRC += $(TOPDIR)/test/hotspot/gtest @@ -159,3 +161,6 @@ $(eval $(call SetupJdkExecutable, BUILD_GTEST_LAUNCHER, \ TARGETS += $(BUILD_GTEST_LAUNCHER) ################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/hotspot/lib/CompileJvm.gmk b/make/hotspot/lib/CompileJvm.gmk index a5c8011344d..b2c59505f9a 100644 --- a/make/hotspot/lib/CompileJvm.gmk +++ b/make/hotspot/lib/CompileJvm.gmk @@ -23,6 +23,11 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ + include CopyFiles.gmk # Include support files that will setup compiler flags due to the selected @@ -359,3 +364,8 @@ ifneq ($(GENERATE_COMPILE_COMMANDS_ONLY), true) $(foreach o, $(BUILD_LIBJVM_ALL_OBJS), $(eval $(call SetupOperatorNewDeleteCheck,$o))) endif endif + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/hotspot/lib/CompileLibraries.gmk b/make/hotspot/lib/CompileLibraries.gmk index 03ba95cac3c..9563c36eec6 100644 --- a/make/hotspot/lib/CompileLibraries.gmk +++ b/make/hotspot/lib/CompileLibraries.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2025, 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,12 @@ # questions. # -default: all +include MakeFileStart.gmk -include $(SPEC) -include MakeBase.gmk -include JdkNativeCompilation.gmk +################################################################################ include HotspotCommon.gmk - +include JdkNativeCompilation.gmk include lib/CompileJvm.gmk ifneq ($(GTEST_FRAMEWORK_SRC), ) @@ -41,6 +39,6 @@ endif include CopyToExplodedJdk.gmk -all: $(TARGETS) +################################################################################ -.PHONY: all +include MakeFileEnd.gmk diff --git a/make/hotspot/lib/JvmFeatures.gmk b/make/hotspot/lib/JvmFeatures.gmk index 09a48508eff..0efb8671da8 100644 --- a/make/hotspot/lib/JvmFeatures.gmk +++ b/make/hotspot/lib/JvmFeatures.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2025, 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,11 +23,15 @@ # questions. # -$(eval $(call IncludeCustomExtension, hotspot/lib/JvmFeatures.gmk)) +################################################################################ + +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) ################################################################################ # Setup CFLAGS and EXCLUDES for the libjvm compilation, depending on which # jvm features are selected for this jvm variant. +################################################################################ ifeq ($(call check-jvm-feature, compiler1), true) JVM_CFLAGS_FEATURES += -DCOMPILER1 @@ -280,3 +284,8 @@ ifeq ($(call check-jvm-feature, opt-size), true) BUILD_LIBJVM_systemDictionary.cpp_CXXFLAGS := -fno-optimize-sibling-calls endif endif + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/hotspot/lib/JvmFlags.gmk b/make/hotspot/lib/JvmFlags.gmk index 5544f391d4a..97538da74c7 100644 --- a/make/hotspot/lib/JvmFlags.gmk +++ b/make/hotspot/lib/JvmFlags.gmk @@ -23,10 +23,12 @@ # questions. # -$(eval $(call IncludeCustomExtension, hotspot/lib/JvmFlags.gmk)) +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) ################################################################################ # Setup JVM_CFLAGS. These are shared between GensrcDtrace.gmk and CompileJvm.gmk. +################################################################################ # This variable may be added to by a custom extension JVM_SRC_ROOTS += $(TOPDIR)/src/hotspot @@ -99,3 +101,8 @@ endif ifeq ($(ENABLE_COMPATIBLE_CDS_ALIGNMENT), true) JVM_CFLAGS += -DCOMPATIBLE_CDS_ALIGNMENT endif + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/hotspot/lib/JvmOverrideFiles.gmk b/make/hotspot/lib/JvmOverrideFiles.gmk index 20721692ec3..3eedb64a597 100644 --- a/make/hotspot/lib/JvmOverrideFiles.gmk +++ b/make/hotspot/lib/JvmOverrideFiles.gmk @@ -23,11 +23,13 @@ # questions. # -$(eval $(call IncludeCustomExtension, hotspot/lib/JvmOverrideFiles.gmk)) +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) ################################################################################ # This file contains explicit overrides of CFLAGS and/or precompiled header # status for individual files on specific platforms. +################################################################################ ifeq ($(TOOLCHAIN_TYPE), gcc) BUILD_LIBJVM_vmStructs.cpp_CXXFLAGS := -fno-var-tracking-assignments @@ -146,3 +148,8 @@ else ifeq ($(call isTargetOs, windows), true) BUILD_LIBJVM_jvmciCompilerToVMInit.cpp_OPTIMIZATION := NONE endif + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/hotspot/test/GtestImage.gmk b/make/hotspot/test/GtestImage.gmk index 3d6290837ee..524c0b36be8 100644 --- a/make/hotspot/test/GtestImage.gmk +++ b/make/hotspot/test/GtestImage.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2025, 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,10 +23,9 @@ # questions. # -default: all +include MakeFileStart.gmk -include $(SPEC) -include MakeBase.gmk +################################################################################ include CopyFiles.gmk @@ -70,4 +69,6 @@ ifeq ($(call isTargetOs, windows), true) ) endif -all: $(TARGETS) +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/ide/eclipse/CreateWorkspace.gmk b/make/ide/eclipse/CreateWorkspace.gmk index 50d04ad87af..052693dbb2d 100644 --- a/make/ide/eclipse/CreateWorkspace.gmk +++ b/make/ide/eclipse/CreateWorkspace.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2025, 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,13 +23,13 @@ # questions. # -default: all +include MakeFileStart.gmk -include $(SPEC) -include MakeBase.gmk +################################################################################ + +include Modules.gmk include TextFileProcessing.gmk include Utils.gmk -include Modules.gmk JVM_VARIANT := $(JVM_VARIANT_MAIN) include hotspot/HotspotCommon.gmk @@ -356,4 +356,6 @@ else )) endif -all: $(TARGETS) +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/ide/idea/jdk/IdeaGenConfig.gmk b/make/ide/idea/jdk/IdeaGenConfig.gmk index 8318463776f..5f8afc47117 100644 --- a/make/ide/idea/jdk/IdeaGenConfig.gmk +++ b/make/ide/idea/jdk/IdeaGenConfig.gmk @@ -23,10 +23,9 @@ # questions. # -default: all +include MakeFileStart.gmk -include $(SPEC) -include MakeBase.gmk +################################################################################ include Modules.gmk @@ -54,4 +53,8 @@ idea: all: idea -.PHONY: default all idea +.PHONY: idea + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/ide/visualstudio/hotspot/CreateVSProject.gmk b/make/ide/visualstudio/hotspot/CreateVSProject.gmk index db48cdea9f7..b2afbe2b9bc 100644 --- a/make/ide/visualstudio/hotspot/CreateVSProject.gmk +++ b/make/ide/visualstudio/hotspot/CreateVSProject.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2025, 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,13 +23,12 @@ # questions. # -# This must be the first rule -default: all +include MakeFileStart.gmk + +################################################################################ -include $(SPEC) -include MakeBase.gmk -include JavaCompilation.gmk include Execute.gmk +include JavaCompilation.gmk ifeq ($(call isTargetOs, windows), true) # The next part is a bit hacky. We include the CompileJvm.gmk to be @@ -144,11 +143,11 @@ ifeq ($(call isTargetOs, windows), true) TARGETS += $(vcproj_file_TARGET) - all: $(TARGETS) - else all: $(info Hotspot Visual Studio generation only supported on Windows) endif -.PHONY: all +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/ide/vscode/hotspot/CreateVSCodeProject.gmk b/make/ide/vscode/hotspot/CreateVSCodeProject.gmk index 54c98a3eeb6..11f25c152f6 100644 --- a/make/ide/vscode/hotspot/CreateVSCodeProject.gmk +++ b/make/ide/vscode/hotspot/CreateVSCodeProject.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2019, 2025, 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,11 +23,7 @@ # questions. # -# This must be the first rule -default: all - -include $(SPEC) -include MakeBase.gmk +include MakeFileStart.gmk ################################################################################ # SedEscape @@ -115,6 +111,8 @@ $(OUTPUTDIR)/.vscode/launch.json: TARGETS := $(OUTPUTDIR)/jdk.code-workspace $(OUTPUTDIR)/.vscode/tasks.json \ $(OUTPUTDIR)/.vscode/launch.json -all: $(TARGETS) +.PHONY: $(TARGETS) -.PHONY: all $(TARGETS) +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/ide/xcode/hotspot/CreateXcodeProject.gmk b/make/ide/xcode/hotspot/CreateXcodeProject.gmk index 1f92ba0716f..3476078b243 100644 --- a/make/ide/xcode/hotspot/CreateXcodeProject.gmk +++ b/make/ide/xcode/hotspot/CreateXcodeProject.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, 2025, 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,11 +23,10 @@ # questions. # -# This must be the first rule -default: all +include MakeFileStart.gmk + +################################################################################ -include $(SPEC) -include MakeBase.gmk include CopyFiles.gmk include Execute.gmk include JavaCompilation.gmk @@ -100,8 +99,6 @@ ifeq ($(call isTargetOs, macosx), true) build: $(build_xcode_project) $(copy_xcode_project) open: $(open_xcode_project) - - all: $(TARGETS) else build: open: @@ -109,4 +106,8 @@ else $(info Xcode projects are only supported on macOS) endif -.PHONY: default all build open +.PHONY: build open + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/modules/java.base/Copy.gmk b/make/modules/java.base/Copy.gmk index 7e3a0e9c3ab..e33676529cd 100644 --- a/make/modules/java.base/Copy.gmk +++ b/make/modules/java.base/Copy.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,12 @@ # questions. # +################################################################################ + include CopyCommon.gmk include Modules.gmk include TextFileProcessing.gmk -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, modules/java.base/Copy.gmk)) - -################################################################################ - ifeq ($(call isTargetOs, aix), true) TZMAPPINGS_SRC := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf diff --git a/make/modules/java.base/Gendata.gmk b/make/modules/java.base/Gendata.gmk index 9e5cfe2d0fc..edb8e050bbf 100644 --- a/make/modules/java.base/Gendata.gmk +++ b/make/modules/java.base/Gendata.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,17 +23,14 @@ # questions. # +################################################################################ + include GendataCommon.gmk - -include gendata/GendataBreakIterator.gmk - -include gendata/GendataTZDB.gmk - include gendata/GendataBlockedCerts.gmk - +include gendata/GendataBreakIterator.gmk include gendata/GendataCryptoPolicy.gmk - include gendata/GendataPublicSuffixList.gmk +include gendata/GendataTZDB.gmk ################################################################################ diff --git a/make/modules/java.base/Gensrc.gmk b/make/modules/java.base/Gensrc.gmk index 6eae7edd078..c974db7b6c6 100644 --- a/make/modules/java.base/Gensrc.gmk +++ b/make/modules/java.base/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,18 +23,20 @@ # questions. # +################################################################################ + include GensrcCommon.gmk -include gensrc/GensrcCharacterData.gmk -include gensrc/GensrcMisc.gmk -include gensrc/GensrcCharsetMapping.gmk -include gensrc/GensrcCharsetCoder.gmk include gensrc/GensrcBuffer.gmk +include gensrc/GensrcCharacterData.gmk +include gensrc/GensrcCharsetCoder.gmk +include gensrc/GensrcCharsetMapping.gmk include gensrc/GensrcExceptions.gmk -include gensrc/GensrcVarHandles.gmk +include gensrc/GensrcMisc.gmk include gensrc/GensrcModuleLoaderMap.gmk -include gensrc/GensrcScopedMemoryAccess.gmk include gensrc/GensrcRegex.gmk +include gensrc/GensrcScopedMemoryAccess.gmk +include gensrc/GensrcVarHandles.gmk ################################################################################ @@ -113,3 +115,5 @@ $(INTPOLY_GEN_DONE): $(INTPLOY_HEADER) $(BUILD_TOOLS_JDK) $(TOUCH) $@ TARGETS += $(INTPOLY_GEN_DONE) + +################################################################################ diff --git a/make/modules/java.base/Java.gmk b/make/modules/java.base/Java.gmk index 5820c280fe9..84344f93409 100644 --- a/make/modules/java.base/Java.gmk +++ b/make/modules/java.base/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + # The base module should be built with all warnings enabled. When a # new warning is added to javac, it can be temporarily added to the # disabled warnings list. @@ -57,3 +59,5 @@ ifeq ($(call isTargetOs, windows), true) sun/nio/ch/SimpleAsynchronousFileChannelImpl.java \ # endif + +################################################################################ diff --git a/make/modules/java.base/Launcher.gmk b/make/modules/java.base/Launcher.gmk index 246767f3937..c249656f188 100644 --- a/make/modules/java.base/Launcher.gmk +++ b/make/modules/java.base/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,10 +23,9 @@ # questions. # -include LauncherCommon.gmk +################################################################################ -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, modules/java.base/Launcher.gmk)) +include LauncherCommon.gmk JAVA_VERSION_INFO_RESOURCE := \ $(TOPDIR)/src/java.base/windows/native/launcher/java.rc @@ -103,3 +102,5 @@ ifeq ($(call isTargetOsType, unix), true) TARGETS += $(BUILD_JSPAWNHELPER) endif + +################################################################################ diff --git a/make/modules/java.base/Lib.gmk b/make/modules/java.base/Lib.gmk index 2c3df4622b1..771b94525aa 100644 --- a/make/modules/java.base/Lib.gmk +++ b/make/modules/java.base/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,11 @@ # questions. # +################################################################################ + include CopyFiles.gmk include LibCommon.gmk -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, modules/java.base/Lib.gmk)) - # Prepare the find cache. $(call FillFindCache, $(wildcard $(TOPDIR)/src/java.base/*/native)) @@ -200,3 +199,5 @@ ifeq ($(call isTargetOs, linux)+$(call isTargetCpu, x86_64)+$(INCLUDE_COMPILER2) TARGETS += $(BUILD_LIBSIMD_SORT) endif + +################################################################################ diff --git a/make/modules/java.base/gendata/GendataBlockedCerts.gmk b/make/modules/java.base/gendata/GendataBlockedCerts.gmk index b6149b457cd..c26b4cdeed7 100644 --- a/make/modules/java.base/gendata/GendataBlockedCerts.gmk +++ b/make/modules/java.base/gendata/GendataBlockedCerts.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,6 +23,11 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ + GENDATA_BLOCKED_CERTS_SRC += $(MODULE_SRC)/share/data/blockedcertsconverter/blocked.certs.pem GENDATA_BLOCKED_CERTS := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/security/blocked.certs @@ -32,3 +37,8 @@ $(GENDATA_BLOCKED_CERTS): $(BUILD_TOOLS_JDK) $(GENDATA_BLOCKED_CERTS_SRC) ($(CAT) $(GENDATA_BLOCKED_CERTS_SRC) | $(TOOL_BLOCKED_CERTS) > $@) || exit 1 TARGETS += $(GENDATA_BLOCKED_CERTS) + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.base/gendata/GendataBreakIterator.gmk b/make/modules/java.base/gendata/GendataBreakIterator.gmk index 857ce2b7c34..7aa26d5490b 100644 --- a/make/modules/java.base/gendata/GendataBreakIterator.gmk +++ b/make/modules/java.base/gendata/GendataBreakIterator.gmk @@ -1,5 +1,5 @@ -# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,9 +23,12 @@ # questions. # -# +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ # Make file for generating BreakIterator data files. -# +################################################################################ # input # @@ -111,3 +114,8 @@ $(LD_DATA_PKG_DIR)/_the.bifiles_th: $(BUILD_TOOLS_JDK) $(UNICODEDATA) \ $(TOUCH) $@ TARGETS += $(BIFILES) $(BIFILES_TH) + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.base/gendata/GendataCryptoPolicy.gmk b/make/modules/java.base/gendata/GendataCryptoPolicy.gmk index c63b36fe058..f4774cb1f28 100644 --- a/make/modules/java.base/gendata/GendataCryptoPolicy.gmk +++ b/make/modules/java.base/gendata/GendataCryptoPolicy.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2025, 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,6 +23,11 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ + # # In pre-JDK9 releases, Oracle JDK has had a separately downloadable set # of policy files which has been a nightmare for deployment. @@ -37,12 +42,6 @@ # determines the default directory/policy. # -default: all - -include $(SPEC) -include MakeBase.gmk - - ################################################################################ POLICY_DIR := $(SUPPORT_OUTPUTDIR)/modules_conf/java.base/security/policy LIMITED_POLICY_DIR := $(POLICY_DIR)/limited @@ -70,3 +69,6 @@ TARGETS += \ $(UNLIMITED_POLICY_DIR)/default_local.policy \ ################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.base/gendata/GendataPublicSuffixList.gmk b/make/modules/java.base/gendata/GendataPublicSuffixList.gmk index 189fccf0c0d..563b728c38d 100644 --- a/make/modules/java.base/gendata/GendataPublicSuffixList.gmk +++ b/make/modules/java.base/gendata/GendataPublicSuffixList.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, 2025, 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,10 @@ # questions. # -include $(SPEC) +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ GENDATA_PUBLICSUFFIXLIST_SRC += $(MODULE_SRC)/share/data/publicsuffixlist/public_suffix_list.dat GENDATA_PUBLICSUFFIXLIST := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/security/public_suffix_list.dat @@ -36,3 +39,8 @@ $(GENDATA_PUBLICSUFFIXLIST): $(GENDATA_PUBLICSUFFIXLIST_SRC) $(BUILD_TOOLS_JDK) $(CHMOD) 444 $@ TARGETS += $(GENDATA_PUBLICSUFFIXLIST) + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.base/gendata/GendataTZDB.gmk b/make/modules/java.base/gendata/GendataTZDB.gmk index fbdd9ff3749..4674c687a24 100644 --- a/make/modules/java.base/gendata/GendataTZDB.gmk +++ b/make/modules/java.base/gendata/GendataTZDB.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2025, 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,6 +23,11 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ + GENDATA_TZDB := # @@ -40,3 +45,8 @@ $(GENDATA_TZDB_DAT): $(TZDATA_TZFILES) $(TOOL_TZDB) -srcdir $(TZDATA_DIR) -dstfile $(GENDATA_TZDB_DAT) $(TZDATA_TZFILE) TARGETS += $(GENDATA_TZDB_DAT) + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.base/gensrc/GensrcBuffer.gmk b/make/modules/java.base/gensrc/GensrcBuffer.gmk index fe417e9c423..f769a8e61e0 100644 --- a/make/modules/java.base/gensrc/GensrcBuffer.gmk +++ b/make/modules/java.base/gensrc/GensrcBuffer.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,11 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ + GENSRC_BUFFER := GENSRC_BUFFER_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio @@ -380,3 +385,8 @@ $(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferRL,$(BYTE_X_BUF), type := d $(GENSRC_BUFFER): $(BUILD_TOOLS_JDK) TARGETS += $(GENSRC_BUFFER) + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.base/gensrc/GensrcCharacterData.gmk b/make/modules/java.base/gensrc/GensrcCharacterData.gmk index beee18000f1..c05b126299b 100644 --- a/make/modules/java.base/gensrc/GensrcCharacterData.gmk +++ b/make/modules/java.base/gensrc/GensrcCharacterData.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,9 +23,12 @@ # questions. # -# +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ # Rules to create $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/lang/CharacterData*.java -# +################################################################################ GENSRC_CHARACTERDATA := @@ -66,3 +69,8 @@ $(eval $(call SetupCharacterData,CharacterData0E, -string -plane 14, 11 4 1)) $(GENSRC_CHARACTERDATA): $(BUILD_TOOLS_JDK) TARGETS += $(GENSRC_CHARACTERDATA) + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.base/gensrc/GensrcCharsetCoder.gmk b/make/modules/java.base/gensrc/GensrcCharsetCoder.gmk index 2940ba42319..3e654d0b7a8 100644 --- a/make/modules/java.base/gensrc/GensrcCharsetCoder.gmk +++ b/make/modules/java.base/gensrc/GensrcCharsetCoder.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,11 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ + GENSRC_CHARSETCODER := GENSRC_CHARSETCODER_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio/charset @@ -108,3 +113,8 @@ GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java $(GENSRC_CHARSETCODER): $(BUILD_TOOLS_JDK) TARGETS += $(GENSRC_CHARSETCODER) + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.base/gensrc/GensrcCharsetMapping.gmk b/make/modules/java.base/gensrc/GensrcCharsetMapping.gmk index b9a8f269a7d..8a9b9dfee5c 100644 --- a/make/modules/java.base/gensrc/GensrcCharsetMapping.gmk +++ b/make/modules/java.base/gensrc/GensrcCharsetMapping.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,11 +23,14 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + ################################################################################ -# # Generate StandardCharsets.java and individul sun.nio.cs charset class using # the charsetmapping tool -# +################################################################################ + CHARSET_DATA_DIR := $(TOPDIR)/make/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 @@ -54,3 +57,8 @@ $(CHARSET_DONE_BASE)-stdcs: $(CHARSET_DATA_DIR)/charsets \ $(TOUCH) '$@' TARGETS += $(CHARSET_DONE_BASE)-stdcs + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.base/gensrc/GensrcExceptions.gmk b/make/modules/java.base/gensrc/GensrcExceptions.gmk index 9fa5d48009b..baa61596d6b 100644 --- a/make/modules/java.base/gensrc/GensrcExceptions.gmk +++ b/make/modules/java.base/gensrc/GensrcExceptions.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,11 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ + GENSRC_EXCEPTIONS := GENSRC_EXCEPTIONS_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio @@ -45,3 +50,8 @@ GENSRC_EXCEPTIONS += $(foreach D, $(GENSRC_EXCEPTIONS_SRC_DIRS), $(GENSRC_EXCEPT $(GENSRC_EXCEPTIONS): $(BUILD_TOOLS_JDK) TARGETS += $(GENSRC_EXCEPTIONS) + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.base/gensrc/GensrcMisc.gmk b/make/modules/java.base/gensrc/GensrcMisc.gmk index a5bbd37321c..edb5e8bc58e 100644 --- a/make/modules/java.base/gensrc/GensrcMisc.gmk +++ b/make/modules/java.base/gensrc/GensrcMisc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,11 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ + ################################################################################ # Install the launcher name, release version string, full version # string and the runtime name into the VersionProps.java file. @@ -154,3 +159,8 @@ ifneq ($(wildcard $(TOPDIR)/src/java.base/share/classes/javax/crypto/JceSecurity TARGETS += $(BUILD_JCESECURITY_JAVA) endif + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.base/gensrc/GensrcModuleLoaderMap.gmk b/make/modules/java.base/gensrc/GensrcModuleLoaderMap.gmk index ce91cdc861c..13b985df3ef 100644 --- a/make/modules/java.base/gensrc/GensrcModuleLoaderMap.gmk +++ b/make/modules/java.base/gensrc/GensrcModuleLoaderMap.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2025, 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,6 +23,11 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ + include Modules.gmk $(eval $(call ReadImportMetaData)) @@ -58,3 +63,6 @@ $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/module/ModuleLoaderMap.java: TARGETS += $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/module/ModuleLoaderMap.java ################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.base/gensrc/GensrcRegex.gmk b/make/modules/java.base/gensrc/GensrcRegex.gmk index 6384d36de59..c46a029e2c2 100644 --- a/make/modules/java.base/gensrc/GensrcRegex.gmk +++ b/make/modules/java.base/gensrc/GensrcRegex.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, 2025, 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,10 +23,13 @@ # questions. # -# +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ # Rules to create java files under # $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/util/regex/ -# +################################################################################ GENSRC_INDICCONJUNCTBREAK := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/util/regex/IndicConjunctBreak.java @@ -44,3 +47,8 @@ $(GENSRC_INDICCONJUNCTBREAK): $(BUILD_TOOLS_JDK) $(INDICCONJUNCTBREAKTEMP) $(IND $(INDICCONJUNCTBREAKPARAMS) TARGETS += $(GENSRC_INDICCONJUNCTBREAK) + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.base/gensrc/GensrcScopedMemoryAccess.gmk b/make/modules/java.base/gensrc/GensrcScopedMemoryAccess.gmk index 54fea77571e..1ed3fb3db79 100644 --- a/make/modules/java.base/gensrc/GensrcScopedMemoryAccess.gmk +++ b/make/modules/java.base/gensrc/GensrcScopedMemoryAccess.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,6 +23,11 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ + SCOPED_MEMORY_ACCESS_GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/misc SCOPED_MEMORY_ACCESS_SRC_DIR := $(MODULE_SRC)/share/classes/jdk/internal/misc SCOPED_MEMORY_ACCESS_TEMPLATE := $(SCOPED_MEMORY_ACCESS_SRC_DIR)/X-ScopedMemoryAccess.java.template @@ -149,3 +154,8 @@ $(SCOPED_MEMORY_ACCESS_DEST): $(BUILD_TOOLS_JDK) $(SCOPED_MEMORY_ACCESS_TEMPLATE $(PRINTF) "}\n" >> $(SCOPED_MEMORY_ACCESS_DEST) TARGETS += $(SCOPED_MEMORY_ACCESS_DEST) + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.base/gensrc/GensrcVarHandles.gmk b/make/modules/java.base/gensrc/GensrcVarHandles.gmk index fe4c4e97648..e2f5664dec6 100644 --- a/make/modules/java.base/gensrc/GensrcVarHandles.gmk +++ b/make/modules/java.base/gensrc/GensrcVarHandles.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2025, 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,6 +23,11 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ + GENSRC_VARHANDLES := VARHANDLES_GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/invoke @@ -277,3 +282,8 @@ $(foreach t, $(VARHANDLES_MEMORY_SEGMENT_TYPES), \ $(eval $(call GenerateVarHandleMemorySegment,VAR_HANDLE_MEMORY_SEGMENT_$t,$t))) TARGETS += $(GENSRC_VARHANDLES) + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.base/lib/CoreLibraries.gmk b/make/modules/java.base/lib/CoreLibraries.gmk index 61ac495968a..b76394d081f 100644 --- a/make/modules/java.base/lib/CoreLibraries.gmk +++ b/make/modules/java.base/lib/CoreLibraries.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,11 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ + ################################################################################ ## Build libverify ################################################################################ @@ -192,3 +197,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJLI, \ )) TARGETS += $(BUILD_LIBJLI) + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.compiler/Java.gmk b/make/modules/java.compiler/Java.gmk index 04f31a9bc66..cb720672639 100644 --- a/make/modules/java.compiler/Java.gmk +++ b/make/modules/java.compiler/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + # To the extent technically possible, this module should be built with # -Werror and all lint warnings enabled. In particular, # DISABLED_WARNINGS_java should not be augmented. @@ -31,3 +33,5 @@ DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' EXCLUDES += javax/tools/snippet-files + +################################################################################ diff --git a/make/modules/java.datatransfer/Java.gmk b/make/modules/java.datatransfer/Java.gmk index 6c5332f6457..47eb6e26577 100644 --- a/make/modules/java.datatransfer/Java.gmk +++ b/make/modules/java.datatransfer/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,8 +23,12 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += this-escape DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' COPY += flavormap.properties + +################################################################################ diff --git a/make/modules/java.desktop/Copy.gmk b/make/modules/java.desktop/Copy.gmk index 4232e62552c..9acca9f688c 100644 --- a/make/modules/java.desktop/Copy.gmk +++ b/make/modules/java.desktop/Copy.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,11 +23,11 @@ # questions. # +################################################################################ + include CopyCommon.gmk include Modules.gmk -################################################################################ - $(CONF_DST_DIR)/sound.properties: $(TOPDIR)/src/java.desktop/share/conf/sound.properties $(call install-file) diff --git a/make/modules/java.desktop/Gendata.gmk b/make/modules/java.desktop/Gendata.gmk index a3f0c926ca6..3df4610bd1d 100644 --- a/make/modules/java.desktop/Gendata.gmk +++ b/make/modules/java.desktop/Gendata.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,8 +23,10 @@ # questions. # +################################################################################ + include GendataCommon.gmk - include gendata/GendataFontConfig.gmk - include gendata/GendataHtml32dtd.gmk + +################################################################################ diff --git a/make/modules/java.desktop/Gensrc.gmk b/make/modules/java.desktop/Gensrc.gmk index f7609107973..ceeade7a96d 100644 --- a/make/modules/java.desktop/Gensrc.gmk +++ b/make/modules/java.desktop/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,10 +23,9 @@ # questions. # -include GensrcCommon.gmk +################################################################################ -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, modules/java.desktop/Gensrc.gmk)) +include GensrcCommon.gmk ifeq ($(call isTargetOs, windows), false) include gensrc/GensrcIcons.gmk @@ -77,3 +76,5 @@ $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \ )) TARGETS += $(COMPILE_PROPERTIES) + +################################################################################ diff --git a/make/modules/java.desktop/Java.gmk b/make/modules/java.desktop/Java.gmk index a13b4b1ba35..61c7fa44e0e 100644 --- a/make/modules/java.desktop/Java.gmk +++ b/make/modules/java.desktop/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += dangling-doc-comments lossy-conversions this-escape DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' @@ -139,3 +141,5 @@ EXCLUDE_FILES += \ javax/swing/plaf/nimbus/SplitPanePainter.java \ javax/swing/plaf/nimbus/TabbedPanePainter.java \ # + +################################################################################ diff --git a/make/modules/java.desktop/Lib.gmk b/make/modules/java.desktop/Lib.gmk index 18f386ae6b4..830e0553c39 100644 --- a/make/modules/java.desktop/Lib.gmk +++ b/make/modules/java.desktop/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,11 @@ # questions. # +################################################################################ + include LibCommon.gmk include Execute.gmk -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, modules/java.desktop/Lib.gmk)) - # Prepare the find cache. $(call FillFindCache, $(wildcard $(TOPDIR)/src/java.desktop/*/native)) @@ -131,3 +130,5 @@ ifeq ($(call isTargetOs, macosx), true) TARGETS += $(BUILD_LIBOSX) endif + +################################################################################ diff --git a/make/modules/java.desktop/gendata/GendataFontConfig.gmk b/make/modules/java.desktop/gendata/GendataFontConfig.gmk index 92a64b986e1..572adb4376e 100644 --- a/make/modules/java.desktop/gendata/GendataFontConfig.gmk +++ b/make/modules/java.desktop/gendata/GendataFontConfig.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,11 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ + FONTCONFIG_DATA_DIR := $(MODULE_SRC)/$(OPENJDK_TARGET_OS)/data/fontconfig FONTCONFIG_SRC_FILE := $(FONTCONFIG_DATA_DIR)/fontconfig.properties @@ -55,3 +60,8 @@ ifneq ($(wildcard $(FONTCONFIG_SRC_FILE)), ) TARGETS += $(FONTCONFIG_OUT_BIN_FILE) endif + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.desktop/gendata/GendataHtml32dtd.gmk b/make/modules/java.desktop/gendata/GendataHtml32dtd.gmk index bf3e0a1b4ed..2c5899c91c2 100644 --- a/make/modules/java.desktop/gendata/GendataHtml32dtd.gmk +++ b/make/modules/java.desktop/gendata/GendataHtml32dtd.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,11 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ + GENDATA_HTML32DTD := HTML32DTD = $(JDK_OUTPUTDIR)/modules/java.desktop/javax/swing/text/html/parser/html32.bdtd @@ -33,3 +38,8 @@ $(HTML32DTD): $(BUILD_TOOLS_JDK) ($(TOOL_DTDBUILDER) html32 > $@) || exit 1 TARGETS += $(HTML32DTD) + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.desktop/gensrc/GensrcIcons.gmk b/make/modules/java.desktop/gensrc/GensrcIcons.gmk index 4e572211334..bc7f580fe76 100644 --- a/make/modules/java.desktop/gensrc/GensrcIcons.gmk +++ b/make/modules/java.desktop/gensrc/GensrcIcons.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,11 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ + GENSRC_AWT_ICONS := GENSRC_AWT_ICONS_SRC := GENSRC_AWT_ICONS_TMP := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop @@ -108,3 +113,8 @@ ifeq ($(call isTargetOs, macosx), true) TARGETS += $(GENSRC_OSX_ICONS) endif + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.desktop/gensrc/GensrcSwing.gmk b/make/modules/java.desktop/gensrc/GensrcSwing.gmk index abd428f3641..a59499e9b1a 100644 --- a/make/modules/java.desktop/gensrc/GensrcSwing.gmk +++ b/make/modules/java.desktop/gensrc/GensrcSwing.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,9 +23,13 @@ # questions. # -# +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ # Generate java files for javax.swing.plaf package -# +################################################################################ + NIMBUS_PACKAGE = javax.swing.plaf NIMBUS_GENSRC_DIR = $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/javax/swing/plaf/nimbus NIMBUS_SKIN_FILE = $(MODULE_SRC)/share/classes/javax/swing/plaf/nimbus/skin.laf @@ -41,3 +45,8 @@ $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated_nimbus: $(NIMBUS_SKIN_FI GENSRC_SWING_NIMBUS := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated_nimbus TARGETS += $(GENSRC_SWING_NIMBUS) + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.desktop/gensrc/GensrcX11Wrappers.gmk b/make/modules/java.desktop/gensrc/GensrcX11Wrappers.gmk index 25402ad035a..fa271fc55ff 100644 --- a/make/modules/java.desktop/gensrc/GensrcX11Wrappers.gmk +++ b/make/modules/java.desktop/gensrc/GensrcX11Wrappers.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2025, 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,8 +23,13 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ # Generate java sources using the X11 offsets that are precalculated in files # src/java.desktop/unix/data/x11wrappergen/sizes-
.txt. +################################################################################ # Put the generated Java classes used to interface X11 from awt here. GENSRC_X11WRAPPERS_OUTPUTDIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/sun/awt/X11 @@ -45,3 +50,8 @@ $(eval $(call SetupExecute, gen_x11wrappers, \ )) TARGETS += $(gen_x11wrappers_TARGET) + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.desktop/lib/AwtLibraries.gmk b/make/modules/java.desktop/lib/AwtLibraries.gmk index 5ba7c819008..4d18038f2aa 100644 --- a/make/modules/java.desktop/lib/AwtLibraries.gmk +++ b/make/modules/java.desktop/lib/AwtLibraries.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,16 @@ # questions. # -include CopyFiles.gmk +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) ################################################################################ # This file will build all AWT/2D native libraries with "awt" in the name. # Note that this does not imply that the code they bring in belong to AWT. # This split is purely made to keep the size of the Makefiles reasonable. +################################################################################ + +include CopyFiles.gmk LIBAWT_DEFAULT_HEADER_DIRS := \ common/awt/utility \ @@ -437,3 +441,8 @@ ifeq ($(call isTargetOs, windows), true) TARGETS += $(COPY_JAWT_LIB) endif + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.desktop/lib/ClientLibraries.gmk b/make/modules/java.desktop/lib/ClientLibraries.gmk index 221d7578980..8733a8617c9 100644 --- a/make/modules/java.desktop/lib/ClientLibraries.gmk +++ b/make/modules/java.desktop/lib/ClientLibraries.gmk @@ -23,11 +23,15 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + ################################################################################ # This file will build all AWT/2D native libraries that does not have "awt" in # the name. Note that this does not imply anything about the logical ownership # of the code they compile. # This split is purely made to keep the size of the Makefiles reasonable. +################################################################################ ################################################################################ ## Build libmlib_image @@ -467,3 +471,8 @@ ifeq ($(call isTargetOs, macosx), true) $(BUILD_LIBOSXUI): $(SHADERS_LIB) endif + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk diff --git a/make/modules/java.instrument/Java.gmk b/make/modules/java.instrument/Java.gmk index f49e425718e..6e5ea0e2c73 100644 --- a/make/modules/java.instrument/Java.gmk +++ b/make/modules/java.instrument/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,5 +23,9 @@ # questions. # +################################################################################ + DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' + +################################################################################ diff --git a/make/modules/java.instrument/Lib.gmk b/make/modules/java.instrument/Lib.gmk index 675c1d8ccd3..0d1a3d81b50 100644 --- a/make/modules/java.instrument/Lib.gmk +++ b/make/modules/java.instrument/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LibCommon.gmk ################################################################################ @@ -48,3 +50,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBINSTRUMENT, \ )) TARGETS += $(BUILD_LIBINSTRUMENT) + +################################################################################ diff --git a/make/modules/java.logging/Copy.gmk b/make/modules/java.logging/Copy.gmk index 8c9e677b861..36d70ed5555 100644 --- a/make/modules/java.logging/Copy.gmk +++ b/make/modules/java.logging/Copy.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,10 +23,10 @@ # questions. # -include CopyCommon.gmk - ################################################################################ +include CopyCommon.gmk + LOGGING_LIB_SRC := $(TOPDIR)/src/java.logging/share/conf $(CONF_DST_DIR)/logging.properties: $(LOGGING_LIB_SRC)/logging.properties diff --git a/make/modules/java.logging/Gensrc.gmk b/make/modules/java.logging/Gensrc.gmk index c28edd822b6..3b166e0f0a6 100644 --- a/make/modules/java.logging/Gensrc.gmk +++ b/make/modules/java.logging/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,10 +23,9 @@ # questions. # -include GensrcCommon.gmk - ################################################################################ +include GensrcCommon.gmk include GensrcProperties.gmk $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \ @@ -35,3 +34,5 @@ $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \ )) TARGETS += $(COMPILE_PROPERTIES) + +################################################################################ diff --git a/make/modules/java.logging/Java.gmk b/make/modules/java.logging/Java.gmk index 781370b2e18..ab4e1b6144e 100644 --- a/make/modules/java.logging/Java.gmk +++ b/make/modules/java.logging/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,11 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += this-escape DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' + +################################################################################ diff --git a/make/modules/java.management.rmi/Java.gmk b/make/modules/java.management.rmi/Java.gmk index 4579fea6843..11f99c26bd3 100644 --- a/make/modules/java.management.rmi/Java.gmk +++ b/make/modules/java.management.rmi/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,5 +23,9 @@ # questions. # +################################################################################ + DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:javax.*' + +################################################################################ diff --git a/make/modules/java.management/Java.gmk b/make/modules/java.management/Java.gmk index 7a337946cd7..44e3f328c7f 100644 --- a/make/modules/java.management/Java.gmk +++ b/make/modules/java.management/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,11 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += dangling-doc-comments this-escape DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' + +################################################################################ diff --git a/make/modules/java.management/Lib.gmk b/make/modules/java.management/Lib.gmk index b9f79da4516..cfa96b012c9 100644 --- a/make/modules/java.management/Lib.gmk +++ b/make/modules/java.management/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LibCommon.gmk ################################################################################ @@ -45,3 +47,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT, \ )) TARGETS += $(BUILD_LIBMANAGEMENT) + +################################################################################ diff --git a/make/modules/java.naming/Java.gmk b/make/modules/java.naming/Java.gmk index 207329f5944..1c7a2a1668a 100644 --- a/make/modules/java.naming/Java.gmk +++ b/make/modules/java.naming/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,8 +23,12 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += dangling-doc-comments this-escape DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' CLEAN += jndiprovider.properties + +################################################################################ diff --git a/make/modules/java.prefs/Java.gmk b/make/modules/java.prefs/Java.gmk index e124e8844d3..6e5ea0e2c73 100644 --- a/make/modules/java.prefs/Java.gmk +++ b/make/modules/java.prefs/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,5 +23,9 @@ # questions. # +################################################################################ + DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' + +################################################################################ diff --git a/make/modules/java.prefs/Lib.gmk b/make/modules/java.prefs/Lib.gmk index 033768ffa1d..7590a5431b1 100644 --- a/make/modules/java.prefs/Lib.gmk +++ b/make/modules/java.prefs/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LibCommon.gmk ################################################################################ @@ -46,3 +48,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBPREFS, \ )) TARGETS += $(BUILD_LIBPREFS) + +################################################################################ diff --git a/make/modules/java.rmi/Java.gmk b/make/modules/java.rmi/Java.gmk index 6c607bd0572..4f24edb6f67 100644 --- a/make/modules/java.rmi/Java.gmk +++ b/make/modules/java.rmi/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += this-escape DOCLINT += -Xdoclint:all/protected \ @@ -32,3 +34,5 @@ CLEAN_FILES += $(wildcard \ $(TOPDIR)/src/java.rmi/share/classes/sun/rmi/server/resources/*.properties) TARGETS += $(call CreateHkTargets, $(CLEAN_FILES)) + +################################################################################ diff --git a/make/modules/java.rmi/Launcher.gmk b/make/modules/java.rmi/Launcher.gmk index 8c335711da0..a72c107981c 100644 --- a/make/modules/java.rmi/Launcher.gmk +++ b/make/modules/java.rmi/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LauncherCommon.gmk ################################################################################ @@ -32,3 +34,5 @@ include LauncherCommon.gmk $(eval $(call SetupBuildLauncher, rmiregistry, \ MAIN_CLASS := sun.rmi.registry.RegistryImpl, \ )) + +################################################################################ diff --git a/make/modules/java.rmi/Lib.gmk b/make/modules/java.rmi/Lib.gmk index 3f4a5bed893..0520af6b702 100644 --- a/make/modules/java.rmi/Lib.gmk +++ b/make/modules/java.rmi/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LibCommon.gmk ################################################################################ @@ -37,3 +39,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBRMI, \ )) TARGETS += $(BUILD_LIBRMI) + +################################################################################ diff --git a/make/modules/java.scripting/Java.gmk b/make/modules/java.scripting/Java.gmk index c9060b5fa46..1909ec1a2df 100644 --- a/make/modules/java.scripting/Java.gmk +++ b/make/modules/java.scripting/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,11 @@ # questions. # +################################################################################ + DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' COPY += .js CLEAN += .properties + +################################################################################ diff --git a/make/modules/java.scripting/Launcher.gmk b/make/modules/java.scripting/Launcher.gmk index a969b567d1e..ee6b93fbf2c 100644 --- a/make/modules/java.scripting/Launcher.gmk +++ b/make/modules/java.scripting/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LauncherCommon.gmk ################################################################################ @@ -33,3 +35,5 @@ $(eval $(call SetupBuildLauncher, jrunscript, \ MAIN_CLASS := com.sun.tools.script.shell.Main, \ JAVA_ARGS := --add-modules ALL-DEFAULT, \ )) + +################################################################################ diff --git a/make/modules/java.security.jgss/Java.gmk b/make/modules/java.security.jgss/Java.gmk index 7a337946cd7..44e3f328c7f 100644 --- a/make/modules/java.security.jgss/Java.gmk +++ b/make/modules/java.security.jgss/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,11 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += dangling-doc-comments this-escape DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' + +################################################################################ diff --git a/make/modules/java.security.jgss/Launcher.gmk b/make/modules/java.security.jgss/Launcher.gmk index b0e2fdcffd1..40a93859378 100644 --- a/make/modules/java.security.jgss/Launcher.gmk +++ b/make/modules/java.security.jgss/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LauncherCommon.gmk ifeq ($(call isTargetOs, windows), true) @@ -50,3 +52,5 @@ ifeq ($(call isTargetOs, windows), true) MAIN_CLASS := sun.security.krb5.internal.tools.Ktab, \ )) endif + +################################################################################ diff --git a/make/modules/java.security.jgss/Lib.gmk b/make/modules/java.security.jgss/Lib.gmk index 2c827b84109..4b05100e6a6 100644 --- a/make/modules/java.security.jgss/Lib.gmk +++ b/make/modules/java.security.jgss/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LibCommon.gmk ################################################################################ @@ -94,3 +96,5 @@ ifneq ($(BUILD_CRYPTO), false) TARGETS += $(BUILD_LIBOSXKRB5) endif endif + +################################################################################ diff --git a/make/modules/java.security.sasl/Java.gmk b/make/modules/java.security.sasl/Java.gmk index 136b311a827..12d13b4910f 100644 --- a/make/modules/java.security.sasl/Java.gmk +++ b/make/modules/java.security.sasl/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, 2025, 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,4 +23,8 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += dangling-doc-comments this-escape + +################################################################################ diff --git a/make/modules/java.smartcardio/Java.gmk b/make/modules/java.smartcardio/Java.gmk index f49e425718e..6e5ea0e2c73 100644 --- a/make/modules/java.smartcardio/Java.gmk +++ b/make/modules/java.smartcardio/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,5 +23,9 @@ # questions. # +################################################################################ + DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' + +################################################################################ diff --git a/make/modules/java.smartcardio/Lib.gmk b/make/modules/java.smartcardio/Lib.gmk index 1e647fd7e24..8d8a2aef086 100644 --- a/make/modules/java.smartcardio/Lib.gmk +++ b/make/modules/java.smartcardio/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LibCommon.gmk ################################################################################ @@ -41,3 +43,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJ2PCSC, \ )) TARGETS += $(BUILD_LIBJ2PCSC) + +################################################################################ diff --git a/make/modules/java.sql.rowset/Java.gmk b/make/modules/java.sql.rowset/Java.gmk index 6bc30e3693d..ecfe3e6e641 100644 --- a/make/modules/java.sql.rowset/Java.gmk +++ b/make/modules/java.sql.rowset/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += dangling-doc-comments DOCLINT += -Xdoclint:all/protected \ @@ -32,3 +34,5 @@ CLEAN_FILES += $(wildcard \ $(TOPDIR)/src/java.sql.rowset/share/classes/javax/sql/rowset/*.properties) TARGETS += $(call CreateHkTargets, $(CLEAN_FILES)) + +################################################################################ diff --git a/make/modules/java.sql/Java.gmk b/make/modules/java.sql/Java.gmk index 7a337946cd7..44e3f328c7f 100644 --- a/make/modules/java.sql/Java.gmk +++ b/make/modules/java.sql/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,11 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += dangling-doc-comments this-escape DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' + +################################################################################ diff --git a/make/modules/java.transaction.xa/Java.gmk b/make/modules/java.transaction.xa/Java.gmk index 4579fea6843..11f99c26bd3 100644 --- a/make/modules/java.transaction.xa/Java.gmk +++ b/make/modules/java.transaction.xa/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,5 +23,9 @@ # questions. # +################################################################################ + DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:javax.*' + +################################################################################ diff --git a/make/modules/java.xml.crypto/Java.gmk b/make/modules/java.xml.crypto/Java.gmk index 9ee19c8c302..68db8ed817a 100644 --- a/make/modules/java.xml.crypto/Java.gmk +++ b/make/modules/java.xml.crypto/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,9 +23,13 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += dangling-doc-comments this-escape DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' COPY += .dtd .xml CLEAN += .properties + +################################################################################ diff --git a/make/modules/java.xml/Copy.gmk b/make/modules/java.xml/Copy.gmk index f242cb2ac76..f8c1896e526 100644 --- a/make/modules/java.xml/Copy.gmk +++ b/make/modules/java.xml/Copy.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, 2025, 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,11 +23,12 @@ # questions. # +################################################################################ + include CopyCommon.gmk include Modules.gmk ################################################################################ -# # Copy property and template files from share/conf to CONF_DST_DIR # $(eval $(call SetupCopyFiles, COPY_XML_MODULE_CONF, \ @@ -37,4 +38,5 @@ $(eval $(call SetupCopyFiles, COPY_XML_MODULE_CONF, \ )) TARGETS += $(COPY_XML_MODULE_CONF) + ################################################################################ diff --git a/make/modules/java.xml/Java.gmk b/make/modules/java.xml/Java.gmk index 0c174f2113e..35f66238a7a 100644 --- a/make/modules/java.xml/Java.gmk +++ b/make/modules/java.xml/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,9 +23,13 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += dangling-doc-comments lossy-conversions this-escape DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:$(call CommaList, javax.xml.catalog javax.xml.datatype \ javax.xml.transform javax.xml.validation javax.xml.xpath)' COPY += .dtd .xsd .xml .ent .mod CLEAN += .properties + +################################################################################ diff --git a/make/modules/jdk.accessibility/Copy.gmk b/make/modules/jdk.accessibility/Copy.gmk index cd8aeba5a11..798b97902c6 100644 --- a/make/modules/jdk.accessibility/Copy.gmk +++ b/make/modules/jdk.accessibility/Copy.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,6 +24,8 @@ # ################################################################################ -# Include CopyCommon.gmk to get exported header files to be properly copied. +# Include CopyCommon.gmk to get exported header files to be properly copied. include CopyCommon.gmk + +################################################################################ diff --git a/make/modules/jdk.accessibility/Java.gmk b/make/modules/jdk.accessibility/Java.gmk index fc8b2f832d7..7f1718a23ed 100644 --- a/make/modules/jdk.accessibility/Java.gmk +++ b/make/modules/jdk.accessibility/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024, 2025, 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,4 +23,8 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += dangling-doc-comments + +################################################################################ diff --git a/make/modules/jdk.accessibility/Launcher.gmk b/make/modules/jdk.accessibility/Launcher.gmk index 86ad96b3a1e..04694b10e9e 100644 --- a/make/modules/jdk.accessibility/Launcher.gmk +++ b/make/modules/jdk.accessibility/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LauncherCommon.gmk ifeq ($(call isTargetOs, windows), true) @@ -89,3 +91,5 @@ ifeq ($(call isTargetOs, windows), true) TARGETS += $(BUILD_JACCESSWALKER) endif + +################################################################################ diff --git a/make/modules/jdk.accessibility/Lib.gmk b/make/modules/jdk.accessibility/Lib.gmk index 6323049c985..6a3631bff67 100644 --- a/make/modules/jdk.accessibility/Lib.gmk +++ b/make/modules/jdk.accessibility/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LibCommon.gmk ################################################################################ @@ -80,3 +82,5 @@ ifeq ($(call isTargetOs, windows), true) TARGETS += $(BUILD_LIBWINDOWSACCESSBRIDGE) endif + +################################################################################ diff --git a/make/modules/jdk.attach/Lib.gmk b/make/modules/jdk.attach/Lib.gmk index 8eefe7a4ec0..78437d761d2 100644 --- a/make/modules/jdk.attach/Lib.gmk +++ b/make/modules/jdk.attach/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LibCommon.gmk ################################################################################ @@ -46,3 +48,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBATTACH, \ )) TARGETS += $(BUILD_LIBATTACH) + +################################################################################ diff --git a/make/modules/jdk.charsets/Gensrc.gmk b/make/modules/jdk.charsets/Gensrc.gmk index e93ea19219d..82dc091cbfd 100644 --- a/make/modules/jdk.charsets/Gensrc.gmk +++ b/make/modules/jdk.charsets/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,12 @@ # questions. # +################################################################################ +# Generate files using the charsetmapping tool +################################################################################ + include GensrcCommon.gmk -################################################################################ -# -# Generate files using the charsetmapping tool -# CHARSET_DATA_DIR := $(TOPDIR)/make/data/charsetmapping CHARSET_GENSRC_JAVA_DIR_CS := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.charsets/sun/nio/cs/ext @@ -82,3 +82,5 @@ TARGETS += \ $(CHARSET_DONE_CS)-euctw \ $(CHARSET_GENSRC_JAVA_DIR_CS)/sjis0213.dat \ # + +################################################################################ diff --git a/make/modules/jdk.charsets/Java.gmk b/make/modules/jdk.charsets/Java.gmk index 2eb5bd45456..c5dbb1e2a60 100644 --- a/make/modules/jdk.charsets/Java.gmk +++ b/make/modules/jdk.charsets/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,4 +23,8 @@ # questions. # +################################################################################ + COPY += .dat + +################################################################################ diff --git a/make/modules/jdk.compiler/Gendata.gmk b/make/modules/jdk.compiler/Gendata.gmk index 57487c7c842..739625a5732 100644 --- a/make/modules/jdk.compiler/Gendata.gmk +++ b/make/modules/jdk.compiler/Gendata.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2025, 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,13 @@ # questions. # +################################################################################ + include CopyFiles.gmk include JarArchive.gmk include JavaCompilation.gmk include Modules.gmk -################################################################################ - -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, modules/jdk.compiler/Gendata.gmk)) - # This is needed to properly setup DOCS_MODULES. $(eval $(call ReadImportMetaData)) diff --git a/make/modules/jdk.compiler/Gensrc.gmk b/make/modules/jdk.compiler/Gensrc.gmk index 14cc4f55a2b..c6c5879745c 100644 --- a/make/modules/jdk.compiler/Gensrc.gmk +++ b/make/modules/jdk.compiler/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include GensrcCommon.gmk include GensrcProperties.gmk include Execute.gmk @@ -72,3 +74,5 @@ $(eval $(call SetupExecute, PARSEPROPERTIES, \ )) TARGETS += $(PARSEPROPERTIES) + +################################################################################ diff --git a/make/modules/jdk.compiler/Java.gmk b/make/modules/jdk.compiler/Java.gmk index a2dd4f60fa6..3d6d22b2782 100644 --- a/make/modules/jdk.compiler/Java.gmk +++ b/make/modules/jdk.compiler/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + # To the extent technically possible, this module should be built with # -Werror and all lint warnings enabled. In particular, # DISABLED_WARNINGS_java should not be augmented. @@ -33,3 +35,5 @@ JAVAC_FLAGS += -XDstringConcat=inline CLEAN_FILES += $(wildcard \ $(patsubst %, $(TOPDIR)/src/jdk.compiler/share/classes/%/*.properties, \ sun/tools/serialver/resources)) + +################################################################################ diff --git a/make/modules/jdk.compiler/Launcher.gmk b/make/modules/jdk.compiler/Launcher.gmk index e5c4bbe4b8c..74bd6896409 100644 --- a/make/modules/jdk.compiler/Launcher.gmk +++ b/make/modules/jdk.compiler/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LauncherCommon.gmk ################################################################################ @@ -43,3 +45,5 @@ $(eval $(call SetupBuildLauncher, serialver, \ MAIN_CLASS := sun.tools.serialver.SerialVer, \ EXPAND_CLASSPATH_WILDCARDS := true, \ )) + +################################################################################ diff --git a/make/modules/jdk.crypto.cryptoki/Java.gmk b/make/modules/jdk.crypto.cryptoki/Java.gmk index fc8b2f832d7..7f1718a23ed 100644 --- a/make/modules/jdk.crypto.cryptoki/Java.gmk +++ b/make/modules/jdk.crypto.cryptoki/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024, 2025, 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,4 +23,8 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += dangling-doc-comments + +################################################################################ diff --git a/make/modules/jdk.crypto.cryptoki/Lib.gmk b/make/modules/jdk.crypto.cryptoki/Lib.gmk index ec80aaf46b4..29d1422cd78 100644 --- a/make/modules/jdk.crypto.cryptoki/Lib.gmk +++ b/make/modules/jdk.crypto.cryptoki/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LibCommon.gmk ################################################################################ @@ -40,3 +42,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJ2PKCS11, \ )) TARGETS += $(BUILD_LIBJ2PKCS11) + +################################################################################ diff --git a/make/modules/jdk.crypto.mscapi/Java.gmk b/make/modules/jdk.crypto.mscapi/Java.gmk index 269a1195b6a..aca47fc97f7 100644 --- a/make/modules/jdk.crypto.mscapi/Java.gmk +++ b/make/modules/jdk.crypto.mscapi/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, 2025, 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,4 +23,8 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += this-escape + +################################################################################ diff --git a/make/modules/jdk.crypto.mscapi/Lib.gmk b/make/modules/jdk.crypto.mscapi/Lib.gmk index 39b83a21ae9..9c78621ec0c 100644 --- a/make/modules/jdk.crypto.mscapi/Lib.gmk +++ b/make/modules/jdk.crypto.mscapi/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LibCommon.gmk ifeq ($(call isTargetOs, windows), true) @@ -40,3 +42,5 @@ ifeq ($(call isTargetOs, windows), true) TARGETS += $(BUILD_LIBSUNMSCAPI) endif + +################################################################################ diff --git a/make/modules/jdk.dev/Java.gmk b/make/modules/jdk.dev/Java.gmk index c26b4f9c8f6..57401175314 100644 --- a/make/modules/jdk.dev/Java.gmk +++ b/make/modules/jdk.dev/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,8 +23,12 @@ # questions. # +################################################################################ + CLEAN_FILES += $(wildcard \ $(patsubst %, $(TOPDIR)/src/jdk.dev/share/classes/%/*.properties, \ com/sun/tools/script/shell)) COPY += .js oqlhelp.html .txt + +################################################################################ diff --git a/make/modules/jdk.dynalink/Java.gmk b/make/modules/jdk.dynalink/Java.gmk index 852e68c0d31..f95e59bf36e 100644 --- a/make/modules/jdk.dynalink/Java.gmk +++ b/make/modules/jdk.dynalink/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,4 +23,8 @@ # questions. # +################################################################################ + CLEAN += .properties + +################################################################################ diff --git a/make/modules/jdk.editpad/Java.gmk b/make/modules/jdk.editpad/Java.gmk index ef2d3bcfa7c..640335dae43 100644 --- a/make/modules/jdk.editpad/Java.gmk +++ b/make/modules/jdk.editpad/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,4 +23,8 @@ # questions. # +################################################################################ + COPY += .properties + +################################################################################ diff --git a/make/modules/jdk.hotspot.agent/Gensrc.gmk b/make/modules/jdk.hotspot.agent/Gensrc.gmk index b2bd016a512..b5cfa6d15fc 100644 --- a/make/modules/jdk.hotspot.agent/Gensrc.gmk +++ b/make/modules/jdk.hotspot.agent/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2025, 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 @@ -54,3 +54,5 @@ ifeq ($(call isTargetOs, macosx), true) TARGETS += $(MACH_EXC_SERVER) endif + +################################################################################ diff --git a/make/modules/jdk.hotspot.agent/Java.gmk b/make/modules/jdk.hotspot.agent/Java.gmk index 333d28a5aa0..eef2ccb4bb0 100644 --- a/make/modules/jdk.hotspot.agent/Java.gmk +++ b/make/modules/jdk.hotspot.agent/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,6 +23,10 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += rawtypes serial cast static overrides \ dangling-doc-comments fallthrough this-escape COPY += .gif .png .properties + +################################################################################ diff --git a/make/modules/jdk.hotspot.agent/Launcher.gmk b/make/modules/jdk.hotspot.agent/Launcher.gmk index 94ad08bda0c..83e640486c2 100644 --- a/make/modules/jdk.hotspot.agent/Launcher.gmk +++ b/make/modules/jdk.hotspot.agent/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LauncherCommon.gmk ################################################################################ @@ -33,3 +35,5 @@ $(eval $(call SetupBuildLauncher, jhsdb, \ MAIN_CLASS := sun.jvm.hotspot.SALauncher, \ MACOSX_PRIVILEGED := true, \ )) + +################################################################################ diff --git a/make/modules/jdk.hotspot.agent/Lib.gmk b/make/modules/jdk.hotspot.agent/Lib.gmk index 12f1c1f2a90..ed8de631dc3 100644 --- a/make/modules/jdk.hotspot.agent/Lib.gmk +++ b/make/modules/jdk.hotspot.agent/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LibCommon.gmk ################################################################################ @@ -79,3 +81,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBSAPROC, \ )) TARGETS += $(BUILD_LIBSAPROC) + +################################################################################ diff --git a/make/modules/jdk.httpserver/Gensrc.gmk b/make/modules/jdk.httpserver/Gensrc.gmk index 37b51bb1d45..baeb620781a 100644 --- a/make/modules/jdk.httpserver/Gensrc.gmk +++ b/make/modules/jdk.httpserver/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2021, 2025, 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,12 @@ # questions. # +################################################################################ + include GensrcCommon.gmk include GensrcProperties.gmk include Modules.gmk -################################################################################ - # Use wildcard so as to avoid getting non-existing directories back SIMPLESERVER_RESOURCES_DIRS := $(wildcard $(addsuffix /sun/net/httpserver/simpleserver/resources, \ $(call FindModuleSrcDirs, jdk.httpserver))) @@ -39,3 +39,5 @@ $(eval $(call SetupCompileProperties, SIMPLESERVER_PROPERTIES, \ )) TARGETS += $(SIMPLESERVER_PROPERTIES) + +################################################################################ diff --git a/make/modules/jdk.httpserver/Java.gmk b/make/modules/jdk.httpserver/Java.gmk index 95c0f1eb6ab..f36d09919bc 100644 --- a/make/modules/jdk.httpserver/Java.gmk +++ b/make/modules/jdk.httpserver/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,6 +23,10 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += this-escape COPY += .ico + +################################################################################ diff --git a/make/modules/jdk.httpserver/Jmod.gmk b/make/modules/jdk.httpserver/Jmod.gmk index 9a216ef0958..72c87e19c29 100644 --- a/make/modules/jdk.httpserver/Jmod.gmk +++ b/make/modules/jdk.httpserver/Jmod.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, 2025, 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,4 +23,8 @@ # questions. # +################################################################################ + JMOD_FLAGS_main_class := --main-class sun.net.httpserver.simpleserver.Main + +################################################################################ diff --git a/make/modules/jdk.httpserver/Launcher.gmk b/make/modules/jdk.httpserver/Launcher.gmk index 0f0c060e6e3..d537ec1b50a 100644 --- a/make/modules/jdk.httpserver/Launcher.gmk +++ b/make/modules/jdk.httpserver/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2021, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LauncherCommon.gmk ################################################################################ @@ -32,3 +34,5 @@ include LauncherCommon.gmk $(eval $(call SetupBuildLauncher, jwebserver, \ MAIN_CLASS := sun.net.httpserver.simpleserver.JWebServer, \ )) + +################################################################################ diff --git a/make/modules/jdk.incubator.vector/Java.gmk b/make/modules/jdk.incubator.vector/Java.gmk index 6cd5301428f..e51ffe57cea 100644 --- a/make/modules/jdk.incubator.vector/Java.gmk +++ b/make/modules/jdk.incubator.vector/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,6 +23,10 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += dangling-doc-comments DOCLINT += -Xdoclint:all/protected + +################################################################################ diff --git a/make/modules/jdk.incubator.vector/Lib.gmk b/make/modules/jdk.incubator.vector/Lib.gmk index 7d2ef440b67..6d1259cfe60 100644 --- a/make/modules/jdk.incubator.vector/Lib.gmk +++ b/make/modules/jdk.incubator.vector/Lib.gmk @@ -23,6 +23,8 @@ # questions. # +################################################################################ + include LibCommon.gmk ################################################################################ @@ -69,3 +71,5 @@ ifeq ($(call isTargetOs, linux)+$(call isTargetCpu, aarch64)+$(INCLUDE_COMPILER2 TARGETS += $(BUILD_LIBSLEEF) endif + +################################################################################ diff --git a/make/modules/jdk.internal.jvmstat/Java.gmk b/make/modules/jdk.internal.jvmstat/Java.gmk index 4376b7e3484..108730a0fc5 100644 --- a/make/modules/jdk.internal.jvmstat/Java.gmk +++ b/make/modules/jdk.internal.jvmstat/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,6 +23,10 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += this-escape COPY += aliasmap + +################################################################################ diff --git a/make/modules/jdk.internal.le/Java.gmk b/make/modules/jdk.internal.le/Java.gmk index 4c952b63574..27c6eaf5f7f 100644 --- a/make/modules/jdk.internal.le/Java.gmk +++ b/make/modules/jdk.internal.le/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,6 +23,10 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += dangling-doc-comments this-escape COPY += .properties .caps .txt + +################################################################################ diff --git a/make/modules/jdk.internal.md/Java.gmk b/make/modules/jdk.internal.md/Java.gmk index 2a850f55637..638c12413c4 100644 --- a/make/modules/jdk.internal.md/Java.gmk +++ b/make/modules/jdk.internal.md/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024, 2025, 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,4 +23,8 @@ # questions. # +################################################################################ + COPY += .txt + +################################################################################ diff --git a/make/modules/jdk.internal.opt/Java.gmk b/make/modules/jdk.internal.opt/Java.gmk index 0c65d9ad94e..08bb3a5334a 100644 --- a/make/modules/jdk.internal.opt/Java.gmk +++ b/make/modules/jdk.internal.opt/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,6 +23,10 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += this-escape COPY += .properties + +################################################################################ diff --git a/make/modules/jdk.internal.vm.ci/Java.gmk b/make/modules/jdk.internal.vm.ci/Java.gmk index 6bf8ad5e74c..cb569bb8817 100644 --- a/make/modules/jdk.internal.vm.ci/Java.gmk +++ b/make/modules/jdk.internal.vm.ci/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += dangling-doc-comments this-escape # -parameters provides method's parameters information in class file, @@ -30,3 +32,5 @@ DISABLED_WARNINGS_java += dangling-doc-comments this-escape # Don't use Indy strings concatenation to have good JVMCI startup performance. JAVAC_FLAGS += -parameters -XDstringConcat=inline + +################################################################################ diff --git a/make/modules/jdk.jartool/Gensrc.gmk b/make/modules/jdk.jartool/Gensrc.gmk index 06fbedfa40c..dc53aa0b652 100644 --- a/make/modules/jdk.jartool/Gensrc.gmk +++ b/make/modules/jdk.jartool/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2025, 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,10 +23,9 @@ # questions. # -include GensrcCommon.gmk - ################################################################################ +include GensrcCommon.gmk include GensrcProperties.gmk $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \ @@ -35,3 +34,5 @@ $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \ )) TARGETS += $(COMPILE_PROPERTIES) + +################################################################################ diff --git a/make/modules/jdk.jartool/Java.gmk b/make/modules/jdk.jartool/Java.gmk index 5e06f172070..806975d1e18 100644 --- a/make/modules/jdk.jartool/Java.gmk +++ b/make/modules/jdk.jartool/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,4 +23,8 @@ # questions. # +################################################################################ + JAVAC_FLAGS += -XDstringConcat=inline + +################################################################################ diff --git a/make/modules/jdk.jartool/Jmod.gmk b/make/modules/jdk.jartool/Jmod.gmk index 8b42113ec84..42fd1f05325 100644 --- a/make/modules/jdk.jartool/Jmod.gmk +++ b/make/modules/jdk.jartool/Jmod.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, 2025, 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,4 +23,8 @@ # questions. # +################################################################################ + JMOD_FLAGS_main_class := --main-class sun.tools.jar.Main + +################################################################################ diff --git a/make/modules/jdk.jartool/Launcher.gmk b/make/modules/jdk.jartool/Launcher.gmk index 3139fac45d5..f75f30d4098 100644 --- a/make/modules/jdk.jartool/Launcher.gmk +++ b/make/modules/jdk.jartool/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LauncherCommon.gmk ################################################################################ @@ -40,3 +42,5 @@ $(eval $(call SetupBuildLauncher, jar, \ $(eval $(call SetupBuildLauncher, jarsigner, \ MAIN_CLASS := sun.security.tools.jarsigner.Main, \ )) + +################################################################################ diff --git a/make/modules/jdk.javadoc/Copy.gmk b/make/modules/jdk.javadoc/Copy.gmk index 031b4a91d33..1566911209c 100644 --- a/make/modules/jdk.javadoc/Copy.gmk +++ b/make/modules/jdk.javadoc/Copy.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include CopyCommon.gmk JDK_JAVADOC_DIR := $(JDK_OUTPUTDIR)/modules/jdk.javadoc diff --git a/make/modules/jdk.javadoc/Gendata.gmk b/make/modules/jdk.javadoc/Gendata.gmk index d733af65f1e..2cd812de779 100644 --- a/make/modules/jdk.javadoc/Gendata.gmk +++ b/make/modules/jdk.javadoc/Gendata.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2025, 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,13 +23,10 @@ # questions. # -include JavaCompilation.gmk -include Modules.gmk - ################################################################################ -# Hook to include the corresponding custom file, if present. -$(eval $(call IncludeCustomExtension, modules/jdk.javadoc/Gendata.gmk)) +include JavaCompilation.gmk +include Modules.gmk # This is needed to properly setup DOCS_MODULES. $(eval $(call ReadImportMetaData)) @@ -115,3 +112,5 @@ $(INTERIM_JDK_JAVADOC_DIR)/_element_lists.marker: $(JDK_JAVADOC_DIR)/_element_li TARGETS += $(JDK_JAVADOC_DIR)/_element_lists.marker \ $(INTERIM_JDK_JAVADOC_DIR)/_element_lists.marker + +################################################################################ diff --git a/make/modules/jdk.javadoc/Gensrc.gmk b/make/modules/jdk.javadoc/Gensrc.gmk index 0346e3832df..e62988f883c 100644 --- a/make/modules/jdk.javadoc/Gensrc.gmk +++ b/make/modules/jdk.javadoc/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include GensrcCommon.gmk include GensrcProperties.gmk @@ -37,3 +39,5 @@ $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \ )) TARGETS += $(COMPILE_PROPERTIES) + +################################################################################ diff --git a/make/modules/jdk.javadoc/Java.gmk b/make/modules/jdk.javadoc/Java.gmk index 1194797b134..f5315019f00 100644 --- a/make/modules/jdk.javadoc/Java.gmk +++ b/make/modules/jdk.javadoc/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,8 +23,12 @@ # questions. # +################################################################################ + # To the extent technically possible, this module should be built with # -Werror and all lint warnings enabled. In particular, # DISABLED_WARNINGS_java should not be augmented. COPY += .xml .css .svg .js .js.template .png .txt .woff .woff2 + +################################################################################ diff --git a/make/modules/jdk.javadoc/Launcher.gmk b/make/modules/jdk.javadoc/Launcher.gmk index 608468962f3..9ed3b494117 100644 --- a/make/modules/jdk.javadoc/Launcher.gmk +++ b/make/modules/jdk.javadoc/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LauncherCommon.gmk ################################################################################ @@ -34,3 +36,5 @@ $(eval $(call SetupBuildLauncher, javadoc, \ JAVA_ARGS := --add-modules ALL-DEFAULT, \ EXPAND_CLASSPATH_WILDCARDS := true, \ )) + +################################################################################ diff --git a/make/modules/jdk.jcmd/Java.gmk b/make/modules/jdk.jcmd/Java.gmk index d19d9beb4d8..5748e62f7bc 100644 --- a/make/modules/jdk.jcmd/Java.gmk +++ b/make/modules/jdk.jcmd/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,4 +23,8 @@ # questions. # +################################################################################ + COPY += _options + +################################################################################ diff --git a/make/modules/jdk.jcmd/Launcher.gmk b/make/modules/jdk.jcmd/Launcher.gmk index acff5a212c5..5d0da09d22b 100644 --- a/make/modules/jdk.jcmd/Launcher.gmk +++ b/make/modules/jdk.jcmd/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LauncherCommon.gmk ################################################################################ @@ -84,3 +86,5 @@ $(eval $(call SetupBuildLauncher, jstat, \ $(eval $(call SetupBuildLauncher, jcmd, \ MAIN_CLASS := sun.tools.jcmd.JCmd, \ )) + +################################################################################ diff --git a/make/modules/jdk.jconsole/Java.gmk b/make/modules/jdk.jconsole/Java.gmk index 2de9321392d..d6cf8689df3 100644 --- a/make/modules/jdk.jconsole/Java.gmk +++ b/make/modules/jdk.jconsole/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,11 @@ # questions. # +################################################################################ + COPY += .gif .png CLEAN_FILES += $(wildcard \ $(TOPDIR)/src/jdk.jconsole/share/classes/sun/tools/jconsole/resources/*.properties) + +################################################################################ diff --git a/make/modules/jdk.jconsole/Launcher.gmk b/make/modules/jdk.jconsole/Launcher.gmk index 35d93d6feb9..7cb40a1b13a 100644 --- a/make/modules/jdk.jconsole/Launcher.gmk +++ b/make/modules/jdk.jconsole/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LauncherCommon.gmk ################################################################################ @@ -38,3 +40,5 @@ $(eval $(call SetupBuildLauncher, jconsole, \ -Djdk.attach.allowAttachSelf=true, \ WINDOWS_JAVAW := true, \ )) + +################################################################################ diff --git a/make/modules/jdk.jdeps/Gensrc.gmk b/make/modules/jdk.jdeps/Gensrc.gmk index b5f1e702a75..6ae92ee830a 100644 --- a/make/modules/jdk.jdeps/Gensrc.gmk +++ b/make/modules/jdk.jdeps/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include GensrcCommon.gmk include GensrcProperties.gmk @@ -40,3 +42,5 @@ $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \ )) TARGETS += $(COMPILE_PROPERTIES) + +################################################################################ diff --git a/make/modules/jdk.jdeps/Java.gmk b/make/modules/jdk.jdeps/Java.gmk index 69c7ae0433f..f2da87aeade 100644 --- a/make/modules/jdk.jdeps/Java.gmk +++ b/make/modules/jdk.jdeps/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,8 +23,12 @@ # questions. # +################################################################################ + COPY += .txt CLEAN_FILES += $(wildcard \ $(TOPDIR)/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/*.properties \ $(TOPDIR)/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/*.properties) + +################################################################################ diff --git a/make/modules/jdk.jdeps/Launcher.gmk b/make/modules/jdk.jdeps/Launcher.gmk index 812d690a91d..debf36b62ae 100644 --- a/make/modules/jdk.jdeps/Launcher.gmk +++ b/make/modules/jdk.jdeps/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LauncherCommon.gmk ################################################################################ @@ -60,3 +62,5 @@ $(eval $(call SetupBuildLauncher, jnativescan, \ MAIN_CLASS := com.sun.tools.jnativescan.Main, \ EXPAND_CLASSPATH_WILDCARDS := true, \ )) + +################################################################################ diff --git a/make/modules/jdk.jdi/Gensrc.gmk b/make/modules/jdk.jdi/Gensrc.gmk index 47f975064ad..57b8faee8a8 100644 --- a/make/modules/jdk.jdi/Gensrc.gmk +++ b/make/modules/jdk.jdi/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include GensrcCommon.gmk ################################################################################ @@ -68,3 +70,5 @@ $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \ )) TARGETS += $(COMPILE_PROPERTIES) + +################################################################################ diff --git a/make/modules/jdk.jdi/Java.gmk b/make/modules/jdk.jdi/Java.gmk index 6577db98b0a..d31008c318f 100644 --- a/make/modules/jdk.jdi/Java.gmk +++ b/make/modules/jdk.jdi/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += dangling-doc-comments EXCLUDES += \ @@ -33,3 +35,5 @@ EXCLUDES += \ # EXCLUDE_FILES += jdi-overview.html + +################################################################################ diff --git a/make/modules/jdk.jdi/Launcher.gmk b/make/modules/jdk.jdi/Launcher.gmk index 79be72e6ef3..a568e504b5a 100644 --- a/make/modules/jdk.jdi/Launcher.gmk +++ b/make/modules/jdk.jdi/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LauncherCommon.gmk ################################################################################ @@ -32,3 +34,5 @@ include LauncherCommon.gmk $(eval $(call SetupBuildLauncher, jdb, \ MAIN_CLASS := com.sun.tools.example.debug.tty.TTY, \ )) + +################################################################################ diff --git a/make/modules/jdk.jdi/Lib.gmk b/make/modules/jdk.jdi/Lib.gmk index 80a5664289b..b59a3ab8ea4 100644 --- a/make/modules/jdk.jdi/Lib.gmk +++ b/make/modules/jdk.jdi/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LibCommon.gmk ifeq ($(call isTargetOs, windows), true) @@ -40,3 +42,5 @@ ifeq ($(call isTargetOs, windows), true) TARGETS += $(BUILD_LIBDT_SHMEM) endif + +################################################################################ diff --git a/make/modules/jdk.jdwp.agent/Copy.gmk b/make/modules/jdk.jdwp.agent/Copy.gmk index cd8aeba5a11..798b97902c6 100644 --- a/make/modules/jdk.jdwp.agent/Copy.gmk +++ b/make/modules/jdk.jdwp.agent/Copy.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,6 +24,8 @@ # ################################################################################ -# Include CopyCommon.gmk to get exported header files to be properly copied. +# Include CopyCommon.gmk to get exported header files to be properly copied. include CopyCommon.gmk + +################################################################################ diff --git a/make/modules/jdk.jdwp.agent/Lib.gmk b/make/modules/jdk.jdwp.agent/Lib.gmk index 53b48cc7c45..a1f9a0fca52 100644 --- a/make/modules/jdk.jdwp.agent/Lib.gmk +++ b/make/modules/jdk.jdwp.agent/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LibCommon.gmk ################################################################################ @@ -77,3 +79,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJDWP, \ )) TARGETS += $(BUILD_LIBJDWP) + +################################################################################ diff --git a/make/modules/jdk.jfr/Copy.gmk b/make/modules/jdk.jfr/Copy.gmk index f4fa3d97551..81dc58c1324 100644 --- a/make/modules/jdk.jfr/Copy.gmk +++ b/make/modules/jdk.jfr/Copy.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,10 +23,10 @@ # questions. # -include CopyCommon.gmk - ################################################################################ +include CopyCommon.gmk + JFR_CONF_DIR := $(TOPDIR)/src/jdk.jfr/share/conf/jfr $(eval $(call SetupCopyFiles, COPY_JFR_CONF, \ DEST := $(LIB_DST_DIR)/jfr, \ diff --git a/make/modules/jdk.jfr/Gendata.gmk b/make/modules/jdk.jfr/Gendata.gmk index 522eea70f32..0a5dd874c81 100644 --- a/make/modules/jdk.jfr/Gendata.gmk +++ b/make/modules/jdk.jfr/Gendata.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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 @@ -25,8 +25,8 @@ ################################################################################ -include ToolsHotspot.gmk include Execute.gmk +include $(TOPDIR)/make/ToolsHotspot.gmk JFR_SRCDIR := $(TOPDIR)/src/hotspot/share/jfr/metadata JFR_DATA_OUTPUTDIR := $(OUTPUTDIR)/jdk/modules/jdk.jfr/jdk/jfr/internal/types @@ -46,3 +46,5 @@ $(eval $(call SetupExecute, jfr_gen_metadata, \ )) TARGETS += $(jfr_gen_metadata) + +################################################################################ diff --git a/make/modules/jdk.jfr/Java.gmk b/make/modules/jdk.jfr/Java.gmk index d07f9117c2d..5fabda8a4b7 100644 --- a/make/modules/jdk.jfr/Java.gmk +++ b/make/modules/jdk.jfr/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,6 +23,10 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += dangling-doc-comments exports COPY := .xsd .xml .dtd .ini JAVAC_FLAGS := -XDstringConcat=inline + +################################################################################ diff --git a/make/modules/jdk.jfr/Jmod.gmk b/make/modules/jdk.jfr/Jmod.gmk index 79a6a81c730..499ea142d3a 100644 --- a/make/modules/jdk.jfr/Jmod.gmk +++ b/make/modules/jdk.jfr/Jmod.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, 2025, 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,4 +23,8 @@ # questions. # +################################################################################ + JMOD_FLAGS_main_class := --main-class jdk.jfr.internal.tool.Main + +################################################################################ diff --git a/make/modules/jdk.jfr/Launcher.gmk b/make/modules/jdk.jfr/Launcher.gmk index ad07c839f90..80417cd67d3 100644 --- a/make/modules/jdk.jfr/Launcher.gmk +++ b/make/modules/jdk.jfr/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LauncherCommon.gmk ################################################################################ @@ -33,3 +35,5 @@ $(eval $(call SetupBuildLauncher, jfr, \ MAIN_CLASS := jdk.jfr.internal.tool.Main, \ EXPAND_CLASSPATH_WILDCARDS := true, \ )) + +################################################################################ diff --git a/make/modules/jdk.jlink/Gensrc.gmk b/make/modules/jdk.jlink/Gensrc.gmk index c450ceea073..87703c7c8bb 100644 --- a/make/modules/jdk.jlink/Gensrc.gmk +++ b/make/modules/jdk.jlink/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,12 @@ # questions. # +################################################################################ + include GensrcCommon.gmk include GensrcProperties.gmk include Modules.gmk -################################################################################ - # Use wildcard so as to avoid getting non-existing directories back JLINK_RESOURCES_DIRS := $(wildcard $(addsuffix /jdk/tools/jlink/resources, \ $(call FindModuleSrcDirs, jdk.jlink))) @@ -50,3 +50,5 @@ $(eval $(call SetupCompileProperties, JIMAGE_PROPERTIES, \ TARGETS += $(JLINK_PROPERTIES) $(JMOD_PROPERTIES) $(JIMAGE_PROPERTIES) + +################################################################################ diff --git a/make/modules/jdk.jlink/Launcher.gmk b/make/modules/jdk.jlink/Launcher.gmk index ef6f5ad1665..312c40e47ab 100644 --- a/make/modules/jdk.jlink/Launcher.gmk +++ b/make/modules/jdk.jlink/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LauncherCommon.gmk ################################################################################ @@ -54,3 +56,5 @@ $(eval $(call SetupBuildLauncher, jmod, \ ENABLE_ARG_FILES := true, \ EXPAND_CLASSPATH_WILDCARDS := true, \ )) + +################################################################################ diff --git a/make/modules/jdk.jpackage/Gensrc.gmk b/make/modules/jdk.jpackage/Gensrc.gmk index 434b42dc0bf..98311d89b87 100644 --- a/make/modules/jdk.jpackage/Gensrc.gmk +++ b/make/modules/jdk.jpackage/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include GensrcCommon.gmk ################################################################################ @@ -36,5 +38,7 @@ ifeq ($(call isTargetOs, macosx), true) $(ENTITLEMENTS_TARGET_FILE): $(ENTITLEMENTS_SRC_FILE) $(call install-file) - TARGETS := $(ENTITLEMENTS_TARGET_FILE) + TARGETS += $(ENTITLEMENTS_TARGET_FILE) endif + +################################################################################ diff --git a/make/modules/jdk.jpackage/Java.gmk b/make/modules/jdk.jpackage/Java.gmk index d60e9ac2814..1b6db5fab05 100644 --- a/make/modules/jdk.jpackage/Java.gmk +++ b/make/modules/jdk.jpackage/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += dangling-doc-comments COPY += .gif .png .txt .spec .script .prerm .preinst \ @@ -30,3 +32,5 @@ COPY += .gif .png .txt .spec .script .prerm .preinst \ .icns .scpt .wxs .wxl .wxi .ico .bmp .tiff .service .xsl CLEAN += .properties + +################################################################################ diff --git a/make/modules/jdk.jpackage/Jmod.gmk b/make/modules/jdk.jpackage/Jmod.gmk index 8e0982202a7..27b03e1081e 100644 --- a/make/modules/jdk.jpackage/Jmod.gmk +++ b/make/modules/jdk.jpackage/Jmod.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, 2025, 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,4 +23,8 @@ # questions. # +################################################################################ + JMOD_FLAGS_main_class := --main-class jdk.jpackage.main.Main + +################################################################################ diff --git a/make/modules/jdk.jpackage/Launcher.gmk b/make/modules/jdk.jpackage/Launcher.gmk index f80c4ed83d3..80f644eea3f 100644 --- a/make/modules/jdk.jpackage/Launcher.gmk +++ b/make/modules/jdk.jpackage/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LauncherCommon.gmk ################################################################################ @@ -32,3 +34,5 @@ include LauncherCommon.gmk $(eval $(call SetupBuildLauncher, jpackage, \ MAIN_CLASS := jdk.jpackage.main.Main, \ )) + +################################################################################ diff --git a/make/modules/jdk.jpackage/Lib.gmk b/make/modules/jdk.jpackage/Lib.gmk index 33d10336e6e..a301447d73e 100644 --- a/make/modules/jdk.jpackage/Lib.gmk +++ b/make/modules/jdk.jpackage/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, 2025, 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,8 +23,10 @@ # questions. # -include LibCommon.gmk +################################################################################ + include LauncherCommon.gmk +include LibCommon.gmk JPACKAGE_OUTPUT_DIR := \ $(JDK_OUTPUTDIR)/modules/$(MODULE)/jdk/jpackage/internal/resources @@ -186,3 +188,5 @@ ifeq ($(call isTargetOs, windows), true) TARGETS += $(BUILD_JPACKAGEAPPLAUNCHERW) endif + +################################################################################ diff --git a/make/modules/jdk.jshell/Gensrc.gmk b/make/modules/jdk.jshell/Gensrc.gmk index 71d1ad42817..deab53719a5 100644 --- a/make/modules/jdk.jshell/Gensrc.gmk +++ b/make/modules/jdk.jshell/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include GensrcCommon.gmk include GensrcProperties.gmk @@ -37,3 +39,5 @@ $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \ )) TARGETS += $(COMPILE_PROPERTIES) + +################################################################################ diff --git a/make/modules/jdk.jshell/Java.gmk b/make/modules/jdk.jshell/Java.gmk index 744c85d960a..f4194b23af7 100644 --- a/make/modules/jdk.jshell/Java.gmk +++ b/make/modules/jdk.jshell/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,4 +23,8 @@ # questions. # +################################################################################ + COPY += .jsh .properties + +################################################################################ diff --git a/make/modules/jdk.jshell/Jmod.gmk b/make/modules/jdk.jshell/Jmod.gmk index 12f22e9d9af..ec599e44fcc 100644 --- a/make/modules/jdk.jshell/Jmod.gmk +++ b/make/modules/jdk.jshell/Jmod.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, 2025, 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,4 +23,8 @@ # questions. # +################################################################################ + JMOD_FLAGS_main_class := --main-class jdk.internal.jshell.tool.JShellToolProvider + +################################################################################ diff --git a/make/modules/jdk.jshell/Launcher.gmk b/make/modules/jdk.jshell/Launcher.gmk index 66da3a9e5fc..bdfcbf1911d 100644 --- a/make/modules/jdk.jshell/Launcher.gmk +++ b/make/modules/jdk.jshell/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LauncherCommon.gmk ################################################################################ @@ -33,3 +35,5 @@ $(eval $(call SetupBuildLauncher, jshell, \ MAIN_CLASS := jdk.internal.jshell.tool.JShellToolProvider, \ EXPAND_CLASSPATH_WILDCARDS := true, \ )) + +################################################################################ diff --git a/make/modules/jdk.jstatd/Jmod.gmk b/make/modules/jdk.jstatd/Jmod.gmk index 2c95e094cfe..1c2aa35a2c2 100644 --- a/make/modules/jdk.jstatd/Jmod.gmk +++ b/make/modules/jdk.jstatd/Jmod.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, 2025, 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,4 +23,8 @@ # questions. # +################################################################################ + JMOD_FLAGS_main_class := --main-class sun.tools.jstatd.Jstatd + +################################################################################ diff --git a/make/modules/jdk.jstatd/Launcher.gmk b/make/modules/jdk.jstatd/Launcher.gmk index 209b810353f..d101cd3f4ed 100644 --- a/make/modules/jdk.jstatd/Launcher.gmk +++ b/make/modules/jdk.jstatd/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LauncherCommon.gmk ################################################################################ @@ -32,3 +34,5 @@ include LauncherCommon.gmk $(eval $(call SetupBuildLauncher, jstatd, \ MAIN_CLASS := sun.tools.jstatd.Jstatd, \ )) + +################################################################################ diff --git a/make/modules/jdk.localedata/Gensrc.gmk b/make/modules/jdk.localedata/Gensrc.gmk index 4d9f15a20c9..a3c5cdf82e8 100644 --- a/make/modules/jdk.localedata/Gensrc.gmk +++ b/make/modules/jdk.localedata/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include GensrcCommon.gmk ################################################################################ @@ -47,3 +49,5 @@ $(CLDR_GEN_DONE): $(wildcard $(CLDR_DATA_DIR)/dtd/*.dtd) \ $(TOUCH) $@ TARGETS += $(CLDR_GEN_DONE) + +################################################################################ diff --git a/make/modules/jdk.localedata/Java.gmk b/make/modules/jdk.localedata/Java.gmk index 41696a641a7..c359f0ee03c 100644 --- a/make/modules/jdk.localedata/Java.gmk +++ b/make/modules/jdk.localedata/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,8 +23,12 @@ # questions. # +################################################################################ + COPY += _dict _th # Exclude BreakIterator classes that are just used in compile process to generate # data files and shouldn't go in the product EXCLUDE_FILES += sun/text/resources/ext/BreakIteratorRules_th.java KEEP_ALL_TRANSLATIONS := true + +################################################################################ diff --git a/make/modules/jdk.management.agent/Copy.gmk b/make/modules/jdk.management.agent/Copy.gmk index 5600989b4d3..ada75231ec7 100644 --- a/make/modules/jdk.management.agent/Copy.gmk +++ b/make/modules/jdk.management.agent/Copy.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include CopyCommon.gmk ################################################################################ diff --git a/make/modules/jdk.management.agent/Gensrc.gmk b/make/modules/jdk.management.agent/Gensrc.gmk index c13f4da75fe..4bafdd9503e 100644 --- a/make/modules/jdk.management.agent/Gensrc.gmk +++ b/make/modules/jdk.management.agent/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,10 +23,9 @@ # questions. # -include GensrcCommon.gmk - ################################################################################ +include GensrcCommon.gmk include GensrcProperties.gmk $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \ @@ -35,3 +34,5 @@ $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \ )) TARGETS += $(COMPILE_PROPERTIES) + +################################################################################ diff --git a/make/modules/jdk.management.agent/Lib.gmk b/make/modules/jdk.management.agent/Lib.gmk index 89de59d7fec..17dd163f63c 100644 --- a/make/modules/jdk.management.agent/Lib.gmk +++ b/make/modules/jdk.management.agent/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LibCommon.gmk ################################################################################ @@ -37,3 +39,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT_AGENT, \ )) TARGETS += $(BUILD_LIBMANAGEMENT_AGENT) + +################################################################################ diff --git a/make/modules/jdk.management/Java.gmk b/make/modules/jdk.management/Java.gmk index 269a1195b6a..aca47fc97f7 100644 --- a/make/modules/jdk.management/Java.gmk +++ b/make/modules/jdk.management/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, 2025, 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,4 +23,8 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += this-escape + +################################################################################ diff --git a/make/modules/jdk.management/Lib.gmk b/make/modules/jdk.management/Lib.gmk index cb65b37bda8..fd9345e8b8a 100644 --- a/make/modules/jdk.management/Lib.gmk +++ b/make/modules/jdk.management/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LibCommon.gmk ################################################################################ @@ -54,3 +56,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT_EXT, \ )) TARGETS += $(BUILD_LIBMANAGEMENT_EXT) + +################################################################################ diff --git a/make/modules/jdk.net/Lib.gmk b/make/modules/jdk.net/Lib.gmk index e43d8427f5a..00d243a7f53 100644 --- a/make/modules/jdk.net/Lib.gmk +++ b/make/modules/jdk.net/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LibCommon.gmk ################################################################################ @@ -38,3 +40,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBEXTNET, \ )) TARGETS += $(BUILD_LIBEXTNET) + +################################################################################ diff --git a/make/modules/jdk.sctp/Java.gmk b/make/modules/jdk.sctp/Java.gmk index cac0f770816..5c7c4eb4176 100644 --- a/make/modules/jdk.sctp/Java.gmk +++ b/make/modules/jdk.sctp/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + # No SCTP implementation on Mac OS X or AIX. These classes should be excluded. SCTP_IMPL_CLASSES = \ $(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/AssociationChange.java \ @@ -51,3 +53,5 @@ ifeq ($(call isTargetOsType, unix), true) EXCLUDE_FILES += $(TOPDIR)/src/jdk.sctp/share/classes/sun/nio/ch/sctp/UnsupportedUtil.java endif endif + +################################################################################ diff --git a/make/modules/jdk.sctp/Lib.gmk b/make/modules/jdk.sctp/Lib.gmk index a6d95a25154..2017805f52d 100644 --- a/make/modules/jdk.sctp/Lib.gmk +++ b/make/modules/jdk.sctp/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LibCommon.gmk ifeq ($(call isTargetOs, linux), true) @@ -44,3 +46,5 @@ ifeq ($(call isTargetOs, linux), true) TARGETS += $(BUILD_LIBSCTP) endif + +################################################################################ diff --git a/make/modules/jdk.security.auth/Java.gmk b/make/modules/jdk.security.auth/Java.gmk index fc8b2f832d7..7f1718a23ed 100644 --- a/make/modules/jdk.security.auth/Java.gmk +++ b/make/modules/jdk.security.auth/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024, 2025, 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,4 +23,8 @@ # questions. # +################################################################################ + DISABLED_WARNINGS_java += dangling-doc-comments + +################################################################################ diff --git a/make/modules/jdk.security.auth/Lib.gmk b/make/modules/jdk.security.auth/Lib.gmk index a0d41004489..9ead32dbe12 100644 --- a/make/modules/jdk.security.auth/Lib.gmk +++ b/make/modules/jdk.security.auth/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, 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,6 +23,8 @@ # questions. # +################################################################################ + include LibCommon.gmk ################################################################################ @@ -37,3 +39,5 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJAAS, \ )) TARGETS += $(BUILD_LIBJAAS) + +################################################################################ diff --git a/make/modules/sun.charsets/Java.gmk b/make/modules/sun.charsets/Java.gmk index 2745327c8e4..c5dbb1e2a60 100644 --- a/make/modules/sun.charsets/Java.gmk +++ b/make/modules/sun.charsets/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,4 +23,8 @@ # questions. # +################################################################################ + COPY += .dat + +################################################################################ diff --git a/make/test/BuildFailureHandler.gmk b/make/test/BuildFailureHandler.gmk index e8f49e76b32..b4f3d690b0d 100644 --- a/make/test/BuildFailureHandler.gmk +++ b/make/test/BuildFailureHandler.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2025, 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,18 +23,13 @@ # questions. # -default: build +include MakeFileStart.gmk -include $(SPEC) -include MakeBase.gmk +################################################################################ include CopyFiles.gmk include JavaCompilation.gmk -TARGETS := - -################################################################################ - FH_BASEDIR := $(TOPDIR)/test/failure_handler FH_SUPPORT := $(SUPPORT_OUTPUTDIR)/test/failure_handler FH_JAR := $(FH_SUPPORT)/jtregFailureHandler.jar @@ -110,4 +105,8 @@ test: build: $(TARGETS) images: $(IMAGES_TARGETS) -.PHONY: all images test +.PHONY: images test + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/test/BuildJtregTestThreadFactory.gmk b/make/test/BuildJtregTestThreadFactory.gmk index 4f0ead24ece..94338626769 100644 --- a/make/test/BuildJtregTestThreadFactory.gmk +++ b/make/test/BuildJtregTestThreadFactory.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2022, 2025, 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,18 +23,13 @@ # questions. # -default: build +include MakeFileStart.gmk -include $(SPEC) -include MakeBase.gmk +################################################################################ include CopyFiles.gmk include JavaCompilation.gmk -TARGETS := - -################################################################################ - TTF_BASEDIR := $(TOPDIR)/test/jtreg_test_thread_factory TTF_SUPPORT := $(SUPPORT_OUTPUTDIR)/test/jtreg_test_thread_factory TTF_JAR := $(TTF_SUPPORT)/jtregTestThreadFactory.jar @@ -64,4 +59,8 @@ IMAGES_TARGETS += $(COPY_TTF) build: $(TARGETS) images: $(IMAGES_TARGETS) -.PHONY: all images +.PHONY: images + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/test/BuildMicrobenchmark.gmk b/make/test/BuildMicrobenchmark.gmk index 272cb1af0a6..53ee942d5d0 100644 --- a/make/test/BuildMicrobenchmark.gmk +++ b/make/test/BuildMicrobenchmark.gmk @@ -23,11 +23,9 @@ # questions. # -# This must be the first rule -default: all +include MakeFileStart.gmk -include $(SPEC) -include MakeBase.gmk +################################################################################ include CopyFiles.gmk include JarArchive.gmk @@ -155,4 +153,6 @@ $(eval $(call SetupCopyFiles, COPY_MICROBENCHMARK_NATIVE, \ all: $(MICROBENCHMARK_JAR) $(BUILD_MICROBENCHMARK_LIBRARIES) $(COPY_MICROBENCHMARK_NATIVE) -.PHONY: all +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/test/BuildTestLib.gmk b/make/test/BuildTestLib.gmk index 1a13e191468..3dc00aeff87 100644 --- a/make/test/BuildTestLib.gmk +++ b/make/test/BuildTestLib.gmk @@ -23,17 +23,14 @@ # questions. # +include MakeFileStart.gmk + ################################################################################ # This file builds the Java components of testlib. # It also covers the test-image part, where the built files are copied to the # test image. ################################################################################ -default: all - -include $(SPEC) -include MakeBase.gmk - include CopyFiles.gmk include JavaCompilation.gmk @@ -41,8 +38,6 @@ include JavaCompilation.gmk # Targets for building the test lib jars ################################################################################ -TARGETS := - TEST_LIB_SOURCE_DIR := $(TOPDIR)/test/lib TEST_LIB_SUPPORT := $(SUPPORT_OUTPUTDIR)/test/lib @@ -85,10 +80,13 @@ $(eval $(call SetupCopyFiles, COPY_LIBTEST_JARS, \ DEST := $(TEST_IMAGE_DIR)/lib-test, \ FILES := $(BUILD_WB_JAR_JAR) $(BUILD_TEST_LIB_JAR_JAR), \ )) -# test-image-lib: $(COPY_LIBTEST_JARS) all: build-test-lib -.PHONY: default all build-test-lib test-image-lib +.PHONY: build-test-lib test-image-lib + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/test/BuildTestLibNative.gmk b/make/test/BuildTestLibNative.gmk index 63dcbbf008b..f2a3aafeea9 100644 --- a/make/test/BuildTestLibNative.gmk +++ b/make/test/BuildTestLibNative.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,17 +23,14 @@ # questions. # +include MakeFileStart.gmk + ################################################################################ # This file builds the native component of testlib. # It also covers the test-image part, where the built files are copied to the # test image. ################################################################################ -default: all - -include $(SPEC) -include MakeBase.gmk - include CopyFiles.gmk include TestFilesCompilation.gmk @@ -86,4 +83,8 @@ test-image-lib-native: $(COPY_LIBTEST_NATIVE_TO_HOTSPOT) $(COPY_LIBTEST_NATIVE_T all: build-test-lib-native -.PHONY: default all build-test-lib-native test-image-lib-native +.PHONY: build-test-lib-native test-image-lib-native + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/test/JtregNativeHotspot.gmk b/make/test/JtregNativeHotspot.gmk index 5b75430e52e..2ee26b422e0 100644 --- a/make/test/JtregNativeHotspot.gmk +++ b/make/test/JtregNativeHotspot.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2025, 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,22 +23,17 @@ # questions. # +include MakeFileStart.gmk + ################################################################################ # This file builds the native component of the JTReg tests for Hotspot. # It also covers the test-image part, where the built files are copied to the # test image. ################################################################################ -default: all - -include $(SPEC) -include MakeBase.gmk - include CopyFiles.gmk include TestFilesCompilation.gmk -$(eval $(call IncludeCustomExtension, test/JtregNativeHotspot.gmk)) - ################################################################################ # Targets for building the native tests themselves. ################################################################################ @@ -1588,4 +1583,8 @@ test-image-hotspot-jtreg-native: $(COPY_HOTSPOT_JTREG_NATIVE) all: build-test-hotspot-jtreg-native test-image: test-image-hotspot-jtreg-native -.PHONY: default all build-test-hotspot-jtreg-native test-image-hotspot-jtreg-native test-image +.PHONY: build-test-hotspot-jtreg-native test-image-hotspot-jtreg-native test-image + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/test/JtregNativeJdk.gmk b/make/test/JtregNativeJdk.gmk index 8384698654d..be40e24ba95 100644 --- a/make/test/JtregNativeJdk.gmk +++ b/make/test/JtregNativeJdk.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2025, 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,22 +23,17 @@ # questions. # +include MakeFileStart.gmk + ################################################################################ # This file builds the native component of the JTReg tests for JDK. # It also covers the test-image part, where the built files are copied to the # test image. ################################################################################ -default: all - -include $(SPEC) -include MakeBase.gmk - include CopyFiles.gmk include TestFilesCompilation.gmk -$(eval $(call IncludeCustomExtension, test/JtregNativeJdk.gmk)) - ################################################################################ # Targets for building the native tests themselves. ################################################################################ @@ -167,4 +162,8 @@ test-image-jdk-jtreg-native: $(COPY_JDK_JTREG_NATIVE) all: build-test-jdk-jtreg-native test-image: test-image-jdk-jtreg-native -.PHONY: default all build-test-jdk-jtreg-native test-image-jdk-jtreg-native test-image +.PHONY: build-test-jdk-jtreg-native test-image-jdk-jtreg-native test-image + +################################################################################ + +include MakeFileEnd.gmk diff --git a/make/test/JtregNativeLibTest.gmk b/make/test/JtregNativeLibTest.gmk index 1a0177e63b0..6a1441495d1 100644 --- a/make/test/JtregNativeLibTest.gmk +++ b/make/test/JtregNativeLibTest.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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,22 +23,17 @@ # questions. # +include MakeFileStart.gmk + ################################################################################ # This file builds the native component of the JTReg tests for testlibrary. # It also covers the test-image part, where the built files are copied to the # test image. ################################################################################ -default: all - -include $(SPEC) -include MakeBase.gmk - include CopyFiles.gmk include TestFilesCompilation.gmk -$(eval $(call IncludeCustomExtension, test/JtregNativeLibTest.gmk)) - ################################################################################ # Targets for building the native tests themselves. ################################################################################ @@ -89,4 +84,8 @@ test-image-libtest-jtreg-native: $(COPY_LIBTEST_JTREG_NATIVE) all: build-test-libtest-jtreg-native test-image: test-image-libtest-jtreg-native -.PHONY: default all build-test-libtest-jtreg-native test-image-libtest-jtreg-native test-image +.PHONY: build-test-libtest-jtreg-native test-image-libtest-jtreg-native test-image + +################################################################################ + +include MakeFileEnd.gmk diff --git a/test/make/TestCompileCommands.gmk b/test/make/TestCompileCommands.gmk index 26a3913138d..4673c74da79 100644 --- a/test/make/TestCompileCommands.gmk +++ b/test/make/TestCompileCommands.gmk @@ -1,5 +1,5 @@ -# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, 2025, 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 @@ -21,10 +21,9 @@ # questions. # -include $(SPEC) -include MakeBase.gmk +include MakeFileStart.gmk -default: all +################################################################################ COMPILE_COMMANDS := $(OUTPUTDIR)/compile_commands.json @@ -49,4 +48,8 @@ TEST_TARGETS += verify-compile-commands-json verify-no-shared-libraries all: $(TEST_TARGETS) -.PHONY: default all verify-compile-commands +.PHONY: verify-compile-commands + +################################################################################ + +include MakeFileEnd.gmk diff --git a/test/make/TestCopyFiles.gmk b/test/make/TestCopyFiles.gmk index cc05f89db23..ff9a7aaec72 100644 --- a/test/make/TestCopyFiles.gmk +++ b/test/make/TestCopyFiles.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, 2025, 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 @@ -21,10 +21,10 @@ # questions. # -default: all +include MakeFileStart.gmk + +################################################################################ -include $(SPEC) -include MakeBase.gmk include CopyFiles.gmk include UtilsForTests.gmk @@ -95,3 +95,7 @@ TEST_TARGETS += run-test1 ################################################################################ all: $(TEST_TARGETS) + +################################################################################ + +include MakeFileEnd.gmk diff --git a/test/make/TestFixDepsFile.gmk b/test/make/TestFixDepsFile.gmk index 26145d604f2..66c2eee461d 100644 --- a/test/make/TestFixDepsFile.gmk +++ b/test/make/TestFixDepsFile.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2025, 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 @@ -21,10 +21,10 @@ # questions. # -default: all +include MakeFileStart.gmk + +################################################################################ -include $(SPEC) -include MakeBase.gmk include UtilsForTests.gmk THIS_FILE := $(TOPDIR)/test/make/FixDepsFile.gmk @@ -62,3 +62,7 @@ TEST_TARGETS := test-fix-deps-file ################################################################################ all: $(TEST_TARGETS) + +################################################################################ + +include MakeFileEnd.gmk diff --git a/test/make/TestIdea.gmk b/test/make/TestIdea.gmk index 9ecc00dae80..4b87c8e5fca 100644 --- a/test/make/TestIdea.gmk +++ b/test/make/TestIdea.gmk @@ -21,17 +21,15 @@ # questions. # -include $(SPEC) -include MakeBase.gmk +include MakeFileStart.gmk -default: all +################################################################################ IDEA_OUTPUT_DIR := $(TESTMAKE_OUTPUTDIR)/verify-idea # Unset these variables to avoid having the current environment interfere with # the idea generation script. SPEC needs to remain as idea.sh will call back to # make and that call needs to have SPEC defined. -unexport HAS_SPEC unexport CONF unexport CONF_NAME @@ -48,4 +46,8 @@ TEST_TARGETS += verify-idea all: $(TEST_TARGETS) -.PHONY: default all verify-idea +.PHONY: verify-idea + +################################################################################ + +include MakeFileEnd.gmk diff --git a/test/make/TestJavaCompilation.gmk b/test/make/TestJavaCompilation.gmk index 039830241a9..d0bd3bb9499 100644 --- a/test/make/TestJavaCompilation.gmk +++ b/test/make/TestJavaCompilation.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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 @@ -21,10 +21,10 @@ # questions. # -default: all +include MakeFileStart.gmk + +################################################################################ -include $(SPEC) -include MakeBase.gmk include JarArchive.gmk include JavaCompilation.gmk include UtilsForTests.gmk @@ -345,4 +345,6 @@ TEST_TARGETS += verify-root1-first verify-root2-first all: $(TEST_TARGETS) -.PHONY: default all +################################################################################ + +include MakeFileEnd.gmk diff --git a/test/make/TestMake.gmk b/test/make/TestMake.gmk index 3ff8a255e8e..a017b573d0c 100644 --- a/test/make/TestMake.gmk +++ b/test/make/TestMake.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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 @@ -21,9 +21,9 @@ # questions. # -default: all +include MakeFileStart.gmk -include $(SPEC) +################################################################################ make-base: +$(MAKE) -f TestMakeBase.gmk $(TEST_SUBTARGET) @@ -50,10 +50,12 @@ configure: TARGETS += make-base java-compilation copy-files fix-deps-file idea \ compile-commands configure -all: $(TARGETS) - # Prints targets to TARGETS_FILE which must be set when calling this target. print-targets: $(ECHO) "$(TARGETS)" >> $(TARGETS_FILE) -.PHONY: default all $(TARGETS) +.PHONY: $(TARGETS) + +################################################################################ + +include MakeFileEnd.gmk diff --git a/test/make/TestMakeBase.gmk b/test/make/TestMakeBase.gmk index 78f2c1884c9..61fcbdf522f 100644 --- a/test/make/TestMakeBase.gmk +++ b/test/make/TestMakeBase.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2025, 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 @@ -21,10 +21,10 @@ # questions. # -default: all +include MakeFileStart.gmk + +################################################################################ -include $(SPEC) -include MakeBase.gmk include UtilsForTests.gmk THIS_FILE := $(TOPDIR)/test/make/TestMakeBase.gmk @@ -725,3 +725,7 @@ $(call AssertEquals, \ ################################################################################ all: $(TEST_TARGETS) + +################################################################################ + +include MakeFileEnd.gmk diff --git a/test/make/UtilsForTests.gmk b/test/make/UtilsForTests.gmk index 25c1aab2af3..125dabd15ef 100644 --- a/test/make/UtilsForTests.gmk +++ b/test/make/UtilsForTests.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, 2025, 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 @@ -21,7 +21,12 @@ # questions. # +include MakeIncludeStart.gmk +ifeq ($(INCLUDE), true) + +################################################################################ # This file contains utilities common for multiple test makefiles. +################################################################################ # Assert two strings are equal # 1 - Tested value @@ -43,3 +48,8 @@ CreateFile = $(shell $(MKDIR) -p $(call ShellQuote, $(dir $1)) \ ifeq ($(call isBuildOs, macosx), true) SLEEP_ON_MAC := sleep 1 endif + +################################################################################ + +endif # include guard +include MakeIncludeEnd.gmk