提交 6541d838 编写于 作者: E erikj

8005635: build-infra: Support building install in jprt

Reviewed-by: ohair
Contributed-by: tim.bell@oracle.com, erik.joelsson@oracle.com
上级 c1cf6912
...@@ -549,7 +549,10 @@ else ...@@ -549,7 +549,10 @@ else
_WSCRIPT2 :=$(DEVTOOLS_PATH)wscript.exe _WSCRIPT2 :=$(DEVTOOLS_PATH)wscript.exe
WSCRIPT :=$(call FileExists,$(_WSCRIPT1),$(_WSCRIPT2)) WSCRIPT :=$(call FileExists,$(_WSCRIPT1),$(_WSCRIPT2))
endif endif
# If CONFIGURE_BUILD is defined, checks were already done by configure.
ifndef CONFIGURE_BUILD
WSCRIPT:=$(call AltCheckSpaces,WSCRIPT) WSCRIPT:=$(call AltCheckSpaces,WSCRIPT)
endif #! CONFIGURE_BUILD
# batch mode no modal dialogs on errors, please. # batch mode no modal dialogs on errors, please.
WSCRIPT += -B WSCRIPT += -B
...@@ -562,7 +565,10 @@ else ...@@ -562,7 +565,10 @@ else
_CSCRIPT2 :=$(DEVTOOLS_PATH)cscript.exe _CSCRIPT2 :=$(DEVTOOLS_PATH)cscript.exe
CSCRIPT :=$(call FileExists,$(_CSCRIPT1),$(_CSCRIPT2)) CSCRIPT :=$(call FileExists,$(_CSCRIPT1),$(_CSCRIPT2))
endif endif
# If CONFIGURE_BUILD is defined, checks were already done by configure.
ifndef CONFIGURE_BUILD
CSCRIPT:=$(call AltCheckSpaces,CSCRIPT) CSCRIPT:=$(call AltCheckSpaces,CSCRIPT)
endif #! CONFIGURE_BUILD
# CABARC: path to cabarc.exe (used in creating install bundles) # CABARC: path to cabarc.exe (used in creating install bundles)
ifdef ALT_CABARC ifdef ALT_CABARC
...@@ -584,7 +590,10 @@ else ...@@ -584,7 +590,10 @@ else
_MSICERT2 :=$(DEVTOOLS_PATH)msicert.exe _MSICERT2 :=$(DEVTOOLS_PATH)msicert.exe
MSICERT :=$(call FileExists,$(_MSICERT1),$(_MSICERT2)) MSICERT :=$(call FileExists,$(_MSICERT1),$(_MSICERT2))
endif endif
# If CONFIGURE_BUILD is defined, checks were already done by configure.
ifndef CONFIGURE_BUILD
MSICERT:=$(call AltCheckSpaces,MSICERT) MSICERT:=$(call AltCheckSpaces,MSICERT)
endif #! CONFIGURE_BUILD
# Import JDK images allow for partial builds, components not built are # Import JDK images allow for partial builds, components not built are
# imported (or copied from) these import areas when needed. # imported (or copied from) these import areas when needed.
......
...@@ -100,7 +100,7 @@ overlay-images: ...@@ -100,7 +100,7 @@ overlay-images:
sign-jars: sign-jars:
+$(MAKE) -f SignJars.gmk +$(MAKE) -f SignJars.gmk
BINARIES:=$(notdir $(wildcard $(IMAGES_OUTPUTDIR)/j2sdk-image/bin/*)) BINARIES:=$(notdir $(wildcard $(JDK_IMAGE_DIR)/bin/*))
INSTALLDIR:=openjdk-$(RELEASE) INSTALLDIR:=openjdk-$(RELEASE)
# Install the jdk image, in a very crude way. Not taking into # Install the jdk image, in a very crude way. Not taking into
...@@ -110,7 +110,7 @@ install: ...@@ -110,7 +110,7 @@ install:
echo and creating $(words $(BINARIES)) links from $(INSTALL_PREFIX)/bin into the jdk. echo and creating $(words $(BINARIES)) links from $(INSTALL_PREFIX)/bin into the jdk.
$(MKDIR) -p $(INSTALL_PREFIX)/jvm/$(INSTALLDIR) $(MKDIR) -p $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
$(RM) -r $(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 $(MKDIR) -p $(INSTALL_PREFIX)/bin
$(RM) $(addprefix $(INSTALL_PREFIX)/bin/,$(BINARIES)) $(RM) $(addprefix $(INSTALL_PREFIX)/bin/,$(BINARIES))
$(foreach b,$(BINARIES),$(LN) -s $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/bin/$b $(INSTALL_PREFIX)/bin/$b &&) true $(foreach b,$(BINARIES),$(LN) -s $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/bin/$b $(INSTALL_PREFIX)/bin/$b &&) true
......
...@@ -33,9 +33,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) ...@@ -33,9 +33,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
bundles: jre-bundle jdk-bundle bundles: jre-bundle jdk-bundle
# JDK_BUNDLE_DIR and JRE_BUNDLE_DIR are defined in SPEC.
JDK_BUNDLE_DIR := $(IMAGES_OUTPUTDIR)/j2sdk-bundle/jdk$(JDK_VERSION).jdk/Contents
JRE_BUNDLE_DIR := $(IMAGES_OUTPUTDIR)/j2re-bundle/jre$(JDK_VERSION).jre/Contents
MACOSX_SRC := $(JDK_TOPDIR)/src/macosx MACOSX_SRC := $(JDK_TOPDIR)/src/macosx
...@@ -70,21 +68,21 @@ else ...@@ -70,21 +68,21 @@ else
endif endif
JDK_FILE_LIST := $(shell $(FIND) $(IMAGES_OUTPUTDIR)/j2sdk-image ! -type d) JDK_FILE_LIST := $(shell $(FIND) $(JDK_IMAGE_DIR) ! -type d)
JRE_FILE_LIST := $(shell $(FIND) $(IMAGES_OUTPUTDIR)/j2re-image ! -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)) JDK_TARGET_LIST := $(subst $(JDK_IMAGE_DIR),$(JDK_BUNDLE_DIR)/Home,$(JDK_FILE_LIST))
JRE_TARGET_LIST := $(subst $(IMAGES_OUTPUTDIR)/j2re-image,$(JRE_BUNDLE_DIR)/Home,$(JRE_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 # The old builds implementation of this did not preserve symlinks so
# make sure they are followed and the contents copied instead. # make sure they are followed and the contents copied instead.
# To fix this, just replace copy with install-file macro. # 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)/%,%,$@) $(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(CP) -f -R -L '$<' '$@' $(CP) -f -R -L '$<' '$@'
$(JRE_BUNDLE_DIR)/Home/%: $(IMAGES_OUTPUTDIR)/j2re-image/% $(JRE_BUNDLE_DIR)/Home/%: $(JRE_IMAGE_DIR)/%
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(CP) -f -R -L '$<' '$@' $(CP) -f -R -L '$<' '$@'
......
...@@ -77,12 +77,6 @@ define AddFileToCopy ...@@ -77,12 +77,6 @@ define AddFileToCopy
$4 += $2/$$($2_$3_FILE) $4 += $2/$$($2_$3_FILE)
endef 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 # JRE and JDK build rules
......
...@@ -28,15 +28,20 @@ $(eval $(call FillCacheFind,$(JDK_TOPDIR)/make/tools \ ...@@ -28,15 +28,20 @@ $(eval $(call FillCacheFind,$(JDK_TOPDIR)/make/tools \
$(JDK_TOPDIR)/src/solaris/classes \ $(JDK_TOPDIR)/src/solaris/classes \
$(JDK_TOPDIR)/makefiles/sun)) $(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 # The exception handling of swing beaninfo which have the own tool directory
ifeq (,$(BUILD_TOOLS)) ifeq (,$(BUILD_TOOLS))
$(eval $(call SetupJavaCompilation,BUILD_TOOLS,\ $(eval $(call SetupJavaCompilation,BUILD_TOOLS,\
SETUP:=GENERATE_OLDBYTECODE,\ SETUP:=GENERATE_OLDBYTECODE,\
SRC:=$(JDK_TOPDIR)/make/tools/src \ SRC:=$(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,\
BIN:=$(JDK_OUTPUTDIR)/btclasses)) BIN:=$(JDK_OUTPUTDIR)/btclasses))
endif endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册