From 6541d838909a9b0a0da4f21b0eafbec7037c5ae2 Mon Sep 17 00:00:00 2001 From: erikj Date: Thu, 3 Jan 2013 20:55:52 +0100 Subject: [PATCH] 8005635: build-infra: Support building install in jprt Reviewed-by: ohair Contributed-by: tim.bell@oracle.com, erik.joelsson@oracle.com --- make/common/shared/Defs-windows.gmk | 9 +++++++++ makefiles/BuildJdk.gmk | 4 ++-- makefiles/Bundles.gmk | 16 +++++++--------- makefiles/Images.gmk | 6 ------ makefiles/Tools.gmk | 15 ++++++++++----- 5 files changed, 28 insertions(+), 22 deletions(-) diff --git a/make/common/shared/Defs-windows.gmk b/make/common/shared/Defs-windows.gmk index 36424056f..40415547d 100644 --- a/make/common/shared/Defs-windows.gmk +++ b/make/common/shared/Defs-windows.gmk @@ -549,7 +549,10 @@ else _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 @@ else _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 @@ else _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. diff --git a/makefiles/BuildJdk.gmk b/makefiles/BuildJdk.gmk index c84b42fc8..bf7e1f95b 100644 --- a/makefiles/BuildJdk.gmk +++ b/makefiles/BuildJdk.gmk @@ -100,7 +100,7 @@ overlay-images: 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 @@ install: 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 diff --git a/makefiles/Bundles.gmk b/makefiles/Bundles.gmk index 8b1183a55..c9b7e16a9 100644 --- a/makefiles/Bundles.gmk +++ b/makefiles/Bundles.gmk @@ -33,9 +33,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) 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 @@ else 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 '$<' '$@' diff --git a/makefiles/Images.gmk b/makefiles/Images.gmk index eb9ebe95a..13a6d87f4 100644 --- a/makefiles/Images.gmk +++ b/makefiles/Images.gmk @@ -77,12 +77,6 @@ define AddFileToCopy $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 diff --git a/makefiles/Tools.gmk b/makefiles/Tools.gmk index eb3a8ac23..a794d7455 100644 --- a/makefiles/Tools.gmk +++ b/makefiles/Tools.gmk @@ -28,15 +28,20 @@ $(eval $(call FillCacheFind,$(JDK_TOPDIR)/make/tools \ $(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 -- GitLab