8349511: [BACKOUT] Framework for tracing makefile inclusion and parsing

Reviewed-by: darcy, mikael
This commit is contained in:
David Holmes 2025-02-06 02:51:12 +00:00
parent 5e1cc08259
commit 64bd8d2592
273 changed files with 1061 additions and 2223 deletions

View file

@ -49,6 +49,6 @@ runs:
- name: 'Export path to where GTest is installed' - name: 'Export path to where GTest is installed'
id: path-name id: path-name
run: | run: |
# Export the absolute path # Export the path
echo "path=`pwd`/gtest" >> $GITHUB_OUTPUT echo 'path=gtest' >> $GITHUB_OUTPUT
shell: bash shell: bash

View file

@ -49,6 +49,6 @@ runs:
- name: 'Export path to where JTReg is installed' - name: 'Export path to where JTReg is installed'
id: path-name id: path-name
run: | run: |
# Export the absolute path # Export the path
echo "path=`pwd`/jtreg/installed" >> $GITHUB_OUTPUT echo 'path=jtreg/installed' >> $GITHUB_OUTPUT
shell: bash shell: bash

View file

@ -59,7 +59,7 @@ ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))),)
else else
makefile_path := $(lastword $(MAKEFILE_LIST)) makefile_path := $(lastword $(MAKEFILE_LIST))
endif 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 # ... and then we can include the real makefile to bootstrap the build
include $(TOPDIR)/make/PreInit.gmk include $(topdir)/make/PreInit.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,9 +23,10 @@
# questions. # questions.
# #
include MakeFileStart.gmk default: all
################################################################################ include $(SPEC)
include MakeBase.gmk
include CopyFiles.gmk include CopyFiles.gmk
include MakeIO.gmk include MakeIO.gmk
@ -42,6 +43,8 @@ ifeq ($(call isBuildOs, windows), true)
TAR_IGNORE_EXIT_VALUE := || test "$$$$?" = "1" TAR_IGNORE_EXIT_VALUE := || test "$$$$?" = "1"
endif endif
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, Bundles-pre.gmk))
################################################################################ ################################################################################
# BUNDLE : Name of bundle to create # BUNDLE : Name of bundle to create
# FILES : Files in BASE_DIRS to add to bundle # 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) product-bundles: $(PRODUCT_TARGETS)
legacy-bundles: $(LEGACY_TARGETS) legacy-bundles: $(LEGACY_TARGETS)
test-bundles: $(TEST_TARGETS) test-bundles: $(TEST_TARGETS)
@ -509,10 +517,6 @@ static-libs-bundles: $(STATIC_LIBS_TARGETS)
static-libs-graal-bundles: $(STATIC_LIBS_GRAAL_TARGETS) static-libs-graal-bundles: $(STATIC_LIBS_GRAAL_TARGETS)
jcov-bundles: $(JCOV_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 \ docs-jdk-bundles docs-javase-bundles docs-reference-bundles \
static-libs-bundles static-libs-graal-bundles jcov-bundles static-libs-bundles static-libs-graal-bundles jcov-bundles
################################################################################
include MakeFileEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,9 +23,10 @@
# questions. # 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 # 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 @ # 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 TARGETS += $(OUTPUTDIR)/compile_commands.json
################################################################################ all: $(TARGETS)
include MakeFileEnd.gmk .PHONY: all

View file

@ -23,17 +23,23 @@
# questions. # questions.
# #
include MakeFileStart.gmk
################################################################################ ################################################################################
# Build demos for the JDK into $(SUPPORT_OUTPUTDIR)/demos/image. # Build demos for the JDK into $(SUPPORT_OUTPUTDIR)/demos/image.
################################################################################ ################################################################################
default: all
include $(SPEC)
include MakeBase.gmk
include CopyFiles.gmk include CopyFiles.gmk
include JavaCompilation.gmk include JavaCompilation.gmk
include TextFileProcessing.gmk include TextFileProcessing.gmk
include ZipArchive.gmk include ZipArchive.gmk
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, CompileDemos-pre.gmk))
# Prepare the find cache. # Prepare the find cache.
DEMO_SRC_DIRS += $(TOPDIR)/src/demo DEMO_SRC_DIRS += $(TOPDIR)/src/demo
@ -258,8 +264,11 @@ ifneq ($(filter images, $(MAKECMDGOALS)), )
IMAGES_TARGETS := $(COPY_TO_TEST_IMAGE) IMAGES_TARGETS := $(COPY_TO_TEST_IMAGE)
endif endif
################################################################################
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, CompileDemos-post.gmk))
all: $(TARGETS)
images: $(IMAGES_TARGETS) images: $(IMAGES_TARGETS)
################################################################################ .PHONY: all
include MakeFileEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,9 +23,11 @@
# questions. # questions.
# #
include MakeFileStart.gmk # This must be the first rule
default: all
################################################################################ include $(SPEC)
include MakeBase.gmk
include CopyFiles.gmk include CopyFiles.gmk
include JavaCompilation.gmk include JavaCompilation.gmk
@ -146,4 +148,5 @@ TARGETS += $(BUILD_JAVAC_SERVER)
################################################################################ ################################################################################
include MakeFileEnd.gmk
all: $(TARGETS)

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,12 +23,13 @@
# questions. # questions.
# #
include MakeFileStart.gmk # This must be the first rule
default: all
################################################################################ include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include Modules.gmk include Modules.gmk
include JavaCompilation.gmk
################################################################################ ################################################################################
# If this is an imported module that has prebuilt classes, only compile # If this is an imported module that has prebuilt classes, only compile
@ -85,15 +86,7 @@ CreateHkTargets = \
################################################################################ ################################################################################
# Include module specific build settings # Include module specific build settings
THIS_SNIPPET := modules/$(MODULE)/Java.gmk -include Java.gmk
ifneq ($(wildcard $(THIS_SNIPPET)), )
include MakeSnippetStart.gmk
include $(THIS_SNIPPET)
include MakeSnippetEnd.gmk
endif
################################################################################ ################################################################################
# Setup the main compilation # Setup the main compilation
@ -155,4 +148,6 @@ endif
################################################################################ ################################################################################
include MakeFileEnd.gmk all: $(TARGETS)
.PHONY: all

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,12 +23,14 @@
# questions. # 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 TOOLS_CLASSES_DIR := $(BUILDTOOLS_OUTPUTDIR)/tools_jigsaw_classes
# When using an external BUILDJDK, make it possible to shortcut building of # 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)

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,12 +23,19 @@
# questions. # questions.
# #
include MakeFileStart.gmk # This must be the first rule
default: all
################################################################################ include $(SPEC)
include MakeBase.gmk
include JavaCompilation.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 # Build tools needed for the JFR source code generation
@ -44,6 +51,7 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_HOTSPOT, \
TARGETS += $(BUILD_TOOLS_HOTSPOT) TARGETS += $(BUILD_TOOLS_HOTSPOT)
################################################################################
include MakeFileEnd.gmk all: $(TARGETS)
.PHONY: all

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,14 +23,21 @@
# questions. # questions.
# #
include MakeFileStart.gmk default: all
################################################################################ include $(SPEC)
include MakeBase.gmk
include CopyFiles.gmk include CopyFiles.gmk
include JavaCompilation.gmk include JavaCompilation.gmk
include TextFileProcessing.gmk include TextFileProcessing.gmk
################################################################################
$(eval $(call IncludeCustomExtension, CompileTools.gmk))
################################################################################
# Use += to be able to add to this from a custom extension # Use += to be able to add to this from a custom extension
BUILD_TOOLS_SRC_DIRS += \ BUILD_TOOLS_SRC_DIRS += \
$(TOPDIR)/make/jdk/src/classes \ $(TOPDIR)/make/jdk/src/classes \
@ -153,6 +160,4 @@ ifeq ($(ENABLE_PANDOC), true)
TARGETS += $(PANDOC_HTML_MANPAGE_FILTER_SETUP) TARGETS += $(PANDOC_HTML_MANPAGE_FILTER_SETUP)
endif endif
################################################################################ all: $(TARGETS)
include MakeFileEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,12 +23,13 @@
# questions. # questions.
# #
include MakeFileStart.gmk
################################################################################
# This makefile is called for every imported module to copy the non class # This makefile is called for every imported module to copy the non class
# contents into the exploded jdk image. # contents into the exploded jdk image.
################################################################################
default: all
include $(SPEC)
include MakeBase.gmk
include CopyFiles.gmk include CopyFiles.gmk
@ -102,6 +103,4 @@ ifneq ($(CONF_DIR), )
TARGETS += $(COPY_CONF) TARGETS += $(COPY_CONF)
endif endif
################################################################################ all: $(TARGETS)
include MakeFileEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,12 +23,15 @@
# questions. # questions.
# #
include MakeFileStart.gmk default: all
################################################################################ include $(SPEC)
include MakeBase.gmk
include CopyFiles.gmk include CopyFiles.gmk
################################################################################
### TZDB tool needs files from java.time.zone package ### TZDB tool needs files from java.time.zone package
define tzdb_copyfiles define tzdb_copyfiles
@ -48,7 +51,3 @@ $(eval $(call SetupCopyFiles, COPY_INTERIM_TZDB, \
################################################################################ ################################################################################
all: $(COPY_INTERIM_TZDB) all: $(COPY_INTERIM_TZDB)
################################################################################
include MakeFileEnd.gmk

View file

@ -22,7 +22,8 @@
# or visit www.oracle.com if you need additional information or have any # or visit www.oracle.com if you need additional information or have any
# questions. # 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) $(RMDIR) $(JCOV_TEMP)
jcov-image: $(JCOV_IMAGE_DIR)/release jcov-image: $(JCOV_IMAGE_DIR)/release
################################################################################
include MakeFileEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,9 +23,10 @@
# questions. # questions.
# #
include MakeFileStart.gmk default: all
################################################################################ include $(SPEC)
include MakeBase.gmk
include CopyFiles.gmk include CopyFiles.gmk
include Execute.gmk include Execute.gmk
@ -35,6 +36,8 @@ ifeq ($(MODULE), )
$(error MODULE must be set when calling CreateJmods.gmk) $(error MODULE must be set when calling CreateJmods.gmk)
endif endif
$(eval $(call IncludeCustomExtension, CreateJmods.gmk))
################################################################################ ################################################################################
JMODS_DIR := $(IMAGES_OUTPUTDIR)/jmods JMODS_DIR := $(IMAGES_OUTPUTDIR)/jmods
@ -184,15 +187,7 @@ endif
################################################################################ ################################################################################
# Include module specific build settings # Include module specific build settings
THIS_SNIPPET := modules/$(MODULE)/Jmod.gmk -include Jmod.gmk
ifneq ($(wildcard $(THIS_SNIPPET)), )
include MakeSnippetStart.gmk
include $(THIS_SNIPPET)
include MakeSnippetEnd.gmk
endif
# Set main class # Set main class
ifneq ($(JMOD_FLAGS_main_class), ) ifneq ($(JMOD_FLAGS_main_class), )
@ -271,4 +266,6 @@ TARGETS += $(create_$(JMOD_FILE))
################################################################################ ################################################################################
include MakeFileEnd.gmk all: $(TARGETS)
################################################################################

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -22,7 +22,26 @@
# questions. # 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. # This file generates all documentation for OpenJDK.
@ -35,19 +54,7 @@ include MakeFileStart.gmk
# #
# We will also generate separate, free-standing specifications from either # We will also generate separate, free-standing specifications from either
# markdown or existing html files. # 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 # Javadoc settings
@ -754,6 +761,10 @@ $(eval $(call SetupZipArchive, BUILD_JAVADOC_ZIP, \
ZIP_TARGETS += $(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. # 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-reference-api-graphs docs-jdk-specs docs-jdk-index docs-zip \
docs-specs-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-javase-api-javadoc docs-javase-api-graphs \
docs-reference-api-javadoc docs-reference-api-graphs docs-jdk-specs \ docs-reference-api-javadoc docs-reference-api-graphs docs-jdk-specs \
docs-jdk-index docs-zip docs-specs-zip docs-jdk-index docs-zip docs-specs-zip
################################################################################
include MakeFileEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,11 +23,18 @@
# questions. # 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. # Help user diagnose possible errors and problems with the build environment.
################################################################################ #
prologue: prologue:
$(ECHO) $(ECHO)
@ -138,8 +145,4 @@ doctor: $(TARGETS)
all: doctor all: doctor
.PHONY: doctor $(TARGETS) .PHONY: default all doctor $(TARGETS)
################################################################################
include MakeFileEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,15 +23,17 @@
# questions. # questions.
# #
include MakeFileStart.gmk
################################################################################
# Runs a tool on the exploded image to improve performance # Runs a tool on the exploded image to improve performance
################################################################################
default: all
include $(SPEC)
include MakeBase.gmk
include Execute.gmk include Execute.gmk
include $(TOPDIR)/make/ModuleTools.gmk include $(TOPDIR)/make/ModuleTools.gmk
################################################################################
ALL_MODULEINFO_CLASSES := $(wildcard $(JDK_OUTPUTDIR)/modules/*/module-info.class) ALL_MODULEINFO_CLASSES := $(wildcard $(JDK_OUTPUTDIR)/modules/*/module-info.class)
$(eval $(call SetupExecute, optimize_image, \ $(eval $(call SetupExecute, optimize_image, \
@ -45,4 +47,6 @@ TARGETS := $(optimize_image_TARGET)
################################################################################ ################################################################################
include MakeFileEnd.gmk all: $(TARGETS)
.PHONY: all default

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,12 +23,15 @@
# questions. # questions.
# #
include MakeFileStart.gmk
################################################################################ ################################################################################
# Generate classlist # Generate classlist
################################################################################ ################################################################################
default: all
include $(SPEC)
include MakeBase.gmk
include CopyFiles.gmk include CopyFiles.gmk
include JavaCompilation.gmk include JavaCompilation.gmk
@ -145,4 +148,4 @@ TARGETS += $(COPY_JLI_TRACE)
################################################################################ ################################################################################
include MakeFileEnd.gmk all: $(TARGETS)

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,11 +23,12 @@
# questions. # questions.
# #
include MakeFileStart.gmk # Default target declared first
default: all
################################################################################ include $(SPEC)
include MakeBase.gmk
include $(TOPDIR)/make/ModuleTools.gmk include ModuleTools.gmk
GENGRAPHS_DIR := $(IMAGES_OUTPUTDIR)/gengraphs GENGRAPHS_DIR := $(IMAGES_OUTPUTDIR)/gengraphs
SPEC_DOTFILES_DIR := $(GENGRAPHS_DIR)/spec-dotfiles 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 $(TOOL_MODULESUMMARY) -o $@ --module-path $(IMAGES_OUTPUTDIR)/jmods
all: $(GENGRAPHS_DIR)/jdk.dot $(GENGRAPHS_DIR)/module-summary.html $(SPEC_DOTFILES_DIR)/java.se.dot all: $(GENGRAPHS_DIR)/jdk.dot $(GENGRAPHS_DIR)/module-summary.html $(SPEC_DOTFILES_DIR)/java.se.dot
################################################################################
include MakeFileEnd.gmk

View file

@ -121,12 +121,12 @@ print-configurations:
@true @true
test-prebuilt: test-prebuilt:
@( cd $(TOPDIR) && \ @( cd $(topdir) && \
$(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \ $(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 CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" )
test-prebuilt-with-exit-code: test-prebuilt-with-exit-code:
@( cd $(TOPDIR) && \ @( cd $(topdir) && \
$(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \ $(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)" ) test-prebuilt-with-exit-code CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" )

View file

@ -23,15 +23,20 @@
# questions. # questions.
# #
include MakeFileStart.gmk
################################################################################
# This makefile creates a jdk image overlaid with statically linked core # This makefile creates a jdk image overlaid with statically linked core
# libraries. # libraries.
################################################################################
default: all
include $(SPEC)
include MakeBase.gmk
include CopyFiles.gmk include CopyFiles.gmk
################################################################################
TARGETS :=
$(eval $(call SetupCopyFiles, COPY_JDK_IMG, \ $(eval $(call SetupCopyFiles, COPY_JDK_IMG, \
SRC := $(JDK_IMAGE_DIR)/, \ SRC := $(JDK_IMAGE_DIR)/, \
DEST := $(GRAAL_BUILDER_IMAGE_DIR)/, \ DEST := $(GRAAL_BUILDER_IMAGE_DIR)/, \
@ -49,4 +54,6 @@ TARGETS += $(COPY_STATIC_LIBS)
################################################################################ ################################################################################
include MakeFileEnd.gmk all: $(TARGETS)
.PHONY: all

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,14 +23,17 @@
# questions. # questions.
# #
include MakeFileStart.gmk default: all
include $(SPEC)
include MakeBase.gmk
include JdkNativeCompilation.gmk
################################################################################ ################################################################################
# This makefile compiles and installs the hsdis library # This makefile compiles and installs the hsdis library
#
################################################################################ ################################################################################
include JdkNativeCompilation.gmk
HSDIS_OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/hsdis HSDIS_OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/hsdis
REAL_HSDIS_NAME := hsdis-$(OPENJDK_TARGET_CPU_LEGACY_LIB)$(SHARED_LIBRARY_SUFFIX) REAL_HSDIS_NAME := hsdis-$(OPENJDK_TARGET_CPU_LEGACY_LIB)$(SHARED_LIBRARY_SUFFIX)
BUILT_HSDIS_LIB := $(HSDIS_OUTPUT_DIR)/$(REAL_HSDIS_NAME) BUILT_HSDIS_LIB := $(HSDIS_OUTPUT_DIR)/$(REAL_HSDIS_NAME)
@ -198,8 +201,8 @@ endif
TARGETS += install TARGETS += install
.PHONY: build install
################################################################################ ################################################################################
include MakeFileEnd.gmk all: $(TARGETS)
.PHONY: all default build install

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,9 +23,10 @@
# questions. # questions.
# #
include MakeFileStart.gmk default: all
################################################################################ include $(SPEC)
include MakeBase.gmk
include CopyFiles.gmk include CopyFiles.gmk
include DebugInfoUtils.gmk include DebugInfoUtils.gmk
@ -36,6 +37,9 @@ include Utils.gmk
JDK_TARGETS := JDK_TARGETS :=
JRE_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. # 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) $(JRE_TARGETS): $(JLINK_JRE_TARGETS)
$(JDK_TARGETS): $(JLINK_JDK_TARGETS) $(JDK_TARGETS): $(JLINK_JDK_TARGETS)
@ -314,8 +324,4 @@ symbols: $(SYMBOLS_TARGETS)
all: jdk jre symbols all: jdk jre symbols
.PHONY: jdk jre symbols .PHONY: default all jdk jre symbols
################################################################################
include MakeFileEnd.gmk

View file

@ -23,8 +23,6 @@
# questions. # questions.
# #
include MakeFileStart.gmk
################################################################################ ################################################################################
# Init.gmk sits between PreInit.gmk and Main.gmk when bootstrapping the build. # 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 # 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. # value of $(MAKE) for all further make calls.
################################################################################ ################################################################################
# Our helper functions. # This must be the first rule
include $(TOPDIR)/make/InitSupport.gmk default:
include LogUtils.gmk .PHONY: default
# Force early generation of module-deps.gmk and find-tests.gmk
GENERATE_MODULE_DEPS_FILE := true
include Modules.gmk
GENERATE_FIND_TESTS_FILE := true
include FindTests.gmk
# Inclusion of this pseudo-target will cause make to execute this file # Inclusion of this pseudo-target will cause make to execute this file
# serially, regardless of -j. # serially, regardless of -j.
.NOTPARALLEL: .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) # Parse COMPARE_BUILD (for makefile development)
$(eval $(call ParseCompareBuild)) $(eval $(call ParseCompareBuild))
@ -163,7 +169,7 @@ main: $(INIT_TARGETS)
$(PRINTF) "\nERROR: Build failed for $(TARGET_DESCRIPTION) (exit code $$exitcode) \n" \ $(PRINTF) "\nERROR: Build failed for $(TARGET_DESCRIPTION) (exit code $$exitcode) \n" \
$(BUILD_LOG_PIPE_SIMPLE) && \ $(BUILD_LOG_PIPE_SIMPLE) && \
cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -j 1 -f make/Init.gmk \ cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -j 1 -f make/Init.gmk \
on-failure ; \ HAS_SPEC=true on-failure ; \
exit $$exitcode ) ) exit $$exitcode ) )
$(call CleanupJavacServer) $(call CleanupJavacServer)
$(call StopGlobalTimer) $(call StopGlobalTimer)
@ -199,7 +205,3 @@ post-compare-build:
$(call CompareBuildDoComparison) $(call CompareBuildDoComparison)
.PHONY: main on-failure pre-compare-build post-compare-build .PHONY: main on-failure pre-compare-build post-compare-build
################################################################################
include MakeFileEnd.gmk

View file

@ -23,9 +23,6 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################ ################################################################################
# This file contains helper functions for Init.gmk. # 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. # to stderr.
BUILD_LOG_PIPE_SIMPLE := | $(TEE) -a $(BUILD_LOG) 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 # Setup the build environment to match the requested specification on
# level of reproducible builds # level of reproducible builds
define SetupReproducibleBuild define SetupReproducibleBuild
@ -61,7 +64,7 @@ endef
# FAIL can be set to false to have the return value of compare be ignored. # FAIL can be set to false to have the return value of compare be ignored.
define ParseCompareBuild define ParseCompareBuild
ifneq ($$(COMPARE_BUILD), ) 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 COMPARE_BUILD_FAIL := true
ifneq ($$(findstring :, $$(COMPARE_BUILD)), ) ifneq ($$(findstring :, $$(COMPARE_BUILD)), )
@ -103,14 +106,14 @@ define ParseCompareBuild
endif endif
endif endif
ifneq ($$(COMPARE_BUILD_PATCH), ) ifneq ($$(COMPARE_BUILD_PATCH), )
ifneq ($$(wildcard $$(WORKSPACE_ROOT)/$$(COMPARE_BUILD_PATCH)), ) ifneq ($$(wildcard $$(topdir)/$$(COMPARE_BUILD_PATCH)), )
# Assume relative path, if file exists # 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)), ) else ifeq ($$(wildcard $$(COMPARE_BUILD_PATCH)), )
$$(error Patch file $$(COMPARE_BUILD_PATCH) does not exist) $$(error Patch file $$(COMPARE_BUILD_PATCH) does not exist)
endif endif
ifneq ($$(COMPARE_BUILD_NODRYRUN), true) 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) ifeq ($$(PATCH_DRY_RUN), FAILED)
$$(error Patch file $$(COMPARE_BUILD_PATCH) does not apply cleanly) $$(error Patch file $$(COMPARE_BUILD_PATCH) does not apply cleanly)
endif endif
@ -126,11 +129,11 @@ endef
define PrepareCompareBuild define PrepareCompareBuild
$(ECHO) "Preparing for comparison rebuild" $(ECHO) "Preparing for comparison rebuild"
# Apply patch, if any # 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 # Move the first build away temporarily
$(RM) -r $(WORKSPACE_ROOT)/build/.compare-build-temp $(RM) -r $(topdir)/build/.compare-build-temp
$(MKDIR) -p $(WORKSPACE_ROOT)/build/.compare-build-temp $(MKDIR) -p $(topdir)/build/.compare-build-temp
$(MV) $(OUTPUTDIR) $(WORKSPACE_ROOT)/build/.compare-build-temp $(MV) $(OUTPUTDIR) $(topdir)/build/.compare-build-temp
# Restore an old compare-build, or create a new compare-build directory. # Restore an old compare-build, or create a new compare-build directory.
if test -d $(COMPARE_BUILD_OUTPUTDIR); then \ if test -d $(COMPARE_BUILD_OUTPUTDIR); then \
$(MV) $(COMPARE_BUILD_OUTPUTDIR) $(OUTPUTDIR); \ $(MV) $(COMPARE_BUILD_OUTPUTDIR) $(OUTPUTDIR); \
@ -140,19 +143,19 @@ define PrepareCompareBuild
# Re-run configure with the same arguments (and possibly some additional), # Re-run configure with the same arguments (and possibly some additional),
# must be done after patching. # must be done after patching.
( cd $(CONFIGURE_START_DIR) && PATH="$(ORIGINAL_PATH)" \ ( 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 endef
# Cleanup after a compare build # Cleanup after a compare build
define CleanupCompareBuild define CleanupCompareBuild
# If running with a COMPARE_BUILD patch, reverse-apply it, but continue # If running with a COMPARE_BUILD patch, reverse-apply it, but continue
# even if that fails (can happen with removed files). # 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 # 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) $(OUTPUTDIR) $(COMPARE_BUILD_OUTPUTDIR)
$(MV) $(WORKSPACE_ROOT)/build/.compare-build-temp/$(CONF_NAME) $(OUTPUTDIR) $(MV) $(topdir)/build/.compare-build-temp/$(CONF_NAME) $(OUTPUTDIR)
$(RM) -r $(WORKSPACE_ROOT)/build/.compare-build-temp $(RM) -r $(topdir)/build/.compare-build-temp
endef endef
# Do the actual comparison of two builds # Do the actual comparison of two builds
@ -262,7 +265,7 @@ endif
############################################################################## ##############################################################################
# Store the build times in this directory. # 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. # Record starting time for build of a sub repository.
define RecordStartTime define RecordStartTime
@ -315,8 +318,3 @@ define ReportProfileTimes
$(BUILD_LOG_PIPE_SIMPLE) $(BUILD_LOG_PIPE_SIMPLE)
) )
endef endef
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,9 +23,10 @@
# questions. # questions.
# #
include MakeFileStart.gmk default: all
################################################################################ include $(SPEC)
include MakeBase.gmk
include Execute.gmk include Execute.gmk
include Modules.gmk include Modules.gmk
@ -57,4 +58,6 @@ TARGETS += $(jlink_interim_image)
################################################################################ ################################################################################
include MakeFileEnd.gmk all: $(TARGETS)
.PHONY: all

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,13 +23,14 @@
# questions. # questions.
# #
include MakeFileStart.gmk default: all
################################################################################ include $(SPEC)
include MakeBase.gmk
include CopyFiles.gmk include CopyFiles.gmk
include JarArchive.gmk
include JavaCompilation.gmk include JavaCompilation.gmk
include JarArchive.gmk
include TextFileProcessing.gmk include TextFileProcessing.gmk
# This rule will be depended on due to the MANIFEST line # 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) all: $(BUILD_JRTFS_JAR)
################################################################################
include MakeFileEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,9 +23,8 @@
# questions. # questions.
# #
include MakeFileStart.gmk include $(SPEC)
include MakeBase.gmk
################################################################################
include CopyFiles.gmk include CopyFiles.gmk
include TextFileProcessing.gmk include TextFileProcessing.gmk
@ -119,7 +118,3 @@ else # Not macosx
endif # macosx endif # macosx
.PHONY: jdk-bundle jre-bundle bundles .PHONY: jdk-bundle jre-bundle bundles
################################################################################
include MakeFileEnd.gmk

View file

@ -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 # Declare default target
# valid top level targets. It's used to declare them all as PHONY and to default:
# generate the -only targets.
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 $(TOPDIR)/make/MainSupport.gmk
include FindTests.gmk
include Modules.gmk
# Are we requested to ignore dependencies? # Are we requested to ignore dependencies?
ifneq ($(findstring -only, $(MAKECMDGOALS)), ) ifneq ($(findstring -only, $(MAKECMDGOALS)), )
DEPS := none DEPS := none
endif 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 for the current target platform.
ALL_MODULES := $(call FindAllModules) ALL_MODULES := $(call FindAllModules)
################################################################################
################################################################################ ################################################################################
# #
# Recipes for all targets. Only recipes, dependencies are declared later. # 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. # Traditional targets typically run by users.
# These can be considered aliases for the targets now named by a more # These can be considered aliases for the targets now named by a more
# "modern" naming scheme. # "modern" naming scheme.
default-target: $(DEFAULT_MAKE_TARGET) default: $(DEFAULT_MAKE_TARGET)
jdk: exploded-image jdk: exploded-image
images: product-images images: product-images
docs: docs-image 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-hotspot-jtreg test-hotspot-jtreg-native test-hotspot-gtest \
test-jdk-jtreg-native test-docs test-jdk-jtreg-native test-docs
################################################################################
################################################################################ ################################################################################
# #
# Clean targets # Clean targets
@ -1477,8 +1487,10 @@ create-main-targets-include:
@$(ECHO) ALL_MAIN_TARGETS := $(sort $(ALL_TARGETS)) > \ @$(ECHO) ALL_MAIN_TARGETS := $(sort $(ALL_TARGETS)) > \
$(MAKESUPPORT_OUTPUTDIR)/main-targets.gmk $(MAKESUPPORT_OUTPUTDIR)/main-targets.gmk
################################################################################
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, Main-post.gmk))
.PHONY: $(ALL_TARGETS) .PHONY: $(ALL_TARGETS)
FRC: # Force target FRC: # Force target
include MakeFileEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,13 +23,13 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################ ################################################################################
# This file contains helper functions for Main.gmk. # This file contains helper functions for Main.gmk.
################################################################################ ################################################################################
ifndef _MAINSUPPORT_GMK
_MAINSUPPORT_GMK := 1
# Setup make rules for creating a top-level target. # Setup make rules for creating a top-level target.
# Parameter 1 is the name of the rule. This name is used as variable prefix. # Parameter 1 is the name of the rule. This name is used as variable prefix.
# #
@ -218,5 +218,4 @@ endef
################################################################################ ################################################################################
endif # include guard endif # _MAINSUPPORT_GMK
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,10 +23,8 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk ifndef _MODULE_TOOLS_GMK
ifeq ($(INCLUDE), true) _MODULE_TOOLS_GMK := 1
################################################################################
include JavaCompilation.gmk 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 \ --add-exports java.base/jdk.internal.module=ALL-UNNAMED \
build.tools.jigsaw.AddPackagesAttribute build.tools.jigsaw.AddPackagesAttribute
################################################################################ endif # _MODULE_TOOLS_GMK
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,29 +23,27 @@
# questions. # questions.
# #
include MakeFileStart.gmk
################################################################################ ################################################################################
# This makefile is called from Main.gmk, through a macro in MakeHelpers.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 # and wraps calls to makefiles for specific modules and build phases. Having
# this wrapper reduces the need for boilerplate code. It also provides # this wrapper reduces the need for boilerplate code. It also provides
# opportunity for automatic copying of files to an interim exploded runnable # opportunity for automatic copying of files to an interim exploded runnable
# image. # image.
################################################################################
default: all
include $(SPEC)
include MakeBase.gmk
include CopyFiles.gmk include CopyFiles.gmk
MODULE_SRC := $(TOPDIR)/src/$(MODULE) MODULE_SRC := $(TOPDIR)/src/$(MODULE)
# Define the snippet for MakeSnippetStart/End # All makefiles should add the targets to be built to this variable.
THIS_SNIPPET := modules/$(MODULE)/$(MAKEFILE_PREFIX).gmk TARGETS :=
include MakeSnippetStart.gmk
# Include the file being wrapped. # Include the file being wrapped.
include $(THIS_SNIPPET) include $(MAKEFILE_PREFIX).gmk
include MakeSnippetEnd.gmk
ifeq ($(MAKEFILE_PREFIX), Lib) ifeq ($(MAKEFILE_PREFIX), Lib)
# We need to keep track of what libraries are generated/needed by this # 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) ifeq ($(GENERATE_COMPILE_COMMANDS_ONLY), true)
TARGETS := $(filter $(MAKESUPPORT_OUTPUTDIR)/compile-commands/%, $(TARGETS)) all: $(filter $(MAKESUPPORT_OUTPUTDIR)/compile-commands/%, $(TARGETS))
else 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) $(COPY_INCLUDE) $(COPY_CMDS) $(COPY_MAN) $(COPY_CONF) $(LINK_LIBS_TO_LIB)
endif endif
################################################################################
include MakeFileEnd.gmk

View file

@ -38,15 +38,13 @@ default:
# serially, regardless of -j. # serially, regardless of -j.
.NOTPARALLEL: .NOTPARALLEL:
IS_PREINIT_ENV := true
# Include our helper functions. # Include our helper functions.
include $(TOPDIR)/make/PreInitSupport.gmk include $(topdir)/make/PreInitSupport.gmk
include $(TOPDIR)/make/common/LogUtils.gmk include $(topdir)/make/common/LogUtils.gmk
# Here are "global" targets, i.e. targets that can be executed without having # Here are "global" targets, i.e. targets that can be executed without having
# a configuration. This will define ALL_GLOBAL_TARGETS. # 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, # CALLED_TARGETS is the list of targets that the user provided,
# or "default" if unspecified. # or "default" if unspecified.
@ -81,8 +79,7 @@ ifneq ($(SKIP_SPEC), true)
# Check that CONF_CHECK is valid. # Check that CONF_CHECK is valid.
$(eval $(call ParseConfCheckOption)) $(eval $(call ParseConfCheckOption))
# Check that the LOG given is valid, and set LOG_LEVEL, LOG_NOFILE, # Check that the LOG given is valid, and set LOG_LEVEL, LOG_NOFILE, MAKE_LOG_VARS and MAKE_LOG_FLAGS.
# MAKE_LOG_VARS and MAKE_LOG_FLAGS.
$(eval $(call ParseLogLevel)) $(eval $(call ParseLogLevel))
# After this SPECS contain 1..N spec files (otherwise ParseConfAndSpec fails). # After this SPECS contain 1..N spec files (otherwise ParseConfAndSpec fails).
@ -104,13 +101,11 @@ ifneq ($(SKIP_SPEC), true)
SEQUENTIAL_TARGETS := $(filter dist-clean clean%, $(MAIN_TARGETS)) SEQUENTIAL_TARGETS := $(filter dist-clean clean%, $(MAIN_TARGETS))
PARALLEL_TARGETS := $(filter-out $(SEQUENTIAL_TARGETS), $(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 spec files depend on the autoconf source code. This check makes sure
# the configuration is up to date after changes to configure. # 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)/*)) \ $(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)/, \ $(if $(CUSTOM_CONF_DIR), $(wildcard $(addprefix $(CUSTOM_CONF_DIR)/, \
version-numbers.conf branding.conf))) version-numbers.conf branding.conf)))
ifeq ($(CONF_CHECK), fail) ifeq ($(CONF_CHECK), fail)
@ -121,8 +116,9 @@ ifneq ($(SKIP_SPEC), true)
else ifeq ($(CONF_CHECK), auto) else ifeq ($(CONF_CHECK), auto)
@echo Note: The configuration is not up to date for \ @echo Note: The configuration is not up to date for \
"'$(lastword $(subst /, , $(dir $@)))'." "'$(lastword $(subst /, , $(dir $@)))'."
@( cd $(TOPDIR) && \ @( cd $(topdir) && \
$(MAKE) $(MAKE_INIT_ARGS) -f $(TOPDIR)/make/Init.gmk SPEC=$@ \ $(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -f $(topdir)/make/Init.gmk \
SPEC=$@ HAS_SPEC=true ACTUAL_TOPDIR=$(topdir) \
reconfigure ) reconfigure )
else ifeq ($(CONF_CHECK), ignore) else ifeq ($(CONF_CHECK), ignore)
# Do nothing # Do nothing
@ -143,7 +139,7 @@ ifneq ($(SKIP_SPEC), true)
$(COMMAND_LINE_VARIABLES) $(MAKECMDGOALS))') $(COMMAND_LINE_VARIABLES) $(MAKECMDGOALS))')
endif 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) \ USER_MAKE_VARS="$(USER_MAKE_VARS)" MAKE_LOG_FLAGS=$(MAKE_LOG_FLAGS) \
$(MAKE_LOG_VARS) \ $(MAKE_LOG_VARS) \
INIT_TARGETS="$(INIT_TARGETS)" \ INIT_TARGETS="$(INIT_TARGETS)" \
@ -159,24 +155,21 @@ ifneq ($(SKIP_SPEC), true)
@$(if $(TARGET_DONE), \ @$(if $(TARGET_DONE), \
true \ true \
, \ , \
( cd $(TOPDIR) && \ ( cd $(topdir) && \
$(foreach spec, $(SPECS), \ $(foreach spec, $(SPECS), \
$(MAKE) $(MAKE_INIT_ARGS) -j 1 -f $(TOPDIR)/make/Init.gmk \ $(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -j 1 -f $(topdir)/make/Init.gmk \
SPEC=$(spec) $(MAKE_INIT_MAIN_TARGET_ARGS) \ SPEC=$(spec) HAS_SPEC=true $(MAKE_INIT_WITH_SPEC_ARGUMENTS) \
main && \ main && \
$(if $(and $(COMPARE_BUILD), $(PARALLEL_TARGETS)), \ $(if $(and $(COMPARE_BUILD), $(PARALLEL_TARGETS)), \
$(MAKE) $(MAKE_INIT_ARGS) -f $(TOPDIR)/make/Init.gmk \ $(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -f $(topdir)/make/Init.gmk \
SPEC=$(spec) \ SPEC=$(spec) HAS_SPEC=true ACTUAL_TOPDIR=$(topdir) \
COMPARE_BUILD="$(COMPARE_BUILD)" \ COMPARE_BUILD="$(COMPARE_BUILD)" pre-compare-build && \
pre-compare-build && \ $(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -j 1 -f $(topdir)/make/Init.gmk \
$(MAKE) $(MAKE_INIT_ARGS) -j 1 -f $(TOPDIR)/make/Init.gmk \ SPEC=$(spec) HAS_SPEC=true $(MAKE_INIT_WITH_SPEC_ARGUMENTS) \
SPEC=$(spec) $(MAKE_INIT_MAIN_TARGET_ARGS) \ COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" main && \
COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" \ $(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -f $(topdir)/make/Init.gmk \
main && \ SPEC=$(spec) HAS_SPEC=true ACTUAL_TOPDIR=$(topdir) \
$(MAKE) $(MAKE_INIT_ARGS) -f $(TOPDIR)/make/Init.gmk \ COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" post-compare-build && \
SPEC=$(spec) \
COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" \
post-compare-build && \
) \ ) \
) true ) \ ) true ) \
$(eval TARGET_DONE=true) \ $(eval TARGET_DONE=true) \
@ -220,5 +213,3 @@ else # SKIP_SPEC=true
.PHONY: $(ALL_TARGETS) .PHONY: $(ALL_TARGETS)
endif # $(SKIP_SPEC)!=true endif # $(SKIP_SPEC)!=true
################################################################################

View file

@ -23,20 +23,20 @@
# questions. # questions.
# #
################################################################################ ##############################################################################
# Helper functions for PreInit.gmk, the initial part of initialization before # Helper functions for PreInit.gmk, the initial part of initialization before
# the SPEC file is loaded. Most of these functions provide parsing and setting # the SPEC file is loaded. Most of these functions provide parsing and setting
# up make options from the command-line. # 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 is defined in spec.gmk, but that is not included yet
COMMA := , 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 # Essential control variables that are handled by PreInit.gmk or Init.gmk
INIT_CONTROL_VARIABLES := LOG CONF CONF_NAME SPEC JOBS CONF_CHECK ALLOW \ INIT_CONTROL_VARIABLES := LOG CONF CONF_NAME SPEC JOBS CONF_CHECK ALLOW \
COMPARE_BUILD COMPARE_BUILD
@ -68,13 +68,13 @@ USER_MAKE_VARS := $(subst §,\ , $(filter-out $(addsuffix =%, $(ALL_CONTROL_VARI
# Setup information about available configurations, if any. # Setup information about available configurations, if any.
ifneq ($(CUSTOM_ROOT), ) ifneq ($(CUSTOM_ROOT), )
build_dir := $(CUSTOM_ROOT)/build build_dir = $(CUSTOM_ROOT)/build
else else
build_dir := $(TOPDIR)/build build_dir = $(topdir)/build
endif endif
all_spec_files := $(wildcard $(build_dir)/*/spec.gmk) all_spec_files = $(wildcard $(build_dir)/*/spec.gmk)
# Extract the configuration names from the path # 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 # Check for unknown command-line variables
define CheckControlVariables define CheckControlVariables
@ -110,7 +110,7 @@ endef
define CheckInvalidMakeFlags define CheckInvalidMakeFlags
# This is a trick to get this rule to execute before any other rules # This is a trick to get this rule to execute before any other rules
# MAKEFLAGS only indicate -j if read in a recipe (!) # MAKEFLAGS only indicate -j if read in a recipe (!)
$$(TOPDIR)/make/PreInit.gmk: .FORCE $$(topdir)/make/PreInit.gmk: .FORCE
$$(if $$(findstring --jobserver, $$(MAKEFLAGS)), \ $$(if $$(findstring --jobserver, $$(MAKEFLAGS)), \
$$(info Error: 'make -jN' is not supported, use 'make JOBS=N') \ $$(info Error: 'make -jN' is not supported, use 'make JOBS=N') \
$$(error Cannot continue) \ $$(error Cannot continue) \
@ -162,7 +162,7 @@ define ParseConfAndSpec
ifneq ($(CUSTOM_ROOT), ) ifneq ($(CUSTOM_ROOT), )
$$(info Error: No configurations found for $$(CUSTOM_ROOT).) $$(info Error: No configurations found for $$(CUSTOM_ROOT).)
else else
$$(info Error: No configurations found for $$(TOPDIR).) $$(info Error: No configurations found for $$(topdir).)
endif endif
$$(info Please run 'bash configure' to create a configuration.) $$(info Please run 'bash configure' to create a configuration.)
$$(info ) $$(info )
@ -278,9 +278,9 @@ define DefineMainTargets
endif endif
$$(main_targets_file): $$(main_targets_file):
@( cd $$(TOPDIR) && \ @( cd $$(topdir) && \
$$(MAKE) $$(MAKE_LOG_FLAGS) -r -R -f $$(TOPDIR)/make/Main.gmk \ $$(MAKE) $$(MAKE_LOG_FLAGS) -r -R -f $$(topdir)/make/Main.gmk \
-I $$(TOPDIR)/make/common SPEC=$(strip $2) NO_RECIPES=true \ -I $$(topdir)/make/common SPEC=$(strip $2) NO_RECIPES=true \
$$(MAKE_LOG_VARS) \ $$(MAKE_LOG_VARS) \
create-main-targets-include ) create-main-targets-include )
@ -295,5 +295,3 @@ define PrintConfCheckFailed
@echo "This behavior may also be changed using CONF_CHECK=<ignore|auto>." @echo "This behavior may also be changed using CONF_CHECK=<ignore|auto>."
@echo ' ' @echo ' '
endef endef
################################################################################

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,12 +23,16 @@
# questions. # questions.
# #
include MakeFileStart.gmk default: all
include $(SPEC)
include MakeBase.gmk
################################################################################ ################################################################################
# This makefile generates the "release" file into the exploded image. Jlink is # 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 # then responsible for using this as the base for release files in each linked
# image. # image.
#
################################################################################ ################################################################################
BASE_RELEASE_FILE := $(JDK_OUTPUTDIR)/release 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

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,10 +23,10 @@
# questions. # questions.
# #
include MakeFileStart.gmk default: all
################################################################################
include $(SPEC)
include MakeBase.gmk
include FindTests.gmk include FindTests.gmk
# We will always run multiple tests serially # We will always run multiple tests serially
@ -71,6 +71,9 @@ ifeq ($(call isTargetOs, windows), true)
endif endif
endif endif
################################################################################
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, RunTests.gmk))
################################################################################ ################################################################################
# This is the JDK that we will test # This is the JDK that we will test
@ -1354,8 +1357,4 @@ endif
all: run-test all: run-test
.PHONY: $(TARGETS) .PHONY: default all $(TARGETS)
################################################################################
include MakeFileEnd.gmk

View file

@ -27,8 +27,6 @@
# Initial bootstrapping, copied and stripped down from Makefile and PreInit.gmk. # 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 # 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). # make executable is called using a Windows mixed path (c:/cygwin/bin/make.exe).
ifneq ($(findstring :, $(MAKE)), ) ifneq ($(findstring :, $(MAKE)), )
@ -59,7 +57,7 @@ TOPDIR := $(strip $(patsubst %/make/, %, $(dir $(makefile_path))))
define SetupVariable define SetupVariable
ifeq ($$($1), ) ifeq ($$($1), )
ifeq ($2, ) 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.) $$(error Cannot continue.)
else ifeq ($2, OPTIONAL) else ifeq ($2, OPTIONAL)
ifneq ($$(findstring $$(LOG), info debug trace), ) 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 # can include the prebuilt spec file ourselves, without an ephemeral spec
# wrapper. This is required so we can include MakeBase which is needed for # wrapper. This is required so we can include MakeBase which is needed for
# CreateNewSpec. # CreateNewSpec.
HAS_SPEC :=
include $(TOPDIR)/make/PreInitSupport.gmk include $(TOPDIR)/make/PreInitSupport.gmk
include $(TOPDIR)/make/common/LogUtils.gmk include $(TOPDIR)/make/common/LogUtils.gmk
@ -247,7 +246,7 @@ endif
# Now we can include additional custom support. # Now we can include additional custom support.
# This might define CUSTOM_NEW_SPEC_LINE # This might define CUSTOM_NEW_SPEC_LINE
ifneq ($(CUSTOM_MAKE_DIR), ) ifneq ($(CUSTOM_MAKE_DIR), )
include $(CUSTOM_MAKE_DIR)/RunTestsPrebuilt-pre.gmk include $(CUSTOM_MAKE_DIR)/RunTestsPrebuilt.gmk
endif endif
NEW_SPEC := $(OUTPUTDIR)/run-test-spec.gmk NEW_SPEC := $(OUTPUTDIR)/run-test-spec.gmk
@ -297,10 +296,14 @@ test-prebuilt:
# is unfortunately not available at this point. # is unfortunately not available at this point.
$(call MakeDir, $(MAKESUPPORT_OUTPUTDIR)/failure-logs) $(call MakeDir, $(MAKESUPPORT_OUTPUTDIR)/failure-logs)
@$(RM) -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error @$(RM) -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error
# We need to fill the FindTest cache before entering RunTests.gmk. # The lazy initialization of the cache file in FindTests.gmk does not
@cd $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) SPEC=$(SPEC) \ # always work with RunTests.gmk. To guarantee that the jtreg test groups
-f RunTestsPrebuiltFindTests.gmk # are always found and parsed, call FindTests.gmk stand alone once
@cd $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test \ # 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="$(TEST)"
test-prebuilt-with-exit-code: test-prebuilt test-prebuilt-with-exit-code: test-prebuilt

View file

@ -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

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,10 @@
# questions. # 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 # 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 # 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 # all repos will be stored in a file in the top dir, which is then used when
# creating the tracker file. # creating the tracker file.
################################################################################
STORED_SOURCE_REVISION := $(TOPDIR)/.src-rev STORED_SOURCE_REVISION := $(TOPDIR)/.src-rev
@ -154,6 +156,10 @@ endif
################################################################################ ################################################################################
$(eval $(call IncludeCustomExtension, SourceRevision-post.gmk))
################################################################################
store-source-revision: $(STORE_SOURCE_REVISION_TARGET) store-source-revision: $(STORE_SOURCE_REVISION_TARGET)
create-source-revision-tracker: $(CREATE_SOURCE_REVISION_TRACKER_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 FRC: # Force target
.PHONY: store-source-revision create-source-revision-tracker .PHONY: store-source-revision create-source-revision-tracker
################################################################################
include MakeFileEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,9 +23,10 @@
# questions. # questions.
# #
include MakeFileStart.gmk default: all
################################################################################ include $(SPEC)
include MakeBase.gmk
include CopyFiles.gmk include CopyFiles.gmk
include DebugInfoUtils.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 TARGETS += static-jdk-image
.PHONY: static-launcher static-jdk-image all: $(TARGETS)
################################################################################ .PHONY: all static-launcher static-jdk-image
include MakeFileEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,12 +23,13 @@
# questions. # questions.
# #
include MakeFileStart.gmk
################################################################################
# This makefile creates an image of the optional static versions of certain JDK # This makefile creates an image of the optional static versions of certain JDK
# libraries. # libraries.
################################################################################
default: all
include $(SPEC)
include MakeBase.gmk
include CopyFiles.gmk include CopyFiles.gmk
include Modules.gmk include Modules.gmk
@ -37,6 +38,8 @@ ALL_MODULES = $(call FindAllModules)
################################################################################ ################################################################################
TARGETS :=
ifneq ($(filter static-libs-image, $(MAKECMDGOALS)), ) ifneq ($(filter static-libs-image, $(MAKECMDGOALS)), )
IMAGE_DEST_DIR = $(STATIC_LIBS_IMAGE_DIR)/lib IMAGE_DEST_DIR = $(STATIC_LIBS_IMAGE_DIR)/lib
else ifneq ($(filter static-libs-graal-image, $(MAKECMDGOALS)), ) else ifneq ($(filter static-libs-graal-image, $(MAKECMDGOALS)), )
@ -69,9 +72,11 @@ ifneq ($(filter static-libs-image, $(MAKECMDGOALS)), )
) )
endif endif
################################################################################
static-libs-image: $(HOTSPOT_VARIANT_STATIC_LIBS_TARGETS) $(STATIC_LIBS_TARGETS) static-libs-image: $(HOTSPOT_VARIANT_STATIC_LIBS_TARGETS) $(STATIC_LIBS_TARGETS)
static-libs-graal-image: $(STATIC_LIBS_TARGETS) static-libs-graal-image: $(STATIC_LIBS_TARGETS)
################################################################################ all: $(TARGETS)
include MakeFileEnd.gmk .PHONY: all

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,13 @@
# questions. # 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) prepare-test-image: $(TARGETS)
all: prepare-test-image all: prepare-test-image
.PHONY: prepare-test-image .PHONY: default all prepare-test-image
################################################################################
include MakeFileEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,10 +23,8 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk ifndef _TOOLS_HOTSPOT_GMK
ifeq ($(INCLUDE), true) _TOOLS_HOTSPOT_GMK := 1
################################################################################
include JavaCompilation.gmk include JavaCompilation.gmk
@ -46,5 +44,4 @@ TOOL_JFR_GEN := $(JAVA_SMALL) -cp $(HOTSPOT_TOOLS_OUTPUTDIR) \
################################################################################ ################################################################################
endif # include guard endif # _TOOLS_HOTSPOT_GMK
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,13 +23,14 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk ifndef _TOOLS_GMK
ifeq ($(INCLUDE), true) _TOOLS_GMK := 1
################################################################################
include JavaCompilation.gmk 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 # To avoid reevaluating the compilation setup for the tools each time this file
# is included, the actual compilation is handled by CompileTools.gmk. The # 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 # Hook to include the corresponding custom post file, if present.
include MakeIncludeEnd.gmk $(eval $(call IncludeCustomExtension, ToolsJdk-post.gmk))
endif # _TOOLS_GMK

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,10 +23,11 @@
# questions. # questions.
# #
include MakeFileStart.gmk # This must be the first rule
default: all
################################################################################
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk include JavaCompilation.gmk
################################################################################ ################################################################################
@ -42,7 +43,3 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_LANGTOOLS, \
)) ))
all: $(BUILD_TOOLS_LANGTOOLS) all: $(BUILD_TOOLS_LANGTOOLS)
################################################################################
include MakeFileEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,14 +23,17 @@
# questions. # questions.
# #
include MakeFileStart.gmk default: all
include $(SPEC)
include MakeBase.gmk
include ProcessMarkdown.gmk
################################################################################ ################################################################################
# This makefile updates the generated build html documentation. # This makefile updates the generated build html documentation.
#
################################################################################ ################################################################################
include ProcessMarkdown.gmk
ifeq ($(ENABLE_PANDOC), false) ifeq ($(ENABLE_PANDOC), false)
$(info No pandoc executable was detected by configure) $(info No pandoc executable was detected by configure)
$(error Cannot continue) $(error Cannot continue)
@ -52,4 +55,10 @@ TARGETS += $(md_docs)
################################################################################ ################################################################################
include MakeFileEnd.gmk $(eval $(call IncludeCustomExtension, UpdateBuildDocs.gmk))
################################################################################
all: $(TARGETS)
.PHONY: all default

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,15 @@
# questions. # 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 # This file is responsible for updating the generated sleef source code files
@ -32,9 +40,6 @@ include MakeFileStart.gmk
# updated from upstream. # updated from upstream.
################################################################################ ################################################################################
include CopyFiles.gmk
include Execute.gmk
ifneq ($(COMPILE_TYPE), cross) ifneq ($(COMPILE_TYPE), cross)
$(error Only cross-compilation of libsleef is currently supported) $(error Only cross-compilation of libsleef is currently supported)
endif endif
@ -143,4 +148,6 @@ TARGETS := $(copy_generated_sleef_source)
################################################################################ ################################################################################
include MakeFileEnd.gmk all: $(TARGETS)
.PHONY: all default

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,15 @@
# questions. # 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 # 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. # 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) ifeq ($(COMPILE_TYPE), cross)
$(error It is not possible to update the x11wrappers when cross-compiling) $(error It is not possible to update the x11wrappers when cross-compiling)
endif endif
@ -104,4 +108,6 @@ TARGETS += $(run_wrappergen) wrapper-information
################################################################################ ################################################################################
include MakeFileEnd.gmk all: $(TARGETS)
.PHONY: all default

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,10 +23,10 @@
# questions. # questions.
# #
include MakeFileStart.gmk default: all
################################################################################
include $(SPEC)
include MakeBase.gmk
include ZipArchive.gmk include ZipArchive.gmk
################################################################################ ################################################################################
@ -100,4 +100,6 @@ endif
################################################################################ ################################################################################
include MakeFileEnd.gmk all: $(TARGETS)
.PHONY: default all

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,16 +23,19 @@
# questions. # questions.
# #
include MakeFileStart.gmk default: all
################################################################################
include $(SPEC)
include MakeBase.gmk
include Modules.gmk include Modules.gmk
include ZipArchive.gmk include ZipArchive.gmk
SRC_ZIP_WORK_DIR := $(SUPPORT_OUTPUTDIR)/src SRC_ZIP_WORK_DIR := $(SUPPORT_OUTPUTDIR)/src
$(if $(filter $(TOPDIR)/%, $(SUPPORT_OUTPUTDIR)), $(eval SRC_ZIP_BASE := $(TOPDIR)), $(eval SRC_ZIP_BASE := $(SUPPORT_OUTPUTDIR))) $(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. # Create the directory structure for src.zip using symlinks.
# <module>/<package>/<file>.java # <module>/<package>/<file>.java
@ -92,8 +95,8 @@ zip: $(SRC_ZIP_SRCS)
TARGETS += zip TARGETS += zip
.PHONY: zip
################################################################################ ################################################################################
include MakeFileEnd.gmk all: $(TARGETS)
.PHONY: default all zip

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,11 +23,14 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk ifeq ($(_MAKEBASE_GMK), )
ifeq ($(INCLUDE), true) $(error You must include MakeBase.gmk prior to including CopyFiles.gmk)
endif
################################################################################ ################################################################################
#
# Code for handling the SetupCopyFiles macro. # Code for handling the SetupCopyFiles macro.
#
################################################################################ ################################################################################
define AddFileToCopy define AddFileToCopy
@ -107,8 +110,3 @@ define SetupCopyFilesBody
) )
endef endef
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,11 +23,14 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk ifeq ($(_MAKEBASE_GMK), )
ifeq ($(INCLUDE), true) $(error You must include MakeBase.gmk prior to including DebugInfoUtils.gmk)
endif
################################################################################ ################################################################################
#
# Common debuginfo utility functions # Common debuginfo utility functions
#
################################################################################ ################################################################################
################################################################################ ################################################################################
@ -53,6 +56,3 @@ else
$(if $(wildcard $1), $(call containing, .dSYM/, $(call FindFiles, $1))) $(if $(wildcard $1), $(call containing, .dSYM/, $(call FindFiles, $1)))
endif endif
endif endif
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,13 +23,17 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk ifeq ($(_MAKEBASE_GMK), )
ifeq ($(INCLUDE), true) $(error You must include MakeBase.gmk prior to including Execute.gmk)
endif
################################################################################ ################################################################################
#
# Code for handling the SetupExecute macro. # Code for handling the SetupExecute macro.
#
################################################################################ ################################################################################
################################################################################ ################################################################################
# Setup make rules for executing an arbitrary command. # Setup make rules for executing an arbitrary command.
# #
@ -192,8 +196,3 @@ define SetupExecuteBody
$1_TARGET := $$($1_FINAL_RESULT) $1_TARGET := $$($1_FINAL_RESULT)
endef endef
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,11 +23,14 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk ifeq ($(_MAKEBASE_GMK), )
ifeq ($(INCLUDE), true) $(error You must include MakeBase.gmk prior to including FileUtils.gmk)
endif
################################################################################ ################################################################################
#
# Common file utility functions # Common file utility functions
#
################################################################################ ################################################################################
################################################################################ ################################################################################
@ -304,8 +307,3 @@ ifeq ($(DISABLE_CACHE_FIND), true)
else else
FindFiles = $(CacheFindFiles) FindFiles = $(CacheFindFiles)
endif endif
################################################################################
include MakeIncludeEnd.gmk
endif # include guard

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,10 +23,21 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk ifndef _FIND_TESTS_GMK
ifeq ($(INCLUDE), true) _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 might have been set by a custom extension
TEST_BASEDIRS += $(TOPDIR)/test $(TOPDIR) TEST_BASEDIRS += $(TOPDIR)/test $(TOPDIR)
@ -94,5 +105,4 @@ ALL_NAMED_TESTS += failure-handler make
################################################################################ ################################################################################
endif # include guard endif # _FIND_TESTS_GMK
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,10 +23,12 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk ifndef _JAR_ARCHIVE_GMK
ifeq ($(INCLUDE), true) _JAR_ARCHIVE_GMK := 1
################################################################################ ifeq ($(_MAKEBASE_GMK), )
$(error You must include MakeBase.gmk prior to including JarArchive.gmk)
endif
include MakeIO.gmk include MakeIO.gmk
@ -281,7 +283,4 @@ define SetupJarArchiveBody
$1 += $$($1_JAR) $1 += $$($1_JAR)
endef endef
################################################################################ endif # _JAR_ARCHIVE_GMK
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -23,10 +23,12 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk ifndef _JAVA_COMPILATION_GMK
ifeq ($(INCLUDE), true) _JAVA_COMPILATION_GMK := 1
################################################################################ ifeq ($(_MAKEBASE_GMK), )
$(error You must include MakeBase.gmk prior to including JavaCompilation.gmk)
endif
include MakeIO.gmk include MakeIO.gmk
@ -538,7 +540,4 @@ SetupJavaCompilationCompileTarget = \
SetupJavaCompilationApiTarget = \ SetupJavaCompilationApiTarget = \
$(strip $2)/_the.$(strip $1)_pubapi $(strip $2)/_the.$(strip $1)_pubapi
################################################################################ endif # _JAVA_COMPILATION_GMK
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -23,13 +23,18 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk ifndef _JDK_NATIVE_COMPILATION_GMK
ifeq ($(INCLUDE), true) _JDK_NATIVE_COMPILATION_GMK := 1
################################################################################ ifeq ($(_MAKEBASE_GMK), )
$(error You must include MakeBase.gmk prior to including JdkNativeCompilation.gmk)
endif
include NativeCompilation.gmk include NativeCompilation.gmk
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, common/JdkNativeCompilation.gmk))
FindSrcDirsForComponent += \ FindSrcDirsForComponent += \
$(call uniq, $(wildcard \ $(call uniq, $(wildcard \
$(TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS)/native/$(strip $2) \ $(TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS)/native/$(strip $2) \
@ -494,7 +499,4 @@ define SetupJdkExecutableBody
$$(eval $$(call SetupJdkNativeCompilation, $1)) $$(eval $$(call SetupJdkNativeCompilation, $1))
endef endef
################################################################################ endif # _JDK_NATIVE_COMPILATION_GMK
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -23,9 +23,6 @@
# questions. # questions.
# #
include $(TOPDIR)/make/common/MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################ ################################################################################
# This file contains helper functions for logging. # This file contains helper functions for logging.
################################################################################ ################################################################################
@ -97,9 +94,6 @@ define ParseLogLevel
# Error: LOG contains unknown option or log level: debug-to-log. # Error: LOG contains unknown option or log level: debug-to-log.
$$(eval $$(call ParseLogOption, profile, LOG_PROFILE_TIMES_FILE)) $$(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 # 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)) LOG_PROFILE_TIMES_FILE := $$(firstword $$(LOG_PROFILE_TIMES_FILE) $$(LOG_PROFILE_TIMES_LOG))
@ -128,11 +122,6 @@ endef
MAKE_LOG_VARS = $(foreach v, \ MAKE_LOG_VARS = $(foreach v, \
LOG_LEVEL LOG_NOFILE LOG_CMDLINES LOG_REPORT LOG_PROFILE_TIMES_LOG \ LOG_LEVEL LOG_NOFILE LOG_CMDLINES LOG_REPORT LOG_PROFILE_TIMES_LOG \
LOG_PROFILE_TIMES_FILE LOG_FLOW, \ LOG_PROFILE_TIMES_FILE, \
$v=$($v) \ $v=$($v) \
) )
################################################################################
endif # include guard
include $(TOPDIR)/make/common/MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,11 +23,6 @@
# questions. # questions.
# #
MAKEBASE_INCLUDED := true
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################ ################################################################################
# MakeBase provides the core functionality needed and used by all makefiles. It # MakeBase provides the core functionality needed and used by all makefiles. It
# should be included by all makefiles. MakeBase provides essential # should be included by all makefiles. MakeBase provides essential
@ -35,6 +30,13 @@ ifeq ($(INCLUDE), true)
# execution, logging and fixpath functionality. # 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 # By defining this pseudo target, make will automatically remove targets
# if their recipe fails so that a rebuild is automatically triggered on the # if their recipe fails so that a rebuild is automatically triggered on the
# next make invocation. # next make invocation.
@ -310,5 +312,7 @@ ExecuteWithLog = \
################################################################################ ################################################################################
include MakeIncludeEnd.gmk # Hook to include the corresponding custom file, if present.
endif # include guard $(eval $(call IncludeCustomExtension, common/MakeBase.gmk))
endif # _MAKEBASE_GMK

View file

@ -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

View file

@ -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

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,14 +23,18 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk ifeq ($(_MAKEBASE_GMK), )
ifeq ($(INCLUDE), true) $(error You must include MakeBase.gmk prior to including MakeIO.gmk)
endif
################################################################################ ################################################################################
#
# Functions for dealing with reading and writing from makefiles. Prior to GNU # Functions for dealing with reading and writing from makefiles. Prior to GNU
# Make 4.0, this was tricky business. # Make 4.0, this was tricky business.
#
################################################################################ ################################################################################
################################################################################ ################################################################################
# ListPathsSafely can be used to print command parameters to a file. This is # 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 # 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) $$(call ListPathsSafely_IfPrintf,$1,$2,29751,30000)
endef endef
endif # HAS_FILE_FUNCTION endif # HAS_FILE_FUNCTION
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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))

View file

@ -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

View file

@ -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))

View file

@ -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

View file

@ -23,8 +23,8 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk ifndef _MODULES_GMK
ifeq ($(INCLUDE), true) _MODULES_GMK := 1
################################################################################ ################################################################################
# Setup module sets for classloaders # Setup module sets for classloaders
@ -45,6 +45,11 @@ include $(TOPDIR)/make/conf/docs-modules.conf
include $(TOPDIR)/make/conf/build-module-sets.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 # Depending on the configuration, we might need to filter out some modules that
# normally should have been included # normally should have been included
@ -311,5 +316,4 @@ endef
################################################################################ ################################################################################
endif # include guard endif # _MODULES_GMK
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,15 +23,19 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################ ################################################################################
# This is the top-level entry point for our native compilation and linking. # This is the top-level entry point for our native compilation and linking.
# It contains the SetupNativeCompilation macro, but is supported by helper # It contains the SetupNativeCompilation macro, but is supported by helper
# macros in the make/common/native directory. # 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 MakeIO.gmk
include native/CompileFile.gmk include native/CompileFile.gmk
include native/DebugSymbols.gmk include native/DebugSymbols.gmk
@ -219,7 +223,6 @@ define SetupNativeCompilationBody
ifeq ($(GENERATE_COMPILE_COMMANDS_ONLY), true) ifeq ($(GENERATE_COMPILE_COMMANDS_ONLY), true)
# Override all targets (this is a hack) # Override all targets (this is a hack)
$1 := $$($1_ALL_OBJS_JSON) $$($1_LDFLAGS_FILE) $1 := $$($1_ALL_OBJS_JSON) $$($1_LDFLAGS_FILE)
TARGETS := $(filter $(MAKESUPPORT_OUTPUTDIR)/compile-commands/%, $(TARGETS))
endif endif
endef endef
@ -406,7 +409,4 @@ define ImportDependencyFile
endif endif
endef endef
################################################################################ endif # _NATIVE_COMPILATION_GMK
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -22,10 +22,9 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk ifeq ($(_MAKEBASE_GMK), )
ifeq ($(INCLUDE), true) $(error You must include MakeBase.gmk prior to including ProcessMarkdown.gmk)
endif
################################################################################
include TextFileProcessing.gmk include TextFileProcessing.gmk
@ -182,8 +181,3 @@ define SetupProcessMarkdownBody
) )
endif endif
endef endef
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,10 +23,13 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk ifndef _TEST_FILES_COMPILATION_GMK
ifeq ($(INCLUDE), true) _TEST_FILES_COMPILATION_GMK := 1
ifeq ($(_MAKEBASE_GMK), )
$(error You must include MakeBase.gmk prior to including TestFilesCompilation.gmk)
endif
################################################################################
include JdkNativeCompilation.gmk include JdkNativeCompilation.gmk
@ -139,7 +142,4 @@ define SetupTestFilesCompilationBody
endef endef
################################################################################ endif # _TEST_FILES_COMPILATION_GMK
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,10 +23,9 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk ifeq ($(_MAKEBASE_GMK), )
ifeq ($(INCLUDE), true) $(error You must include MakeBase.gmk prior to including TextFileProcessing.gmk)
endif
################################################################################
# Helper function for SetupTextFileProcessing; adds a rule for a single file # Helper function for SetupTextFileProcessing; adds a rule for a single file
# to be processed. # to be processed.
@ -223,8 +222,3 @@ define SetupTextFileProcessingBody
endif endif
endif endif
endef endef
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,11 +23,14 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk ifeq ($(_MAKEBASE_GMK), )
ifeq ($(INCLUDE), true) $(error You must include MakeBase.gmk prior to including Utils.gmk)
endif
################################################################################ ################################################################################
#
# Basic utility functions available to MakeBase.gmk itself # Basic utility functions available to MakeBase.gmk itself
#
################################################################################ ################################################################################
# String equals # String equals
@ -395,8 +398,3 @@ FilterExcludedTranslations = \
), \ ), \
$1 \ $1 \
)) ))
################################################################################
include MakeIncludeEnd.gmk
endif # include guard

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,13 +23,15 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk ifndef _ZIP_ARCHIVE_GMK
ifeq ($(INCLUDE), true) _ZIP_ARCHIVE_GMK := 1
################################################################################
# Depends on build tools for MakeZipReproducible # 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. # Setup make rules for creating a zip archive.
# #
@ -190,7 +192,4 @@ define SetupZipArchiveBody
$1 += $$($1_ZIP) $1 += $$($1_ZIP)
endef endef
################################################################################ endif # _ZIP_ARCHIVE_GMK
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,11 +23,6 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################
include CopyFiles.gmk include CopyFiles.gmk
LIB_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE) LIB_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)
@ -93,8 +88,3 @@ define SetupCopyLegalFilesBody
) \ ) \
) )
endef endef
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,15 +23,6 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################
include JavaCompilation.gmk include JavaCompilation.gmk
include $(TOPDIR)/make/ToolsJdk.gmk include ToolsJdk.gmk
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,14 +23,9 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################
include Execute.gmk include Execute.gmk
include TextFileProcessing.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 # 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) $$(strip $1) += $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/$$(strip $2)
endef endef
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,8 +23,6 @@
# questions. # questions.
# #
include MakeFileStart.gmk
################################################################################ ################################################################################
# This file makes modifications to module-info.java files based on the build # This file makes modifications to module-info.java files based on the build
# configuration. # configuration.
@ -43,8 +41,13 @@ include MakeFileStart.gmk
# #
# The modified module-info.java files are put in the gensrc directory where # The modified module-info.java files are put in the gensrc directory where
# they will automatically override the static versions in the src tree. # they will automatically override the static versions in the src tree.
#
################################################################################ ################################################################################
default: all
include $(SPEC)
include MakeBase.gmk
include Modules.gmk include Modules.gmk
################################################################################ ################################################################################
@ -98,4 +101,4 @@ endif
################################################################################ ################################################################################
include MakeFileEnd.gmk all: $(TARGETS)

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,13 +23,8 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################
# This file defines macros that sets up rules for generating java classes # This file defines macros that sets up rules for generating java classes
# from resource bundle properties files. # from resource bundle properties files.
################################################################################
include JavaCompilation.gmk include JavaCompilation.gmk
@ -147,8 +142,3 @@ define SetupCompilePropertiesBody
$1 += $$($1_JAVAS) $$($1_TARGET) $$($1_HK) $1 += $$($1_JAVAS) $$($1_TARGET) $$($1_HK)
endef endef
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -23,16 +23,11 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################
include CopyFiles.gmk include CopyFiles.gmk
include JdkNativeCompilation.gmk include JdkNativeCompilation.gmk
include Modules.gmk include Modules.gmk
include ProcessMarkdown.gmk include ProcessMarkdown.gmk
include $(TOPDIR)/make/ToolsJdk.gmk include ToolsJdk.gmk
LAUNCHER_SRC := $(TOPDIR)/src/java.base/share/native/launcher LAUNCHER_SRC := $(TOPDIR)/src/java.base/share/native/launcher
LAUNCHER_CFLAGS += -I$(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
endif endif
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,14 +23,4 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################
include JdkNativeCompilation.gmk include JdkNativeCompilation.gmk
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -23,15 +23,11 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################ ################################################################################
# This file contains functionality related to compiling a single native source # 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 # file (C, C++ or Objective-C) into an object file. It also harbours related
# functionality for generating PCH (precompiled headers) and Windows resource # functionality for generating PCH (precompiled headers) and Windows resource
# files. # files.
################################################################################
################################################################################ ################################################################################
# Creates a recipe that creates a compile_commands.json fragment. Remove any # Creates a recipe that creates a compile_commands.json fragment. Remove any
@ -356,8 +352,3 @@ define CreateWindowsResourceFile
> $$($1_RES_DEPS_TARGETS_FILE) > $$($1_RES_DEPS_TARGETS_FILE)
endif endif
endef endef
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,12 +23,8 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################ ################################################################################
# This file contains functionality related to native debug symbol handling. # This file contains functionality related to native debug symbol handling.
################################################################################
################################################################################ ################################################################################
define CreateDebugSymbols define CreateDebugSymbols
@ -102,8 +98,3 @@ define CreateDebugSymbols
endif # $1_DEBUG_SYMBOLS != false endif # $1_DEBUG_SYMBOLS != false
endif # COPY_DEBUG_SYMBOLS endif # COPY_DEBUG_SYMBOLS
endef endef
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,14 +23,10 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################ ################################################################################
# This file contains functionality related to setting up compiler and linker # This file contains functionality related to setting up compiler and linker
# flags, based on various more abstract sources of compilation description, # flags, based on various more abstract sources of compilation description,
# like optimization level. # like optimization level.
################################################################################
################################################################################ ################################################################################
# $1 is the prefix of the file to be compiled # $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_EXTRA_LIBS += $$($1_LIBS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LIBS_$(OPENJDK_TARGET_OS)) \
$$($1_LIBS_$(TOOLCHAIN_TYPE)) $$($1_LIBS_$(TOOLCHAIN_TYPE)_$(OPENJDK_TARGET_OS)) $$($1_LIBS_$(TOOLCHAIN_TYPE)) $$($1_LIBS_$(TOOLCHAIN_TYPE)_$(OPENJDK_TARGET_OS))
endef endef
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,13 +23,9 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################ ################################################################################
# This file contains functionality related to linking a native binary; # This file contains functionality related to linking a native binary;
# creating either a dynamic library, a static library or an executable. # creating either a dynamic library, a static library or an executable.
################################################################################
################################################################################ ################################################################################
# GetEntitlementsFile # GetEntitlementsFile
@ -216,8 +212,3 @@ define CreateDynamicLibraryOrExecutable
$$(ECHO) $$($1_ALL_LD_ARGS) > $$@ $$(ECHO) $$($1_ALL_LD_ARGS) > $$@
endef endef
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,13 +23,9 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################ ################################################################################
# This file contains functionality related to linking a native binary; # This file contains functionality related to linking a native binary;
# creating either a dynamic library, a static library or an executable. # creating either a dynamic library, a static library or an executable.
################################################################################
################################################################################ ################################################################################
define CreateLinkedResultMicrosoft define CreateLinkedResultMicrosoft
@ -118,8 +114,3 @@ define CreateDynamicLibraryOrExecutableMicrosoft
-outputresource:$$@;#1 -outputresource:$$@;#1
endif endif
endef endef
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,9 +23,6 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################ ################################################################################
# This file contains functionality related to handling paths for source files # 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 # 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. # "@-files", which we normally use to avoid hitting command line length limits.
# Finally this file contains functionality for locating all source code files # Finally this file contains functionality for locating all source code files
# that should be included in the compilation. # that should be included in the compilation.
################################################################################
################################################################################ ################################################################################
# When absolute paths are not allowed in the output, and the compiler does not # When absolute paths are not allowed in the output, and the compiler does not
@ -244,8 +240,3 @@ define SetupObjectFileList
endif endif
endif endif
endef endef
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,11 +23,6 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################
include CopyFiles.gmk include CopyFiles.gmk
# Copy all built libraries into exploded jdk # Copy all built libraries into exploded jdk
@ -62,8 +57,3 @@ else
TARGETS += $(COPY_LIBS) $(LINK_LIBS) TARGETS += $(COPY_LIBS) $(LINK_LIBS)
endif endif
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,11 +23,6 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################
ifeq ($(JVM_VARIANT), ) ifeq ($(JVM_VARIANT), )
$(error This makefile must be called with JVM_VARIANT set) $(error This makefile must be called with JVM_VARIANT set)
endif endif
@ -51,8 +46,3 @@ check-jvm-feature = \
$(if $(filter-out $(VALID_JVM_FEATURES), $1), \ $(if $(filter-out $(VALID_JVM_FEATURES), $1), \
$(error Internal error: Invalid feature tested: $1)) \ $(error Internal error: Invalid feature tested: $1)) \
$(if $(filter $1, $(JVM_FEATURES_$(JVM_VARIANT))), true, false)) $(if $(filter $1, $(JVM_FEATURES_$(JVM_VARIANT))), true, false))
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,16 +23,17 @@
# questions. # questions.
# #
include MakeFileStart.gmk default: all
################################################################################
include $(SPEC)
include MakeBase.gmk
include Execute.gmk include Execute.gmk
include HotspotCommon.gmk
include JavaCompilation.gmk include JavaCompilation.gmk
include JdkNativeCompilation.gmk include JdkNativeCompilation.gmk
include TextFileProcessing.gmk include TextFileProcessing.gmk
include HotspotCommon.gmk
# The real work is done in these files # The real work is done in these files
include gensrc/GensrcJfr.gmk include gensrc/GensrcJfr.gmk
@ -40,6 +41,8 @@ include gensrc/GensrcAdlc.gmk
include gensrc/GensrcDtrace.gmk include gensrc/GensrcDtrace.gmk
include gensrc/GensrcJvmti.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 # While technically the rules below are "gendata" which can be done in parallel
# with native compilation, let's keep it here for simplicity. # 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) TARGETS += $(CREATE_HOTSPOT_LAUNCHER) $(CHMOD_HOTSPOT_LAUNCHER)
################################################################################ all: $(TARGETS)
include MakeFileEnd.gmk .PHONY: all

