提交 c5981782 编写于 作者: D duke

Merge

cfeea66a3fa8ca3686a7cfa2d0ce8ab0169f168d jdk7-b24
project=jdk7
...@@ -23,25 +23,25 @@ ...@@ -23,25 +23,25 @@
# have any questions. # have any questions.
# #
BUILD_PARENT_DIRECTORY=.
ifndef TOPDIR ifndef TOPDIR
TOPDIR:=$(shell \ TOPDIR:=.
if [ -r ./j2se/make/Makefile -o -r ./jdk/make/Makefile ]; then \
echo "."; \
else \
echo "../.."; \
fi)
endif endif
ifndef CONTROL_TOPDIR ifndef CONTROL_TOPDIR
CONTROL_TOPDIR=$(TOPDIR)/control CONTROL_TOPDIR=$(TOPDIR)
CONTROL_TOPDIR:=$(shell \
if [ -r $(TOPDIR)/control/make/Makefile ]; then \
echo "$(TOPDIR)/control"; \
else \
echo "$(TOPDIR)"; \
fi)
endif endif
# Openjdk sources (only used if SKIP_OPENJDK_BUILD!=true)
OPENJDK_SOURCETREE=$(TOPDIR)/openjdk
OPENJDK_BUILDDIR:=$(shell \
if [ -r $(OPENJDK_SOURCETREE)/Makefile ]; then \
echo "$(OPENJDK_SOURCETREE)"; \
else \
echo "."; \
fi)
ifndef JDK_TOPDIR ifndef JDK_TOPDIR
JDK_TOPDIR=$(TOPDIR)/jdk JDK_TOPDIR=$(TOPDIR)/jdk
endif endif
...@@ -55,6 +55,7 @@ include ./make/Defs-internal.gmk ...@@ -55,6 +55,7 @@ include ./make/Defs-internal.gmk
all:: all::
@$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build started: `$(DATE) '+%y-%m-%d %H:%M'` @$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build started: `$(DATE) '+%y-%m-%d %H:%M'`
$(MKDIR) -p $(OUTPUTDIR)
# Rules for sanity checks # Rules for sanity checks
include ./make/sanity-rules.gmk include ./make/sanity-rules.gmk
...@@ -81,11 +82,24 @@ include ./make/deploy-rules.gmk ...@@ -81,11 +82,24 @@ include ./make/deploy-rules.gmk
all:: setup build all:: setup build
setup: setup: openjdk_check
$(MKDIR) -p $(OUTPUTDIR)/j2sdk-image $(MKDIR) -p $(OUTPUTDIR)/j2sdk-image
$(MKDIR) -p $(ABS_OUTPUTDIR)/j2sdk-image
$(MKDIR) -p $(OUTPUTDIR)-fastdebug/j2sdk-image # Check on whether we really can build the openjdk, need source etc.
$(MKDIR) -p $(ABS_OUTPUTDIR)-fastdebug/j2sdk-image openjdk_check: FRC
ifneq ($(SKIP_OPENJDK_BUILD), true)
@$(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
build:: sanity build:: sanity
...@@ -143,7 +157,7 @@ endif ...@@ -143,7 +157,7 @@ endif
COMMON_DEBUG_FLAGS= \ COMMON_DEBUG_FLAGS= \
DEBUG_NAME=$(DEBUG_NAME) \ DEBUG_NAME=$(DEBUG_NAME) \
ALT_OUTPUTDIR=$(_OUTPUTDIR)-$(DEBUG_NAME) \ ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)-$(DEBUG_NAME) \
NO_DOCS=true NO_DOCS=true
product_build: setup product_build: setup
...@@ -190,46 +204,64 @@ ifneq ($(SKIP_COMPARE_IMAGES), true) ...@@ -190,46 +204,64 @@ ifneq ($(SKIP_COMPARE_IMAGES), true)
all :: compare-image all :: compare-image
endif endif
ifeq ($(SKIP_OPENJDK_BUILD), false) ifneq ($(SKIP_OPENJDK_BUILD), true)
all :: openjdk_build
endif
# If we have bundle rules, we have a chance here to do a complete cycle
# build, of production and open build.
# FIXUP: We should create the openjdk source bundle and build that?
# But how do we reliable create or get at a formal openjdk source tree?
# The one we have needs to be trimmed of built bits and closed dirs.
# The repositories might not be available.
# The openjdk source bundle is probably not available.
ifneq ($(SKIP_OPENJDK_BUILD), true)
ifeq ($(BUILD_JDK), true) ifeq ($(BUILD_JDK), true)
ifeq ($(BUNDLE_RULES_AVAILABLE), true) ifeq ($(BUNDLE_RULES_AVAILABLE), true)
# If we have bundle rules, we have a chance here to do a complete cycle
# build, of closed and open build. OPENJDK_PLUGS=$(ABS_OUTPUTDIR)/$(OPENJDK_BINARY_PLUGS_INAME)
# FIXUP: We should create the openjdk source bundle and build that? OPENJDK_OUTPUTDIR=$(ABS_OUTPUTDIR)/open-output
ABS_OPENJDK_PLUGS=$(ABS_OUTPUTDIR)/$(OPENJDK_BINARY_PLUGS_INAME) OPENJDK_BUILD_NAME \
ABS_OPENJDK_OUTPUTDIR=$(ABS_OUTPUTDIR)/openjdk = openjdk-$(JDK_MINOR_VERSION)-$(BUILD_NUMBER)-$(PLATFORM)-$(ARCH)-$(BUNDLE_DATE)
OPENJDK_BUILD_NAME_PREFIX \ OPENJDK_BUILD_BINARY_ZIP=$(ABS_BIN_BUNDLEDIR)/$(OPENJDK_BUILD_NAME).zip
= $(J2SDK_NAME)-$(JDK_MKTG_UNDERSCORE_VERSION)-$(MILESTONE) BUILT_IMAGE=$(ABS_OUTPUTDIR)/j2sdk-image
OPENJDK_BUILD_NAME_SUFFIX \ ifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64)
= $(BUILD_NUMBER)-$(PLATFORM)-$(ARCH)-$(BUNDLE_DATE) OPENJDK_BOOTDIR=$(BOOTDIR)
OPENJDK_BUILD_NAME \ OPENJDK_IMPORTJDK=$(JDK_IMPORT_PATH)
= $(OPENJDK_BUILD_NAME_PREFIX)-openjdk-$(OPENJDK_BUILD_NAME_SUFFIX) else
OPENJDK_BUILD_BINARY_ZIP \ OPENJDK_BOOTDIR=$(BUILT_IMAGE)
= $(ABS_BIN_BUNDLEDIR)/$(OPENJDK_BUILD_NAME).zip OPENJDK_IMPORTJDK=$(BUILT_IMAGE)
all :: openjdk-build endif
openjdk-build:
openjdk_build:
@$(ECHO) " " @$(ECHO) " "
@$(ECHO) "=================================================" @$(ECHO) "================================================="
@$(ECHO) "Starting openjdk build" @$(ECHO) "Starting openjdk build"
@$(ECHO) " Using: ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR)"
@$(ECHO) "=================================================" @$(ECHO) "================================================="
@$(ECHO) " " @$(ECHO) " "
$(RM) -r $(ABS_OPENJDK_OUTPUTDIR) $(RM) -r $(OPENJDK_OUTPUTDIR)
$(MKDIR) -p $(ABS_OPENJDK_OUTPUTDIR) $(MKDIR) -p $(OPENJDK_OUTPUTDIR)
$(MAKE) OPENJDK=true \ ($(CD) $(OPENJDK_BUILDDIR) && $(MAKE) \
BUILD_LANGTOOLS=$(BUILD_LANGTOOLS) \ OPENJDK=true \
BUILD_CORBA=$(BUILD_CORBA) \ ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR) \
BUILD_JAXP=$(BUILD_JAXP) \ ALT_OUTPUTDIR=$(OPENJDK_OUTPUTDIR) \
BUILD_JAXWS=$(BUILD_JAXWS) \ ALT_BINARY_PLUGS_PATH=$(OPENJDK_PLUGS) \
BUILD_HOTSPOT=$(BUILD_HOTSPOT) \ ALT_BOOTDIR=$(OPENJDK_BOOTDIR) \
ALT_OUTPUTDIR=$(ABS_OPENJDK_OUTPUTDIR) \ ALT_JDK_IMPORT_PATH=$(OPENJDK_IMPORTJDK) \
ALT_BINARY_PLUGS_PATH=$(ABS_OUTPUTDIR)/$(OPENJDK_BINARY_PLUGS_INAME) \ product_build )
ALT_BOOTDIR=$(ABS_OUTPUTDIR)/j2sdk-image \
ALT_JDK_IMPORT_PATH=$(ABS_OUTPUTDIR)/j2sdk-image \
product_build
$(RM) $(OPENJDK_BUILD_BINARY_ZIP) $(RM) $(OPENJDK_BUILD_BINARY_ZIP)
( $(CD) $(ABS_OPENJDK_OUTPUTDIR)/j2sdk-image && \ ( $(CD) $(OPENJDK_OUTPUTDIR)/j2sdk-image && \
$(ZIPEXE) -q -r $(OPENJDK_BUILD_BINARY_ZIP) .) $(ZIPEXE) -q -r $(OPENJDK_BUILD_BINARY_ZIP) .)
$(RM) -r $(ABS_OPENJDK_OUTPUTDIR) $(RM) -r $(OPENJDK_OUTPUTDIR)
@$(ECHO) " "
@$(ECHO) "================================================="
@$(ECHO) "Finished openjdk build"
@$(ECHO) " Binary Bundle: $(OPENJDK_BUILD_BINARY_ZIP)"
@$(ECHO) "================================================="
@$(ECHO) " "
endif endif
endif endif
endif endif
...@@ -432,11 +464,11 @@ endif ...@@ -432,11 +464,11 @@ endif
# Cycle build. Build the jdk, use it to build the jdk again. # Cycle build. Build the jdk, use it to build the jdk again.
################################################################ ################################################################
ABS_BOOTJDK_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk
boot_cycle: boot_cycle:
$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTJDK_OUTPUTDIR) product_build $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) product_build
$(MAKE) ALT_BOOTDIR=$(ABS_BOOTJDK_OUTPUTDIR)/j2sdk-image product_build $(MAKE) ALT_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image product_build
################################################################ ################################################################
# JPRT rule to build # JPRT rule to build
...@@ -452,7 +484,6 @@ include ./make/jprt.gmk ...@@ -452,7 +484,6 @@ include ./make/jprt.gmk
fastdebug_build debug_build product_build setup \ fastdebug_build debug_build product_build setup \
dev dev-build dev-sanity dev-clobber dev dev-build dev-sanity dev-clobber
# FIXUP: Old j2se targets # Force target
j2se_fastdebug_only: jdk_fastdebug_only FRC:
j2se_only: jdk_only
...@@ -342,32 +342,29 @@ ...@@ -342,32 +342,29 @@
<blockquote> <blockquote>
<p> <p>
The source code for the The source code for the OpenJDK is delivered in a set of
OpenJDK is directories:
delivered in <i>3</i> sibling directories:
<tt>hotspot</tt>, <tt>hotspot</tt>,
<tt>langtools</tt>, <tt>langtools</tt>,
<tt>corba</tt>, <tt>corba</tt>,
<tt>jaxws</tt>, <tt>jaxws</tt>,
<tt>jaxp</tt>, <tt>jaxp</tt>,
<tt>jdk</tt>
and and
<tt>jdk</tt>.
The <tt>hotspot</tt> directory contains the source code and make The <tt>hotspot</tt> directory contains the source code and make
files for files for building the OpenJDK Hotspot Virtual Machine.
building the The <tt>langtools</tt> directory contains the source code and make
OpenJDK files for building the OpenJDK javac and language tools.
Hotspot Virtual Machine. The <tt>corba</tt> directory contains the source code and make
The <tt>jdk</tt> files for building the OpenJDK Corba files.
directory contains the source code and make files for The <tt>jaxws</tt> directory contains the source code and make
building the files for building the OpenJDK JAXWS files.
OpenJDK The <tt>jaxp</tt> directory contains the source code and make
runtime libraries, tools and demos. files for building the OpenJDK JAXP files.
The top level Makefile is used to build the complete OpenJDK The <tt>jdk</tt> directory contains the source code and make files for
release including building the hotspot building the OpenJDK runtime libraries and misc files.
VM, staging the VM binaries, and building the The top level <tt>Makefile</tt>
OpenJDK is used to build the entire OpenJDK.
runtime libraries,
tools and demos.
</blockquote> </blockquote>
<!-- ------------------------------------------------------ --> <!-- ------------------------------------------------------ -->
...@@ -730,17 +727,15 @@ ...@@ -730,17 +727,15 @@
under an open-source license. under an open-source license.
In order to build an OpenJDK binary from source code, In order to build an OpenJDK binary from source code,
you must first download and install the appropriate you must first download and install the appropriate
binary plug bundles from the OpenJDK Download area. binary plug bundles from the OpenJDK, go to the
<a href="http://openjdk.java.net">OpenJDK</a> site and select
the "<b>Bundles(7)</b>" link.
During the OpenJDK build process these "binary plugs" During the OpenJDK build process these "binary plugs"
for the encumbered components will be copied into your for the encumbered components will be copied into your
resulting OpenJDK binary build image. resulting OpenJDK binary build image.
These binary plug files are only for the purpose of These binary plug files are only for the purpose of
building an OpenJDK binary. building an OpenJDK binary.
Download the Binary Plugs by selecting the <b>Downloads</b> Make sure you set
link at
<a href="http://openjdk.java.net/">the OpenJDK site</a>,
install the bundle,
and make sure you set
<tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt> <tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>
to the root of this installation. to the root of this installation.
</blockquote> </blockquote>
......
...@@ -28,6 +28,12 @@ ...@@ -28,6 +28,12 @@
# not contain rules. # not contain rules.
# #
ifdef OPENJDK
ifneq ($(OPENJDK),true)
x:=$(error "OPENJDK (if defined) can only be set to true")
endif
endif
# Define absolute paths to TOPDIRs # Define absolute paths to TOPDIRs
ABS_CONTROL_TOPDIR:=$(call OptFullPath,"$(CONTROL_TOPDIR)") ABS_CONTROL_TOPDIR:=$(call OptFullPath,"$(CONTROL_TOPDIR)")
ABS_LANGTOOLS_TOPDIR:=$(call OptFullPath,"$(LANGTOOLS_TOPDIR)") ABS_LANGTOOLS_TOPDIR:=$(call OptFullPath,"$(LANGTOOLS_TOPDIR)")
...@@ -96,10 +102,8 @@ ifndef BUILD_JDK ...@@ -96,10 +102,8 @@ ifndef BUILD_JDK
endif endif
ifeq ($(JDK_SRC_AVAILABLE),true) ifeq ($(JDK_SRC_AVAILABLE),true)
JDK_CLOSED_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/src/closed) JDK_CLOSED_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/src/closed)
ifndef OPENJDK ifeq ($(JDK_CLOSED_SRC_AVAILABLE),false)
ifeq ($(JDK_CLOSED_SRC_AVAILABLE),false) OPENJDK = true
OPENJDK = true
endif
endif endif
endif endif
...@@ -150,8 +154,8 @@ ifdef OPENJDK ...@@ -150,8 +154,8 @@ ifdef OPENJDK
SKIP_OPENJDK_BUILD = true SKIP_OPENJDK_BUILD = true
else else
ifndef SKIP_OPENJDK_BUILD ifndef SKIP_OPENJDK_BUILD
SKIP_OPENJDK_BUILD = false #SKIP_OPENJDK_BUILD = false
# FIXUP: until freetype fixed on linux and solaris rmi build fixed # Until 6675289 is resolved, or this feature is removed.
SKIP_OPENJDK_BUILD = true SKIP_OPENJDK_BUILD = true
endif endif
endif endif
......
...@@ -121,11 +121,3 @@ compare-image-clobber: ...@@ -121,11 +121,3 @@ compare-image-clobber:
.PHONY: jdk jdk-build jdk-clobber jdk-sanity .PHONY: jdk jdk-build jdk-clobber jdk-sanity
# FIXUP: Old j2se target names
j2se-build: jdk-build
j2se-clobber:: jdk-clobber
j2se-sanity:: jdk-sanity
j2se: jdk
.PHONY: j2se j2se-build j2se-clobber j2se-sanity
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册