8005635: build-infra: Support building install in jprt
authorerikj
Thu, 03 Jan 2013 20:55:52 +0100
changeset 15129 38c7422a92ff
parent 15128 296bb1620e00
child 15130 14a47a69bc62
8005635: build-infra: Support building install in jprt Reviewed-by: ohair Contributed-by: tim.bell@oracle.com, erik.joelsson@oracle.com
jdk/make/common/shared/Defs-windows.gmk
jdk/makefiles/BuildJdk.gmk
jdk/makefiles/Bundles.gmk
jdk/makefiles/Images.gmk
jdk/makefiles/Tools.gmk
--- a/jdk/make/common/shared/Defs-windows.gmk	Wed Jan 02 15:35:12 2013 +0100
+++ b/jdk/make/common/shared/Defs-windows.gmk	Thu Jan 03 20:55:52 2013 +0100
@@ -549,7 +549,10 @@
   _WSCRIPT2 :=$(DEVTOOLS_PATH)wscript.exe
   WSCRIPT  :=$(call FileExists,$(_WSCRIPT1),$(_WSCRIPT2))
 endif
+# If CONFIGURE_BUILD is defined, checks were already done by configure.
+ifndef CONFIGURE_BUILD
 WSCRIPT:=$(call AltCheckSpaces,WSCRIPT)
+endif #! CONFIGURE_BUILD
 # batch mode no modal dialogs on errors, please.
 WSCRIPT += -B
 
@@ -562,7 +565,10 @@
   _CSCRIPT2 :=$(DEVTOOLS_PATH)cscript.exe
   CSCRIPT  :=$(call FileExists,$(_CSCRIPT1),$(_CSCRIPT2))
 endif
+# If CONFIGURE_BUILD is defined, checks were already done by configure.
+ifndef CONFIGURE_BUILD
 CSCRIPT:=$(call AltCheckSpaces,CSCRIPT)
+endif #! CONFIGURE_BUILD
 
 # CABARC: path to cabarc.exe (used in creating install bundles)
 ifdef ALT_CABARC
@@ -584,7 +590,10 @@
   _MSICERT2 :=$(DEVTOOLS_PATH)msicert.exe
   MSICERT   :=$(call FileExists,$(_MSICERT1),$(_MSICERT2))
 endif
+# If CONFIGURE_BUILD is defined, checks were already done by configure.
+ifndef CONFIGURE_BUILD
 MSICERT:=$(call AltCheckSpaces,MSICERT)
+endif #! CONFIGURE_BUILD
 
 # Import JDK images allow for partial builds, components not built are
 #    imported (or copied from) these import areas when needed.
--- a/jdk/makefiles/BuildJdk.gmk	Wed Jan 02 15:35:12 2013 +0100
+++ b/jdk/makefiles/BuildJdk.gmk	Thu Jan 03 20:55:52 2013 +0100
@@ -100,7 +100,7 @@
 sign-jars:
 	+$(MAKE) -f SignJars.gmk
 
