From a44a470052aff3b17fa53165f043ccce36c1ef9b Mon Sep 17 00:00:00 2001 From: Magnus Ihse Bursie Date: Tue, 3 Jun 2025 19:23:29 +0000 Subject: [PATCH] 8358515: make cmp-baseline is broken after JDK-8349665 Reviewed-by: erikj --- make/Init.gmk | 22 ++++++++++++++-------- make/Main.gmk | 8 -------- make/PreInit.gmk | 3 ++- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/make/Init.gmk b/make/Init.gmk index 32624d7dee6..38959323628 100644 --- a/make/Init.gmk +++ b/make/Init.gmk @@ -110,7 +110,18 @@ reconfigure: CUSTOM_CONFIG_DIR="$(CUSTOM_CONFIG_DIR)" \ $(RECONFIGURE_COMMAND) ) -.PHONY: print-modules print-targets print-tests print-configuration reconfigure +# Create files that are needed to run most targets in Main.gmk +create-make-helpers: + ( cd $(TOPDIR) && \ + $(MAKE) $(MAKE_ARGS) -j 1 -f make/GenerateFindTests.gmk \ + $(USER_MAKE_VARS) ) + ( cd $(TOPDIR) && \ + $(MAKE) $(MAKE_ARGS) -j 1 -f make/Main.gmk $(USER_MAKE_VARS) \ + UPDATE_MODULE_DEPS=true NO_RECIPES=true \ + create-main-targets-include ) + +.PHONY: print-modules print-targets print-tests print-configuration \ + reconfigure create-make-helpers ############################################################################## # The main target. This will delegate all other targets into Main.gmk. @@ -130,7 +141,7 @@ TARGET_DESCRIPTION := target$(if $(word 2, $(MAIN_TARGETS)),s) \ # variables are explicitly propagated using $(USER_MAKE_VARS). main: MAKEOVERRIDES := -main: $(INIT_TARGETS) +main: $(INIT_TARGETS) create-make-helpers ifneq ($(SEQUENTIAL_TARGETS)$(PARALLEL_TARGETS), ) $(call RotateLogFiles) $(ECHO) "Building $(TARGET_DESCRIPTION)" $(BUILD_LOG_PIPE_SIMPLE) @@ -142,12 +153,7 @@ main: $(INIT_TARGETS) $(SEQUENTIAL_TARGETS) ) # We might have cleaned away essential files, recreate them. ( cd $(TOPDIR) && \ - $(MAKE) $(MAKE_ARGS) -j 1 -f make/GenerateFindTests.gmk \ - $(USER_MAKE_VARS) ) - ( cd $(TOPDIR) && \ - $(MAKE) $(MAKE_ARGS) -j 1 -f make/Main.gmk $(USER_MAKE_VARS) \ - UPDATE_MODULE_DEPS=true NO_RECIPES=true \ - create-main-targets-include ) + $(MAKE) $(MAKE_ARGS) -j 1 -f make/Init.gmk create-make-helpers ) endif ifneq ($(PARALLEL_TARGETS), ) $(call PrepareFailureLogs) diff --git a/make/Main.gmk b/make/Main.gmk index 386bd226842..d0568509a4e 100644 --- a/make/Main.gmk +++ b/make/Main.gmk @@ -423,14 +423,6 @@ bootcycle-images: ifneq ($(COMPILE_TYPE), cross) $(call LogWarn, Boot cycle build step 2: Building a new JDK image using previously built image) $(call MakeDir, $(OUTPUTDIR)/bootcycle-build) - # We need to create essential files for the bootcycle spec dir - ( cd $(TOPDIR) && \ - $(MAKE) $(MAKE_ARGS) -f make/GenerateFindTests.gmk \ - SPEC=$(BOOTCYCLE_SPEC)) - ( cd $(TOPDIR) && \ - $(MAKE) $(MAKE_ARGS) -f $(TOPDIR)/make/Main.gmk \ - SPEC=$(BOOTCYCLE_SPEC) UPDATE_MODULE_DEPS=true NO_RECIPES=true \ - create-main-targets-include ) +$(MAKE) $(MAKE_ARGS) -f $(TOPDIR)/make/Init.gmk PARALLEL_TARGETS=$(BOOTCYCLE_TARGET) \ LOG_PREFIX="[bootcycle] " JOBS= SPEC=$(BOOTCYCLE_SPEC) main else diff --git a/make/PreInit.gmk b/make/PreInit.gmk index bce61ccde5f..3df44308dd9 100644 --- a/make/PreInit.gmk +++ b/make/PreInit.gmk @@ -50,7 +50,8 @@ include $(TOPDIR)/make/Global.gmk # Targets provided by Init.gmk. ALL_INIT_TARGETS := print-modules print-targets print-configuration \ - print-tests reconfigure pre-compare-build post-compare-build + print-tests reconfigure pre-compare-build post-compare-build \ + create-make-helpers # CALLED_TARGETS is the list of targets that the user provided, # or "default" if unspecified.