8006828: "SKIP_BOOT_CYCLE=false" must work in new building infrastructure
authorerikj
Thu, 04 Apr 2013 09:24:21 +0200
changeset 16578 7a35b47cb9e5
parent 16575 d7ad0dfaa411
child 16579 7e2a683462f9
8006828: "SKIP_BOOT_CYCLE=false" must work in new building infrastructure Reviewed-by: tbell, alanb
common/autoconf/bootcycle-spec.gmk.in
common/autoconf/spec.gmk.in
common/makefiles/Jprt.gmk
common/makefiles/Main.gmk
--- a/common/autoconf/bootcycle-spec.gmk.in	Wed Jul 05 18:48:16 2017 +0200
+++ b/common/autoconf/bootcycle-spec.gmk.in	Thu Apr 04 09:24:21 2013 +0200
@@ -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 @@
 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))
--- a/common/autoconf/spec.gmk.in	Wed Jul 05 18:48:16 2017 +0200
+++ b/common/autoconf/spec.gmk.in	Thu Apr 04 09:24:21 2013 +0200
@@ -225,6 +225,7 @@
 # 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 @@
 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
--- a/common/makefiles/Jprt.gmk	Wed Jul 05 18:48:16 2017 +0200
+++ b/common/makefiles/Jprt.gmk	Thu Apr 04 09:24:21 2013 +0200
@@ -64,6 +64,10 @@
 # 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)
 
--- a/common/makefiles/Main.gmk	Wed Jul 05 18:48:16 2017 +0200
+++ b/common/makefiles/Main.gmk	Thu Apr 04 09:24:21 2013 +0200
@@ -175,9 +175,8 @@
 	@($(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)