From 0763264fbe4ae314a219f02ec1636c06dc86cc90 Mon Sep 17 00:00:00 2001 From: erikj Date: Thu, 4 Apr 2013 09:24:21 +0200 Subject: [PATCH] 8006828: "SKIP_BOOT_CYCLE=false" must work in new building infrastructure Reviewed-by: tbell, alanb --- common/autoconf/bootcycle-spec.gmk.in | 14 ++++++++++++-- common/autoconf/spec.gmk.in | 18 ++++++++++-------- common/makefiles/Jprt.gmk | 4 ++++ common/makefiles/Main.gmk | 5 ++--- 4 files changed, 28 insertions(+), 13 deletions(-) diff --git a/common/autoconf/bootcycle-spec.gmk.in b/common/autoconf/bootcycle-spec.gmk.in index 6edca72..9bc4007 100644 --- a/common/autoconf/bootcycle-spec.gmk.in +++ b/common/autoconf/bootcycle-spec.gmk.in @@ -29,9 +29,16 @@ include @SPEC@ # Check that the user did not try to specify a different java to use for compiling. -ifneq ($(firstword $(SJAVAC_SERVER_JAVA)),$(firstword $(JAVA))) - $(error Bootcycle builds are not possible if --with-sjavac-server-java is specified) +# On windows we need to account for fixpath being first word. +ifeq ($(firstword $(JAVA)),$(FIXPATH)) + JAVA_EXEC_POS=2 +else + JAVA_EXEC_POS=1 endif +ifneq ($(word $(JAVA_EXEC_POS),$(SJAVAC_SERVER_JAVA)),$(word $(JAVA_EXEC_POS),$(JAVA))) + $(error Bootcycle builds are not possible if --with-sjavac-server-java is specified) +endif + # Override specific values to do a boot cycle build @@ -39,5 +46,8 @@ endif BUILD_OUTPUT:=@BUILD_OUTPUT@/bootcycle-build # Use a different Boot JDK +OLD_BOOT_JDK:=$(BOOT_JDK) BOOT_JDK:=@BUILD_OUTPUT@/images/j2sdk-image BOOT_RTJAR:=@BUILD_OUTPUT@/images/j2sdk-image/jre/lib/rt.jar + +SJAVAC_SERVER_JAVA:=$(subst $(OLD_BOOT_JDK),$(BOOT_JDK),$(SJAVAC_SERVER_JAVA)) diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in index bfba636..4e5b7b4 100644 --- a/common/autoconf/spec.gmk.in +++ b/common/autoconf/spec.gmk.in @@ -225,6 +225,7 @@ BUILD_VARIANT_RELEASE:=@BUILD_VARIANT_RELEASE@ # directory. BUILD_OUTPUT:=@BUILD_OUTPUT@ +# Colon left out to be able to override IMAGES_OUTPUTDIR for bootcycle-images LANGTOOLS_OUTPUTDIR=$(BUILD_OUTPUT)/langtools CORBA_OUTPUTDIR=$(BUILD_OUTPUT)/corba JAXP_OUTPUTDIR=$(BUILD_OUTPUT)/jaxp @@ -643,16 +644,17 @@ JDK_IMAGE_SUBDIR:=j2sdk-image JRE_IMAGE_SUBDIR:=j2re-image JDK_OVERLAY_IMAGE_SUBDIR:=j2sdk-overlay-image JRE_OVERLAY_IMAGE_SUBDIR:=j2re-overlay-image -JDK_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR) -JRE_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR) -JDK_OVERLAY_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/$(JDK_OVERLAY_IMAGE_SUBDIR) -JRE_OVERLAY_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/$(JRE_OVERLAY_IMAGE_SUBDIR) +# Colon left out to be able to override output dir for bootcycle-images +JDK_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR) +JRE_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR) +JDK_OVERLAY_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_OVERLAY_IMAGE_SUBDIR) +JRE_OVERLAY_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_OVERLAY_IMAGE_SUBDIR) # Macosx bundles directory definitions -JDK_BUNDLE_SUBDIR:=j2sdk-bundle/jdk$(JDK_VERSION).jdk/Contents -JRE_BUNDLE_SUBDIR:=j2re-bundle/jre$(JDK_VERSION).jre/Contents -JDK_BUNDLE_DIR:=$(IMAGES_OUTPUTDIR)/$(JDK_BUNDLE_SUBDIR) -JRE_BUNDLE_DIR:=$(IMAGES_OUTPUTDIR)/$(JRE_BUNDLE_SUBDIR) +JDK_BUNDLE_SUBDIR=j2sdk-bundle/jdk$(JDK_VERSION).jdk/Contents +JRE_BUNDLE_SUBDIR=j2re-bundle/jre$(JDK_VERSION).jre/Contents +JDK_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_BUNDLE_SUBDIR) +JRE_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_BUNDLE_SUBDIR) # Include the custom-spec.gmk file if it exists -include $(dir @SPEC@)/custom-spec.gmk diff --git a/common/makefiles/Jprt.gmk b/common/makefiles/Jprt.gmk index c70cf88..938d436 100644 --- a/common/makefiles/Jprt.gmk +++ b/common/makefiles/Jprt.gmk @@ -64,6 +64,10 @@ HOTSPOT_AVAILABLE := $(if $(wildcard $(root_dir)/hotspot),true,false) # Build with the configure bridge. After running configure, restart make # to parse the new spec file. BRIDGE_TARGETS := all +# Add bootcycle-images target if legacy variable is set. +ifeq ($(SKIP_BOOT_CYCLE),false) + BRIDGE_TARGETS += bootcycle-images +endif bridgeBuild: bridge2configure @cd $(root_dir) && $(MAKE) -f NewMakefile.gmk $(BRIDGE_TARGETS) diff --git a/common/makefiles/Main.gmk b/common/makefiles/Main.gmk index 11dda4b..9e2bd40 100644 --- a/common/makefiles/Main.gmk +++ b/common/makefiles/Main.gmk @@ -175,9 +175,8 @@ sign-jars-only: start-make @($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk sign-jars) @$(call TargetExit) -bootcycle-images: - @$(ECHO) Boot cycle build step 1: Building the JDK image normally - @($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) SPEC=$(SPEC) images) +bootcycle-images: images bootcycle-images-only +bootcycle-images-only: start-make @$(ECHO) Boot cycle build step 2: Building a new JDK image using previously built image @($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) SPEC=$(dir $(SPEC))bootcycle-spec.gmk images) -- GitLab