提交 86e06fa9 编写于 作者: O ohair

6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build

Reviewed-by: tbell
上级 310b6966
...@@ -49,27 +49,17 @@ ifndef JDK_MAKE_SHARED_DIR ...@@ -49,27 +49,17 @@ ifndef JDK_MAKE_SHARED_DIR
JDK_MAKE_SHARED_DIR=$(JDK_TOPDIR)/make/common/shared JDK_MAKE_SHARED_DIR=$(JDK_TOPDIR)/make/common/shared
endif endif
include $(JDK_MAKE_SHARED_DIR)/Defs-control.gmk # For start and finish echo lines
TITLE_TEXT = Control $(PLATFORM) $(ARCH) $(RELEASE)
include ./make/Defs-internal.gmk DAYE_STAMP = `$(DATE) '+%y-%m-%d %H:%M'`
START_ECHO = echo "$(TITLE_TEXT) $@ build started: $(DATE_STAMP)"
FINISH_ECHO = echo "$(TITLE_TEXT) $@ build finished: $(DATE_STAMP)"
all:: default: all
@$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build started: `$(DATE) '+%y-%m-%d %H:%M'`
$(MKDIR) -p $(OUTPUTDIR)
# Rules for sanity checks include $(JDK_MAKE_SHARED_DIR)/Defs-control.gmk
include ./make/Defs-internal.gmk
include ./make/sanity-rules.gmk include ./make/sanity-rules.gmk
dev : dev-build
dev-build:
$(MAKE) DEV_ONLY=true all
dev-sanity:
$(MAKE) DEV_ONLY=true sanity
dev-clobber:
$(MAKE) DEV_ONLY=true clobber
# Rules for various components
include ./make/hotspot-rules.gmk include ./make/hotspot-rules.gmk
include ./make/langtools-rules.gmk include ./make/langtools-rules.gmk
include ./make/corba-rules.gmk include ./make/corba-rules.gmk
...@@ -80,68 +70,101 @@ include ./make/install-rules.gmk ...@@ -80,68 +70,101 @@ include ./make/install-rules.gmk
include ./make/sponsors-rules.gmk include ./make/sponsors-rules.gmk
include ./make/deploy-rules.gmk include ./make/deploy-rules.gmk
all:: setup build # What "all" means
all::
@$(START_ECHO)
setup: openjdk_check all:: openjdk_check sanity all_product_build
$(MKDIR) -p $(OUTPUTDIR)/j2sdk-image
ifeq ($(SKIP_FASTDEBUG_BUILD), false)
all:: fastdebug_build
endif
ifeq ($(SKIP_DEBUG_BUILD), false)
all:: debug_build
endif
# Check on whether we really can build the openjdk, need source etc.
openjdk_check: FRC
ifneq ($(SKIP_OPENJDK_BUILD), true) ifneq ($(SKIP_OPENJDK_BUILD), true)
@$(ECHO) " " all:: openjdk_build
@$(ECHO) "================================================="
@if [ ! -r $(OPENJDK_BUILDDIR)/Makefile ] ; then \
$(ECHO) "ERROR: No openjdk source tree available at: $(OPENJDK_BUILDDIR)"; \
exit 1; \
else \
$(ECHO) "OpenJDK will be built after JDK is built"; \
$(ECHO) " OPENJDK_BUILDDIR=$(OPENJDK_BUILDDIR)"; \
fi
@$(ECHO) "================================================="
@$(ECHO) " "
endif endif
build:: sanity all::
@$(FINISH_ECHO)
clobber:: # Everything for a full product build
all_product_build::
@$(START_ECHO)
ifeq ($(SKIP_PRODUCT_BUILD), false)
all_product_build:: product_build
ifeq ($(BUILD_INSTALL), true)
all_product_build:: $(INSTALL)
clobber:: install-clobber
endif
ifeq ($(BUILD_SPONSORS), true)
all_product_build:: $(SPONSORS)
clobber:: sponsors-clobber
endif
ifneq ($(SKIP_COMPARE_IMAGES), true)
all_product_build:: compare-image
endif
endif
all_product_build::
@$(FINISH_ECHO)
# Generis build of basic repo series
generic_build_repo_series::
$(MKDIR) -p $(OUTPUTDIR)
$(MKDIR) -p $(OUTPUTDIR)/j2sdk-image
ifeq ($(BUILD_LANGTOOLS), true) ifeq ($(BUILD_LANGTOOLS), true)
build:: langtools generic_build_repo_series:: langtools
clobber:: langtools-clobber clobber:: langtools-clobber
endif endif
ifeq ($(BUILD_CORBA), true) ifeq ($(BUILD_CORBA), true)
build:: corba generic_build_repo_series:: corba
clobber:: corba-clobber clobber:: corba-clobber
endif endif
ifeq ($(BUILD_JAXP), true) ifeq ($(BUILD_JAXP), true)
build:: jaxp generic_build_repo_series:: jaxp
clobber:: jaxp-clobber clobber:: jaxp-clobber
endif endif
ifeq ($(BUILD_JAXWS), true) ifeq ($(BUILD_JAXWS), true)
build:: jaxws generic_build_repo_series:: jaxws
clobber:: jaxws-clobber clobber:: jaxws-clobber
endif endif
ifeq ($(BUILD_HOTSPOT), true) ifeq ($(BUILD_HOTSPOT), true)
build:: $(HOTSPOT) generic_build_repo_series:: $(HOTSPOT)
clobber:: hotspot-clobber clobber:: hotspot-clobber
endif endif
ifeq ($(BUILD_JDK), true) ifeq ($(BUILD_JDK), true)
build:: $(JDK_JAVA_EXE) generic_build_repo_series:: $(JDK_JAVA_EXE)
clobber:: jdk-clobber clobber:: jdk-clobber
endif endif
ifeq ($(BUILD_DEPLOY), true) ifeq ($(BUILD_DEPLOY), true)
build:: $(DEPLOY) generic_build_repo_series:: $(DEPLOY)
clobber:: deploy-clobber clobber:: deploy-clobber
endif endif
# ifeq ($(BUILD_JDK), true)
# Generic debug build, fastdebug or debug. Needs special handling. ifeq ($(BUNDLE_RULES_AVAILABLE), true)
generic_build_repo_series:: openjdk-binary-plugs-bundles
endif
endif
# The debug build, fastdebug or debug. Needs special handling.
# Note that debug builds do NOT do INSTALL steps, but must be done # Note that debug builds do NOT do INSTALL steps, but must be done
# after the product build and before the INSTALL step of the product build. # after the product build and before the INSTALL step of the product build.
# #
...@@ -155,57 +178,109 @@ endif ...@@ -155,57 +178,109 @@ endif
# look for INSTALL_DEBUG_NAME in the install rules. # look for INSTALL_DEBUG_NAME in the install rules.
# #
COMMON_DEBUG_FLAGS= \ # Location of fresh bootdir output
DEBUG_NAME=$(DEBUG_NAME) \ ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk
ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)-$(DEBUG_NAME) \ FRESH_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image
NO_DOCS=true FRESH_DEBUG_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)-$(DEBUG_NAME)/j2sdk-image
create_fresh_product_bootdir: FRC
@$(START_ECHO)
$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
NO_DOCS=true \
BOOT_CYCLE_SETTINGS= \
build_product_image
@$(FINISH_ECHO)
create_fresh_debug_bootdir: FRC
@$(START_ECHO)
$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
NO_DOCS=true \
BOOT_CYCLE_DEBUG_SETTINGS= \
build_debug_image
@$(FINISH_ECHO)
create_fresh_fastdebug_bootdir: FRC
@$(START_ECHO)
$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
NO_DOCS=true \
BOOT_CYCLE_DEBUG_SETTINGS= \
build_fastdebug_image
@$(FINISH_ECHO)
# Create boot image?
ifeq ($(SKIP_BOOT_CYCLE),false)
ifneq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64)
DO_BOOT_CYCLE=true
endif
endif
product_build: setup ifeq ($(DO_BOOT_CYCLE),true)
@$(ECHO) $@ build started: `$(DATE) '+%y-%m-%d %H:%M'`
$(MAKE) SKIP_FASTDEBUG_BUILD=true SKIP_DEBUG_BUILD=true all
@$(ECHO) $@ build finished: `$(DATE) '+%y-%m-%d %H:%M'`
generic_debug_build: # Create the bootdir to use in the build
@$(ECHO) $@ build started: `$(DATE) '+%y-%m-%d %H:%M'` product_build:: create_fresh_product_bootdir
$(MAKE) $(COMMON_DEBUG_FLAGS) setup build debug_build:: create_fresh_debug_bootdir
@$(ECHO) $@ build finished: `$(DATE) '+%y-%m-%d %H:%M'` fastdebug_build:: create_fresh_fastdebug_bootdir
debug_build: setup # Define variables to be used now for the boot jdk
$(MAKE) DEBUG_NAME=debug generic_debug_build BOOT_CYCLE_SETTINGS= \
ALT_BOOTDIR=$(FRESH_BOOTDIR) \
ALT_JDK_IMPORT_PATH=$(FRESH_BOOTDIR)
BOOT_CYCLE_DEBUG_SETTINGS= \
ALT_BOOTDIR=$(FRESH_DEBUG_BOOTDIR) \
ALT_JDK_IMPORT_PATH=$(FRESH_DEBUG_BOOTDIR)
fastdebug_build: setup else
$(MAKE) DEBUG_NAME=fastdebug generic_debug_build
ifeq ($(SKIP_FASTDEBUG_BUILD), false) # Use the supplied ALT_BOOTDIR as the boot
all:: fastdebug_build BOOT_CYCLE_SETTINGS=
endif BOOT_CYCLE_DEBUG_SETTINGS=
ifeq ($(SKIP_DEBUG_BUILD), false)
all:: debug_build
endif endif
ifeq ($(BUILD_JDK), true) build_product_image:
ifeq ($(BUNDLE_RULES_AVAILABLE), true) @$(START_ECHO)
all:: openjdk-binary-plugs-bundles $(MAKE) \
endif SKIP_FASTDEBUG_BUILD=true \
endif SKIP_DEBUG_BUILD=true \
$(BOOT_CYCLE_SETTINGS) \
generic_build_repo_series
@$(FINISH_ECHO)
ifeq ($(BUILD_INSTALL), true) generic_debug_build:
all :: $(INSTALL) @$(START_ECHO)
clobber:: install-clobber $(MAKE) \
endif ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)-$(DEBUG_NAME) \
DEBUG_NAME=$(DEBUG_NAME) \
NO_DOCS=true \
$(BOOT_CYCLE_DEBUG_SETTINGS) \
generic_build_repo_series
@$(FINISH_ECHO)
ifeq ($(BUILD_SPONSORS), true) build_debug_image:
all :: $(SPONSORS) $(MAKE) DEBUG_NAME=debug generic_debug_build
clobber:: sponsors-clobber
endif
ifneq ($(SKIP_COMPARE_IMAGES), true) build_fastdebug_image:
all :: compare-image $(MAKE) DEBUG_NAME=fastdebug generic_debug_build
endif
# Build final image
product_build:: build_product_image
debug_build:: build_debug_image
fastdebug_build:: build_fastdebug_image
# Check on whether we really can build the openjdk, need source etc.
openjdk_check: FRC
ifneq ($(SKIP_OPENJDK_BUILD), true) ifneq ($(SKIP_OPENJDK_BUILD), true)
all :: openjdk_build @$(ECHO) " "
@$(ECHO) "================================================="
@if [ ! -r $(OPENJDK_BUILDDIR)/Makefile ] ; then \
$(ECHO) "ERROR: No openjdk source tree available at: $(OPENJDK_BUILDDIR)"; \
exit 1; \
else \
$(ECHO) "OpenJDK will be built after JDK is built"; \
$(ECHO) " OPENJDK_BUILDDIR=$(OPENJDK_BUILDDIR)"; \
fi
@$(ECHO) "================================================="
@$(ECHO) " "
endif endif
# If we have bundle rules, we have a chance here to do a complete cycle # If we have bundle rules, we have a chance here to do a complete cycle
...@@ -235,6 +310,7 @@ else ...@@ -235,6 +310,7 @@ else
endif endif
openjdk_build: openjdk_build:
@$(START_ECHO)
@$(ECHO) " " @$(ECHO) " "
@$(ECHO) "=================================================" @$(ECHO) "================================================="
@$(ECHO) "Starting openjdk build" @$(ECHO) "Starting openjdk build"
...@@ -245,6 +321,7 @@ openjdk_build: ...@@ -245,6 +321,7 @@ openjdk_build:
$(MKDIR) -p $(OPENJDK_OUTPUTDIR) $(MKDIR) -p $(OPENJDK_OUTPUTDIR)
($(CD) $(OPENJDK_BUILDDIR) && $(MAKE) \ ($(CD) $(OPENJDK_BUILDDIR) && $(MAKE) \
OPENJDK=true \ OPENJDK=true \
NO_DOCS=true \
ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR) \ ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR) \
ALT_OUTPUTDIR=$(OPENJDK_OUTPUTDIR) \ ALT_OUTPUTDIR=$(OPENJDK_OUTPUTDIR) \
ALT_BINARY_PLUGS_PATH=$(OPENJDK_PLUGS) \ ALT_BINARY_PLUGS_PATH=$(OPENJDK_PLUGS) \
...@@ -261,6 +338,7 @@ openjdk_build: ...@@ -261,6 +338,7 @@ openjdk_build:
@$(ECHO) " Binary Bundle: $(OPENJDK_BUILD_BINARY_ZIP)" @$(ECHO) " Binary Bundle: $(OPENJDK_BUILD_BINARY_ZIP)"
@$(ECHO) "=================================================" @$(ECHO) "================================================="
@$(ECHO) " " @$(ECHO) " "
@$(FINISH_ECHO)
endif endif
endif endif
...@@ -274,8 +352,18 @@ clobber:: ...@@ -274,8 +352,18 @@ clobber::
clean: clobber clean: clobber
all:: #
@$(ECHO) Control build finished: `$(DATE) '+%y-%m-%d %H:%M'` # Dev builds
#
dev : dev-build
dev-build:
$(MAKE) DEV_ONLY=true all
dev-sanity:
$(MAKE) DEV_ONLY=true sanity
dev-clobber:
$(MAKE) DEV_ONLY=true clobber
# #
# Quick jdk verification build # Quick jdk verification build
...@@ -460,16 +548,6 @@ ifeq ($(BUNDLE_RULES_AVAILABLE), true) ...@@ -460,16 +548,6 @@ ifeq ($(BUNDLE_RULES_AVAILABLE), true)
include $(BUNDLE_RULES) include $(BUNDLE_RULES)
endif endif
################################################################
# Cycle build. Build the jdk, use it to build the jdk again.
################################################################
ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk
boot_cycle:
$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) product_build
$(MAKE) ALT_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image product_build
################################################################ ################################################################
# JPRT rule to build # JPRT rule to build
################################################################ ################################################################
...@@ -480,9 +558,20 @@ include ./make/jprt.gmk ...@@ -480,9 +558,20 @@ include ./make/jprt.gmk
# PHONY # PHONY
################################################################ ################################################################
.PHONY: all build what clobber insane \ .PHONY: all \
fastdebug_build debug_build product_build setup \ generic_build_repo_series \
dev dev-build dev-sanity dev-clobber what clobber insane \
dev dev-build dev-sanity dev-clobber \
product_build \
fastdebug_build \
debug_build \
build_product_image \
build_debug_image \
build_fastdebug_image \
create_fresh_product_bootdir \
create_fresh_debug_bootdir \
create_fresh_fastdebug_bootdir \
generic_debug_build
# Force target # Force target
FRC: FRC:
......
...@@ -159,6 +159,9 @@ else ...@@ -159,6 +159,9 @@ else
SKIP_OPENJDK_BUILD = true SKIP_OPENJDK_BUILD = true
endif endif
endif endif
ifndef SKIP_PRODUCT_BUILD
SKIP_PRODUCT_BUILD = false
endif
# Solaris 64 bit builds are not complete enough to ever do this # Solaris 64 bit builds are not complete enough to ever do this
ifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64) ifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64)
......
...@@ -115,13 +115,13 @@ dirMustExist "${jdk_import}" ALT_JDK_IMPORT_PATH ...@@ -115,13 +115,13 @@ dirMustExist "${jdk_import}" ALT_JDK_IMPORT_PATH
dirMustExist "${ANT_HOME}" ANT_HOME dirMustExist "${ANT_HOME}" ANT_HOME
dirMustExist "${FINDBUGS_HOME}" FINDBUGS_HOME dirMustExist "${FINDBUGS_HOME}" FINDBUGS_HOME
# If ALT_PREVIOUS_JDK_IMAGE not defined, set it to the bootdir area for # If ALT_PREVIOUS_RELEASE_IMAGE not defined, set it to the bootdir area for
# any possible image comparisons. # any possible image comparisons.
# We assume bootdir is a previous jdk release image, valid for comparison # We assume bootdir is a previous jdk release image, valid for comparison
# reasons. # reasons.
if [ "${ALT_PREVIOUS_JDK_IMAGE}" = "" ] ; then if [ "${ALT_PREVIOUS_RELEASE_IMAGE}" = "" ] ; then
ALT_PREVIOUS_JDK_IMAGE="${bootdir}" ALT_PREVIOUS_RELEASE_IMAGE="${bootdir}"
export ALT_PREVIOUS_JDK_IMAGE export ALT_PREVIOUS_RELEASE_IMAGE
fi fi
# Use the JDK import for now (FIXME: use the binary plugs?) # Use the JDK import for now (FIXME: use the binary plugs?)
......
...@@ -36,7 +36,7 @@ DEFAULT_BUILD_FLAVOR=product ...@@ -36,7 +36,7 @@ DEFAULT_BUILD_FLAVOR=product
JPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(DEFAULT_BUILD_FLAVOR)-bundle.zip JPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(DEFAULT_BUILD_FLAVOR)-bundle.zip
JPRT_ARCHIVE_INSTALL_BUNDLE=$(ABS_OUTPUTDIR)/$(DEFAULT_BUILD_FLAVOR)-install-bundle.zip JPRT_ARCHIVE_INSTALL_BUNDLE=$(ABS_OUTPUTDIR)/$(DEFAULT_BUILD_FLAVOR)-install-bundle.zip
jprt_build_product: product_build jprt_build_product: all_product_build
( $(CD) $(OUTPUTDIR)/j2sdk-image && \ ( $(CD) $(OUTPUTDIR)/j2sdk-image && \
$(ZIPEXE) -q -r $(JPRT_ARCHIVE_BUNDLE) . ) $(ZIPEXE) -q -r $(JPRT_ARCHIVE_BUNDLE) . )
ifdef HAVE_JPRT_SAVE_BUNDLES ifdef HAVE_JPRT_SAVE_BUNDLES
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册