View file

@ -23,10 +23,7 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk $(eval $(call IncludeCustomExtension, hotspot/gensrc/GensrcAdlc.gmk))
ifeq ($(INCLUDE), true)
################################################################################
ifeq ($(call check-jvm-feature, compiler2), true) ifeq ($(call check-jvm-feature, compiler2), true)
@ -263,8 +260,3 @@ ifeq ($(call check-jvm-feature, compiler2), true)
TARGETS += $(ADLC_GENERATED_FILES) TARGETS += $(ADLC_GENERATED_FILES)
endif endif
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,12 +23,8 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################ ################################################################################
# Gensrc support for dtrace. The files generated here are included by dtrace.hpp # Gensrc support for dtrace. The files generated here are included by dtrace.hpp
################################################################################
ifeq ($(call check-jvm-feature, dtrace), true) 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)) $(DTRACE_GENSRC_DIR)/%.h, $(wildcard $(DTRACE_SOURCE_DIR)/*.d))
endif endif
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,12 +23,9 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################ ################################################################################
# Setup make rules for JFR gensrc file generation. # Setup make rules for JFR gensrc file generation.
################################################################################ #
include $(TOPDIR)/make/ToolsHotspot.gmk include $(TOPDIR)/make/ToolsHotspot.gmk
@ -47,8 +44,3 @@ $(eval $(call SetupExecute, jfr_gen_headers, \
)) ))
TARGETS += $(jfr_gen_headers) TARGETS += $(jfr_gen_headers)
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,14 +23,12 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk include CopyFiles.gmk
ifeq ($(INCLUDE), true)
$(eval $(call IncludeCustomExtension, hotspot/gensrc/GensrcJvmti.gmk))
################################################################################ ################################################################################
# Build tools needed for the JVMTI source code generation # 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. # FIXME: jvmtiGen.java should move to make/src, jvmtiEnvFill.java should be removed.
JVMTI_TOOLS_SRCDIR := $(TOPDIR)/src/hotspot/share/prims JVMTI_TOOLS_SRCDIR := $(TOPDIR)/src/hotspot/share/prims
@ -122,8 +120,3 @@ ifeq ($(JVM_VARIANT), $(firstword $(JVM_VARIANTS)))
TARGETS += $(COPY_JVMTI_H) TARGETS += $(COPY_JVMTI_H)
endif endif
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # 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 # or visit www.oracle.com if you need additional information or have any
# questions. # questions.
# #
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################ $(eval $(call IncludeCustomExtension, hotspot/lib/CompileGtest.gmk))
GTEST_TEST_SRC += $(TOPDIR)/test/hotspot/gtest GTEST_TEST_SRC += $(TOPDIR)/test/hotspot/gtest
@ -161,6 +159,3 @@ $(eval $(call SetupJdkExecutable, BUILD_GTEST_LAUNCHER, \
TARGETS += $(BUILD_GTEST_LAUNCHER) TARGETS += $(BUILD_GTEST_LAUNCHER)
################################################################################ ################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -23,11 +23,6 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################
include CopyFiles.gmk include CopyFiles.gmk
# Include support files that will setup compiler flags due to the selected # 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))) $(foreach o, $(BUILD_LIBJVM_ALL_OBJS), $(eval $(call SetupOperatorNewDeleteCheck,$o)))
endif endif
endif endif
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,12 +23,14 @@
# questions. # questions.
# #
include MakeFileStart.gmk default: all
################################################################################ include $(SPEC)
include MakeBase.gmk
include JdkNativeCompilation.gmk
include HotspotCommon.gmk include HotspotCommon.gmk
include JdkNativeCompilation.gmk
include lib/CompileJvm.gmk include lib/CompileJvm.gmk
ifneq ($(GTEST_FRAMEWORK_SRC), ) ifneq ($(GTEST_FRAMEWORK_SRC), )
@ -39,6 +41,6 @@ endif
include CopyToExplodedJdk.gmk include CopyToExplodedJdk.gmk
################################################################################ all: $(TARGETS)
include MakeFileEnd.gmk .PHONY: all

View file

@ -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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -23,15 +23,11 @@
# questions. # questions.
# #
################################################################################ $(eval $(call IncludeCustomExtension, hotspot/lib/JvmFeatures.gmk))
include MakeIncludeStart.gmk
ifeq ($(INCLUDE), true)
################################################################################ ################################################################################
# Setup CFLAGS and EXCLUDES for the libjvm compilation, depending on which # Setup CFLAGS and EXCLUDES for the libjvm compilation, depending on which
# jvm features are selected for this jvm variant. # jvm features are selected for this jvm variant.
################################################################################
ifeq ($(call check-jvm-feature, compiler1), true) ifeq ($(call check-jvm-feature, compiler1), true)
JVM_CFLAGS_FEATURES += -DCOMPILER1 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 BUILD_LIBJVM_systemDictionary.cpp_CXXFLAGS := -fno-optimize-sibling-calls
endif endif
endif endif
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

View file

@ -23,12 +23,10 @@
# questions. # questions.
# #
include MakeIncludeStart.gmk $(eval $(call IncludeCustomExtension, hotspot/lib/JvmFlags.gmk))
ifeq ($(INCLUDE), true)
################################################################################ ################################################################################
# Setup JVM_CFLAGS. These are shared between GensrcDtrace.gmk and CompileJvm.gmk. # Setup JVM_CFLAGS. These are shared between GensrcDtrace.gmk and CompileJvm.gmk.
################################################################################
# This variable may be added to by a custom extension # This variable may be added to by a custom extension
JVM_SRC_ROOTS += $(TOPDIR)/src/hotspot JVM_SRC_ROOTS += $(TOPDIR)/src/hotspot
@ -101,8 +99,3 @@ endif
ifeq ($(ENABLE_COMPATIBLE_CDS_ALIGNMENT), true) ifeq ($(ENABLE_COMPATIBLE_CDS_ALIGNMENT), true)
JVM_CFLAGS += -DCOMPATIBLE_CDS_ALIGNMENT JVM_CFLAGS += -DCOMPATIBLE_CDS_ALIGNMENT
endif endif
################################################################################
endif # include guard
include MakeIncludeEnd.gmk

Some files were not shown because too many files have changed in this diff Show more