diff --git a/.github/actions/get-gtest/action.yml b/.github/actions/get-gtest/action.yml index d38d33eabd8..5de2b10cd32 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 absolute path - echo "path=`pwd`/gtest" >> $GITHUB_OUTPUT + # Export the path + echo 'path=gtest' >> $GITHUB_OUTPUT shell: bash diff --git a/.github/actions/get-jtreg/action.yml b/.github/actions/get-jtreg/action.yml index 4bb671d25d1..78a3a4c9edd 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 absolute path - echo "path=`pwd`/jtreg/installed" >> $GITHUB_OUTPUT + # Export the path + echo 'path=jtreg/installed' >> $GITHUB_OUTPUT shell: bash diff --git a/Makefile b/Makefile index 751574e9620..b094e14efbd 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 58950b5fb1f..2ed04c19064 100644 --- a/make/Bundles.gmk +++ b/make/Bundles.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. # 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. # -include MakeFileStart.gmk +default: all -################################################################################ +include $(SPEC) +include MakeBase.gmk include CopyFiles.gmk include MakeIO.gmk @@ -42,6 +43,8 @@ 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 @@ -499,6 +502,11 @@ 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) @@ -509,10 +517,6 @@ static-libs-bundles: $(STATIC_LIBS_TARGETS) static-libs-graal-bundles: $(STATIC_LIBS_GRAAL_TARGETS) jcov-bundles: $(JCOV_TARGETS) -.PHONY: product-bundles test-bundles \ +.PHONY: all default 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 baf07cf2e94..180bc76d4b8 100644 --- a/make/CompileCommands.gmk +++ b/make/CompileCommands.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,9 +23,10 @@ # questions. # -include MakeFileStart.gmk +default: all -################################################################################ +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 @ @@ -49,6 +50,6 @@ $(OUTPUTDIR)/compile_commands.json: $(wildcard $(MAKESUPPORT_OUTPUTDIR)/compile- TARGETS += $(OUTPUTDIR)/compile_commands.json -################################################################################ +all: $(TARGETS) -include MakeFileEnd.gmk +.PHONY: all diff --git a/make/CompileDemos.gmk b/make/CompileDemos.gmk index 503edf18e00..6c95aa08c2b 100644 --- a/make/CompileDemos.gmk +++ b/make/CompileDemos.gmk @@ -23,17 +23,23 @@ # 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 @@ -258,8 +264,11 @@ 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) -################################################################################ - -include MakeFileEnd.gmk +.PHONY: all diff --git a/make/CompileInterimLangtools.gmk b/make/CompileInterimLangtools.gmk index c869ea160c7..dbb23de093c 100644 --- a/make/CompileInterimLangtools.gmk +++ b/make/CompileInterimLangtools.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. # 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,11 @@ # questions. # -include MakeFileStart.gmk +# This must be the first rule +default: all -################################################################################ +include $(SPEC) +include MakeBase.gmk include CopyFiles.gmk include JavaCompilation.gmk @@ -146,4 +148,5 @@ TARGETS += $(BUILD_JAVAC_SERVER) ################################################################################ -include MakeFileEnd.gmk + +all: $(TARGETS) diff --git a/make/CompileJavaModules.gmk b/make/CompileJavaModules.gmk index b4a193dfade..7c86b77dd31 100644 --- a/make/CompileJavaModules.gmk +++ b/make/CompileJavaModules.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. # 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,13 @@ # questions. # -include MakeFileStart.gmk +# This must be the first rule +default: all -################################################################################ - -include JavaCompilation.gmk +include $(SPEC) +include MakeBase.gmk include Modules.gmk +include JavaCompilation.gmk ################################################################################ # If this is an imported module that has prebuilt classes, only compile @@ -85,15 +86,7 @@ CreateHkTargets = \ ################################################################################ # Include module specific build settings -THIS_SNIPPET := modules/$(MODULE)/Java.gmk - -ifneq ($(wildcard $(THIS_SNIPPET)), ) - include MakeSnippetStart.gmk - - include $(THIS_SNIPPET) - - include MakeSnippetEnd.gmk -endif +-include Java.gmk ################################################################################ # Setup the main compilation @@ -155,4 +148,6 @@ endif ################################################################################ -include MakeFileEnd.gmk +all: $(TARGETS) + +.PHONY: all diff --git a/make/CompileModuleTools.gmk b/make/CompileModuleTools.gmk index 12088553055..888b8418eea 100644 --- a/make/CompileModuleTools.gmk +++ b/make/CompileModuleTools.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. # 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 MakeFileStart.gmk +default: all + +include $(SPEC) +include MakeBase.gmk +include JavaCompilation.gmk ################################################################################ -include JavaCompilation.gmk - TOOLS_CLASSES_DIR := $(BUILDTOOLS_OUTPUTDIR)/tools_jigsaw_classes # When using an external BUILDJDK, make it possible to shortcut building of @@ -62,4 +64,4 @@ TARGETS += $(BUILD_JIGSAW_TOOLS) ################################################################################ -include MakeFileEnd.gmk +all: $(TARGETS) diff --git a/make/CompileToolsHotspot.gmk b/make/CompileToolsHotspot.gmk index 1ce6578de07..3fd3e5e8b88 100644 --- a/make/CompileToolsHotspot.gmk +++ b/make/CompileToolsHotspot.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,19 @@ # questions. # -include MakeFileStart.gmk +# This must be the first rule +default: all -################################################################################ +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 @@ -44,6 +51,7 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_HOTSPOT, \ TARGETS += $(BUILD_TOOLS_HOTSPOT) -################################################################################ -include MakeFileEnd.gmk +all: $(TARGETS) + +.PHONY: all diff --git a/make/CompileToolsJdk.gmk b/make/CompileToolsJdk.gmk index c291dbdba0a..41a19f90ace 100644 --- a/make/CompileToolsJdk.gmk +++ b/make/CompileToolsJdk.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,21 @@ # questions. # -include MakeFileStart.gmk +default: all -################################################################################ +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 \ @@ -153,6 +160,4 @@ ifeq ($(ENABLE_PANDOC), true) TARGETS += $(PANDOC_HTML_MANPAGE_FILTER_SETUP) endif -################################################################################ - -include MakeFileEnd.gmk +all: $(TARGETS) diff --git a/make/CopyImportModules.gmk b/make/CopyImportModules.gmk index 435468e48db..69a42f166ba 100644 --- a/make/CopyImportModules.gmk +++ b/make/CopyImportModules.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. # 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,13 @@ # 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 @@ -102,6 +103,4 @@ ifneq ($(CONF_DIR), ) TARGETS += $(COPY_CONF) endif -################################################################################ - -include MakeFileEnd.gmk +all: $(TARGETS) diff --git a/make/CopyInterimTZDB.gmk b/make/CopyInterimTZDB.gmk index 9305ca4c4ed..1e54cd8af11 100644 --- a/make/CopyInterimTZDB.gmk +++ b/make/CopyInterimTZDB.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. # 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,15 @@ # questions. # -include MakeFileStart.gmk +default: all -################################################################################ +include $(SPEC) +include MakeBase.gmk include CopyFiles.gmk +################################################################################ + ### TZDB tool needs files from java.time.zone package define tzdb_copyfiles @@ -48,7 +51,3 @@ $(eval $(call SetupCopyFiles, COPY_INTERIM_TZDB, \ ################################################################################ all: $(COPY_INTERIM_TZDB) - -################################################################################ - -include MakeFileEnd.gmk diff --git a/make/Coverage.gmk b/make/Coverage.gmk index 2fd4e4ec6d4..c6c82af2401 100644 --- a/make/Coverage.gmk +++ b/make/Coverage.gmk @@ -22,7 +22,8 @@ # or visit www.oracle.com if you need additional information or have any # questions. -include MakeFileStart.gmk +include $(SPEC) +include MakeBase.gmk ################################################################################ @@ -53,7 +54,3 @@ $(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 40bceda69a9..86bc3b8335e 100644 --- a/make/CreateJmods.gmk +++ b/make/CreateJmods.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. # 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. # -include MakeFileStart.gmk +default: all -################################################################################ +include $(SPEC) +include MakeBase.gmk include CopyFiles.gmk include Execute.gmk @@ -35,6 +36,8 @@ ifeq ($(MODULE), ) $(error MODULE must be set when calling CreateJmods.gmk) endif +$(eval $(call IncludeCustomExtension, CreateJmods.gmk)) + ################################################################################ JMODS_DIR := $(IMAGES_OUTPUTDIR)/jmods @@ -184,15 +187,7 @@ endif ################################################################################ # Include module specific build settings -THIS_SNIPPET := modules/$(MODULE)/Jmod.gmk - -ifneq ($(wildcard $(THIS_SNIPPET)), ) - include MakeSnippetStart.gmk - - include $(THIS_SNIPPET) - - include MakeSnippetEnd.gmk -endif +-include Jmod.gmk # Set main class ifneq ($(JMOD_FLAGS_main_class), ) @@ -271,4 +266,6 @@ TARGETS += $(create_$(JMOD_FILE)) ################################################################################ -include MakeFileEnd.gmk +all: $(TARGETS) + +################################################################################ diff --git a/make/Docs.gmk b/make/Docs.gmk index 5c67393fb66..fb2726e6dad 100644 --- a/make/Docs.gmk +++ b/make/Docs.gmk @@ -1,4 +1,4 @@ -# Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. # 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,7 +22,26 @@ # questions. # -include MakeFileStart.gmk +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)) ################################################################################ # This file generates all documentation for OpenJDK. @@ -35,19 +54,7 @@ include MakeFileStart.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 @@ -754,6 +761,10 @@ $(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. @@ -795,11 +806,7 @@ 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: docs-jdk-api-javadoc docs-jdk-api-graphs \ +.PHONY: default all 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 05de0730fa1..39953cd28db 100644 --- a/make/Doctor.gmk +++ b/make/Doctor.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,11 +23,18 @@ # questions. # -include MakeFileStart.gmk +default: all + +include $(SPEC) +include MakeBase.gmk + +# Hook to include the corresponding custom file, if present. +$(eval $(call IncludeCustomExtension, Doctor.gmk)) ################################################################################ +# # Help user diagnose possible errors and problems with the build environment. -################################################################################ +# prologue: $(ECHO) @@ -138,8 +145,4 @@ doctor: $(TARGETS) all: doctor -.PHONY: doctor $(TARGETS) - -################################################################################ - -include MakeFileEnd.gmk +.PHONY: default all doctor $(TARGETS) diff --git a/make/ExplodedImageOptimize.gmk b/make/ExplodedImageOptimize.gmk index 928ff86f10f..a67b987d91d 100644 --- a/make/ExplodedImageOptimize.gmk +++ b/make/ExplodedImageOptimize.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. # 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,17 @@ # questions. # -include MakeFileStart.gmk - -################################################################################ # 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 +################################################################################ + ALL_MODULEINFO_CLASSES := $(wildcard $(JDK_OUTPUTDIR)/modules/*/module-info.class) $(eval $(call SetupExecute, optimize_image, \ @@ -45,4 +47,6 @@ TARGETS := $(optimize_image_TARGET) ################################################################################ -include MakeFileEnd.gmk +all: $(TARGETS) + +.PHONY: all default diff --git a/make/GenerateLinkOptData.gmk b/make/GenerateLinkOptData.gmk index 5fc745ba223..b6989042d6a 100644 --- a/make/GenerateLinkOptData.gmk +++ b/make/GenerateLinkOptData.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. # 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,15 @@ # questions. # -include MakeFileStart.gmk - ################################################################################ # Generate classlist ################################################################################ +default: all + +include $(SPEC) +include MakeBase.gmk + include CopyFiles.gmk include JavaCompilation.gmk @@ -145,4 +148,4 @@ TARGETS += $(COPY_JLI_TRACE) ################################################################################ -include MakeFileEnd.gmk +all: $(TARGETS) diff --git a/make/GenerateModuleSummary.gmk b/make/GenerateModuleSummary.gmk index 5c6ec055c45..854d938c9ca 100644 --- a/make/GenerateModuleSummary.gmk +++ b/make/GenerateModuleSummary.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. # 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 MakeFileStart.gmk +# Default target declared first +default: all -################################################################################ - -include $(TOPDIR)/make/ModuleTools.gmk +include $(SPEC) +include MakeBase.gmk +include ModuleTools.gmk GENGRAPHS_DIR := $(IMAGES_OUTPUTDIR)/gengraphs SPEC_DOTFILES_DIR := $(GENGRAPHS_DIR)/spec-dotfiles @@ -49,7 +50,3 @@ $(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 512c5b963aa..25753f1ae57 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 d707e067a55..7fa90c66019 100644 --- a/make/GraalBuilderImage.gmk +++ b/make/GraalBuilderImage.gmk @@ -23,15 +23,20 @@ # questions. # -include MakeFileStart.gmk - -################################################################################ # This makefile creates a jdk image overlaid with statically linked core # libraries. -################################################################################ + +default: all + +include $(SPEC) +include MakeBase.gmk include CopyFiles.gmk +################################################################################ + +TARGETS := + $(eval $(call SetupCopyFiles, COPY_JDK_IMG, \ SRC := $(JDK_IMAGE_DIR)/, \ DEST := $(GRAAL_BUILDER_IMAGE_DIR)/, \ @@ -49,4 +54,6 @@ TARGETS += $(COPY_STATIC_LIBS) ################################################################################ -include MakeFileEnd.gmk +all: $(TARGETS) + +.PHONY: all diff --git a/make/Hsdis.gmk b/make/Hsdis.gmk index a0fc031be1b..13d84f964bc 100644 --- a/make/Hsdis.gmk +++ b/make/Hsdis.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,14 +23,17 @@ # questions. # -include MakeFileStart.gmk +default: all + +include $(SPEC) +include MakeBase.gmk +include JdkNativeCompilation.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) @@ -198,8 +201,8 @@ endif TARGETS += install -.PHONY: build install - ################################################################################ -include MakeFileEnd.gmk +all: $(TARGETS) + +.PHONY: all default build install diff --git a/make/Images.gmk b/make/Images.gmk index 6c859fce7a5..c5d0ef11b5d 100644 --- a/make/Images.gmk +++ b/make/Images.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. # 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. # -include MakeFileStart.gmk +default: all -################################################################################ +include $(SPEC) +include MakeBase.gmk include CopyFiles.gmk include DebugInfoUtils.gmk @@ -36,6 +37,9 @@ 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. @@ -305,6 +309,12 @@ $(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) @@ -314,8 +324,4 @@ symbols: $(SYMBOLS_TARGETS) all: jdk jre symbols -.PHONY: jdk jre symbols - -################################################################################ - -include MakeFileEnd.gmk +.PHONY: default all jdk jre symbols diff --git a/make/Init.gmk b/make/Init.gmk index 6da2fb985b6..5a10f42482f 100644 --- a/make/Init.gmk +++ b/make/Init.gmk @@ -23,8 +23,6 @@ # 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 @@ -33,20 +31,28 @@ include MakeFileStart.gmk # value of $(MAKE) for all further make calls. ################################################################################ -# 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 +# This must be the first rule +default: +.PHONY: default # 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)) @@ -163,7 +169,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 \ - on-failure ; \ + HAS_SPEC=true on-failure ; \ exit $$exitcode ) ) $(call CleanupJavacServer) $(call StopGlobalTimer) @@ -199,7 +205,3 @@ 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 a9af44e4225..a4b4f2ca964 100644 --- a/make/InitSupport.gmk +++ b/make/InitSupport.gmk @@ -23,9 +23,6 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - ################################################################################ # This file contains helper functions for Init.gmk. ################################################################################ @@ -39,6 +36,12 @@ 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 @@ -61,7 +64,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 := $(WORKSPACE_ROOT)/build/compare-build/$(CONF_NAME) + COMPARE_BUILD_OUTPUTDIR := $(topdir)/build/compare-build/$(CONF_NAME) COMPARE_BUILD_FAIL := true ifneq ($$(findstring :, $$(COMPARE_BUILD)), ) @@ -103,14 +106,14 @@ define ParseCompareBuild endif endif ifneq ($$(COMPARE_BUILD_PATCH), ) - ifneq ($$(wildcard $$(WORKSPACE_ROOT)/$$(COMPARE_BUILD_PATCH)), ) + ifneq ($$(wildcard $$(topdir)/$$(COMPARE_BUILD_PATCH)), ) # Assume relative path, if file exists - COMPARE_BUILD_PATCH := $$(wildcard $$(WORKSPACE_ROOT)/$$(COMPARE_BUILD_PATCH)) + COMPARE_BUILD_PATCH := $$(wildcard $$(topdir)/$$(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 $$(WORKSPACE_ROOT) && $$(PATCH) --dry-run -p1 < $$(COMPARE_BUILD_PATCH) > /dev/null 2>&1 || $$(ECHO) FAILED) + PATCH_DRY_RUN := $$(shell cd $$(topdir) && $$(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 @@ -126,11 +129,11 @@ endef define PrepareCompareBuild $(ECHO) "Preparing for comparison rebuild" # Apply patch, if any - $(if $(COMPARE_BUILD_PATCH), cd $(WORKSPACE_ROOT) && $(PATCH) -p1 < $(COMPARE_BUILD_PATCH)) + $(if $(COMPARE_BUILD_PATCH), cd $(topdir) && $(PATCH) -p1 < $(COMPARE_BUILD_PATCH)) # Move the first build away temporarily - $(RM) -r $(WORKSPACE_ROOT)/build/.compare-build-temp - $(MKDIR) -p $(WORKSPACE_ROOT)/build/.compare-build-temp - $(MV) $(OUTPUTDIR) $(WORKSPACE_ROOT)/build/.compare-build-temp + $(RM) -r $(topdir)/build/.compare-build-temp + $(MKDIR) -p $(topdir)/build/.compare-build-temp + $(MV) $(OUTPUTDIR) $(topdir)/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); \ @@ -140,19 +143,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) $(WORKSPACE_ROOT)/configure $(CONFIGURE_COMMAND_LINE) $(COMPARE_BUILD_CONF)) + $(BASH) $(topdir)/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 $(WORKSPACE_ROOT) && $(PATCH) -R -p1 < $(COMPARE_BUILD_PATCH) || true) + $(if $(COMPARE_BUILD_PATCH), cd $(topdir) && $(PATCH) -R -p1 < $(COMPARE_BUILD_PATCH) || true) # Move this build away and restore the original build - $(MKDIR) -p $(WORKSPACE_ROOT)/build/compare-build + $(MKDIR) -p $(topdir)/build/compare-build $(MV) $(OUTPUTDIR) $(COMPARE_BUILD_OUTPUTDIR) - $(MV) $(WORKSPACE_ROOT)/build/.compare-build-temp/$(CONF_NAME) $(OUTPUTDIR) - $(RM) -r $(WORKSPACE_ROOT)/build/.compare-build-temp + $(MV) $(topdir)/build/.compare-build-temp/$(CONF_NAME) $(OUTPUTDIR) + $(RM) -r $(topdir)/build/.compare-build-temp endef # Do the actual comparison of two builds @@ -262,7 +265,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 @@ -315,8 +318,3 @@ define ReportProfileTimes $(BUILD_LOG_PIPE_SIMPLE) ) endef - -################################################################################ - -endif # include guard -include MakeIncludeEnd.gmk diff --git a/make/InterimImage.gmk b/make/InterimImage.gmk index 5fd685509ae..e046f060513 100644 --- a/make/InterimImage.gmk +++ b/make/InterimImage.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. # 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. # -include MakeFileStart.gmk +default: all -################################################################################ +include $(SPEC) +include MakeBase.gmk include Execute.gmk include Modules.gmk @@ -57,4 +58,6 @@ TARGETS += $(jlink_interim_image) ################################################################################ -include MakeFileEnd.gmk +all: $(TARGETS) + +.PHONY: all diff --git a/make/JrtfsJar.gmk b/make/JrtfsJar.gmk index 54e2b094318..e1b3965ba04 100644 --- a/make/JrtfsJar.gmk +++ b/make/JrtfsJar.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. # 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,14 @@ # questions. # -include MakeFileStart.gmk +default: all -################################################################################ +include $(SPEC) +include MakeBase.gmk include CopyFiles.gmk -include JarArchive.gmk include JavaCompilation.gmk +include JarArchive.gmk include TextFileProcessing.gmk # This rule will be depended on due to the MANIFEST line @@ -77,7 +78,3 @@ $(eval $(call SetupJarArchive, BUILD_JRTFS_JAR, \ )) all: $(BUILD_JRTFS_JAR) - -################################################################################ - -include MakeFileEnd.gmk diff --git a/make/MacBundles.gmk b/make/MacBundles.gmk index f80ca1e2735..13b80b8e56e 100644 --- a/make/MacBundles.gmk +++ b/make/MacBundles.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,8 @@ # questions. # -include MakeFileStart.gmk - -################################################################################ +include $(SPEC) +include MakeBase.gmk include CopyFiles.gmk include TextFileProcessing.gmk @@ -119,7 +118,3 @@ 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 4690139e6ad..e49db6e78a2 100644 --- a/make/Main.gmk +++ b/make/Main.gmk @@ -24,35 +24,44 @@ # ################################################################################ -# This is the main makefile containing most actual top level targets. +# This is the main makefile containing most actual top level targets. It needs +# to be called with a SPEC file defined. ################################################################################ -# 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. +# Declare default target +default: -ALL_TARGETS := +ifeq ($(wildcard $(SPEC)), ) + $(error Main.gmk needs SPEC set to a proper spec.gmk) +endif -DEFAULT_TARGET := default-target +# Now load the spec +include $(SPEC) -include MakeFileStart.gmk - -################################################################################ +# 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 $(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. @@ -1333,7 +1342,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-target: $(DEFAULT_MAKE_TARGET) +default: $(DEFAULT_MAKE_TARGET) jdk: exploded-image images: product-images docs: docs-image @@ -1368,6 +1377,7 @@ 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 @@ -1477,8 +1487,10 @@ 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 f7ba4de2d53..5a5e40d025a 100644 --- a/make/MainSupport.gmk +++ b/make/MainSupport.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,5 +218,4 @@ endef ################################################################################ -endif # include guard -include MakeIncludeEnd.gmk +endif # _MAINSUPPORT_GMK diff --git a/make/ModuleTools.gmk b/make/ModuleTools.gmk index 3b26ce86c28..020e12d6e4b 100644 --- a/make/ModuleTools.gmk +++ b/make/ModuleTools.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,10 +23,8 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ +ifndef _MODULE_TOOLS_GMK +_MODULE_TOOLS_GMK := 1 include JavaCompilation.gmk @@ -51,7 +49,4 @@ TOOL_ADD_PACKAGES_ATTRIBUTE := $(BUILD_JAVA) $(JAVA_FLAGS_SMALL_BUILDJDK) \ --add-exports java.base/jdk.internal.module=ALL-UNNAMED \ build.tools.jigsaw.AddPackagesAttribute -################################################################################ - -endif # include guard -include MakeIncludeEnd.gmk +endif # _MODULE_TOOLS_GMK diff --git a/make/ModuleWrapper.gmk b/make/ModuleWrapper.gmk index b3ddf940e00..51208432ea0 100644 --- a/make/ModuleWrapper.gmk +++ b/make/ModuleWrapper.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. # 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,29 +23,27 @@ # 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) -# Define the snippet for MakeSnippetStart/End -THIS_SNIPPET := modules/$(MODULE)/$(MAKEFILE_PREFIX).gmk - -include MakeSnippetStart.gmk +# All makefiles should add the targets to be built to this variable. +TARGETS := # Include the file being wrapped. -include $(THIS_SNIPPET) - -include MakeSnippetEnd.gmk +include $(MAKEFILE_PREFIX).gmk ifeq ($(MAKEFILE_PREFIX), Lib) # We need to keep track of what libraries are generated/needed by this @@ -130,12 +128,8 @@ $(eval $(call SetupCopyFiles, COPY_CONF, \ )) ifeq ($(GENERATE_COMPILE_COMMANDS_ONLY), true) - TARGETS := $(filter $(MAKESUPPORT_OUTPUTDIR)/compile-commands/%, $(TARGETS)) + all: $(filter $(MAKESUPPORT_OUTPUTDIR)/compile-commands/%, $(TARGETS)) else - TARGETS += $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB) \ + all: $(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 b4c0402da3d..6a424894802 100644 --- a/make/PreInit.gmk +++ b/make/PreInit.gmk @@ -38,15 +38,13 @@ 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. @@ -81,8 +79,7 @@ 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). @@ -104,26 +101,25 @@ 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) $(MAKE_INIT_ARGS) -f $(TOPDIR)/make/Init.gmk SPEC=$@ \ - reconfigure ) + @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 ) else ifeq ($(CONF_CHECK), ignore) # Do nothing endif @@ -143,7 +139,7 @@ ifneq ($(SKIP_SPEC), true) $(COMMAND_LINE_VARIABLES) $(MAKECMDGOALS))') endif - MAKE_INIT_MAIN_TARGET_ARGS := \ + MAKE_INIT_WITH_SPEC_ARGUMENTS := ACTUAL_TOPDIR=$(topdir) \ USER_MAKE_VARS="$(USER_MAKE_VARS)" MAKE_LOG_FLAGS=$(MAKE_LOG_FLAGS) \ $(MAKE_LOG_VARS) \ INIT_TARGETS="$(INIT_TARGETS)" \ @@ -159,24 +155,21 @@ ifneq ($(SKIP_SPEC), true) @$(if $(TARGET_DONE), \ true \ , \ - ( cd $(TOPDIR) && \ + ( cd $(topdir) && \ $(foreach spec, $(SPECS), \ - $(MAKE) $(MAKE_INIT_ARGS) -j 1 -f $(TOPDIR)/make/Init.gmk \ - SPEC=$(spec) $(MAKE_INIT_MAIN_TARGET_ARGS) \ + $(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -j 1 -f $(topdir)/make/Init.gmk \ + SPEC=$(spec) HAS_SPEC=true $(MAKE_INIT_WITH_SPEC_ARGUMENTS) \ main && \ $(if $(and $(COMPARE_BUILD), $(PARALLEL_TARGETS)), \ - $(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 && \ + $(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 && \ ) \ ) true ) \ $(eval TARGET_DONE=true) \ @@ -220,5 +213,3 @@ else # SKIP_SPEC=true .PHONY: $(ALL_TARGETS) endif # $(SKIP_SPEC)!=true - -################################################################################ diff --git a/make/PreInitSupport.gmk b/make/PreInitSupport.gmk index c3741589330..5acc2163af1 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. -################################################################################ - -# Include the corresponding closed file, if present. -ifneq ($(CUSTOM_MAKE_DIR), ) - -include $(CUSTOM_MAKE_DIR)/PreInitSupport-pre.gmk -endif +############################################################################## # 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 +endif + # 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,5 +295,3 @@ 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 4204dfc76d5..dc6f66a69a2 100644 --- a/make/ReleaseFile.gmk +++ b/make/ReleaseFile.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. # 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 MakeFileStart.gmk +default: all + +include $(SPEC) +include MakeBase.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 @@ -81,4 +85,10 @@ TARGETS += $(BASE_RELEASE_FILE) ################################################################################ -include MakeFileEnd.gmk +$(eval $(call IncludeCustomExtension, ReleaseFile.gmk)) + +################################################################################ + +all: $(TARGETS) + +.PHONY: all default diff --git a/make/RunTests.gmk b/make/RunTests.gmk index f541f0c0757..27a3c9b8b45 100644 --- a/make/RunTests.gmk +++ b/make/RunTests.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. # 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 MakeFileStart.gmk - -################################################################################ +default: all +include $(SPEC) +include MakeBase.gmk include FindTests.gmk # We will always run multiple tests serially @@ -71,6 +71,9 @@ 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 @@ -1354,8 +1357,4 @@ endif all: run-test -.PHONY: $(TARGETS) - -################################################################################ - -include MakeFileEnd.gmk +.PHONY: default all $(TARGETS) diff --git a/make/RunTestsPrebuilt.gmk b/make/RunTestsPrebuilt.gmk index 1ca22276c75..3bfcebd4be4 100644 --- a/make/RunTestsPrebuilt.gmk +++ b/make/RunTestsPrebuilt.gmk @@ -27,8 +27,6 @@ # 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)), ) @@ -59,7 +57,7 @@ TOPDIR := $(strip $(patsubst %/make/, %, $(dir $(makefile_path)))) define SetupVariable ifeq ($$($1), ) ifeq ($2, ) - $$(info Error: Prebuilt variable $1 is missing, needed for test-prebuilt) + $$(info Error: Prebuilt variable $1 is missing, needed for run-tests-prebuilt) $$(error Cannot continue.) else ifeq ($2, OPTIONAL) ifneq ($$(findstring $$(LOG), info debug trace), ) @@ -137,6 +135,7 @@ $(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 @@ -247,7 +246,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-pre.gmk + include $(CUSTOM_MAKE_DIR)/RunTestsPrebuilt.gmk endif NEW_SPEC := $(OUTPUTDIR)/run-test-spec.gmk @@ -297,10 +296,14 @@ test-prebuilt: # is unfortunately not available at this point. $(call MakeDir, $(MAKESUPPORT_OUTPUTDIR)/failure-logs) @$(RM) -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error - # 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 \ + # 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 \ TEST="$(TEST)" test-prebuilt-with-exit-code: test-prebuilt diff --git a/make/RunTestsPrebuiltFindTests.gmk b/make/RunTestsPrebuiltFindTests.gmk deleted file mode 100644 index d8faa5cd0cd..00000000000 --- a/make/RunTestsPrebuiltFindTests.gmk +++ /dev/null @@ -1,38 +0,0 @@ -# -# 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 285aaae17b5..79c438987f7 100644 --- a/make/SourceRevision.gmk +++ b/make/SourceRevision.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. # 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 MakeFileStart.gmk +include $(SPEC) +include MakeBase.gmk + +$(eval $(call IncludeCustomExtension, SourceRevision-pre.gmk)) ################################################################################ # Keep track of what source revision is used to create the build, by creating @@ -35,7 +38,6 @@ include MakeFileStart.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 @@ -154,6 +156,10 @@ endif ################################################################################ +$(eval $(call IncludeCustomExtension, SourceRevision-post.gmk)) + +################################################################################ + store-source-revision: $(STORE_SOURCE_REVISION_TARGET) create-source-revision-tracker: $(CREATE_SOURCE_REVISION_TRACKER_TARGET) @@ -161,7 +167,3 @@ 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 3fcbd0565c3..e4b8e422caf 100644 --- a/make/StaticLibs.gmk +++ b/make/StaticLibs.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. # 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. # -include MakeFileStart.gmk +default: all -################################################################################ +include $(SPEC) +include MakeBase.gmk include CopyFiles.gmk include DebugInfoUtils.gmk @@ -184,8 +185,6 @@ static-jdk-image: $(copy-from-jdk-image) $(copy-static-launcher) $(copy-static-l TARGETS += static-jdk-image -.PHONY: static-launcher static-jdk-image +all: $(TARGETS) -################################################################################ - -include MakeFileEnd.gmk +.PHONY: all static-launcher static-jdk-image diff --git a/make/StaticLibsImage.gmk b/make/StaticLibsImage.gmk index 1f50c5b7f1b..6a181ff262f 100644 --- a/make/StaticLibsImage.gmk +++ b/make/StaticLibsImage.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. # 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,13 @@ # 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 @@ -37,6 +38,8 @@ 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)), ) @@ -69,9 +72,11 @@ 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) -include MakeFileEnd.gmk +.PHONY: all diff --git a/make/TestImage.gmk b/make/TestImage.gmk index 869cce1d558..5c788a8d0a6 100644 --- a/make/TestImage.gmk +++ b/make/TestImage.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. # 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,13 @@ # questions. # -include MakeFileStart.gmk +default: all + +include $(SPEC) +include MakeBase.gmk + +# Hook to include the corresponding custom file, if present. +$(eval $(call IncludeCustomExtension, TestImage-pre.gmk)) ################################################################################ @@ -48,8 +54,4 @@ TARGETS += $(BUILD_INFO_PROPERTIES) $(README) prepare-test-image: $(TARGETS) all: prepare-test-image -.PHONY: prepare-test-image - -################################################################################ - -include MakeFileEnd.gmk +.PHONY: default all prepare-test-image diff --git a/make/ToolsHotspot.gmk b/make/ToolsHotspot.gmk index 60ef0f2e35e..f53d851c0b7 100644 --- a/make/ToolsHotspot.gmk +++ b/make/ToolsHotspot.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,8 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ +ifndef _TOOLS_HOTSPOT_GMK +_TOOLS_HOTSPOT_GMK := 1 include JavaCompilation.gmk @@ -46,5 +44,4 @@ TOOL_JFR_GEN := $(JAVA_SMALL) -cp $(HOTSPOT_TOOLS_OUTPUTDIR) \ ################################################################################ -endif # include guard -include MakeIncludeEnd.gmk +endif # _TOOLS_HOTSPOT_GMK diff --git a/make/ToolsJdk.gmk b/make/ToolsJdk.gmk index f301ddb53d1..98287473f3e 100644 --- a/make/ToolsJdk.gmk +++ b/make/ToolsJdk.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,14 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ +ifndef _TOOLS_GMK +_TOOLS_GMK := 1 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 @@ -136,5 +137,7 @@ PANDOC_HTML_MANPAGE_FILTER := $(BUILDTOOLS_OUTPUTDIR)/manpages/pandoc-html-manpa ################################################################################ -endif # include guard -include MakeIncludeEnd.gmk +# Hook to include the corresponding custom post file, if present. +$(eval $(call IncludeCustomExtension, ToolsJdk-post.gmk)) + +endif # _TOOLS_GMK diff --git a/make/ToolsLangtools.gmk b/make/ToolsLangtools.gmk index 4146652bf8b..86fb364a7cd 100644 --- a/make/ToolsLangtools.gmk +++ b/make/ToolsLangtools.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,10 +23,11 @@ # questions. # -include MakeFileStart.gmk - -################################################################################ +# This must be the first rule +default: all +include $(SPEC) +include MakeBase.gmk include JavaCompilation.gmk ################################################################################ @@ -42,7 +43,3 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_LANGTOOLS, \ )) all: $(BUILD_TOOLS_LANGTOOLS) - -################################################################################ - -include MakeFileEnd.gmk diff --git a/make/UpdateBuildDocs.gmk b/make/UpdateBuildDocs.gmk index b507789489f..7fed72e7311 100644 --- a/make/UpdateBuildDocs.gmk +++ b/make/UpdateBuildDocs.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,14 +23,17 @@ # questions. # -include MakeFileStart.gmk +default: all + +include $(SPEC) +include MakeBase.gmk +include ProcessMarkdown.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) @@ -52,4 +55,10 @@ TARGETS += $(md_docs) ################################################################################ -include MakeFileEnd.gmk +$(eval $(call IncludeCustomExtension, UpdateBuildDocs.gmk)) + +################################################################################ + +all: $(TARGETS) + +.PHONY: all default diff --git a/make/UpdateSleefSource.gmk b/make/UpdateSleefSource.gmk index c7fdfdb41d9..37a28abcb85 100644 --- a/make/UpdateSleefSource.gmk +++ b/make/UpdateSleefSource.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. # 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,15 @@ # questions. # -include MakeFileStart.gmk +################################################################################ + +default: all + +include $(SPEC) +include MakeBase.gmk + +include CopyFiles.gmk +include Execute.gmk ################################################################################ # This file is responsible for updating the generated sleef source code files @@ -32,9 +40,6 @@ include MakeFileStart.gmk # updated from upstream. ################################################################################ -include CopyFiles.gmk -include Execute.gmk - ifneq ($(COMPILE_TYPE), cross) $(error Only cross-compilation of libsleef is currently supported) endif @@ -143,4 +148,6 @@ TARGETS := $(copy_generated_sleef_source) ################################################################################ -include MakeFileEnd.gmk +all: $(TARGETS) + +.PHONY: all default diff --git a/make/UpdateX11Wrappers.gmk b/make/UpdateX11Wrappers.gmk index 3ff2fc148fb..f6f43ac2b53 100644 --- a/make/UpdateX11Wrappers.gmk +++ b/make/UpdateX11Wrappers.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved. # 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,15 @@ # questions. # -include MakeFileStart.gmk +################################################################################ + +default: all + +include $(SPEC) +include MakeBase.gmk +include Execute.gmk +include JdkNativeCompilation.gmk +include ToolsJdk.gmk ################################################################################ # This file is responsible for extracting the x11 native struct offsets to @@ -35,10 +43,6 @@ include MakeFileStart.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 @@ -104,4 +108,6 @@ TARGETS += $(run_wrappergen) wrapper-information ################################################################################ -include MakeFileEnd.gmk +all: $(TARGETS) + +.PHONY: all default diff --git a/make/ZipSecurity.gmk b/make/ZipSecurity.gmk index fa5e4125290..08f9caadd9a 100644 --- a/make/ZipSecurity.gmk +++ b/make/ZipSecurity.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. # 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 MakeFileStart.gmk - -################################################################################ +default: all +include $(SPEC) +include MakeBase.gmk include ZipArchive.gmk ################################################################################ @@ -100,4 +100,6 @@ endif ################################################################################ -include MakeFileEnd.gmk +all: $(TARGETS) + +.PHONY: default all diff --git a/make/ZipSource.gmk b/make/ZipSource.gmk index 519339f2078..c1df6af7583 100644 --- a/make/ZipSource.gmk +++ b/make/ZipSource.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. # 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,19 @@ # questions. # -include MakeFileStart.gmk - -################################################################################ +default: all +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 @@ -92,8 +95,8 @@ zip: $(SRC_ZIP_SRCS) TARGETS += zip -.PHONY: zip - ################################################################################ -include MakeFileEnd.gmk +all: $(TARGETS) + +.PHONY: default all zip diff --git a/make/common/CopyFiles.gmk b/make/common/CopyFiles.gmk index f56947f01f5..8ba21677245 100644 --- a/make/common/CopyFiles.gmk +++ b/make/common/CopyFiles.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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) +ifeq ($(_MAKEBASE_GMK), ) + $(error You must include MakeBase.gmk prior to including CopyFiles.gmk) +endif ################################################################################ +# # Code for handling the SetupCopyFiles macro. +# ################################################################################ define AddFileToCopy @@ -107,8 +110,3 @@ define SetupCopyFilesBody ) endef - -################################################################################ - -endif # include guard -include MakeIncludeEnd.gmk diff --git a/make/common/DebugInfoUtils.gmk b/make/common/DebugInfoUtils.gmk index 721dd06e587..69d6c24b5e0 100644 --- a/make/common/DebugInfoUtils.gmk +++ b/make/common/DebugInfoUtils.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. # 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) +ifeq ($(_MAKEBASE_GMK), ) + $(error You must include MakeBase.gmk prior to including DebugInfoUtils.gmk) +endif ################################################################################ +# # Common debuginfo utility functions +# ################################################################################ ################################################################################ @@ -53,6 +56,3 @@ 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 bf108c30c05..aa3c2e58813 100644 --- a/make/common/Execute.gmk +++ b/make/common/Execute.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. # 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,17 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) +ifeq ($(_MAKEBASE_GMK), ) + $(error You must include MakeBase.gmk prior to including Execute.gmk) +endif ################################################################################ +# # Code for handling the SetupExecute macro. +# ################################################################################ + ################################################################################ # Setup make rules for executing an arbitrary command. # @@ -192,8 +196,3 @@ 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 fa934797fc7..d3cc4872ebb 100644 --- a/make/common/FileUtils.gmk +++ b/make/common/FileUtils.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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) +ifeq ($(_MAKEBASE_GMK), ) + $(error You must include MakeBase.gmk prior to including FileUtils.gmk) +endif ################################################################################ +# # Common file utility functions +# ################################################################################ ################################################################################ @@ -304,8 +307,3 @@ 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 1f3a70b3035..5dfe49e5901 100644 --- a/make/common/FindTests.gmk +++ b/make/common/FindTests.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. # 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,21 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) +ifndef _FIND_TESTS_GMK +_FIND_TESTS_GMK := 1 -################################################################################ +# 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) @@ -94,5 +105,4 @@ ALL_NAMED_TESTS += failure-handler make ################################################################################ -endif # include guard -include MakeIncludeEnd.gmk +endif # _FIND_TESTS_GMK diff --git a/make/common/JarArchive.gmk b/make/common/JarArchive.gmk index 1f8ed1bc002..68e9eaca32c 100644 --- a/make/common/JarArchive.gmk +++ b/make/common/JarArchive.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,12 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) +ifndef _JAR_ARCHIVE_GMK +_JAR_ARCHIVE_GMK := 1 -################################################################################ +ifeq ($(_MAKEBASE_GMK), ) + $(error You must include MakeBase.gmk prior to including JarArchive.gmk) +endif include MakeIO.gmk @@ -281,7 +283,4 @@ define SetupJarArchiveBody $1 += $$($1_JAR) endef -################################################################################ - -endif # include guard -include MakeIncludeEnd.gmk +endif # _JAR_ARCHIVE_GMK diff --git a/make/common/JavaCompilation.gmk b/make/common/JavaCompilation.gmk index f48aefcd517..c56217b9f33 100644 --- a/make/common/JavaCompilation.gmk +++ b/make/common/JavaCompilation.gmk @@ -23,10 +23,12 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) +ifndef _JAVA_COMPILATION_GMK +_JAVA_COMPILATION_GMK := 1 -################################################################################ +ifeq ($(_MAKEBASE_GMK), ) + $(error You must include MakeBase.gmk prior to including JavaCompilation.gmk) +endif include MakeIO.gmk @@ -538,7 +540,4 @@ SetupJavaCompilationCompileTarget = \ SetupJavaCompilationApiTarget = \ $(strip $2)/_the.$(strip $1)_pubapi -################################################################################ - -endif # include guard -include MakeIncludeEnd.gmk +endif # _JAVA_COMPILATION_GMK diff --git a/make/common/JdkNativeCompilation.gmk b/make/common/JdkNativeCompilation.gmk index 372ad39305c..a4f48385f41 100644 --- a/make/common/JdkNativeCompilation.gmk +++ b/make/common/JdkNativeCompilation.gmk @@ -23,13 +23,18 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) +ifndef _JDK_NATIVE_COMPILATION_GMK +_JDK_NATIVE_COMPILATION_GMK := 1 -################################################################################ +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) \ @@ -494,7 +499,4 @@ define SetupJdkExecutableBody $$(eval $$(call SetupJdkNativeCompilation, $1)) endef -################################################################################ - -endif # include guard -include MakeIncludeEnd.gmk +endif # _JDK_NATIVE_COMPILATION_GMK diff --git a/make/common/LogUtils.gmk b/make/common/LogUtils.gmk index b32f6179ac7..2815cf9d495 100644 --- a/make/common/LogUtils.gmk +++ b/make/common/LogUtils.gmk @@ -23,9 +23,6 @@ # questions. # -include $(TOPDIR)/make/common/MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - ################################################################################ # This file contains helper functions for logging. ################################################################################ @@ -97,9 +94,6 @@ 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)) @@ -128,11 +122,6 @@ endef MAKE_LOG_VARS = $(foreach v, \ LOG_LEVEL LOG_NOFILE LOG_CMDLINES LOG_REPORT LOG_PROFILE_TIMES_LOG \ - LOG_PROFILE_TIMES_FILE LOG_FLOW, \ + LOG_PROFILE_TIMES_FILE, \ $v=$($v) \ ) - -################################################################################ - -endif # include guard -include $(TOPDIR)/make/common/MakeIncludeEnd.gmk diff --git a/make/common/MakeBase.gmk b/make/common/MakeBase.gmk index d1bb0396943..aec7396cd65 100644 --- a/make/common/MakeBase.gmk +++ b/make/common/MakeBase.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # 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 @@ -35,6 +30,13 @@ ifeq ($(INCLUDE), true) # 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. @@ -310,5 +312,7 @@ ExecuteWithLog = \ ################################################################################ -include MakeIncludeEnd.gmk -endif # include guard +# Hook to include the corresponding custom file, if present. +$(eval $(call IncludeCustomExtension, common/MakeBase.gmk)) + +endif # _MAKEBASE_GMK diff --git a/make/common/MakeFileEnd.gmk b/make/common/MakeFileEnd.gmk deleted file mode 100644 index 0c02ae79373..00000000000 --- a/make/common/MakeFileEnd.gmk +++ /dev/null @@ -1,42 +0,0 @@ -# -# 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 deleted file mode 100644 index c9ba685862f..00000000000 --- a/make/common/MakeFileStart.gmk +++ /dev/null @@ -1,68 +0,0 @@ -# -# 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 ($(filter $(MAKELEVEL), 1 2),) - ifneq ($(words $(MAKEFILE_LIST)), 2) - $(error $(THIS_MAKEFILE_PATH): This file is not supposed to be included) - endif -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 b32f427226a..e1806e9259a 100644 --- a/make/common/MakeIO.gmk +++ b/make/common/MakeIO.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,18 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) +ifeq ($(_MAKEBASE_GMK), ) + $(error You must include MakeBase.gmk prior to including MakeIO.gmk) +endif ################################################################################ +# # 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 @@ -237,8 +241,3 @@ 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 deleted file mode 100644 index f0520d84b6c..00000000000 --- a/make/common/MakeIncludeEnd.gmk +++ /dev/null @@ -1,45 +0,0 @@ -# -# 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 deleted file mode 100644 index e754114211c..00000000000 --- a/make/common/MakeIncludeStart.gmk +++ /dev/null @@ -1,83 +0,0 @@ -# -# 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 deleted file mode 100644 index 833df2e9edb..00000000000 --- a/make/common/MakeSnippetEnd.gmk +++ /dev/null @@ -1,45 +0,0 @@ -# -# 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 deleted file mode 100644 index dfe7f9f0007..00000000000 --- a/make/common/MakeSnippetStart.gmk +++ /dev/null @@ -1,46 +0,0 @@ -# -# 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 03548ca8778..4fc0288f251 100644 --- a/make/common/Modules.gmk +++ b/make/common/Modules.gmk @@ -23,8 +23,8 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) +ifndef _MODULES_GMK +_MODULES_GMK := 1 ################################################################################ # Setup module sets for classloaders @@ -45,6 +45,11 @@ 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 @@ -311,5 +316,4 @@ endef ################################################################################ -endif # include guard -include MakeIncludeEnd.gmk +endif # _MODULES_GMK diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk index 9721f1c0aca..66d07df3b78 100644 --- a/make/common/NativeCompilation.gmk +++ b/make/common/NativeCompilation.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,19 @@ # 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 @@ -219,7 +223,6 @@ 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 @@ -406,7 +409,4 @@ define ImportDependencyFile endif endef -################################################################################ - -endif # include guard -include MakeIncludeEnd.gmk +endif # _NATIVE_COMPILATION_GMK diff --git a/make/common/ProcessMarkdown.gmk b/make/common/ProcessMarkdown.gmk index 1b4a5b76ea1..d14c3ce4f76 100644 --- a/make/common/ProcessMarkdown.gmk +++ b/make/common/ProcessMarkdown.gmk @@ -1,4 +1,4 @@ -# Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. # 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,10 +22,9 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ +ifeq ($(_MAKEBASE_GMK), ) + $(error You must include MakeBase.gmk prior to including ProcessMarkdown.gmk) +endif include TextFileProcessing.gmk @@ -182,8 +181,3 @@ define SetupProcessMarkdownBody ) endif endef - -################################################################################ - -endif # include guard -include MakeIncludeEnd.gmk diff --git a/make/common/TestFilesCompilation.gmk b/make/common/TestFilesCompilation.gmk index 9e076590cf3..e09e144fa06 100644 --- a/make/common/TestFilesCompilation.gmk +++ b/make/common/TestFilesCompilation.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. # 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) +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 JdkNativeCompilation.gmk @@ -139,7 +142,4 @@ define SetupTestFilesCompilationBody endef -################################################################################ - -endif # include guard -include MakeIncludeEnd.gmk +endif # _TEST_FILES_COMPILATION_GMK diff --git a/make/common/TextFileProcessing.gmk b/make/common/TextFileProcessing.gmk index 462d8756650..94aa259bebc 100644 --- a/make/common/TextFileProcessing.gmk +++ b/make/common/TextFileProcessing.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. # 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 MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ +ifeq ($(_MAKEBASE_GMK), ) + $(error You must include MakeBase.gmk prior to including TextFileProcessing.gmk) +endif # Helper function for SetupTextFileProcessing; adds a rule for a single file # to be processed. @@ -223,8 +222,3 @@ define SetupTextFileProcessingBody endif endif endef - -################################################################################ - -endif # include guard -include MakeIncludeEnd.gmk diff --git a/make/common/Utils.gmk b/make/common/Utils.gmk index 03009ec3ca4..26d05ed91be 100644 --- a/make/common/Utils.gmk +++ b/make/common/Utils.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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) +ifeq ($(_MAKEBASE_GMK), ) + $(error You must include MakeBase.gmk prior to including Utils.gmk) +endif ################################################################################ +# # Basic utility functions available to MakeBase.gmk itself +# ################################################################################ # String equals @@ -395,8 +398,3 @@ FilterExcludedTranslations = \ ), \ $1 \ )) - -################################################################################ - -include MakeIncludeEnd.gmk -endif # include guard diff --git a/make/common/ZipArchive.gmk b/make/common/ZipArchive.gmk index e6bc99eb4c1..22fd6722fa2 100644 --- a/make/common/ZipArchive.gmk +++ b/make/common/ZipArchive.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,15 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ +ifndef _ZIP_ARCHIVE_GMK +_ZIP_ARCHIVE_GMK := 1 # Depends on build tools for MakeZipReproducible -include $(TOPDIR)/make/ToolsJdk.gmk +include ../ToolsJdk.gmk + +ifeq ($(_MAKEBASE_GMK), ) + $(error You must include MakeBase.gmk prior to including ZipArchive.gmk) +endif # Setup make rules for creating a zip archive. # @@ -190,7 +192,4 @@ define SetupZipArchiveBody $1 += $$($1_ZIP) endef -################################################################################ - -endif # include guard -include MakeIncludeEnd.gmk +endif # _ZIP_ARCHIVE_GMK diff --git a/make/common/modules/CopyCommon.gmk b/make/common/modules/CopyCommon.gmk index 9dc03f08e59..f4df1ce3a30 100644 --- a/make/common/modules/CopyCommon.gmk +++ b/make/common/modules/CopyCommon.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ - include CopyFiles.gmk LIB_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE) @@ -93,8 +88,3 @@ define SetupCopyLegalFilesBody ) \ ) endef - -################################################################################ - -endif # include guard -include MakeIncludeEnd.gmk diff --git a/make/common/modules/GendataCommon.gmk b/make/common/modules/GendataCommon.gmk index ad1d1c7f7a5..0d5d39ea973 100644 --- a/make/common/modules/GendataCommon.gmk +++ b/make/common/modules/GendataCommon.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,15 +23,6 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ - include JavaCompilation.gmk -include $(TOPDIR)/make/ToolsJdk.gmk +include ToolsJdk.gmk -################################################################################ - -endif # include guard -include MakeIncludeEnd.gmk diff --git a/make/common/modules/GensrcCommon.gmk b/make/common/modules/GensrcCommon.gmk index 64d1f71d82e..b14e96293ba 100644 --- a/make/common/modules/GensrcCommon.gmk +++ b/make/common/modules/GensrcCommon.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,14 +23,9 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ - include Execute.gmk include TextFileProcessing.gmk -include $(TOPDIR)/make/ToolsJdk.gmk +include ToolsJdk.gmk ################################################################################ # Sets up a rule that creates a version.properties file in the gensrc output @@ -46,8 +41,3 @@ 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 f2097c34766..56b5fb54eb8 100644 --- a/make/common/modules/GensrcModuleInfo.gmk +++ b/make/common/modules/GensrcModuleInfo.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -include MakeFileStart.gmk - ################################################################################ # This file makes modifications to module-info.java files based on the build # configuration. @@ -43,8 +41,13 @@ include MakeFileStart.gmk # # 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 ################################################################################ @@ -98,4 +101,4 @@ endif ################################################################################ -include MakeFileEnd.gmk +all: $(TARGETS) diff --git a/make/common/modules/GensrcProperties.gmk b/make/common/modules/GensrcProperties.gmk index 4d4fc0460f0..5db10af27b1 100644 --- a/make/common/modules/GensrcProperties.gmk +++ b/make/common/modules/GensrcProperties.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,13 +23,8 @@ # 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 @@ -147,8 +142,3 @@ 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 700c0de74d5..32b14353b52 100644 --- a/make/common/modules/LauncherCommon.gmk +++ b/make/common/modules/LauncherCommon.gmk @@ -23,16 +23,11 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ - include CopyFiles.gmk include JdkNativeCompilation.gmk include Modules.gmk include ProcessMarkdown.gmk -include $(TOPDIR)/make/ToolsJdk.gmk +include ToolsJdk.gmk LAUNCHER_SRC := $(TOPDIR)/src/java.base/share/native/launcher LAUNCHER_CFLAGS += -I$(TOPDIR)/src/java.base/share/native/launcher \ @@ -239,8 +234,3 @@ 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 0320450c934..4e3570d9cd7 100644 --- a/make/common/modules/LibCommon.gmk +++ b/make/common/modules/LibCommon.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,4 @@ # 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 9c3d39d6edf..498a04a0fda 100644 --- a/make/common/native/CompileFile.gmk +++ b/make/common/native/CompileFile.gmk @@ -23,15 +23,11 @@ # 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 @@ -356,8 +352,3 @@ 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 7f21fd8cbf3..f7a5a4021e2 100644 --- a/make/common/native/DebugSymbols.gmk +++ b/make/common/native/DebugSymbols.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,8 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - ################################################################################ # This file contains functionality related to native debug symbol handling. -################################################################################ ################################################################################ define CreateDebugSymbols @@ -102,8 +98,3 @@ 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 747e090b816..daa9a83d62b 100644 --- a/make/common/native/Flags.gmk +++ b/make/common/native/Flags.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,10 @@ # 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 @@ -227,8 +223,3 @@ 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 7cf6c97b27c..1461f7302dc 100644 --- a/make/common/native/Link.gmk +++ b/make/common/native/Link.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,9 @@ # 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 @@ -216,8 +212,3 @@ 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 55f8e5684e7..7c895a9507d 100644 --- a/make/common/native/LinkMicrosoft.gmk +++ b/make/common/native/LinkMicrosoft.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,9 @@ # 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 @@ -118,8 +114,3 @@ 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 ee097b2e134..e021a390289 100644 --- a/make/common/native/Paths.gmk +++ b/make/common/native/Paths.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # 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 @@ -34,7 +31,6 @@ ifeq ($(INCLUDE), true) # "@-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 @@ -244,8 +240,3 @@ define SetupObjectFileList endif endif endef - -################################################################################ - -endif # include guard -include MakeIncludeEnd.gmk diff --git a/make/hotspot/CopyToExplodedJdk.gmk b/make/hotspot/CopyToExplodedJdk.gmk index 2848ed24b93..21d68c7b06f 100644 --- a/make/hotspot/CopyToExplodedJdk.gmk +++ b/make/hotspot/CopyToExplodedJdk.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ - include CopyFiles.gmk # Copy all built libraries into exploded jdk @@ -62,8 +57,3 @@ 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 661af26221c..3aacdf30c4c 100644 --- a/make/hotspot/HotspotCommon.gmk +++ b/make/hotspot/HotspotCommon.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ - ifeq ($(JVM_VARIANT), ) $(error This makefile must be called with JVM_VARIANT set) endif @@ -51,8 +46,3 @@ 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 48715c8e71a..48fe7e25507 100644 --- a/make/hotspot/gensrc/GenerateSources.gmk +++ b/make/hotspot/gensrc/GenerateSources.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. # 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,17 @@ # questions. # -include MakeFileStart.gmk - -################################################################################ +default: all +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 @@ -40,6 +41,8 @@ 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. @@ -60,6 +63,6 @@ $(CHMOD_HOTSPOT_LAUNCHER): $(CREATE_HOTSPOT_LAUNCHER) TARGETS += $(CREATE_HOTSPOT_LAUNCHER) $(CHMOD_HOTSPOT_LAUNCHER) -################################################################################ +all: $(TARGETS) -include MakeFileEnd.gmk +.PHONY: all diff --git a/make/hotspot/gensrc/GensrcAdlc.gmk b/make/hotspot/gensrc/GensrcAdlc.gmk index 4cecc3070e7..2be368e2694 100644 --- a/make/hotspot/gensrc/GensrcAdlc.gmk +++ b/make/hotspot/gensrc/GensrcAdlc.gmk @@ -23,10 +23,7 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ +$(eval $(call IncludeCustomExtension, hotspot/gensrc/GensrcAdlc.gmk)) ifeq ($(call check-jvm-feature, compiler2), true) @@ -263,8 +260,3 @@ 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 fd243ea8269..0cc0ff11093 100644 --- a/make/hotspot/gensrc/GensrcDtrace.gmk +++ b/make/hotspot/gensrc/GensrcDtrace.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,8 @@ # 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) @@ -56,8 +52,3 @@ 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 d1d9eb5ec77..545c6876ad6 100644 --- a/make/hotspot/gensrc/GensrcJfr.gmk +++ b/make/hotspot/gensrc/GensrcJfr.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,9 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - ################################################################################ # Setup make rules for JFR gensrc file generation. -################################################################################ +# include $(TOPDIR)/make/ToolsHotspot.gmk @@ -47,8 +44,3 @@ $(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 19eb4540947..b9c2e38b820 100644 --- a/make/hotspot/gensrc/GensrcJvmti.gmk +++ b/make/hotspot/gensrc/GensrcJvmti.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. # 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. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) +include CopyFiles.gmk + +$(eval $(call IncludeCustomExtension, hotspot/gensrc/GensrcJvmti.gmk)) ################################################################################ # 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 @@ -122,8 +120,3 @@ 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 5c576cbbf0d..8e55c9b669b 100644 --- a/make/hotspot/lib/CompileGtest.gmk +++ b/make/hotspot/lib/CompileGtest.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. # 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,10 +22,8 @@ # 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 @@ -161,6 +159,3 @@ $(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 b2c59505f9a..a5c8011344d 100644 --- a/make/hotspot/lib/CompileJvm.gmk +++ b/make/hotspot/lib/CompileJvm.gmk @@ -23,11 +23,6 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ - include CopyFiles.gmk # Include support files that will setup compiler flags due to the selected @@ -364,8 +359,3 @@ 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 9563c36eec6..03ba95cac3c 100644 --- a/make/hotspot/lib/CompileLibraries.gmk +++ b/make/hotspot/lib/CompileLibraries.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,14 @@ # questions. # -include MakeFileStart.gmk +default: all -################################################################################ +include $(SPEC) +include MakeBase.gmk +include JdkNativeCompilation.gmk include HotspotCommon.gmk -include JdkNativeCompilation.gmk + include lib/CompileJvm.gmk ifneq ($(GTEST_FRAMEWORK_SRC), ) @@ -39,6 +41,6 @@ endif include CopyToExplodedJdk.gmk -################################################################################ +all: $(TARGETS) -include MakeFileEnd.gmk +.PHONY: all diff --git a/make/hotspot/lib/JvmFeatures.gmk b/make/hotspot/lib/JvmFeatures.gmk index 0efb8671da8..09a48508eff 100644 --- a/make/hotspot/lib/JvmFeatures.gmk +++ b/make/hotspot/lib/JvmFeatures.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. # 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,11 @@ # questions. # -################################################################################ - -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) +$(eval $(call IncludeCustomExtension, hotspot/lib/JvmFeatures.gmk)) ################################################################################ # 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 @@ -284,8 +280,3 @@ 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 97538da74c7..5544f391d4a 100644 --- a/make/hotspot/lib/JvmFlags.gmk +++ b/make/hotspot/lib/JvmFlags.gmk @@ -23,12 +23,10 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) +$(eval $(call IncludeCustomExtension, hotspot/lib/JvmFlags.gmk)) ################################################################################ # 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 @@ -101,8 +99,3 @@ 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 2244529024c..f57afb7b5dd 100644 --- a/make/hotspot/lib/JvmOverrideFiles.gmk +++ b/make/hotspot/lib/JvmOverrideFiles.gmk @@ -23,13 +23,11 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) +$(eval $(call IncludeCustomExtension, hotspot/lib/JvmOverrideFiles.gmk)) ################################################################################ # 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 @@ -166,8 +164,3 @@ 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 524c0b36be8..3d6290837ee 100644 --- a/make/hotspot/test/GtestImage.gmk +++ b/make/hotspot/test/GtestImage.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. # 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. # -include MakeFileStart.gmk +default: all -################################################################################ +include $(SPEC) +include MakeBase.gmk include CopyFiles.gmk @@ -69,6 +70,4 @@ ifeq ($(call isTargetOs, windows), true) ) endif -################################################################################ - -include MakeFileEnd.gmk +all: $(TARGETS) diff --git a/make/ide/eclipse/CreateWorkspace.gmk b/make/ide/eclipse/CreateWorkspace.gmk index 052693dbb2d..50d04ad87af 100644 --- a/make/ide/eclipse/CreateWorkspace.gmk +++ b/make/ide/eclipse/CreateWorkspace.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. # 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 MakeFileStart.gmk +default: all -################################################################################ - -include Modules.gmk +include $(SPEC) +include MakeBase.gmk include TextFileProcessing.gmk include Utils.gmk +include Modules.gmk JVM_VARIANT := $(JVM_VARIANT_MAIN) include hotspot/HotspotCommon.gmk @@ -356,6 +356,4 @@ else )) endif -################################################################################ - -include MakeFileEnd.gmk +all: $(TARGETS) diff --git a/make/ide/idea/jdk/IdeaGenConfig.gmk b/make/ide/idea/jdk/IdeaGenConfig.gmk index 5f8afc47117..8318463776f 100644 --- a/make/ide/idea/jdk/IdeaGenConfig.gmk +++ b/make/ide/idea/jdk/IdeaGenConfig.gmk @@ -23,9 +23,10 @@ # questions. # -include MakeFileStart.gmk +default: all -################################################################################ +include $(SPEC) +include MakeBase.gmk include Modules.gmk @@ -53,8 +54,4 @@ idea: all: idea -.PHONY: idea - -################################################################################ - -include MakeFileEnd.gmk +.PHONY: default all idea diff --git a/make/ide/visualstudio/hotspot/CreateVSProject.gmk b/make/ide/visualstudio/hotspot/CreateVSProject.gmk index b2afbe2b9bc..db48cdea9f7 100644 --- a/make/ide/visualstudio/hotspot/CreateVSProject.gmk +++ b/make/ide/visualstudio/hotspot/CreateVSProject.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. # 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,13 @@ # questions. # -include MakeFileStart.gmk +# This must be the first rule +default: all -################################################################################ - -include Execute.gmk +include $(SPEC) +include MakeBase.gmk include JavaCompilation.gmk +include Execute.gmk ifeq ($(call isTargetOs, windows), true) # The next part is a bit hacky. We include the CompileJvm.gmk to be @@ -143,11 +144,11 @@ ifeq ($(call isTargetOs, windows), true) TARGETS += $(vcproj_file_TARGET) + all: $(TARGETS) + else all: $(info Hotspot Visual Studio generation only supported on Windows) endif -################################################################################ - -include MakeFileEnd.gmk +.PHONY: all diff --git a/make/ide/vscode/hotspot/CreateVSCodeProject.gmk b/make/ide/vscode/hotspot/CreateVSCodeProject.gmk index 11f25c152f6..54c98a3eeb6 100644 --- a/make/ide/vscode/hotspot/CreateVSCodeProject.gmk +++ b/make/ide/vscode/hotspot/CreateVSCodeProject.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. # 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. # -include MakeFileStart.gmk +# This must be the first rule +default: all + +include $(SPEC) +include MakeBase.gmk ################################################################################ # SedEscape @@ -111,8 +115,6 @@ $(OUTPUTDIR)/.vscode/launch.json: TARGETS := $(OUTPUTDIR)/jdk.code-workspace $(OUTPUTDIR)/.vscode/tasks.json \ $(OUTPUTDIR)/.vscode/launch.json -.PHONY: $(TARGETS) +all: $(TARGETS) -################################################################################ - -include MakeFileEnd.gmk +.PHONY: all $(TARGETS) diff --git a/make/ide/xcode/hotspot/CreateXcodeProject.gmk b/make/ide/xcode/hotspot/CreateXcodeProject.gmk index 3476078b243..1f92ba0716f 100644 --- a/make/ide/xcode/hotspot/CreateXcodeProject.gmk +++ b/make/ide/xcode/hotspot/CreateXcodeProject.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. # 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,11 @@ # questions. # -include MakeFileStart.gmk - -################################################################################ +# This must be the first rule +default: all +include $(SPEC) +include MakeBase.gmk include CopyFiles.gmk include Execute.gmk include JavaCompilation.gmk @@ -99,6 +100,8 @@ ifeq ($(call isTargetOs, macosx), true) build: $(build_xcode_project) $(copy_xcode_project) open: $(open_xcode_project) + + all: $(TARGETS) else build: open: @@ -106,8 +109,4 @@ else $(info Xcode projects are only supported on macOS) endif -.PHONY: build open - -################################################################################ - -include MakeFileEnd.gmk +.PHONY: default all build open diff --git a/make/modules/java.base/Copy.gmk b/make/modules/java.base/Copy.gmk index e33676529cd..7e3a0e9c3ab 100644 --- a/make/modules/java.base/Copy.gmk +++ b/make/modules/java.base/Copy.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. # 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,15 @@ # 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 edb8e050bbf..9e5cfe2d0fc 100644 --- a/make/modules/java.base/Gendata.gmk +++ b/make/modules/java.base/Gendata.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,15 +23,18 @@ # questions. # -################################################################################ - include GendataCommon.gmk -include gendata/GendataBlockedCerts.gmk + include gendata/GendataBreakIterator.gmk -include gendata/GendataCryptoPolicy.gmk -include gendata/GendataPublicSuffixList.gmk + include gendata/GendataTZDB.gmk +include gendata/GendataBlockedCerts.gmk + +include gendata/GendataCryptoPolicy.gmk + +include gendata/GendataPublicSuffixList.gmk + ################################################################################ GENDATA_UNINAME := $(JDK_OUTPUTDIR)/modules/java.base/java/lang/uniName.dat diff --git a/make/modules/java.base/Gensrc.gmk b/make/modules/java.base/Gensrc.gmk index c974db7b6c6..6eae7edd078 100644 --- a/make/modules/java.base/Gensrc.gmk +++ b/make/modules/java.base/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,20 +23,18 @@ # questions. # -################################################################################ - include GensrcCommon.gmk -include gensrc/GensrcBuffer.gmk include gensrc/GensrcCharacterData.gmk -include gensrc/GensrcCharsetCoder.gmk -include gensrc/GensrcCharsetMapping.gmk -include gensrc/GensrcExceptions.gmk include gensrc/GensrcMisc.gmk -include gensrc/GensrcModuleLoaderMap.gmk -include gensrc/GensrcRegex.gmk -include gensrc/GensrcScopedMemoryAccess.gmk +include gensrc/GensrcCharsetMapping.gmk +include gensrc/GensrcCharsetCoder.gmk +include gensrc/GensrcBuffer.gmk +include gensrc/GensrcExceptions.gmk include gensrc/GensrcVarHandles.gmk +include gensrc/GensrcModuleLoaderMap.gmk +include gensrc/GensrcScopedMemoryAccess.gmk +include gensrc/GensrcRegex.gmk ################################################################################ @@ -115,5 +113,3 @@ $(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 84344f93409..5820c280fe9 100644 --- a/make/modules/java.base/Java.gmk +++ b/make/modules/java.base/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # 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. @@ -59,5 +57,3 @@ 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 c249656f188..246767f3937 100644 --- a/make/modules/java.base/Launcher.gmk +++ b/make/modules/java.base/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,11 @@ # questions. # -################################################################################ - include LauncherCommon.gmk +# Hook to include the corresponding custom file, if present. +$(eval $(call IncludeCustomExtension, modules/java.base/Launcher.gmk)) + JAVA_VERSION_INFO_RESOURCE := \ $(TOPDIR)/src/java.base/windows/native/launcher/java.rc @@ -102,5 +103,3 @@ 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 771b94525aa..2c3df4622b1 100644 --- a/make/modules/java.base/Lib.gmk +++ b/make/modules/java.base/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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 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)) @@ -199,5 +200,3 @@ 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 c26b4cdeed7..b6149b457cd 100644 --- a/make/modules/java.base/gendata/GendataBlockedCerts.gmk +++ b/make/modules/java.base/gendata/GendataBlockedCerts.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,11 +23,6 @@ # 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 @@ -37,8 +32,3 @@ $(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 7aa26d5490b..857ce2b7c34 100644 --- a/make/modules/java.base/gendata/GendataBreakIterator.gmk +++ b/make/modules/java.base/gendata/GendataBreakIterator.gmk @@ -1,5 +1,5 @@ -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,9 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ +# # Make file for generating BreakIterator data files. -################################################################################ +# # input # @@ -114,8 +111,3 @@ $(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 f4774cb1f28..c63b36fe058 100644 --- a/make/modules/java.base/gendata/GendataCryptoPolicy.gmk +++ b/make/modules/java.base/gendata/GendataCryptoPolicy.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # 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. @@ -42,6 +37,12 @@ ifeq ($(INCLUDE), true) # 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 @@ -69,6 +70,3 @@ 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 563b728c38d..189fccf0c0d 100644 --- a/make/modules/java.base/gendata/GendataPublicSuffixList.gmk +++ b/make/modules/java.base/gendata/GendataPublicSuffixList.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,10 +23,7 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ +include $(SPEC) GENDATA_PUBLICSUFFIXLIST_SRC += $(MODULE_SRC)/share/data/publicsuffixlist/public_suffix_list.dat GENDATA_PUBLICSUFFIXLIST := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/security/public_suffix_list.dat @@ -39,8 +36,3 @@ $(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 4674c687a24..fbdd9ff3749 100644 --- a/make/modules/java.base/gendata/GendataTZDB.gmk +++ b/make/modules/java.base/gendata/GendataTZDB.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,11 +23,6 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ - GENDATA_TZDB := # @@ -45,8 +40,3 @@ $(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 f769a8e61e0..fe417e9c423 100644 --- a/make/modules/java.base/gensrc/GensrcBuffer.gmk +++ b/make/modules/java.base/gensrc/GensrcBuffer.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ - GENSRC_BUFFER := GENSRC_BUFFER_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio @@ -385,8 +380,3 @@ $(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 c05b126299b..beee18000f1 100644 --- a/make/modules/java.base/gensrc/GensrcCharacterData.gmk +++ b/make/modules/java.base/gensrc/GensrcCharacterData.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved. # 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,9 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ +# # Rules to create $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/lang/CharacterData*.java -################################################################################ +# GENSRC_CHARACTERDATA := @@ -69,8 +66,3 @@ $(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 3e654d0b7a8..2940ba42319 100644 --- a/make/modules/java.base/gensrc/GensrcCharsetCoder.gmk +++ b/make/modules/java.base/gensrc/GensrcCharsetCoder.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,11 +23,6 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ - GENSRC_CHARSETCODER := GENSRC_CHARSETCODER_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio/charset @@ -113,8 +108,3 @@ 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 8a9b9dfee5c..b9a8f269a7d 100644 --- a/make/modules/java.base/gensrc/GensrcCharsetMapping.gmk +++ b/make/modules/java.base/gensrc/GensrcCharsetMapping.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,14 +23,11 @@ # 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 @@ -57,8 +54,3 @@ $(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 baa61596d6b..9fa5d48009b 100644 --- a/make/modules/java.base/gensrc/GensrcExceptions.gmk +++ b/make/modules/java.base/gensrc/GensrcExceptions.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ - GENSRC_EXCEPTIONS := GENSRC_EXCEPTIONS_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio @@ -50,8 +45,3 @@ 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 edb5e8bc58e..a5bbd37321c 100644 --- a/make/modules/java.base/gensrc/GensrcMisc.gmk +++ b/make/modules/java.base/gensrc/GensrcMisc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # 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. @@ -159,8 +154,3 @@ 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 13b985df3ef..ce91cdc861c 100644 --- a/make/modules/java.base/gensrc/GensrcModuleLoaderMap.gmk +++ b/make/modules/java.base/gensrc/GensrcModuleLoaderMap.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ - include Modules.gmk $(eval $(call ReadImportMetaData)) @@ -63,6 +58,3 @@ $(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 c46a029e2c2..6384d36de59 100644 --- a/make/modules/java.base/gensrc/GensrcRegex.gmk +++ b/make/modules/java.base/gensrc/GensrcRegex.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. # 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 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 @@ -47,8 +44,3 @@ $(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 1ed3fb3db79..54fea77571e 100644 --- a/make/modules/java.base/gensrc/GensrcScopedMemoryAccess.gmk +++ b/make/modules/java.base/gensrc/GensrcScopedMemoryAccess.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,11 +23,6 @@ # 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 @@ -154,8 +149,3 @@ $(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 e2f5664dec6..fe4c4e97648 100644 --- a/make/modules/java.base/gensrc/GensrcVarHandles.gmk +++ b/make/modules/java.base/gensrc/GensrcVarHandles.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,11 +23,6 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ - GENSRC_VARHANDLES := VARHANDLES_GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/invoke @@ -282,8 +277,3 @@ $(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 b76394d081f..61ac495968a 100644 --- a/make/modules/java.base/lib/CoreLibraries.gmk +++ b/make/modules/java.base/lib/CoreLibraries.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ - ################################################################################ ## Build libverify ################################################################################ @@ -197,8 +192,3 @@ $(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 cb720672639..04f31a9bc66 100644 --- a/make/modules/java.compiler/Java.gmk +++ b/make/modules/java.compiler/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # 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,5 +31,3 @@ 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 47eb6e26577..6c5332f6457 100644 --- a/make/modules/java.datatransfer/Java.gmk +++ b/make/modules/java.datatransfer/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. # 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,8 @@ # 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 9acca9f688c..4232e62552c 100644 --- a/make/modules/java.desktop/Copy.gmk +++ b/make/modules/java.desktop/Copy.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -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 3df4610bd1d..a3f0c926ca6 100644 --- a/make/modules/java.desktop/Gendata.gmk +++ b/make/modules/java.desktop/Gendata.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,10 +23,8 @@ # questions. # -################################################################################ - include GendataCommon.gmk -include gendata/GendataFontConfig.gmk -include gendata/GendataHtml32dtd.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 ceeade7a96d..f7609107973 100644 --- a/make/modules/java.desktop/Gensrc.gmk +++ b/make/modules/java.desktop/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,10 +23,11 @@ # questions. # -################################################################################ - include GensrcCommon.gmk +# Hook to include the corresponding custom file, if present. +$(eval $(call IncludeCustomExtension, modules/java.desktop/Gensrc.gmk)) + ifeq ($(call isTargetOs, windows), false) include gensrc/GensrcIcons.gmk endif @@ -76,5 +77,3 @@ $(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 61c7fa44e0e..a13b4b1ba35 100644 --- a/make/modules/java.desktop/Java.gmk +++ b/make/modules/java.desktop/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - DISABLED_WARNINGS_java += dangling-doc-comments lossy-conversions this-escape DOCLINT += -Xdoclint:all/protected \ '-Xdoclint/package:java.*,javax.*' @@ -141,5 +139,3 @@ 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 830e0553c39..18f386ae6b4 100644 --- a/make/modules/java.desktop/Lib.gmk +++ b/make/modules/java.desktop/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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 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)) @@ -130,5 +131,3 @@ 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 572adb4376e..92a64b986e1 100644 --- a/make/modules/java.desktop/gendata/GendataFontConfig.gmk +++ b/make/modules/java.desktop/gendata/GendataFontConfig.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,11 +23,6 @@ # 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 @@ -60,8 +55,3 @@ 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 2c5899c91c2..bf3e0a1b4ed 100644 --- a/make/modules/java.desktop/gendata/GendataHtml32dtd.gmk +++ b/make/modules/java.desktop/gendata/GendataHtml32dtd.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ - GENDATA_HTML32DTD := HTML32DTD = $(JDK_OUTPUTDIR)/modules/java.desktop/javax/swing/text/html/parser/html32.bdtd @@ -38,8 +33,3 @@ $(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 bc7f580fe76..4e572211334 100644 --- a/make/modules/java.desktop/gensrc/GensrcIcons.gmk +++ b/make/modules/java.desktop/gensrc/GensrcIcons.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ - GENSRC_AWT_ICONS := GENSRC_AWT_ICONS_SRC := GENSRC_AWT_ICONS_TMP := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop @@ -113,8 +108,3 @@ 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 a59499e9b1a..abd428f3641 100644 --- a/make/modules/java.desktop/gensrc/GensrcSwing.gmk +++ b/make/modules/java.desktop/gensrc/GensrcSwing.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,13 +23,9 @@ # 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 @@ -45,8 +41,3 @@ $(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 fa271fc55ff..25402ad035a 100644 --- a/make/modules/java.desktop/gensrc/GensrcX11Wrappers.gmk +++ b/make/modules/java.desktop/gensrc/GensrcX11Wrappers.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,13 +23,8 @@ # 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 @@ -50,8 +45,3 @@ $(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 4d18038f2aa..5ba7c819008 100644 --- a/make/modules/java.desktop/lib/AwtLibraries.gmk +++ b/make/modules/java.desktop/lib/AwtLibraries.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) +include CopyFiles.gmk ################################################################################ # 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 \ @@ -441,8 +437,3 @@ 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 8733a8617c9..221d7578980 100644 --- a/make/modules/java.desktop/lib/ClientLibraries.gmk +++ b/make/modules/java.desktop/lib/ClientLibraries.gmk @@ -23,15 +23,11 @@ # 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 @@ -471,8 +467,3 @@ 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 6e5ea0e2c73..f49e425718e 100644 --- a/make/modules/java.instrument/Java.gmk +++ b/make/modules/java.instrument/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved. # 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,5 @@ # 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 0d1a3d81b50..675c1d8ccd3 100644 --- a/make/modules/java.instrument/Lib.gmk +++ b/make/modules/java.instrument/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LibCommon.gmk ################################################################################ @@ -50,5 +48,3 @@ $(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 36d70ed5555..8c9e677b861 100644 --- a/make/modules/java.logging/Copy.gmk +++ b/make/modules/java.logging/Copy.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,10 +23,10 @@ # questions. # -################################################################################ - 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 3b166e0f0a6..c28edd822b6 100644 --- a/make/modules/java.logging/Gensrc.gmk +++ b/make/modules/java.logging/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,9 +23,10 @@ # questions. # +include GensrcCommon.gmk + ################################################################################ -include GensrcCommon.gmk include GensrcProperties.gmk $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \ @@ -34,5 +35,3 @@ $(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 ab4e1b6144e..781370b2e18 100644 --- a/make/modules/java.logging/Java.gmk +++ b/make/modules/java.logging/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. # 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. # -################################################################################ - 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 11f99c26bd3..4579fea6843 100644 --- a/make/modules/java.management.rmi/Java.gmk +++ b/make/modules/java.management.rmi/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,9 +23,5 @@ # 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 44e3f328c7f..7a337946cd7 100644 --- a/make/modules/java.management/Java.gmk +++ b/make/modules/java.management/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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. # -################################################################################ - 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 cfa96b012c9..b9f79da4516 100644 --- a/make/modules/java.management/Lib.gmk +++ b/make/modules/java.management/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LibCommon.gmk ################################################################################ @@ -47,5 +45,3 @@ $(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 1c7a2a1668a..207329f5944 100644 --- a/make/modules/java.naming/Java.gmk +++ b/make/modules/java.naming/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,8 @@ # 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 6e5ea0e2c73..e124e8844d3 100644 --- a/make/modules/java.prefs/Java.gmk +++ b/make/modules/java.prefs/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,9 +23,5 @@ # 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 7590a5431b1..033768ffa1d 100644 --- a/make/modules/java.prefs/Lib.gmk +++ b/make/modules/java.prefs/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LibCommon.gmk ################################################################################ @@ -48,5 +46,3 @@ $(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 4f24edb6f67..6c607bd0572 100644 --- a/make/modules/java.rmi/Java.gmk +++ b/make/modules/java.rmi/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - DISABLED_WARNINGS_java += this-escape DOCLINT += -Xdoclint:all/protected \ @@ -34,5 +32,3 @@ 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 a72c107981c..8c335711da0 100644 --- a/make/modules/java.rmi/Launcher.gmk +++ b/make/modules/java.rmi/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LauncherCommon.gmk ################################################################################ @@ -34,5 +32,3 @@ 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 0520af6b702..3f4a5bed893 100644 --- a/make/modules/java.rmi/Lib.gmk +++ b/make/modules/java.rmi/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LibCommon.gmk ################################################################################ @@ -39,5 +37,3 @@ $(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 1909ec1a2df..c9060b5fa46 100644 --- a/make/modules/java.scripting/Java.gmk +++ b/make/modules/java.scripting/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,11 +23,7 @@ # 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 ee6b93fbf2c..a969b567d1e 100644 --- a/make/modules/java.scripting/Launcher.gmk +++ b/make/modules/java.scripting/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LauncherCommon.gmk ################################################################################ @@ -35,5 +33,3 @@ $(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 44e3f328c7f..7a337946cd7 100644 --- a/make/modules/java.security.jgss/Java.gmk +++ b/make/modules/java.security.jgss/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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. # -################################################################################ - 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 40a93859378..b0e2fdcffd1 100644 --- a/make/modules/java.security.jgss/Launcher.gmk +++ b/make/modules/java.security.jgss/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LauncherCommon.gmk ifeq ($(call isTargetOs, windows), true) @@ -52,5 +50,3 @@ 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 4b05100e6a6..2c827b84109 100644 --- a/make/modules/java.security.jgss/Lib.gmk +++ b/make/modules/java.security.jgss/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LibCommon.gmk ################################################################################ @@ -96,5 +94,3 @@ 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 12d13b4910f..136b311a827 100644 --- a/make/modules/java.security.sasl/Java.gmk +++ b/make/modules/java.security.sasl/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. # 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,4 @@ # 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 6e5ea0e2c73..f49e425718e 100644 --- a/make/modules/java.smartcardio/Java.gmk +++ b/make/modules/java.smartcardio/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved. # 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,5 @@ # 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 8d8a2aef086..1e647fd7e24 100644 --- a/make/modules/java.smartcardio/Lib.gmk +++ b/make/modules/java.smartcardio/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LibCommon.gmk ################################################################################ @@ -43,5 +41,3 @@ $(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 ecfe3e6e641..6bc30e3693d 100644 --- a/make/modules/java.sql.rowset/Java.gmk +++ b/make/modules/java.sql.rowset/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - DISABLED_WARNINGS_java += dangling-doc-comments DOCLINT += -Xdoclint:all/protected \ @@ -34,5 +32,3 @@ 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 44e3f328c7f..7a337946cd7 100644 --- a/make/modules/java.sql/Java.gmk +++ b/make/modules/java.sql/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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. # -################################################################################ - 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 11f99c26bd3..4579fea6843 100644 --- a/make/modules/java.transaction.xa/Java.gmk +++ b/make/modules/java.transaction.xa/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,9 +23,5 @@ # 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 68db8ed817a..9ee19c8c302 100644 --- a/make/modules/java.xml.crypto/Java.gmk +++ b/make/modules/java.xml.crypto/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,9 @@ # 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 f8c1896e526..f242cb2ac76 100644 --- a/make/modules/java.xml/Copy.gmk +++ b/make/modules/java.xml/Copy.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. # 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 CopyCommon.gmk include Modules.gmk ################################################################################ +# # Copy property and template files from share/conf to CONF_DST_DIR # $(eval $(call SetupCopyFiles, COPY_XML_MODULE_CONF, \ @@ -38,5 +37,4 @@ $(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 35f66238a7a..0c174f2113e 100644 --- a/make/modules/java.xml/Java.gmk +++ b/make/modules/java.xml/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,9 @@ # 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 798b97902c6..cd8aeba5a11 100644 --- a/make/modules/jdk.accessibility/Copy.gmk +++ b/make/modules/jdk.accessibility/Copy.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. # 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,8 +24,6 @@ # ################################################################################ - # Include CopyCommon.gmk to get exported header files to be properly copied. -include CopyCommon.gmk -################################################################################ +include CopyCommon.gmk diff --git a/make/modules/jdk.accessibility/Java.gmk b/make/modules/jdk.accessibility/Java.gmk index 7f1718a23ed..fc8b2f832d7 100644 --- a/make/modules/jdk.accessibility/Java.gmk +++ b/make/modules/jdk.accessibility/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. # 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,4 @@ # questions. # -################################################################################ - DISABLED_WARNINGS_java += dangling-doc-comments - -################################################################################ diff --git a/make/modules/jdk.accessibility/Launcher.gmk b/make/modules/jdk.accessibility/Launcher.gmk index 04694b10e9e..86ad96b3a1e 100644 --- a/make/modules/jdk.accessibility/Launcher.gmk +++ b/make/modules/jdk.accessibility/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LauncherCommon.gmk ifeq ($(call isTargetOs, windows), true) @@ -91,5 +89,3 @@ 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 6a3631bff67..6323049c985 100644 --- a/make/modules/jdk.accessibility/Lib.gmk +++ b/make/modules/jdk.accessibility/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LibCommon.gmk ################################################################################ @@ -82,5 +80,3 @@ 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 78437d761d2..8eefe7a4ec0 100644 --- a/make/modules/jdk.attach/Lib.gmk +++ b/make/modules/jdk.attach/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LibCommon.gmk ################################################################################ @@ -48,5 +46,3 @@ $(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 82dc091cbfd..e93ea19219d 100644 --- a/make/modules/jdk.charsets/Gensrc.gmk +++ b/make/modules/jdk.charsets/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,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,5 +82,3 @@ 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 c5dbb1e2a60..2eb5bd45456 100644 --- a/make/modules/jdk.charsets/Java.gmk +++ b/make/modules/jdk.charsets/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,4 @@ # questions. # -################################################################################ - COPY += .dat - -################################################################################ diff --git a/make/modules/jdk.compiler/Gendata.gmk b/make/modules/jdk.compiler/Gendata.gmk index 739625a5732..57487c7c842 100644 --- a/make/modules/jdk.compiler/Gendata.gmk +++ b/make/modules/jdk.compiler/Gendata.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. # 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,16 @@ # 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 c6c5879745c..14cc4f55a2b 100644 --- a/make/modules/jdk.compiler/Gensrc.gmk +++ b/make/modules/jdk.compiler/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,8 +23,6 @@ # questions. # -################################################################################ - include GensrcCommon.gmk include GensrcProperties.gmk include Execute.gmk @@ -74,5 +72,3 @@ $(eval $(call SetupExecute, PARSEPROPERTIES, \ )) TARGETS += $(PARSEPROPERTIES) - -################################################################################ diff --git a/make/modules/jdk.compiler/Java.gmk b/make/modules/jdk.compiler/Java.gmk index 3d6d22b2782..a2dd4f60fa6 100644 --- a/make/modules/jdk.compiler/Java.gmk +++ b/make/modules/jdk.compiler/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # 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. @@ -35,5 +33,3 @@ 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 74bd6896409..e5c4bbe4b8c 100644 --- a/make/modules/jdk.compiler/Launcher.gmk +++ b/make/modules/jdk.compiler/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LauncherCommon.gmk ################################################################################ @@ -45,5 +43,3 @@ $(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 7f1718a23ed..fc8b2f832d7 100644 --- a/make/modules/jdk.crypto.cryptoki/Java.gmk +++ b/make/modules/jdk.crypto.cryptoki/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. # 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,4 @@ # 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 29d1422cd78..ec80aaf46b4 100644 --- a/make/modules/jdk.crypto.cryptoki/Lib.gmk +++ b/make/modules/jdk.crypto.cryptoki/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LibCommon.gmk ################################################################################ @@ -42,5 +40,3 @@ $(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 aca47fc97f7..269a1195b6a 100644 --- a/make/modules/jdk.crypto.mscapi/Java.gmk +++ b/make/modules/jdk.crypto.mscapi/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. # 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,4 @@ # 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 9c78621ec0c..39b83a21ae9 100644 --- a/make/modules/jdk.crypto.mscapi/Lib.gmk +++ b/make/modules/jdk.crypto.mscapi/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LibCommon.gmk ifeq ($(call isTargetOs, windows), true) @@ -42,5 +40,3 @@ 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 57401175314..c26b4f9c8f6 100644 --- a/make/modules/jdk.dev/Java.gmk +++ b/make/modules/jdk.dev/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,8 @@ # 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 f95e59bf36e..852e68c0d31 100644 --- a/make/modules/jdk.dynalink/Java.gmk +++ b/make/modules/jdk.dynalink/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,8 +23,4 @@ # questions. # -################################################################################ - CLEAN += .properties - -################################################################################ diff --git a/make/modules/jdk.editpad/Java.gmk b/make/modules/jdk.editpad/Java.gmk index 640335dae43..ef2d3bcfa7c 100644 --- a/make/modules/jdk.editpad/Java.gmk +++ b/make/modules/jdk.editpad/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,8 +23,4 @@ # questions. # -################################################################################ - COPY += .properties - -################################################################################ diff --git a/make/modules/jdk.hotspot.agent/Gensrc.gmk b/make/modules/jdk.hotspot.agent/Gensrc.gmk index b5cfa6d15fc..b2bd016a512 100644 --- a/make/modules/jdk.hotspot.agent/Gensrc.gmk +++ b/make/modules/jdk.hotspot.agent/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -54,5 +54,3 @@ 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 eef2ccb4bb0..333d28a5aa0 100644 --- a/make/modules/jdk.hotspot.agent/Java.gmk +++ b/make/modules/jdk.hotspot.agent/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # 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 83e640486c2..94ad08bda0c 100644 --- a/make/modules/jdk.hotspot.agent/Launcher.gmk +++ b/make/modules/jdk.hotspot.agent/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LauncherCommon.gmk ################################################################################ @@ -35,5 +33,3 @@ $(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 ed8de631dc3..12f1c1f2a90 100644 --- a/make/modules/jdk.hotspot.agent/Lib.gmk +++ b/make/modules/jdk.hotspot.agent/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LibCommon.gmk ################################################################################ @@ -81,5 +79,3 @@ $(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 baeb620781a..37b51bb1d45 100644 --- a/make/modules/jdk.httpserver/Gensrc.gmk +++ b/make/modules/jdk.httpserver/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,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,5 +39,3 @@ $(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 f36d09919bc..95c0f1eb6ab 100644 --- a/make/modules/jdk.httpserver/Java.gmk +++ b/make/modules/jdk.httpserver/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # 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 72c87e19c29..9a216ef0958 100644 --- a/make/modules/jdk.httpserver/Jmod.gmk +++ b/make/modules/jdk.httpserver/Jmod.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. # 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,4 @@ # 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 d537ec1b50a..0f0c060e6e3 100644 --- a/make/modules/jdk.httpserver/Launcher.gmk +++ b/make/modules/jdk.httpserver/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LauncherCommon.gmk ################################################################################ @@ -34,5 +32,3 @@ 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 e51ffe57cea..6cd5301428f 100644 --- a/make/modules/jdk.incubator.vector/Java.gmk +++ b/make/modules/jdk.incubator.vector/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # 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 6d1259cfe60..7d2ef440b67 100644 --- a/make/modules/jdk.incubator.vector/Lib.gmk +++ b/make/modules/jdk.incubator.vector/Lib.gmk @@ -23,8 +23,6 @@ # questions. # -################################################################################ - include LibCommon.gmk ################################################################################ @@ -71,5 +69,3 @@ 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 108730a0fc5..4376b7e3484 100644 --- a/make/modules/jdk.internal.jvmstat/Java.gmk +++ b/make/modules/jdk.internal.jvmstat/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # 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 27c6eaf5f7f..4c952b63574 100644 --- a/make/modules/jdk.internal.le/Java.gmk +++ b/make/modules/jdk.internal.le/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # 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 638c12413c4..2a850f55637 100644 --- a/make/modules/jdk.internal.md/Java.gmk +++ b/make/modules/jdk.internal.md/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. # 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,4 @@ # questions. # -################################################################################ - COPY += .txt - -################################################################################ diff --git a/make/modules/jdk.internal.opt/Java.gmk b/make/modules/jdk.internal.opt/Java.gmk index 08bb3a5334a..0c65d9ad94e 100644 --- a/make/modules/jdk.internal.opt/Java.gmk +++ b/make/modules/jdk.internal.opt/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # 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 cb569bb8817..6bf8ad5e74c 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, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - DISABLED_WARNINGS_java += dangling-doc-comments this-escape # -parameters provides method's parameters information in class file, @@ -32,5 +30,3 @@ 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 dc53aa0b652..06fbedfa40c 100644 --- a/make/modules/jdk.jartool/Gensrc.gmk +++ b/make/modules/jdk.jartool/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,9 +23,10 @@ # questions. # +include GensrcCommon.gmk + ################################################################################ -include GensrcCommon.gmk include GensrcProperties.gmk $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \ @@ -34,5 +35,3 @@ $(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 806975d1e18..5e06f172070 100644 --- a/make/modules/jdk.jartool/Java.gmk +++ b/make/modules/jdk.jartool/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,4 @@ # questions. # -################################################################################ - JAVAC_FLAGS += -XDstringConcat=inline - -################################################################################ diff --git a/make/modules/jdk.jartool/Jmod.gmk b/make/modules/jdk.jartool/Jmod.gmk index 42fd1f05325..8b42113ec84 100644 --- a/make/modules/jdk.jartool/Jmod.gmk +++ b/make/modules/jdk.jartool/Jmod.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. # 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,4 @@ # 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 f75f30d4098..3139fac45d5 100644 --- a/make/modules/jdk.jartool/Launcher.gmk +++ b/make/modules/jdk.jartool/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LauncherCommon.gmk ################################################################################ @@ -42,5 +40,3 @@ $(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 1566911209c..031b4a91d33 100644 --- a/make/modules/jdk.javadoc/Copy.gmk +++ b/make/modules/jdk.javadoc/Copy.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # 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 2cd812de779..d733af65f1e 100644 --- a/make/modules/jdk.javadoc/Gendata.gmk +++ b/make/modules/jdk.javadoc/Gendata.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. # 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 JavaCompilation.gmk include Modules.gmk +################################################################################ + +# Hook to include the corresponding custom file, if present. +$(eval $(call IncludeCustomExtension, modules/jdk.javadoc/Gendata.gmk)) + # This is needed to properly setup DOCS_MODULES. $(eval $(call ReadImportMetaData)) @@ -112,5 +115,3 @@ $(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 e62988f883c..0346e3832df 100644 --- a/make/modules/jdk.javadoc/Gensrc.gmk +++ b/make/modules/jdk.javadoc/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include GensrcCommon.gmk include GensrcProperties.gmk @@ -39,5 +37,3 @@ $(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 f5315019f00..1194797b134 100644 --- a/make/modules/jdk.javadoc/Java.gmk +++ b/make/modules/jdk.javadoc/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,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. 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 9ed3b494117..608468962f3 100644 --- a/make/modules/jdk.javadoc/Launcher.gmk +++ b/make/modules/jdk.javadoc/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LauncherCommon.gmk ################################################################################ @@ -36,5 +34,3 @@ $(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 5748e62f7bc..d19d9beb4d8 100644 --- a/make/modules/jdk.jcmd/Java.gmk +++ b/make/modules/jdk.jcmd/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,4 @@ # questions. # -################################################################################ - COPY += _options - -################################################################################ diff --git a/make/modules/jdk.jcmd/Launcher.gmk b/make/modules/jdk.jcmd/Launcher.gmk index 5d0da09d22b..acff5a212c5 100644 --- a/make/modules/jdk.jcmd/Launcher.gmk +++ b/make/modules/jdk.jcmd/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LauncherCommon.gmk ################################################################################ @@ -86,5 +84,3 @@ $(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 d6cf8689df3..2de9321392d 100644 --- a/make/modules/jdk.jconsole/Java.gmk +++ b/make/modules/jdk.jconsole/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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. # -################################################################################ - 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 7cb40a1b13a..35d93d6feb9 100644 --- a/make/modules/jdk.jconsole/Launcher.gmk +++ b/make/modules/jdk.jconsole/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LauncherCommon.gmk ################################################################################ @@ -40,5 +38,3 @@ $(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 6ae92ee830a..b5f1e702a75 100644 --- a/make/modules/jdk.jdeps/Gensrc.gmk +++ b/make/modules/jdk.jdeps/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include GensrcCommon.gmk include GensrcProperties.gmk @@ -42,5 +40,3 @@ $(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 f2da87aeade..69c7ae0433f 100644 --- a/make/modules/jdk.jdeps/Java.gmk +++ b/make/modules/jdk.jdeps/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. # 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,8 @@ # 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 debf36b62ae..812d690a91d 100644 --- a/make/modules/jdk.jdeps/Launcher.gmk +++ b/make/modules/jdk.jdeps/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LauncherCommon.gmk ################################################################################ @@ -62,5 +60,3 @@ $(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 57b8faee8a8..47f975064ad 100644 --- a/make/modules/jdk.jdi/Gensrc.gmk +++ b/make/modules/jdk.jdi/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,8 +23,6 @@ # questions. # -################################################################################ - include GensrcCommon.gmk ################################################################################ @@ -70,5 +68,3 @@ $(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 d31008c318f..6577db98b0a 100644 --- a/make/modules/jdk.jdi/Java.gmk +++ b/make/modules/jdk.jdi/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - DISABLED_WARNINGS_java += dangling-doc-comments EXCLUDES += \ @@ -35,5 +33,3 @@ EXCLUDES += \ # EXCLUDE_FILES += jdi-overview.html - -################################################################################ diff --git a/make/modules/jdk.jdi/Launcher.gmk b/make/modules/jdk.jdi/Launcher.gmk index a568e504b5a..79be72e6ef3 100644 --- a/make/modules/jdk.jdi/Launcher.gmk +++ b/make/modules/jdk.jdi/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LauncherCommon.gmk ################################################################################ @@ -34,5 +32,3 @@ 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 b59a3ab8ea4..80a5664289b 100644 --- a/make/modules/jdk.jdi/Lib.gmk +++ b/make/modules/jdk.jdi/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LibCommon.gmk ifeq ($(call isTargetOs, windows), true) @@ -42,5 +40,3 @@ 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 798b97902c6..cd8aeba5a11 100644 --- a/make/modules/jdk.jdwp.agent/Copy.gmk +++ b/make/modules/jdk.jdwp.agent/Copy.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. # 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,8 +24,6 @@ # ################################################################################ - # Include CopyCommon.gmk to get exported header files to be properly copied. -include CopyCommon.gmk -################################################################################ +include CopyCommon.gmk diff --git a/make/modules/jdk.jdwp.agent/Lib.gmk b/make/modules/jdk.jdwp.agent/Lib.gmk index a1f9a0fca52..53b48cc7c45 100644 --- a/make/modules/jdk.jdwp.agent/Lib.gmk +++ b/make/modules/jdk.jdwp.agent/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LibCommon.gmk ################################################################################ @@ -79,5 +77,3 @@ $(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 81dc58c1324..f4fa3d97551 100644 --- a/make/modules/jdk.jfr/Copy.gmk +++ b/make/modules/jdk.jfr/Copy.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. # 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 +################################################################################ + 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 0a5dd874c81..522eea70f32 100644 --- a/make/modules/jdk.jfr/Gendata.gmk +++ b/make/modules/jdk.jfr/Gendata.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -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,5 +46,3 @@ $(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 5fabda8a4b7..d07f9117c2d 100644 --- a/make/modules/jdk.jfr/Java.gmk +++ b/make/modules/jdk.jfr/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # 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 499ea142d3a..79a6a81c730 100644 --- a/make/modules/jdk.jfr/Jmod.gmk +++ b/make/modules/jdk.jfr/Jmod.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. # 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,4 @@ # 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 80417cd67d3..ad07c839f90 100644 --- a/make/modules/jdk.jfr/Launcher.gmk +++ b/make/modules/jdk.jfr/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LauncherCommon.gmk ################################################################################ @@ -35,5 +33,3 @@ $(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 87703c7c8bb..c450ceea073 100644 --- a/make/modules/jdk.jlink/Gensrc.gmk +++ b/make/modules/jdk.jlink/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,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,5 +50,3 @@ $(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 312c40e47ab..ef6f5ad1665 100644 --- a/make/modules/jdk.jlink/Launcher.gmk +++ b/make/modules/jdk.jlink/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LauncherCommon.gmk ################################################################################ @@ -56,5 +54,3 @@ $(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 98311d89b87..434b42dc0bf 100644 --- a/make/modules/jdk.jpackage/Gensrc.gmk +++ b/make/modules/jdk.jpackage/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,8 +23,6 @@ # questions. # -################################################################################ - include GensrcCommon.gmk ################################################################################ @@ -38,7 +36,5 @@ 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 1b6db5fab05..d60e9ac2814 100644 --- a/make/modules/jdk.jpackage/Java.gmk +++ b/make/modules/jdk.jpackage/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - DISABLED_WARNINGS_java += dangling-doc-comments COPY += .gif .png .txt .spec .script .prerm .preinst \ @@ -32,5 +30,3 @@ 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 27b03e1081e..8e0982202a7 100644 --- a/make/modules/jdk.jpackage/Jmod.gmk +++ b/make/modules/jdk.jpackage/Jmod.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. # 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,4 @@ # 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 80f644eea3f..f80c4ed83d3 100644 --- a/make/modules/jdk.jpackage/Launcher.gmk +++ b/make/modules/jdk.jpackage/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LauncherCommon.gmk ################################################################################ @@ -34,5 +32,3 @@ 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 a301447d73e..33d10336e6e 100644 --- a/make/modules/jdk.jpackage/Lib.gmk +++ b/make/modules/jdk.jpackage/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. # 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,8 @@ # questions. # -################################################################################ - -include LauncherCommon.gmk include LibCommon.gmk +include LauncherCommon.gmk JPACKAGE_OUTPUT_DIR := \ $(JDK_OUTPUTDIR)/modules/$(MODULE)/jdk/jpackage/internal/resources @@ -188,5 +186,3 @@ 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 deab53719a5..71d1ad42817 100644 --- a/make/modules/jdk.jshell/Gensrc.gmk +++ b/make/modules/jdk.jshell/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,8 +23,6 @@ # questions. # -################################################################################ - include GensrcCommon.gmk include GensrcProperties.gmk @@ -39,5 +37,3 @@ $(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 f4194b23af7..744c85d960a 100644 --- a/make/modules/jdk.jshell/Java.gmk +++ b/make/modules/jdk.jshell/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. # 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,4 @@ # questions. # -################################################################################ - COPY += .jsh .properties - -################################################################################ diff --git a/make/modules/jdk.jshell/Jmod.gmk b/make/modules/jdk.jshell/Jmod.gmk index ec599e44fcc..12f22e9d9af 100644 --- a/make/modules/jdk.jshell/Jmod.gmk +++ b/make/modules/jdk.jshell/Jmod.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. # 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,4 @@ # 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 bdfcbf1911d..66da3a9e5fc 100644 --- a/make/modules/jdk.jshell/Launcher.gmk +++ b/make/modules/jdk.jshell/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LauncherCommon.gmk ################################################################################ @@ -35,5 +33,3 @@ $(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 1c2aa35a2c2..2c95e094cfe 100644 --- a/make/modules/jdk.jstatd/Jmod.gmk +++ b/make/modules/jdk.jstatd/Jmod.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. # 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,4 @@ # 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 d101cd3f4ed..209b810353f 100644 --- a/make/modules/jdk.jstatd/Launcher.gmk +++ b/make/modules/jdk.jstatd/Launcher.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LauncherCommon.gmk ################################################################################ @@ -34,5 +32,3 @@ 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 a3c5cdf82e8..4d9f15a20c9 100644 --- a/make/modules/jdk.localedata/Gensrc.gmk +++ b/make/modules/jdk.localedata/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include GensrcCommon.gmk ################################################################################ @@ -49,5 +47,3 @@ $(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 c359f0ee03c..41696a641a7 100644 --- a/make/modules/jdk.localedata/Java.gmk +++ b/make/modules/jdk.localedata/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,8 @@ # 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 ada75231ec7..5600989b4d3 100644 --- a/make/modules/jdk.management.agent/Copy.gmk +++ b/make/modules/jdk.management.agent/Copy.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,8 +23,6 @@ # questions. # -################################################################################ - include CopyCommon.gmk ################################################################################ diff --git a/make/modules/jdk.management.agent/Gensrc.gmk b/make/modules/jdk.management.agent/Gensrc.gmk index 4bafdd9503e..c13f4da75fe 100644 --- a/make/modules/jdk.management.agent/Gensrc.gmk +++ b/make/modules/jdk.management.agent/Gensrc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,9 +23,10 @@ # questions. # +include GensrcCommon.gmk + ################################################################################ -include GensrcCommon.gmk include GensrcProperties.gmk $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \ @@ -34,5 +35,3 @@ $(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 17dd163f63c..89de59d7fec 100644 --- a/make/modules/jdk.management.agent/Lib.gmk +++ b/make/modules/jdk.management.agent/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LibCommon.gmk ################################################################################ @@ -39,5 +37,3 @@ $(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 aca47fc97f7..269a1195b6a 100644 --- a/make/modules/jdk.management/Java.gmk +++ b/make/modules/jdk.management/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. # 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,4 @@ # questions. # -################################################################################ - DISABLED_WARNINGS_java += this-escape - -################################################################################ diff --git a/make/modules/jdk.management/Lib.gmk b/make/modules/jdk.management/Lib.gmk index fd9345e8b8a..cb65b37bda8 100644 --- a/make/modules/jdk.management/Lib.gmk +++ b/make/modules/jdk.management/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LibCommon.gmk ################################################################################ @@ -56,5 +54,3 @@ $(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 00d243a7f53..e43d8427f5a 100644 --- a/make/modules/jdk.net/Lib.gmk +++ b/make/modules/jdk.net/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LibCommon.gmk ################################################################################ @@ -40,5 +38,3 @@ $(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 5c7c4eb4176..cac0f770816 100644 --- a/make/modules/jdk.sctp/Java.gmk +++ b/make/modules/jdk.sctp/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # 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 \ @@ -53,5 +51,3 @@ 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 2017805f52d..a6d95a25154 100644 --- a/make/modules/jdk.sctp/Lib.gmk +++ b/make/modules/jdk.sctp/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LibCommon.gmk ifeq ($(call isTargetOs, linux), true) @@ -46,5 +44,3 @@ 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 7f1718a23ed..fc8b2f832d7 100644 --- a/make/modules/jdk.security.auth/Java.gmk +++ b/make/modules/jdk.security.auth/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. # 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,4 @@ # 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 9ead32dbe12..a0d41004489 100644 --- a/make/modules/jdk.security.auth/Lib.gmk +++ b/make/modules/jdk.security.auth/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # 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,6 @@ # questions. # -################################################################################ - include LibCommon.gmk ################################################################################ @@ -39,5 +37,3 @@ $(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 c5dbb1e2a60..2745327c8e4 100644 --- a/make/modules/sun.charsets/Java.gmk +++ b/make/modules/sun.charsets/Java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,8 +23,4 @@ # questions. # -################################################################################ - COPY += .dat - -################################################################################ diff --git a/make/test/BuildFailureHandler.gmk b/make/test/BuildFailureHandler.gmk index b4f3d690b0d..e8f49e76b32 100644 --- a/make/test/BuildFailureHandler.gmk +++ b/make/test/BuildFailureHandler.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. # 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,18 @@ # questions. # -include MakeFileStart.gmk +default: build -################################################################################ +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 @@ -105,8 +110,4 @@ test: build: $(TARGETS) images: $(IMAGES_TARGETS) -.PHONY: images test - -################################################################################ - -include MakeFileEnd.gmk +.PHONY: all images test diff --git a/make/test/BuildJtregTestThreadFactory.gmk b/make/test/BuildJtregTestThreadFactory.gmk index 94338626769..4f0ead24ece 100644 --- a/make/test/BuildJtregTestThreadFactory.gmk +++ b/make/test/BuildJtregTestThreadFactory.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. # 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,18 @@ # questions. # -include MakeFileStart.gmk +default: build -################################################################################ +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 @@ -59,8 +64,4 @@ IMAGES_TARGETS += $(COPY_TTF) build: $(TARGETS) images: $(IMAGES_TARGETS) -.PHONY: images - -################################################################################ - -include MakeFileEnd.gmk +.PHONY: all images diff --git a/make/test/BuildMicrobenchmark.gmk b/make/test/BuildMicrobenchmark.gmk index 53ee942d5d0..272cb1af0a6 100644 --- a/make/test/BuildMicrobenchmark.gmk +++ b/make/test/BuildMicrobenchmark.gmk @@ -23,9 +23,11 @@ # questions. # -include MakeFileStart.gmk +# This must be the first rule +default: all -################################################################################ +include $(SPEC) +include MakeBase.gmk include CopyFiles.gmk include JarArchive.gmk @@ -153,6 +155,4 @@ $(eval $(call SetupCopyFiles, COPY_MICROBENCHMARK_NATIVE, \ all: $(MICROBENCHMARK_JAR) $(BUILD_MICROBENCHMARK_LIBRARIES) $(COPY_MICROBENCHMARK_NATIVE) -################################################################################ - -include MakeFileEnd.gmk +.PHONY: all diff --git a/make/test/BuildTestLib.gmk b/make/test/BuildTestLib.gmk index 3dc00aeff87..1a13e191468 100644 --- a/make/test/BuildTestLib.gmk +++ b/make/test/BuildTestLib.gmk @@ -23,14 +23,17 @@ # 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 @@ -38,6 +41,8 @@ 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 @@ -80,13 +85,10 @@ $(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: build-test-lib test-image-lib - -################################################################################ - -include MakeFileEnd.gmk +.PHONY: default all build-test-lib test-image-lib diff --git a/make/test/BuildTestLibNative.gmk b/make/test/BuildTestLibNative.gmk index f2a3aafeea9..63dcbbf008b 100644 --- a/make/test/BuildTestLibNative.gmk +++ b/make/test/BuildTestLibNative.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,14 +23,17 @@ # questions. # -include 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 @@ -83,8 +86,4 @@ test-image-lib-native: $(COPY_LIBTEST_NATIVE_TO_HOTSPOT) $(COPY_LIBTEST_NATIVE_T all: build-test-lib-native -.PHONY: build-test-lib-native test-image-lib-native - -################################################################################ - -include MakeFileEnd.gmk +.PHONY: default all build-test-lib-native test-image-lib-native diff --git a/make/test/JtregNativeHotspot.gmk b/make/test/JtregNativeHotspot.gmk index 6a423e89a62..97f2f12cb76 100644 --- a/make/test/JtregNativeHotspot.gmk +++ b/make/test/JtregNativeHotspot.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. # 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,22 @@ # 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. ################################################################################ @@ -1583,8 +1588,4 @@ test-image-hotspot-jtreg-native: $(COPY_HOTSPOT_JTREG_NATIVE) all: build-test-hotspot-jtreg-native test-image: test-image-hotspot-jtreg-native -.PHONY: build-test-hotspot-jtreg-native test-image-hotspot-jtreg-native test-image - -################################################################################ - -include MakeFileEnd.gmk +.PHONY: default all build-test-hotspot-jtreg-native test-image-hotspot-jtreg-native test-image diff --git a/make/test/JtregNativeJdk.gmk b/make/test/JtregNativeJdk.gmk index b50cb0f811c..90055cb5c01 100644 --- a/make/test/JtregNativeJdk.gmk +++ b/make/test/JtregNativeJdk.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. # 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,22 @@ # 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. ################################################################################ @@ -164,8 +169,4 @@ test-image-jdk-jtreg-native: $(COPY_JDK_JTREG_NATIVE) all: build-test-jdk-jtreg-native test-image: test-image-jdk-jtreg-native -.PHONY: build-test-jdk-jtreg-native test-image-jdk-jtreg-native test-image - -################################################################################ - -include MakeFileEnd.gmk +.PHONY: default all build-test-jdk-jtreg-native test-image-jdk-jtreg-native test-image diff --git a/make/test/JtregNativeLibTest.gmk b/make/test/JtregNativeLibTest.gmk index 6a1441495d1..1a0177e63b0 100644 --- a/make/test/JtregNativeLibTest.gmk +++ b/make/test/JtregNativeLibTest.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. # 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,22 @@ # 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. ################################################################################ @@ -84,8 +89,4 @@ test-image-libtest-jtreg-native: $(COPY_LIBTEST_JTREG_NATIVE) all: build-test-libtest-jtreg-native test-image: test-image-libtest-jtreg-native -.PHONY: build-test-libtest-jtreg-native test-image-libtest-jtreg-native test-image - -################################################################################ - -include MakeFileEnd.gmk +.PHONY: default all build-test-libtest-jtreg-native test-image-libtest-jtreg-native test-image diff --git a/test/make/TestCompileCommands.gmk b/test/make/TestCompileCommands.gmk index 4673c74da79..26a3913138d 100644 --- a/test/make/TestCompileCommands.gmk +++ b/test/make/TestCompileCommands.gmk @@ -1,5 +1,5 @@ -# Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. # 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,10 @@ # questions. # -include MakeFileStart.gmk +include $(SPEC) +include MakeBase.gmk -################################################################################ +default: all COMPILE_COMMANDS := $(OUTPUTDIR)/compile_commands.json @@ -48,8 +49,4 @@ TEST_TARGETS += verify-compile-commands-json verify-no-shared-libraries all: $(TEST_TARGETS) -.PHONY: verify-compile-commands - -################################################################################ - -include MakeFileEnd.gmk +.PHONY: default all verify-compile-commands diff --git a/test/make/TestCopyFiles.gmk b/test/make/TestCopyFiles.gmk index ff9a7aaec72..cc05f89db23 100644 --- a/test/make/TestCopyFiles.gmk +++ b/test/make/TestCopyFiles.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. # 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. # -include MakeFileStart.gmk - -################################################################################ +default: all +include $(SPEC) +include MakeBase.gmk include CopyFiles.gmk include UtilsForTests.gmk @@ -95,7 +95,3 @@ TEST_TARGETS += run-test1 ################################################################################ all: $(TEST_TARGETS) - -################################################################################ - -include MakeFileEnd.gmk diff --git a/test/make/TestFixDepsFile.gmk b/test/make/TestFixDepsFile.gmk index 66c2eee461d..26145d604f2 100644 --- a/test/make/TestFixDepsFile.gmk +++ b/test/make/TestFixDepsFile.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -21,10 +21,10 @@ # questions. # -include MakeFileStart.gmk - -################################################################################ +default: all +include $(SPEC) +include MakeBase.gmk include UtilsForTests.gmk THIS_FILE := $(TOPDIR)/test/make/FixDepsFile.gmk @@ -62,7 +62,3 @@ 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 4b87c8e5fca..9ecc00dae80 100644 --- a/test/make/TestIdea.gmk +++ b/test/make/TestIdea.gmk @@ -21,15 +21,17 @@ # questions. # -include MakeFileStart.gmk +include $(SPEC) +include MakeBase.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 @@ -46,8 +48,4 @@ TEST_TARGETS += verify-idea all: $(TEST_TARGETS) -.PHONY: verify-idea - -################################################################################ - -include MakeFileEnd.gmk +.PHONY: default all verify-idea diff --git a/test/make/TestJavaCompilation.gmk b/test/make/TestJavaCompilation.gmk index d0bd3bb9499..039830241a9 100644 --- a/test/make/TestJavaCompilation.gmk +++ b/test/make/TestJavaCompilation.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -21,10 +21,10 @@ # questions. # -include MakeFileStart.gmk - -################################################################################ +default: all +include $(SPEC) +include MakeBase.gmk include JarArchive.gmk include JavaCompilation.gmk include UtilsForTests.gmk @@ -345,6 +345,4 @@ TEST_TARGETS += verify-root1-first verify-root2-first all: $(TEST_TARGETS) -################################################################################ - -include MakeFileEnd.gmk +.PHONY: default all diff --git a/test/make/TestMake.gmk b/test/make/TestMake.gmk index a017b573d0c..3ff8a255e8e 100644 --- a/test/make/TestMake.gmk +++ b/test/make/TestMake.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -21,9 +21,9 @@ # questions. # -include MakeFileStart.gmk +default: all -################################################################################ +include $(SPEC) make-base: +$(MAKE) -f TestMakeBase.gmk $(TEST_SUBTARGET) @@ -50,12 +50,10 @@ 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: $(TARGETS) - -################################################################################ - -include MakeFileEnd.gmk +.PHONY: default all $(TARGETS) diff --git a/test/make/TestMakeBase.gmk b/test/make/TestMakeBase.gmk index 61fcbdf522f..78f2c1884c9 100644 --- a/test/make/TestMakeBase.gmk +++ b/test/make/TestMakeBase.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. # 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. # -include MakeFileStart.gmk - -################################################################################ +default: all +include $(SPEC) +include MakeBase.gmk include UtilsForTests.gmk THIS_FILE := $(TOPDIR)/test/make/TestMakeBase.gmk @@ -725,7 +725,3 @@ $(call AssertEquals, \ ################################################################################ all: $(TEST_TARGETS) - -################################################################################ - -include MakeFileEnd.gmk diff --git a/test/make/UtilsForTests.gmk b/test/make/UtilsForTests.gmk index 125dabd15ef..25c1aab2af3 100644 --- a/test/make/UtilsForTests.gmk +++ b/test/make/UtilsForTests.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -21,12 +21,7 @@ # questions. # -include MakeIncludeStart.gmk -ifeq ($(INCLUDE), true) - -################################################################################ # This file contains utilities common for multiple test makefiles. -################################################################################ # Assert two strings are equal # 1 - Tested value @@ -48,8 +43,3 @@ 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