-BINARIES:=$(notdir $(wildcard $(IMAGES_OUTPUTDIR)/j2sdk-image/bin/*))
+BINARIES:=$(notdir $(wildcard $(JDK_IMAGE_DIR)/bin/*))
 INSTALLDIR:=openjdk-$(RELEASE)
 
 # Install the jdk image, in a very crude way. Not taking into
@@ -110,7 +110,7 @@
 	echo and creating $(words $(BINARIES)) links from $(INSTALL_PREFIX)/bin into the jdk.
 	$(MKDIR) -p $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
 	$(RM) -r $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/*
-	$(CP) -rp $(IMAGES_OUTPUTDIR)/j2sdk-image/* $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
+	$(CP) -rp $(JDK_IMAGE_DIR)/* $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
 	$(MKDIR) -p $(INSTALL_PREFIX)/bin
 	$(RM) $(addprefix $(INSTALL_PREFIX)/bin/,$(BINARIES))
 	$(foreach b,$(BINARIES),$(LN) -s $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/bin/$b $(INSTALL_PREFIX)/bin/$b &&) true
--- a/jdk/makefiles/Bundles.gmk	Wed Jan 02 15:35:12 2013 +0100
+++ b/jdk/makefiles/Bundles.gmk	Thu Jan 03 20:55:52 2013 +0100
@@ -33,9 +33,7 @@
 
 bundles: jre-bundle jdk-bundle
 
-
-JDK_BUNDLE_DIR := $(IMAGES_OUTPUTDIR)/j2sdk-bundle/jdk$(JDK_VERSION).jdk/Contents
-JRE_BUNDLE_DIR := $(IMAGES_OUTPUTDIR)/j2re-bundle/jre$(JDK_VERSION).jre/Contents
+# JDK_BUNDLE_DIR and JRE_BUNDLE_DIR are defined in SPEC.
 
 MACOSX_SRC := $(JDK_TOPDIR)/src/macosx
 
@@ -70,21 +68,21 @@
 endif
 
 
-JDK_FILE_LIST := $(shell $(FIND) $(IMAGES_OUTPUTDIR)/j2sdk-image ! -type d)
-JRE_FILE_LIST := $(shell $(FIND) $(IMAGES_OUTPUTDIR)/j2re-image ! -type d)
+JDK_FILE_LIST := $(shell $(FIND) $(JDK_IMAGE_DIR) ! -type d)
+JRE_FILE_LIST := $(shell $(FIND) $(JRE_IMAGE_DIR) ! -type d)
 
-JDK_TARGET_LIST := $(subst $(IMAGES_OUTPUTDIR)/j2sdk-image,$(JDK_BUNDLE_DIR)/Home,$(JDK_FILE_LIST))
-JRE_TARGET_LIST := $(subst $(IMAGES_OUTPUTDIR)/j2re-image,$(JRE_BUNDLE_DIR)/Home,$(JRE_FILE_LIST))
+JDK_TARGET_LIST := $(subst $(JDK_IMAGE_DIR),$(JDK_BUNDLE_DIR)/Home,$(JDK_FILE_LIST))
+JRE_TARGET_LIST := $(subst $(JRE_IMAGE_DIR),$(JRE_BUNDLE_DIR)/Home,$(JRE_FILE_LIST))
 
 # The old builds implementation of this did not preserve symlinks so
 # make sure they are followed and the contents copied instead.
 # To fix this, just replace copy with install-file macro.
-$(JDK_BUNDLE_DIR)/Home/%: $(IMAGES_OUTPUTDIR)/j2sdk-image/%
+$(JDK_BUNDLE_DIR)/Home/%: $(JDK_IMAGE_DIR)/%
 	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $(@D)
 	$(CP) -f -R -L '$<' '$@'
 
-$(JRE_BUNDLE_DIR)/Home/%: $(IMAGES_OUTPUTDIR)/j2re-image/%
+$(JRE_BUNDLE_DIR)/Home/%: $(JRE_IMAGE_DIR)/%
 	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $(@D)
 	$(CP) -f -R -L '$<' '$@'
--- a/jdk/makefiles/Images.gmk	Wed Jan 02 15:35:12 2013 +0100
+++ b/jdk/makefiles/Images.gmk	Thu Jan 03 20:55:52 2013 +0100
@@ -77,12 +77,6 @@
   $4 += $2/$$($2_$3_FILE)
 endef
 
-JDK_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2sdk-image
-JRE_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2re-image
-
-JDK_OVERLAY_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2sdk-overlay-image
-JRE_OVERLAY_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2re-overlay-image
-
 ################################################################################
 #
 # JRE and JDK build rules
--- a/jdk/makefiles/Tools.gmk	Wed Jan 02 15:35:12 2013 +0100
+++ b/jdk/makefiles/Tools.gmk	Thu Jan 03 20:55:52 2013 +0100
@@ -28,15 +28,20 @@
     $(JDK_TOPDIR)/src/solaris/classes \
     $(JDK_TOPDIR)/makefiles/sun))
 
+TOOLS_SRC:=$(JDK_TOPDIR)/make/tools/src \
+           $(JDK_TOPDIR)/makefiles/sun/awt/X11 \
+           $(JDK_TOPDIR)/makefiles/sun/osxapp \
+           $(JDK_TOPDIR)/make/tools/swing-beans
+
+ifneq ($(OPENJDK_TARGET_OS),windows)
+  TOOLS_SRC+=$(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator
+endif
+
 # The exception handling of swing beaninfo which have the own tool directory
 ifeq (,$(BUILD_TOOLS))
 $(eval $(call SetupJavaCompilation,BUILD_TOOLS,\
                 SETUP:=GENERATE_OLDBYTECODE,\
-		SRC:=$(JDK_TOPDIR)/make/tools/src \
-                     $(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator \
-                     $(JDK_TOPDIR)/makefiles/sun/awt/X11 \
-                     $(JDK_TOPDIR)/makefiles/sun/osxapp \
-                     $(JDK_TOPDIR)/make/tools/swing-beans,\
+		SRC:=$(TOOLS_SRC),\
 		BIN:=$(JDK_OUTPUTDIR)/btclasses))
 
 endif