aboutsummaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorihse <none@none>2013-11-14 10:53:23 +0100
committerihse <none@none>2013-11-14 10:53:23 +0100
commit2ea36f14482899ed83219b5bdb14ff2a56972674 (patch)
tree2a04566f766b130a3c4956f8ae20685b590ad953 /make
parent08de93376aadd0c94f69fa94538538640f161f8d (diff)
8027566: Remove the old build system
Reviewed-by: erikj, tbell --HG-- rename : common/makefiles/HotspotWrapper.gmk => make/HotspotWrapper.gmk rename : common/makefiles/javadoc/Javadoc.gmk => make/Javadoc.gmk rename : common/makefiles/Jprt.gmk => make/Jprt.gmk rename : common/makefiles/Main.gmk => make/Main.gmk rename : common/makefiles/MakeHelpers.gmk => make/MakeHelpers.gmk rename : common/makefiles/javadoc/CORE_PKGS.gmk => make/common/CORE_PKGS.gmk rename : common/makefiles/IdlCompilation.gmk => make/common/IdlCompilation.gmk rename : common/makefiles/JavaCompilation.gmk => make/common/JavaCompilation.gmk rename : common/makefiles/MakeBase.gmk => make/common/MakeBase.gmk rename : common/makefiles/javadoc/NON_CORE_PKGS.gmk => make/common/NON_CORE_PKGS.gmk rename : common/makefiles/NativeCompilation.gmk => make/common/NativeCompilation.gmk rename : common/makefiles/RMICompilation.gmk => make/common/RMICompilation.gmk rename : common/makefiles/support/ListPathsSafely-post-compress.incl => make/common/support/ListPathsSafely-post-compress.incl rename : common/makefiles/support/ListPathsSafely-pre-compress.incl => make/common/support/ListPathsSafely-pre-compress.incl rename : common/makefiles/support/ListPathsSafely-uncompress.sed => make/common/support/ListPathsSafely-uncompress.sed rename : common/makefiles/support/unicode2x.sed => make/common/support/unicode2x.sed rename : common/makefiles/devkit/Makefile => make/devkit/Makefile rename : common/makefiles/devkit/Tools.gmk => make/devkit/Tools.gmk
Diffstat (limited to 'make')
-rw-r--r--make/Defs-internal.gmk383
-rw-r--r--make/HotspotWrapper.gmk (renamed from make/jaxws-rules.gmk)58
-rw-r--r--make/Javadoc.gmk1210
-rw-r--r--make/Jprt.gmk248
-rw-r--r--make/Main.gmk245
-rw-r--r--make/MakeHelpers.gmk306
-rw-r--r--make/README.pre-components41
-rw-r--r--make/common/CORE_PKGS.gmk300
-rw-r--r--make/common/IdlCompilation.gmk106
-rw-r--r--make/common/JavaCompilation.gmk592
-rw-r--r--make/common/MakeBase.gmk449
-rw-r--r--make/common/NON_CORE_PKGS.gmk110
-rw-r--r--make/common/NativeCompilation.gmk594
-rw-r--r--make/common/RMICompilation.gmk96
-rw-r--r--make/common/support/ListPathsSafely-post-compress.incl1
-rw-r--r--make/common/support/ListPathsSafely-pre-compress.incl1
-rw-r--r--make/common/support/ListPathsSafely-uncompress.sed72
-rw-r--r--make/common/support/unicode2x.sed100
-rw-r--r--make/corba-rules.gmk56
-rw-r--r--make/deploy-rules.gmk110
-rw-r--r--make/devkit/Makefile121
-rw-r--r--make/devkit/Tools.gmk473
-rw-r--r--make/hotspot-rules.gmk120
-rw-r--r--make/install-rules.gmk121
-rw-r--r--make/jaxp-rules.gmk56
-rw-r--r--make/jdk-rules.gmk121
-rw-r--r--make/jprt.gmk67
-rw-r--r--make/langtools-rules.gmk51
-rw-r--r--make/nashorn-rules.gmk59
-rw-r--r--make/sanity-rules.gmk336
-rw-r--r--make/scripts/fixpath.pl169
-rw-r--r--make/scripts/vsvars.sh619
-rw-r--r--make/sponsors-rules.gmk74
33 files changed, 5051 insertions, 2414 deletions
diff --git a/make/Defs-internal.gmk b/make/Defs-internal.gmk
deleted file mode 100644
index 15374ff..0000000
--- a/make/Defs-internal.gmk
+++ /dev/null
@@ -1,383 +0,0 @@
-#
-# Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Common variables used by all the Java makefiles. This file should
-# not contain rules.
-#
-
-# The build times report is turned off by setting REPORT_BUILD_TIMES to nothing.
-# This is necessary for the target clobber/clean which will erase the
-# directories where the buildtimes are stored.
-REPORT_BUILD_TIMES=1
-# Store the build times in this directory.
-BUILDTIMESDIR=$(ABS_OUTPUTDIR)/tmp/buildtimes
-
-# Record starting time for build of a sub repository.
-define RecordStartTime
-$(MKDIR) -p $(BUILDTIMESDIR)
-$(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_start_$1
-$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_start_$1_human_readable
-endef
-
-# Indicate that we started to build a sub repository and record starting time.
-define MakeStart
-$(call RecordStartTime,$1)
-$(PRINTF) "\n\n%s\n%s\n##### %-60.60s #####\n%s\n\n" \
-"########################################################################" \
-"########################################################################" \
-"Entering $1 for target(s) $2" \
-"########################################################################"
-endef
-
-# Record ending time and calculate the difference and store it in a
-# easy to read format. Handles builds that cross midnight. Expects
-# that a build will never take 24 hours or more.
-define RecordEndTime
-$(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_end_$1
-$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_end_$1_human_readable
-$(ECHO) `$(CAT) $(BUILDTIMESDIR)/build_time_start_$1` `$(CAT) $(BUILDTIMESDIR)/build_time_end_$1` $1 | \
- $(NAWK) '{ F=$$7; T=$$14; if (F > T) { T+=3600*24 }; D=T-F; H=int(D/3600); \
- M=int((D-H*3600)/60); S=D-H*3600-M*60; printf("%02d:%02d:%02d %s\n",H,M,S,$$15); }' \
- > $(BUILDTIMESDIR)/build_time_diff_$1
-endef
-
-# Indicate that we are done.
-# Record ending time and print out the total time it took to build.
-define MakeFinish
-$(if $(REPORT_BUILD_TIMES),$(call RecordEndTime,$1),)
-$(PRINTF) "%s\n##### %-60.60s #####\n%s\n##### %-60.60s #####\n%s\n\n" \
-"########################################################################" \
-"Leaving $1 for target(s) $2" \
-"########################################################################" \
-$(if $(REPORT_BUILD_TIMES),"Build time `$(CAT) $(BUILDTIMESDIR)/build_time_diff_$1` for target(s) $2","") \
-"########################################################################"
-endef
-
-# Find all build_time_* files and print their contents in a list sorted
-# on the name of the sub repository.
-define ReportBuildTimes
-$(PRINTF) -- "-- Build times ----------\nTarget %s\nStart %s\nEnd %s\n%s\n%s\n-------------------------\n" \
-$1 \
-"`$(CAT) $(BUILDTIMESDIR)/build_time_start_TOTAL_human_readable`" \
-"`$(CAT) $(BUILDTIMESDIR)/build_time_end_TOTAL_human_readable`" \
-"`$(LS) $(BUILDTIMESDIR)/build_time_diff_* | $(GREP) -v _TOTAL | $(XARGS) $(CAT) | $(SORT) -k 2`" \
-"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_TOTAL`"
-endef
-
-ifdef OPENJDK
- ifneq ($(OPENJDK),true)
- x:=$(error "OPENJDK (if defined) can only be set to true")
- endif
-endif
-
-# Define absolute paths to TOPDIRs
-ABS_LANGTOOLS_TOPDIR:=$(call OptFullPath,"$(LANGTOOLS_TOPDIR)")
-ABS_CORBA_TOPDIR:=$(call OptFullPath,"$(CORBA_TOPDIR)")
-ABS_JAXP_TOPDIR:=$(call OptFullPath,"$(JAXP_TOPDIR)")
-ABS_JAXWS_TOPDIR:=$(call OptFullPath,"$(JAXWS_TOPDIR)")
-ABS_JDK_TOPDIR:=$(call OptFullPath,"$(JDK_TOPDIR)")
-ABS_HOTSPOT_TOPDIR:=$(call OptFullPath,"$(HOTSPOT_TOPDIR)")
-ABS_NASHORN_TOPDIR:=$(call OptFullPath,"$(NASHORN_TOPDIR)")
-ABS_INSTALL_TOPDIR:=$(call OptFullPath,"$(INSTALL_TOPDIR)")
-ABS_SPONSORS_TOPDIR:=$(call OptFullPath,"$(SPONSORS_TOPDIR)")
-ABS_DEPLOY_TOPDIR:=$(call OptFullPath,"$(DEPLOY_TOPDIR)")
-
-# Macro to return true or false if a file exists and is readable
-define MkExists
-$(shell if [ -r $1 ]; then $(ECHO) true; else $(ECHO) false; fi)
-endef
-
-HOTSPOT_SRC_AVAILABLE := $(call MkExists,$(HOTSPOT_TOPDIR)/make/Makefile)
-ifndef BUILD_HOTSPOT
- ifdef ALT_HOTSPOT_IMPORT_PATH
- BUILD_HOTSPOT := false
- else
- BUILD_HOTSPOT := $(HOTSPOT_SRC_AVAILABLE)
- endif
-endif
-
-LANGTOOLS_SRC_AVAILABLE := $(call MkExists,$(LANGTOOLS_TOPDIR)/make/Makefile)
-ifndef BUILD_LANGTOOLS
- ifdef ALT_LANGTOOLS_DIST
- BUILD_LANGTOOLS := false
- else
- BUILD_LANGTOOLS := $(LANGTOOLS_SRC_AVAILABLE)
- endif
-endif
-
-CORBA_SRC_AVAILABLE := $(call MkExists,$(CORBA_TOPDIR)/make/Makefile)
-ifndef BUILD_CORBA
- ifdef ALT_CORBA_DIST
- BUILD_CORBA := false
- else
- BUILD_CORBA := $(CORBA_SRC_AVAILABLE)
- endif
-endif
-
-JAXP_SRC_AVAILABLE := $(call MkExists,$(JAXP_TOPDIR)/make/Makefile)
-ifndef BUILD_JAXP
- ifdef ALT_JAXP_DIST
- BUILD_JAXP := false
- else
- BUILD_JAXP := $(JAXP_SRC_AVAILABLE)
- endif
-endif
-
-JAXWS_SRC_AVAILABLE := $(call MkExists,$(JAXWS_TOPDIR)/make/Makefile)
-ifndef BUILD_JAXWS
- ifdef ALT_JAXWS_DIST
- BUILD_JAXWS := false
- else
- BUILD_JAXWS := $(JAXWS_SRC_AVAILABLE)
- endif
-endif
-
-JDK_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/make/Makefile)
-ifndef BUILD_JDK
- BUILD_JDK := $(JDK_SRC_AVAILABLE)
-endif
-ifeq ($(JDK_SRC_AVAILABLE),true)
- JDK_CLOSED_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/src/closed)
- ifeq ($(JDK_CLOSED_SRC_AVAILABLE),false)
- OPENJDK = true
- endif
-endif
-
-NASHORN_SRC_AVAILABLE := $(call MkExists,$(NASHORN_TOPDIR)/make/Makefile)
-ifndef BUILD_NASHORN
- ifdef ALT_NASHORN_DIST
- BUILD_NASHORN := false
- else
- BUILD_NASHORN := $(NASHORN_SRC_AVAILABLE)
- endif
-endif
-
-DEPLOY_SRC_AVAILABLE := $(call MkExists,$(DEPLOY_TOPDIR)/make/Makefile)
-ifndef BUILD_DEPLOY
- BUILD_DEPLOY := $(DEPLOY_SRC_AVAILABLE)
-endif
-
-INSTALL_SRC_AVAILABLE := $(call MkExists,$(INSTALL_TOPDIR)/make/Makefile)
-ifndef BUILD_INSTALL
- ifdef DEV_ONLY
- BUILD_INSTALL := false
- else
- BUILD_INSTALL := $(INSTALL_SRC_AVAILABLE)
- endif
-endif
-
-SPONSORS_SRC_AVAILABLE := $(call MkExists,$(SPONSORS_TOPDIR)/make/Makefile)
-ifndef BUILD_SPONSORS
- ifdef DEV_ONLY
- BUILD_SPONSORS := false
- else
- BUILD_SPONSORS := $(SPONSORS_SRC_AVAILABLE)
- endif
-endif
-
-
-# Do we build the source bundles?
-BUNDLE_RULES = $(JDK_TOPDIR)/make/closed/bundles.gmk
-ifeq ($(SKIP_BUNDLES_BUILD), true)
- BUNDLE_RULES_AVAILABLE := false
-else
- BUNDLE_RULES_AVAILABLE := $(call MkExists,$(BUNDLE_RULES))
-endif
-
-# Current things we do NOT build for OPENJDK
-ifdef OPENJDK
- BUILD_DEPLOY = false
- BUILD_INSTALL = false
- BUILD_SPONSORS = false
- BUNDLE_RULES_AVAILABLE := false
- # These could be over-ridden on the command line or in environment
- ifndef SKIP_FASTDEBUG_BUILD
- SKIP_FASTDEBUG_BUILD = true
- endif
- ifndef SKIP_DEBUG_BUILD
- SKIP_DEBUG_BUILD = true
- endif
- ifndef SKIP_COMPARE_IMAGES
- SKIP_COMPARE_IMAGES = true
- endif
-else
-
- # Various non-OPENJDK reasons to NOT build the deploy repository
- ifeq ($(ARCH), ia64)
- BUILD_DEPLOY=false
- endif
- ifeq ($(ARCH), sparcv9)
- BUILD_DEPLOY=false
- endif
- ifeq ($(ARCH), amd64)
- ifeq ($(PLATFORM), solaris)
- BUILD_DEPLOY=false
- endif
- endif
-
-endif
-ifndef SKIP_PRODUCT_BUILD
- SKIP_PRODUCT_BUILD = false
-endif
-
-# Many reasons why we would want to skip the comparison to previous jdk
-ifndef SKIP_COMPARE_IMAGES
- ifeq ($(BUILD_JDK), false)
- SKIP_COMPARE_IMAGES = true
- endif
- ifeq ($(BUILD_DEPLOY), false)
- SKIP_COMPARE_IMAGES = true
- endif
- ifeq ($(BUILD_INSTALL), false)
- SKIP_COMPARE_IMAGES = true
- endif
- ifdef DEV_ONLY
- SKIP_COMPARE_IMAGES = true
- endif
-endif
-
-# Select defaults if these are not set to true or false
-ifndef SKIP_DEBUG_BUILD
- SKIP_DEBUG_BUILD=true
-endif
-ifndef SKIP_FASTDEBUG_BUILD
- SKIP_FASTDEBUG_BUILD=true
-endif
-
-# Select javadoc setting GENERATE_DOCS
-ifndef NO_DOCS
- # Default value (we want javadoc run)
- GENERATE_DOCS=true
- # No DOCS build when JDK_UPDATE_VERSION set on non-OPENJDK builds
- ifndef OPENJDK
- ifdef JDK_UPDATE_VERSION
- GENERATE_DOCS=false
- endif
- endif
- # If langtools, corba, jaxp, and jaxws are not being built,
- # a full jdk javadoc is not possible
- ifneq ($(BUILD_LANGTOOLS), true)
- GENERATE_DOCS=false
- endif
- ifneq ($(BUILD_CORBA), true)
- GENERATE_DOCS=false
- endif
- ifneq ($(BUILD_JAXP), true)
- GENERATE_DOCS=false
- endif
- ifneq ($(BUILD_JAXWS), true)
- GENERATE_DOCS=false
- endif
- ifeq ($(GENERATE_DOCS),false)
- NO_DOCS=true
- endif
-else
- GENERATE_DOCS=false
-endif
-
-# Output directory for hotspot build
-HOTSPOT_DIR = $(ABS_OUTPUTDIR)/hotspot
-
-# If we are building components
-ifndef ALT_LANGTOOLS_DIST
- LANGTOOLS_OUTPUTDIR = $(ABS_OUTPUTDIR)/langtools
- ABS_LANGTOOLS_DIST = $(LANGTOOLS_OUTPUTDIR)/dist
-endif
-ifndef ALT_CORBA_DIST
- CORBA_OUTPUTDIR = $(ABS_OUTPUTDIR)/corba
- ABS_CORBA_DIST = $(CORBA_OUTPUTDIR)/dist
-endif
-ifndef ALT_JAXP_DIST
- JAXP_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxp
- ABS_JAXP_DIST = $(JAXP_OUTPUTDIR)/dist
-endif
-ifndef ALT_JAXWS_DIST
- JAXWS_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxws
- ABS_JAXWS_DIST = $(JAXWS_OUTPUTDIR)/dist
-endif
-ifndef ALT_NASHORN_DIST
- NASHORN_OUTPUTDIR = $(ABS_OUTPUTDIR)/nashorn
- ABS_NASHORN_DIST = $(NASHORN_OUTPUTDIR)/dist
-endif
-
-# Common make arguments (supplied to all component builds)
-COMMON_BUILD_ARGUMENTS = \
- JDK_TOPDIR=$(ABS_JDK_TOPDIR) \
- JDK_MAKE_SHARED_DIR=$(ABS_JDK_TOPDIR)/make/common/shared \
- EXTERNALSANITYCONTROL=true \
- SOURCE_LANGUAGE_VERSION=$(SOURCE_LANGUAGE_VERSION) \
- TARGET_CLASS_VERSION=$(TARGET_CLASS_VERSION) \
- MILESTONE=$(MILESTONE) \
- BUILD_NUMBER=$(BUILD_NUMBER) \
- JDK_BUILD_NUMBER=$(JDK_BUILD_NUMBER) \
- FULL_VERSION=$(FULL_VERSION) \
- PREVIOUS_JDK_VERSION=$(PREVIOUS_JDK_VERSION) \
- JDK_VERSION=$(JDK_VERSION) \
- JDK_MKTG_VERSION=$(JDK_MKTG_VERSION) \
- JDK_MAJOR_VERSION=$(JDK_MAJOR_VERSION) \
- JDK_MINOR_VERSION=$(JDK_MINOR_VERSION) \
- JDK_MICRO_VERSION=$(JDK_MICRO_VERSION) \
- PREVIOUS_MAJOR_VERSION=$(PREVIOUS_MAJOR_VERSION) \
- PREVIOUS_MINOR_VERSION=$(PREVIOUS_MINOR_VERSION) \
- PREVIOUS_MICRO_VERSION=$(PREVIOUS_MICRO_VERSION)
-
-ifdef OPENJDK
- COMMON_BUILD_ARGUMENTS += OPENJDK=$(OPENJDK)
-endif
-
-ifdef ARCH_DATA_MODEL
- COMMON_BUILD_ARGUMENTS += ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)
-endif
-
-ifeq ($(DEBUG_NAME), debug)
- COMMON_BUILD_ARGUMENTS += VARIANT=DBG DEBUG_CLASSFILES=true
-endif
-
-ifeq ($(DEBUG_NAME), fastdebug)
- COMMON_BUILD_ARGUMENTS += VARIANT=DBG FASTDEBUG=true DEBUG_CLASSFILES=true
-endif
-
-ifdef COOKED_JDK_UPDATE_VERSION
- COMMON_BUILD_ARGUMENTS += COOKED_JDK_UPDATE_VERSION=$(COOKED_JDK_UPDATE_VERSION)
-endif
-
-ifdef COOKED_BUILD_NUMBER
- COMMON_BUILD_ARGUMENTS += COOKED_BUILD_NUMBER=$(COOKED_BUILD_NUMBER)
-endif
-
-ifdef ANT_HOME
- COMMON_BUILD_ARGUMENTS += ANT_HOME="$(ANT_HOME)"
-endif
-
-# When all repos support FULL_DEBUG_SYMBOLS and ZIP_DEBUGINFO_FILES,
-# then these can be set here:
-#ifdef FULL_DEBUG_SYMBOLS
-# COMMON_BUILD_ARGUMENTS += FULL_DEBUG_SYMBOLS=$(FULL_DEBUG_SYMBOLS)
-#endif
-#
-#ifdef ZIP_DEBUGINFO_FILES
-# COMMON_BUILD_ARGUMENTS += ZIP_DEBUGINFO_FILES="$(ZIP_DEBUGINFO_FILES)"
-#endif
diff --git a/make/jaxws-rules.gmk b/make/HotspotWrapper.gmk
index 59e33f3..51437df 100644
--- a/make/jaxws-rules.gmk
+++ b/make/HotspotWrapper.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -23,34 +23,30 @@
# questions.
#
-################################################################
-# JAXWS TARGETS
-################################################################
-
-JAXWS_BUILD_ARGUMENTS = \
- $(COMMON_BUILD_ARGUMENTS) \
- ALT_OUTPUTDIR=$(JAXWS_OUTPUTDIR) \
- ALT_BOOTDIR=$(BOOTDIR) \
- ALT_JDK_IMPORT_PATH=$(JDK_IMPORT_PATH)
-
-ifeq ($(BUILD_LANGTOOLS), true)
- JAXWS_BUILD_ARGUMENTS += ALT_LANGTOOLS_DIST=$(ABS_LANGTOOLS_DIST)
-endif
-
-jaxws: jaxws-build
-jaxws-build:
- $(MKDIR) -p $(JAXWS_OUTPUTDIR)
- @$(call MakeStart,jaxws,all)
- ($(CD) $(JAXWS_TOPDIR)/make && \
- $(MAKE) $(JAXWS_BUILD_ARGUMENTS) all)
- @$(call MakeFinish,jaxws,all)
-
-jaxws-clobber::
- $(MKDIR) -p $(JAXWS_OUTPUTDIR)
- @$(call MakeStart,jaxws,clobber)
- ($(CD) $(JAXWS_TOPDIR)/make && \
- $(MAKE) $(JAXWS_BUILD_ARGUMENTS) clobber)
- @$(call MakeFinish,jaxws,clobber)
-
-.PHONY: jaxws jaxws-build jaxws-clobber
+# Include the legacy hotspot-spec.gmk (which in turns includes spec.gmk)
+BASE_SPEC:=$(SPEC)
+include $(dir $(SPEC))hotspot-spec.gmk
+include MakeBase.gmk
+# Inclusion of this pseudo-target will cause make to execute this file
+# serially, regardless of -j. Recursively called makefiles will not be
+# affected, however. This is required for correct dependency management.
+.NOTPARALLEL:
+
+default: all
+
+# Get all files except .hg in the hotspot directory.
+HOTSPOT_FILES := $(shell $(FIND) -L $(HOTSPOT_TOPDIR) -name ".hg" -prune -o -print)
+
+# The old build creates hotspot output dir before calling hotspot and
+# not doing it breaks builds on msys.
+$(HOTSPOT_OUTPUTDIR)/_hotspot.timestamp: $(HOTSPOT_FILES)
+ @$(MKDIR) -p $(HOTSPOT_OUTPUTDIR)
+ @($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) -j1 $(HOTSPOT_MAKE_ARGS) SPEC=$(HOTSPOT_SPEC) BASE_SPEC=$(BASE_SPEC))
+ $(TOUCH) $@
+
+hotspot: $(HOTSPOT_OUTPUTDIR)/_hotspot.timestamp
+
+all: hotspot
+
+.PHONY: default all hotspot
diff --git a/make/Javadoc.gmk b/make/Javadoc.gmk
new file mode 100644
index 0000000..70c9a67
--- /dev/null
+++ b/make/Javadoc.gmk
@@ -0,0 +1,1210 @@
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+include $(SPEC)
+include MakeBase.gmk
+
+.SUFFIXES: # Delete the default suffixes
+.SUFFIXES: .java
+
+#
+# Definitions for $(DOCSDIR), $(MKDIR), $(BINDIR), etc.
+#
+
+DOCSDIR=$(OUTPUT_ROOT)/docs
+TEMPDIR=$(OUTPUT_ROOT)/docstemp
+
+JDK_SHARE_SRC=$(JDK_TOPDIR)/src/share
+JDK_SHARE_CLASSES=$(JDK_SHARE_SRC)/classes
+
+JDK_IMPSRC = $(JDK_OUTPUTDIR)/impsrc
+
+JDK_GENSRC = $(JDK_OUTPUTDIR)/gensrc
+
+HOTSPOT_DOCS_IMPORT_PATH=$(HOTSPOT_OUTPUTDIR)/docs
+
+BUILD_NUMBER=$(JDK_BUILD_NUMBER)
+
+JAVADOC_CMD = $(JAVA) \
+ -Xmx1024m \
+ -Djava.awt.headless=true \
+ $(NEW_JAVADOC) \
+ -bootclasspath $(JDK_OUTPUTDIR)/classes
+
+# Copyright year for beginning of Java and some of the apis
+# (Needed when creating the javadocs)
+FIRST_COPYRIGHT_YEAR = 1993
+DOMAPI_FIRST_COPYRIGHT_YEAR = 2005
+MIRROR_FIRST_COPYRIGHT_YEAR = 2004
+DOCLETAPI_FIRST_COPYRIGHT_YEAR = 1993
+TAGLETAPI_FIRST_COPYRIGHT_YEAR = 1993
+JDI_FIRST_COPYRIGHT_YEAR = 1999
+JAAS_FIRST_COPYRIGHT_YEAR = 1998
+JGSS_FIRST_COPYRIGHT_YEAR = 2000
+SMARTCARDIO_FIRST_COPYRIGHT_YEAR = 2005
+HTTPSERVER_FIRST_COPYRIGHT_YEAR = 2005
+MGMT_FIRST_COPYRIGHT_YEAR = 2003
+ATTACH_FIRST_COPYRIGHT_YEAR = 2005
+JCONSOLE_FIRST_COPYRIGHT_YEAR = 2006
+SCTPAPI_FIRST_COPYRIGHT_YEAR = 2009
+TRACING_FIRST_COPYRIGHT_YEAR = 2008
+TREEAPI_FIRST_COPYRIGHT_YEAR = 2005
+JNLP_FIRST_COPYRIGHT_YEAR = 1998
+PLUGIN2_FIRST_COPYRIGHT_YEAR = 2007
+
+# Oracle name
+FULL_COMPANY_NAME = Oracle and/or its affiliates
+
+# Copyright address
+COMPANY_ADDRESS = 500 Oracle Parkway<br>Redwood Shores, CA 94065 USA.
+
+# The trademark symbol
+TRADEMARK = &trade;
+
+# Common copyright lines used
+# The word "Copyright" might optionally be a link to the file cpyr.html.
+# The first year of copyright may vary or not be available.
+# The address to the company might be optional.
+COMMA:= ,
+EMPTY:=
+SPACE:=$(EMPTY) $(EMPTY)
+COPYRIGHT_SYMBOL = &\#x00a9;
+# Macro to construct the copyright line
+# (The GNU make 3.78.1 "if" conditional is broken, fixed in GNU make 3.81)
+define CopyrightLine # optionalurl optionalfirstyear optionaladdress
+$(if $(strip $1),<a href="$(strip $1)">Copyright</a>,Copyright) \
+$(COPYRIGHT_SYMBOL) $(if $2,$2${COMMA},) $(COPYRIGHT_YEAR),\
+$(FULL_COMPANY_NAME). $3 All rights reserved.
+endef
+
+# Url to root of documents
+DOCSDIR_URL = {@docroot}/$(GET2DOCSDIR)
+
+# Url to copyright html file
+COPYRIGHT_URL-7 = $(DOCSDIR_URL)/legal/cpyr.html
+# This isn't added in old build yet.
+#COPYRIGHT_URL-8 = $(DOCSDIR_URL)/legal/cpyr.html
+COPYRIGHT_URL = $(COPYRIGHT_URL-$(JDK_MINOR_VERSION))
+
+# Url to bug filing site
+BUG_SUBMIT_URL = http://bugreport.sun.com/bugreport/
+
+# Common line for how to submit a bug or rfe
+BUG_SUBMIT_LINE = <a href="$(BUG_SUBMIT_URL)">Submit a bug or feature</a>
+
+# Url to devdocs page
+# Was: http://java.sun.com/javase/6/webnotes/devdocs-vs-specs.html
+DEV_DOCS_URL-7 = http://download.oracle.com/javase/7/docs/index.html
+DEV_DOCS_URL-8 = http://download.oracle.com/javase/8/docs/index.html
+DEV_DOCS_URL = $(DEV_DOCS_URL-$(JDK_MINOR_VERSION))
+DOCS_BASE_URL = http://download.oracle.com/javase/7/docs
+
+# Common Java trademark line
+JAVA_TRADEMARK_LINE = Java is a trademark or registered trademark of \
+$(FULL_COMPANY_NAME) in the US and other countries.
+
+#################################################################
+# Macros:
+
+
+# List of all possible directories for javadoc to look for sources
+# NOTE: Quotes are required around sourcepath argument only on Windows.
+# Otherwise, you get "No packages or classes specified." due
+# to $(PATH_SEP) being interpreted as an end of
+# command (newline or shell ; character)
+ALL_SOURCE_DIRS = $(JDK_SHARE_CLASSES) \
+ $(JDK_IMPSRC) \
+ $(JDK_GENSRC) \
+ $(JDK_OUTPUTDIR)/gendocsrc_rmic \
+ $(JDK_TOPDIR)/src/solaris/classes \
+ $(JDK_TOPDIR)/src/windows/classes \
+ $(JDK_SHARE_SRC)/doc/stub
+
+# List of directories that actually exist
+ALL_EXISTING_SOURCE_DIRS := $(wildcard $(ALL_SOURCE_DIRS))
+
+# List with classpath separator between them
+EMPTY:=
+SPACE:= $(EMPTY) $(EMPTY)
+RELEASEDOCS_SOURCEPATH = \
+ $(subst $(SPACE),$(PATH_SEP),$(strip $(ALL_SOURCE_DIRS)))
+
+define prep-target
+ $(MKDIR) -p $(@D)
+ $(RM) $@
+endef
+
+# Prep for javadoc creation, assumes $@ is an index.html file
+define prep-javadoc
+ @if [ -f "$@" -a "$?" != "" ] ; then \
+ $(ECHO) "# Dependencies have changed: $?"; \
+ fi
+ $(RM) -r $(@D)
+ $(MKDIR) -p $(@D)
+endef
+
+# A cache of the directories in ALL_SOURCE_DIRS
+DIRECTORY_CACHE = $(DOCSTMPDIR)/directory.cache
+
+# Given a list of packages, return a list of files or dirs to be dependent on
+# (Currently only returning a list of directories)
+define PackageDependencies # packages
+ $(shell \
+ if [ "$1" != "" -a -f $(DIRECTORY_CACHE) ] ; then \
+ for p in $1 ; do \
+ pd=`$(ECHO) $${p} | $(SED) -e 's@[.]@/@g'`; \
+ $(CAT) $(DIRECTORY_CACHE) | $(GREP) "/$${pd}/" ; \
+ done; \
+ fi \
+ )
+endef
+
+# Given a list of packages, add packages that exist to $@, print summary
+define PackageFilter # packages
+ @if [ "$1" != "" ] ; then \
+ for p in $1 ; do \
+ pd=`$(ECHO) $${p} | $(SED) -e 's@[.]@/@g'`; \
+ found="false"; \
+ for cp in $(ALL_SOURCE_DIRS) ; do \
+ if [ -d $${cp}/$${pd} ] ; then \
+ $(ECHO) "$${p}" >> $@; \
+ found="true"; \
+ break; \
+ fi; \
+ done; \
+ if [ "$${found}" = "false" ] ; then \
+ $(ECHO) "WARNING: Package not found: $${p}"; \
+ fi; \
+ done; \
+ fi
+endef
+
+# Print out a summary of the javadoc command about to be run
+define JavadocSummary # optionsfile packagesfile
+ @$(ECHO) "# Summary for $@"; \
+ $(ECHO) "# Options (`$(BASENAME) $1`):"; $(SED) -e 's@^@# @' $1; \
+ $(ECHO) "# Packages (`$(BASENAME) $2`):";$(SED) -e 's@^@# @' $2
+endef
+
+#
+# Temporary directory for javadoc creation
+#
+DOCSTMPDIR = $(TEMPDIR)/doctmp
+
+#
+# Different api directories created from root directory
+#
+COREAPI_DOCSDIR = $(DOCSDIR)/api
+JDK_API_DOCSDIR = $(DOCSDIR)/jdk/api
+JRE_API_DOCSDIR = $(DOCSDIR)/jre/api
+PLATFORM_DOCSDIR = $(DOCSDIR)/platform
+
+# The non-core api javadocs need to be able to access the root of the core
+# api directory, so for jdk/api or jre/api to get to the core api/
+# directory we would use this:
+JDKJRE2COREAPI = ../../api
+
+# Common bottom argument
+define CommonBottom # year
+<font size="-1"><br> $(call CopyrightLine,,$1,)</font>
+endef
+
+# Common trademark bottom argument (Not sure why this is used sometimes)
+define CommonTrademarkBottom # year
+<font size="-1">\
+$(BUG_SUBMIT_LINE)<br>$(JAVA_TRADEMARK_LINE)<br>\
+$(call CopyrightLine,,$1,$(COMPANY_ADDRESS))\
+</font>
+endef
+
+# Common echo of option
+define OptionOnly # opt
+ $(PRINTF) "%s\n" "$1"
+endef
+define OptionPair # opt arg
+ $(PRINTF) "%s '%s'\n" "$1" '$2'
+endef
+define OptionTrip # opt arg arg
+ $(PRINTF) "%s '%s' '%s'\n" "$1" '$2' '$3'
+endef
+
+# Core api bottom argument (with special sauce)
+COREAPI_BOTTOM = <font size="-1"> $(BUG_SUBMIT_LINE)\
+<br>For further API reference and developer documentation, \
+see <a href="$(DEV_DOCS_URL)" target="_blank">Java SE Documentation</a>. \
+That documentation contains more detailed, developer-targeted descriptions, \
+with conceptual overviews, definitions of terms, workarounds, \
+and working code examples.<br>\
+$(call CopyrightLine,$(COPYRIGHT_URL),$(FIRST_COPYRIGHT_YEAR),)\
+</font>
+
+# Common javadoc options used by all
+COMMON_JAVADOCFLAGS = \
+ -XDignore.symbol.file=true \
+ -quiet \
+ -use \
+ -keywords \
+ -Xdoclint:none \
+ -Xprofilespath $(JDK_TOPDIR)/make/profile-rtjar-includes.txt \
+ $(ADDITIONAL_JAVADOCFLAGS)
+
+ifdef OPENJDK
+ ADDITIONAL_JAVADOCFLAGS = \
+ -Xdocrootparent $(DOCS_BASE_URL)
+else
+ ADDITIONAL_JAVADOCFLAGS =
+endif
+
+# Draft used for non-fcs documents
+DRAFT_HEADER =
+ifneq ($(MILESTONE), fcs)
+ DRAFT_HEADER = <br><strong>DRAFT&nbsp;$(MILESTONE)-$(BUILD_NUMBER)</strong>
+ DRAFT_BOTTOM = <br><strong>DRAFT&nbsp;$(MILESTONE)-$(BUILD_NUMBER)</strong>
+ DRAFT_WINTITLE = $(BUILD_NUMBER)
+ # Early access top text (not used in FCS releases)
+ COREAPI_TOP_EARLYACCESS = \
+<div style="background-color: \#EEEEEE"> \
+<div style="padding: 6px; margin-top: 2px; margin-bottom: 6px; \
+margin-left: 6px; margin-right: 6px; text-align: justify; \
+font-size: 80%; font-family: Helvetica, Arial, sans-serif; \
+font-weight: normal;"> \
+Please note that the specifications and other information \
+contained herein are not final and are subject to change. \
+The information is being made available to you solely for purpose of \
+evaluation. \
+</div> </div>
+
+endif
+
+#################################################################
+
+#
+# CORE_PKGS environment variable has been moved to the following file
+#
+include CORE_PKGS.gmk
+
+#
+# Load environment variables for API package names that are not part of
+# the Java SE platform
+#
+include NON_CORE_PKGS.gmk
+
+#################################################################
+
+#
+# Default target is same as docs target, create core api and all others it can
+#
+
+all: docs
+docs: coredocs otherdocs
+
+#################################################################
+# Production Targets -- USE THESE TARGETS WHEN:
+# a) You're generating docs outside of release engineering's
+# standard control build.
+# b) The docs will be pushed to the web and/or included in
+# the downloaded doc bundle.
+#
+# See: Notes.html#releaseTargets
+# Note: Spaces precede ifdef/ifndef indents. Tabs precede target commands (!)
+#
+
+sanitycheckcoredocs:
+ @$(ECHO) ""
+ @$(ECHO) "Building core api docs with these values:"
+ @$(ECHO) " BUILD_NUMBER = $(BUILD_NUMBER)"
+ @$(ECHO) " MILESTONE = $(MILESTONE)"
+ @$(ECHO) ""
+ ifeq ($(BUILD_NUMBER), b00)
+ @$(ECHO) "ERROR: Build number must be defined"
+ @$(ECHO) "MILESTONE is set to $(MILESTONE)"
+ @$(ECHO) ""
+ exit 1
+ endif
+
+#############################################################
+#
+# coredocs
+#
+COREAPI_DOCTITLE = Java$(TRADEMARK) Platform, Standard Edition \
+$(JDK_MINOR_VERSION)<br>API Specification
+COREAPI_WINDOWTITLE = Java Platform SE $(JDK_MINOR_VERSION)
+COREAPI_HEADER = \
+<strong>Java$(TRADEMARK)&nbsp;Platform<br>Standard&nbsp;Ed.&nbsp;$(JDK_MINOR_VERSION)</strong>
+
+# Java language specification cite
+TAG_JLS = jls:a:See <cite> \
+The Java&trade; Language Specification</cite>:
+
+# Overview file for core apis
+COREAPI_OVERVIEW = $(JDK_SHARE_CLASSES)/overview-core.html
+
+# The index.html, options, and packages files
+COREAPI_INDEX_FILE = $(COREAPI_DOCSDIR)/index.html
+COREAPI_OPTIONS_FILE = $(DOCSTMPDIR)/coredocs.options
+COREAPI_PACKAGES_FILE = $(DOCSTMPDIR)/coredocs.packages
+
+coredocs: $(COREAPI_INDEX_FILE)
+
+# Set relative location to core api document root
+$(COREAPI_INDEX_FILE): GET2DOCSDIR=..
+
+# Run javadoc if the index file is out of date or missing
+$(COREAPI_INDEX_FILE): $(COREAPI_OPTIONS_FILE) $(COREAPI_PACKAGES_FILE)
+ $(prep-javadoc)
+ $(call JavadocSummary,$(COREAPI_OPTIONS_FILE),$(COREAPI_PACKAGES_FILE))
+ $(JAVADOC_CMD) -d $(@D) \
+ @$(COREAPI_OPTIONS_FILE) @$(COREAPI_PACKAGES_FILE)
+
+# Create file with javadoc options in it
+$(COREAPI_OPTIONS_FILE): $(COREAPI_OVERVIEW)
+ $(prep-target)
+ @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+ $(call OptionPair,-encoding,ISO-8859-1) ; \
+ $(call OptionPair,-tag,beaninfo:X) ; \
+ $(call OptionPair,-tag,revised:X) ; \
+ $(call OptionPair,-tag,since.unbundled:X) ; \
+ $(call OptionPair,-tag,spec:X) ; \
+ $(call OptionPair,-tag,specdefault:X) ; \
+ $(call OptionPair,-tag,Note:X) ; \
+ $(call OptionPair,-tag,ToDo:X) ; \
+ $(call OptionPair,-tag,apiNote:a:API Note:) ; \
+ $(call OptionPair,-tag,implSpec:a:Implementation Requirements:) ; \
+ $(call OptionPair,-tag,implNote:a:Implementation Note:) ; \
+ $(call OptionPair,-tag,param) ; \
+ $(call OptionPair,-tag,return) ; \
+ $(call OptionPair,-tag,throws) ; \
+ $(call OptionPair,-tag,since) ; \
+ $(call OptionPair,-tag,version) ; \
+ $(call OptionPair,-tag,serialData) ; \
+ $(call OptionPair,-tag,factory) ; \
+ $(call OptionPair,-tag,see) ; \
+ $(call OptionPair,-tag,$(TAG_JLS)) ; \
+ $(call OptionOnly,-splitIndex) ; \
+ $(call OptionPair,-overview,$(COREAPI_OVERVIEW)) ; \
+ $(call OptionPair,-doctitle,$(COREAPI_DOCTITLE)) ; \
+ $(call OptionPair,-windowtitle,$(COREAPI_WINDOWTITLE) $(DRAFT_WINTITLE)) ; \
+ $(call OptionPair,-header,$(COREAPI_HEADER)$(DRAFT_HEADER)) ; \
+ $(call OptionPair,-bottom,$(COREAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
+ ) >> $@
+ ifdef COREAPI_TOP_EARLYACCESS
+ @$(call OptionPair,-top,$(COREAPI_TOP_EARLYACCESS)) >> $@
+ endif
+
+# Create a file with the package names in it
+$(COREAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(CORE_PKGS))
+ $(prep-target)
+ $(call PackageFilter,$(CORE_PKGS))
+
+#############################################################
+#
+# docletapidocs
+#
+
+ALL_OTHER_TARGETS += docletapidocs
+
+DOCLETAPI_DOCDIR := $(JDK_API_DOCSDIR)/javadoc/doclet
+DOCLETAPI2COREAPI := ../../$(JDKJRE2COREAPI)
+DOCLETAPI_DOCTITLE := Doclet API
+DOCLETAPI_WINDOWTITLE := Doclet API
+DOCLETAPI_HEADER := <strong>Doclet API</strong>
+DOCLETAPI_BOTTOM := $(call CommonTrademarkBottom,$(DOCLETAPI_FIRST_COPYRIGHT_YEAR))
+DOCLETAPI_GROUPNAME := Packages
+DOCLETAPI_REGEXP := com.sun.javadoc
+# DOCLETAPI_PKGS is located in NON_CORE_PKGS.gmk
+
+# The index.html, options, and packages files
+DOCLETAPI_INDEX_FILE = $(DOCLETAPI_DOCDIR)/index.html
+DOCLETAPI_OPTIONS_FILE = $(DOCSTMPDIR)/docletapi.options
+DOCLETAPI_PACKAGES_FILE = $(DOCSTMPDIR)/docletapi.packages
+
+docletapidocs: $(DOCLETAPI_INDEX_FILE)
+
+# Set relative location to core api document root
+$(DOCLETAPI_INDEX_FILE): GET2DOCSDIR=$(DOCLETAPI2COREAPI)/..
+
+# Run javadoc if the index file is out of date or missing
+$(DOCLETAPI_INDEX_FILE): $(DOCLETAPI_OPTIONS_FILE) $(DOCLETAPI_PACKAGES_FILE) coredocs
+ $(prep-javadoc)
+ $(call JavadocSummary,$(DOCLETAPI_OPTIONS_FILE),$(DOCLETAPI_PACKAGES_FILE))
+ $(JAVADOC_CMD) -d $(@D) \
+ @$(DOCLETAPI_OPTIONS_FILE) @$(DOCLETAPI_PACKAGES_FILE)
+
+# Create file with javadoc options in it
+$(DOCLETAPI_OPTIONS_FILE):
+ $(prep-target)
+ @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+ $(call OptionPair,-encoding,ascii) ; \
+ $(call OptionOnly,-breakiterator) ; \
+ $(call OptionPair,-doctitle,$(DOCLETAPI_DOCTITLE)) ; \
+ $(call OptionPair,-windowtitle,$(DOCLETAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+ $(call OptionPair,-header,$(DOCLETAPI_HEADER)$(DRAFT_HEADER)) ; \
+ $(call OptionPair,-bottom,$(DOCLETAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
+ $(call OptionTrip,-group,$(DOCLETAPI_GROUPNAME),$(DOCLETAPI_REGEXP)); \
+ $(call OptionTrip,-linkoffline,$(DOCLETAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
+ ) >> $@
+
+# Create a file with the package names in it
+$(DOCLETAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(DOCLETAPI_PKGS))
+ $(prep-target)
+ $(call PackageFilter,$(DOCLETAPI_PKGS))
+
+#############################################################
+#
+# tagletapidocs
+#
+
+ALL_OTHER_TARGETS += tagletapidocs
+TAGLETAPI_DOCDIR := $(JDK_API_DOCSDIR)/javadoc/taglet
+TAGLETAPI2COREAPI := ../../$(JDKJRE2COREAPI)
+TAGLETAPI_BOTTOM := $(call CommonTrademarkBottom,$(TAGLETAPI_FIRST_COPYRIGHT_YEAR))
+# TAGLETAPI_FILE is located in NON_CORE_PKGS.gmk
+
+# Temporary directory (special generation rules)
+TAGLETAPI_TEMPDIR = $(DOCSTMPDIR)/taglets_temp
+
+# The index.html, options, and packages files
+TAGLETAPI_INDEX_FILE = $(TAGLETAPI_DOCDIR)/index.html
+TAGLETAPI_OPTIONS_FILE = $(DOCSTMPDIR)/tagletapi.options
+TAGLETAPI_PACKAGES_FILE = $(DOCSTMPDIR)/tagletapi.packages
+
+tagletapidocs: $(TAGLETAPI_INDEX_FILE)
+
+# Set relative location to core api document root
+$(TAGLETAPI_INDEX_FILE): GET2DOCSDIR=$(TAGLETAPI2COREAPI)/..
+
+# Run javadoc if the index file is out of date or missing
+$(TAGLETAPI_INDEX_FILE): $(TAGLETAPI_OPTIONS_FILE) $(TAGLETAPI_PACKAGES_FILE) coredocs
+ $(prep-javadoc)
+ $(RM) -r $(TAGLETAPI_TEMPDIR)
+ $(MKDIR) -p $(TAGLETAPI_TEMPDIR)
+ $(call JavadocSummary,$(TAGLETAPI_OPTIONS_FILE),$(TAGLETAPI_PACKAGES_FILE))
+ $(JAVADOC_CMD) -d $(TAGLETAPI_TEMPDIR) \
+ @$(TAGLETAPI_OPTIONS_FILE) @$(TAGLETAPI_PACKAGES_FILE)
+ cp -r $(TAGLETAPI_TEMPDIR)/com $(@D)
+ cp $(TAGLETAPI_TEMPDIR)/stylesheet.css $(@D)
+ $(RM) -r $(TAGLETAPI_TEMPDIR)
+
+# Create file with javadoc options in it
+$(TAGLETAPI_OPTIONS_FILE):
+ $(prep-target)
+ @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+ $(call OptionPair,-encoding,ascii) ; \
+ $(call OptionOnly,-nonavbar) ; \
+ $(call OptionOnly,-noindex) ; \
+ $(call OptionPair,-bottom,$(TAGLETAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
+ $(call OptionTrip,-linkoffline,$(TAGLETAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
+ ) >> $@
+
+# Create a file with the package names in it
+$(TAGLETAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(TAGLETAPI_PKGS))
+ $(prep-target)
+ @($(ECHO) "$(JDK_IMPSRC)/$(TAGLETAPI_FILE)" ) > $@
+
+#############################################################
+#
+# domapidocs
+#
+
+ALL_OTHER_TARGETS += domapidocs
+
+DOMAPI_DOCDIR := $(JRE_API_DOCSDIR)/plugin/dom
+DOMAPI2COREAPI := ../../$(JDKJRE2COREAPI)
+DOMAPI_DOCTITLE := Common DOM API
+DOMAPI_WINDOWTITLE := Common DOM API
+DOMAPI_HEADER := <strong>Common DOM API</strong>
+DOMAPI_BOTTOM := $(call CommonTrademarkBottom,$(DOMAPI_FIRST_COPYRIGHT_YEAR))
+DOMAPI_GROUPNAME := Packages
+DOMAPI_REGEXP := com.sun.java.browser.dom:org.w3c.dom*
+# DOMAPI_PKGS is located in NON_CORE_PKGS.gmk
+
+# The index.html, options, and packages files
+DOMAPI_INDEX_FILE = $(DOMAPI_DOCDIR)/index.html
+DOMAPI_OPTIONS_FILE = $(DOCSTMPDIR)/domapi.options
+DOMAPI_PACKAGES_FILE = $(DOCSTMPDIR)/domapi.packages
+
+domapidocs: $(DOMAPI_INDEX_FILE)
+
+# Set relative location to core api document root
+$(DOMAPI_INDEX_FILE): GET2DOCSDIR=$(DOMAPI2COREAPI)/..
+
+# Run javadoc if the index file is out of date or missing
+$(DOMAPI_INDEX_FILE): $(DOMAPI_OPTIONS_FILE) $(DOMAPI_PACKAGES_FILE) coredocs
+ $(prep-javadoc)
+ $(call JavadocSummary,$(DOMAPI_OPTIONS_FILE),$(DOMAPI_PACKAGES_FILE))
+ $(JAVADOC_CMD) -d $(@D) \
+ @$(DOMAPI_OPTIONS_FILE) @$(DOMAPI_PACKAGES_FILE)
+
+# Create file with javadoc options in it
+$(DOMAPI_OPTIONS_FILE):
+ $(prep-target)
+ @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+ $(call OptionPair,-encoding,ascii) ; \
+ $(call OptionOnly,-splitIndex) ; \
+ $(call OptionPair,-doctitle,$(DOMAPI_DOCTITLE)) ; \
+ $(call OptionPair,-windowtitle,$(DOMAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+ $(call OptionPair,-header,$(DOMAPI_HEADER)$(DRAFT_HEADER)) ; \
+ $(call OptionPair,-bottom,$(DOMAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
+ $(call OptionTrip,-group,$(DOMAPI_GROUPNAME),$(DOMAPI_REGEXP)); \
+ $(call OptionTrip,-linkoffline,$(DOMAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
+ ) >> $@
+
+# Create a file with the package names in it
+$(DOMAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(DOMAPI_PKGS))
+ $(prep-target)
+ $(call PackageFilter,$(DOMAPI_PKGS))
+
+#############################################################
+#
+# jpdadocs
+#
+
+ALL_OTHER_TARGETS += jpdadocs
+
+jpdadocs: jdidocs jdwpdocs jvmtidocs
+
+#############################################################
+#
+# jdidocs
+#
+
+ALL_OTHER_TARGETS += jdidocs
+
+JDI_DOCDIR := $(JDK_API_DOCSDIR)/jpda/jdi
+JDI2COREAPI := ../../$(JDKJRE2COREAPI)
+JDI_DOCTITLE := Java$(TRADEMARK) Debug Interface
+JDI_WINDOWTITLE := Java Debug Interface
+JDI_HEADER := <strong>Java Debug Interface</strong>
+JDI_BOTTOM := $(call CommonBottom,$(JDI_FIRST_COPYRIGHT_YEAR))
+JDI_OVERVIEW := $(JDK_SHARE_CLASSES)/jdi-overview.html
+# JDI_PKGS is located in NON_CORE_PKGS.gmk
+
+# The index.html, options, and packages files
+JDI_INDEX_FILE = $(JDI_DOCDIR)/index.html
+JDI_OPTIONS_FILE = $(DOCSTMPDIR)/jdi.options
+JDI_PACKAGES_FILE = $(DOCSTMPDIR)/jdi.packages
+
+jdidocs: $(JDI_INDEX_FILE)
+
+# Set relative location to core api document root
+$(JDI_INDEX_FILE): GET2DOCSDIR=$(JDI2COREAPI)/..
+
+# Run javadoc if the index file is out of date or missing
+$(JDI_INDEX_FILE): $(JDI_OPTIONS_FILE) $(JDI_PACKAGES_FILE) coredocs
+ $(prep-javadoc)
+ $(call JavadocSummary,$(JDI_OPTIONS_FILE),$(JDI_PACKAGES_FILE))
+ $(JAVADOC_CMD) -d $(@D) \
+ @$(JDI_OPTIONS_FILE) @$(JDI_PACKAGES_FILE)
+
+# Create file with javadoc options in it
+$(JDI_OPTIONS_FILE): $(JDI_OVERVIEW)
+ $(prep-target)
+ @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+ $(call OptionPair,-encoding,ascii) ; \
+ $(call OptionPair,-overview,$(JDI_OVERVIEW)) ; \
+ $(call OptionPair,-doctitle,$(JDI_DOCTITLE)) ; \
+ $(call OptionPair,-windowtitle,$(JDI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+ $(call OptionPair,-header,$(JDI_HEADER)$(DRAFT_HEADER)) ; \
+ $(call OptionPair,-bottom,$(JDI_BOTTOM)$(DRAFT_BOTTOM)) ; \
+ $(call OptionTrip,-linkoffline,$(JDI2COREAPI),$(COREAPI_DOCSDIR)/); \
+ ) >> $@
+
+# Create a file with the package names in it
+$(JDI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JDI_PKGS))
+ $(prep-target)
+ $(call PackageFilter,$(JDI_PKGS))
+
+#############################################################
+#
+# jdwpdocs
+#
+
+ALL_OTHER_TARGETS += jdwpdocs
+
+JDWP_DOCDIR = $(PLATFORM_DOCSDIR)/jpda/jdwp
+
+jdwpdocs: $(JDWP_DOCDIR)/jdwp-protocol.html
+$(JDWP_DOCDIR)/jdwp-protocol.html : $(JDK_OUTPUTDIR)/gensrc_jdwp_doc/jdwp-protocol.html
+ $(MKDIR) -p $(@D)
+ $(RM) $@
+ $(CP) $< $@
+
+#############################################################
+#
+# jvmtidocs
+#
+
+ALL_OTHER_TARGETS += jvmtidocs
+
+JVMTI_DOCDIR = $(PLATFORM_DOCSDIR)/jvmti
+JVMTI_HTML = $(HOTSPOT_DIST)/docs/platform/jvmti/jvmti.html
+
+jvmtidocs: $(JVMTI_DOCDIR)/jvmti.html
+$(JVMTI_DOCDIR)/jvmti.html:
+ @$(prep-javadoc)
+ @if [ -f $(JVMTI_HTML) ] ; then \
+ $(ECHO) "$(CP) $(JVMTI_HTML) $@"; \
+ $(CP) $(JVMTI_HTML) $@; \
+ else \
+ $(ECHO) "WARNING: Generated file does not exist: $(JVMTI_HTML)"; \
+ fi
+
+#############################################################
+#
+# jaasdocs
+#
+
+ALL_OTHER_TARGETS += jaasdocs
+
+JAAS_DOCDIR := $(JRE_API_DOCSDIR)/security/jaas/spec
+JAAS2COREAPI := ../../../$(JDKJRE2COREAPI)
+JAAS_DOCTITLE := Java$(TRADEMARK) Authentication and Authorization Service
+JAAS_WINDOWTITLE := Java Authentication and Authorization Service
+JAAS_HEADER := <strong>Java Authentication and Authorization Service</strong>
+JAAS_BOTTOM := $(call CommonBottom,$(JAAS_FIRST_COPYRIGHT_YEAR))
+# JAAS_PKGS is located in NON_CORE_PKGS.gmk
+JAAS_OVERVIEW := $(JDK_SHARE_CLASSES)/com/sun/security/auth/jaas-overview.html
+
+# The index.html, options, and packages files
+JAAS_INDEX_FILE = $(JAAS_DOCDIR)/index.html
+JAAS_OPTIONS_FILE = $(DOCSTMPDIR)/jaas.options
+JAAS_PACKAGES_FILE = $(DOCSTMPDIR)/jaas.packages
+
+jaasdocs: $(JAAS_INDEX_FILE)
+
+# Set relative location to core api document root
+$(JAAS_INDEX_FILE): GET2DOCSDIR=$(JAAS2COREAPI)/..
+
+# Run javadoc if the index file is out of date or missing
+$(JAAS_INDEX_FILE): $(JAAS_OPTIONS_FILE) $(JAAS_PACKAGES_FILE) coredocs
+ $(prep-javadoc)
+ $(call JavadocSummary,$(JAAS_OPTIONS_FILE),$(JAAS_PACKAGES_FILE))
+ $(JAVADOC_CMD) -d $(@D) \
+ @$(JAAS_OPTIONS_FILE) @$(JAAS_PACKAGES_FILE)
+
+# Create file with javadoc options in it
+$(JAAS_OPTIONS_FILE): $(JAAS_OVERVIEW)
+ $(prep-target)
+ @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+ $(call OptionPair,-encoding,ascii) ; \
+ $(call OptionPair,-overview,$(JAAS_OVERVIEW)) ; \
+ $(call OptionPair,-doctitle,$(JAAS_DOCTITLE)) ; \
+ $(call OptionPair,-windowtitle,$(JAAS_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+ $(call OptionPair,-header,$(JAAS_HEADER)$(DRAFT_HEADER)) ; \
+ $(call OptionPair,-bottom,$(JAAS_BOTTOM)$(DRAFT_BOTTOM)) ; \
+ $(call OptionTrip,-linkoffline,$(JAAS2COREAPI),$(COREAPI_DOCSDIR)/); \
+ ) >> $@
+
+# Create a file with the package names in it
+$(JAAS_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JAAS_PKGS))
+ $(prep-target)
+ $(call PackageFilter,$(JAAS_PKGS))
+
+#############################################################
+#
+# jgssdocs
+#
+
+ALL_OTHER_TARGETS += jgssdocs
+
+JGSS_DOCDIR := $(JRE_API_DOCSDIR)/security/jgss/spec
+JGSS2COREAPI := ../../../$(JDKJRE2COREAPI)
+JGSS_DOCTITLE := Java$(TRADEMARK) GSS-API Utilities
+JGSS_WINDOWTITLE := Java GSS-API Utilities
+JGSS_HEADER := <strong>Java GSS-API Utilities</strong>
+JGSS_BOTTOM := $(call CommonBottom,$(JGSS_FIRST_COPYRIGHT_YEAR))
+JGSS_OVERVIEW := $(JDK_SHARE_CLASSES)/com/sun/security/jgss/jgss-overview.html
+# JGSS_PKGS is located in NON_CORE_PKGS.gmk
+
+# The index.html, options, and packages files
+JGSS_INDEX_FILE = $(JGSS_DOCDIR)/index.html
+JGSS_OPTIONS_FILE = $(DOCSTMPDIR)/jgss.options
+JGSS_PACKAGES_FILE = $(DOCSTMPDIR)/jgss.packages
+
+jgssdocs: $(JGSS_INDEX_FILE)
+
+# Set relative location to core api document root
+$(JGSS_INDEX_FILE): GET2DOCSDIR=$(JGSS2COREAPI)/..
+
+# Run javadoc if the index file is out of date or missing
+$(JGSS_INDEX_FILE): $(JGSS_OPTIONS_FILE) $(JGSS_PACKAGES_FILE) coredocs
+ $(prep-javadoc)
+ $(call JavadocSummary,$(JGSS_OPTIONS_FILE),$(JGSS_PACKAGES_FILE))
+ $(JAVADOC_CMD) -d $(@D) \
+ @$(JGSS_OPTIONS_FILE) @$(JGSS_PACKAGES_FILE)
+
+# Create file with javadoc options in it
+$(JGSS_OPTIONS_FILE): $(JGSS_OVERVIEW)
+ $(prep-target)
+ @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+ $(call OptionPair,-encoding,ascii) ; \
+ $(call OptionOnly,-nodeprecatedlist) ; \
+ $(call OptionPair,-overview,$(JGSS_OVERVIEW)) ; \
+ $(call OptionPair,-doctitle,$(JGSS_DOCTITLE)) ; \
+ $(call OptionPair,-windowtitle,$(JGSS_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+ $(call OptionPair,-header,$(JGSS_HEADER)$(DRAFT_HEADER)) ; \
+ $(call OptionPair,-bottom,$(JGSS_BOTTOM)$(DRAFT_BOTTOM)) ; \
+ $(call OptionTrip,-linkoffline,$(JGSS2COREAPI),$(COREAPI_DOCSDIR)/); \
+ ) >> $@
+
+# Create a file with the package names in it
+$(JGSS_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JGSS_PKGS))
+ $(prep-target)
+ $(call PackageFilter,$(JGSS_PKGS))
+
+#############################################################
+#
+# smartcardiodocs
+#
+
+ALL_OTHER_TARGETS += smartcardiodocs
+
+SMARTCARDIO_DOCDIR := $(JRE_API_DOCSDIR)/security/smartcardio/spec
+SMARTCARDIO2COREAPI := ../../../$(JDKJRE2COREAPI)
+SMARTCARDIO_DOCTITLE := Java$(TRADEMARK) Smart Card I/O
+SMARTCARDIO_WINDOWTITLE := Java Smart Card I/O
+SMARTCARDIO_HEADER := <strong>Java Smart Card I/O</strong>
+SMARTCARDIO_BOTTOM := $(call CommonBottom,$(SMARTCARDIO_FIRST_COPYRIGHT_YEAR))
+# SMARTCARDIO_PKGS is located in NON_CORE_PKGS.gmk
+
+# The index.html, options, and packages files
+SMARTCARDIO_INDEX_FILE = $(SMARTCARDIO_DOCDIR)/index.html
+SMARTCARDIO_OPTIONS_FILE = $(DOCSTMPDIR)/smartcardio.options
+SMARTCARDIO_PACKAGES_FILE = $(DOCSTMPDIR)/smartcardio.packages
+
+smartcardiodocs: $(SMARTCARDIO_INDEX_FILE)
+
+# Set relative location to core api document root
+$(SMARTCARDIO_INDEX_FILE): GET2DOCSDIR=$(SMARTCARDIO2COREAPI)/..
+
+# Run javadoc if the index file is out of date or missing
+$(SMARTCARDIO_INDEX_FILE): $(SMARTCARDIO_OPTIONS_FILE) $(SMARTCARDIO_PACKAGES_FILE) coredocs
+ $(prep-javadoc)
+ $(call JavadocSummary,$(SMARTCARDIO_OPTIONS_FILE),$(SMARTCARDIO_PACKAGES_FILE))
+ $(JAVADOC_CMD) -d $(@D) \
+ @$(SMARTCARDIO_OPTIONS_FILE) @$(SMARTCARDIO_PACKAGES_FILE)
+
+# Create file with javadoc options in it
+$(SMARTCARDIO_OPTIONS_FILE):
+ $(prep-target)
+ @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+ $(call OptionPair,-encoding,ascii) ; \
+ $(call OptionOnly,-nodeprecatedlist) ; \
+ $(call OptionPair,-doctitle,$(SMARTCARDIO_DOCTITLE)) ; \
+ $(call OptionPair,-windowtitle,$(SMARTCARDIO_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+ $(call OptionPair,-header,$(SMARTCARDIO_HEADER)$(DRAFT_HEADER)); \
+ $(call OptionPair,-bottom,$(SMARTCARDIO_BOTTOM)$(DRAFT_BOTTOM)); \
+ $(call OptionTrip,-linkoffline,$(SMARTCARDIO2COREAPI),$(COREAPI_DOCSDIR)/); \
+ ) >> $@
+
+# Create a file with the package names in it
+$(SMARTCARDIO_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(SMARTCARDIO_PKGS))
+ $(prep-target)
+ $(call PackageFilter,$(SMARTCARDIO_PKGS))
+
+#############################################################
+#
+# httpserverdocs
+#
+
+ALL_OTHER_TARGETS += httpserverdocs
+
+HTTPSERVER_DOCDIR := $(JRE_API_DOCSDIR)/net/httpserver/spec
+HTTPSERVER2COREAPI := ../../../$(JDKJRE2COREAPI)
+HTTPSERVER_DOCTITLE := Java$(TRADEMARK) HTTP Server
+HTTPSERVER_WINDOWTITLE := Java HTTP Server
+HTTPSERVER_HEADER := <strong>Java HTTP Server</strong>
+HTTPSERVER_BOTTOM := $(call CommonBottom,$(HTTPSERVER_FIRST_COPYRIGHT_YEAR))
+# HTTPSERVER_PKGS is located in NON_CORE_PKGS.gmk
+
+HTTPSERVER_INDEX_HTML = $(HTTPSERVER_DOCDIR)/index.html
+HTTPSERVER_OPTIONS_FILE = $(DOCSTMPDIR)/httpserver.options
+HTTPSERVER_PACKAGES_FILE = $(DOCSTMPDIR)/httpserver.packages
+
+httpserverdocs: $(HTTPSERVER_INDEX_HTML)
+
+# Set relative location to core api document root
+$(HTTPSERVER_INDEX_HTML): GET2DOCSDIR=$(HTTPSERVER2COREAPI)/..
+
+# Run javadoc if the index file is out of date or missing
+$(HTTPSERVER_INDEX_HTML): $(HTTPSERVER_OPTIONS_FILE) $(HTTPSERVER_PACKAGES_FILE) coredocs
+ $(prep-javadoc)
+ $(call JavadocSummary,$(HTTPSERVER_OPTIONS_FILE),$(HTTPSERVER_PACKAGES_FILE))
+ $(JAVADOC_CMD) -d $(@D) \
+ @$(HTTPSERVER_OPTIONS_FILE) @$(HTTPSERVER_PACKAGES_FILE)
+
+# Create file with javadoc options in it
+$(HTTPSERVER_OPTIONS_FILE):
+ $(prep-target)
+ @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+ $(call OptionPair,-encoding,ascii) ; \
+ $(call OptionOnly,-nodeprecatedlist) ; \
+ $(call OptionPair,-doctitle,$(HTTPSERVER_DOCTITLE)) ; \
+ $(call OptionPair,-windowtitle,$(HTTPSERVER_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+ $(call OptionPair,-header,$(HTTPSERVER_HEADER)$(DRAFT_HEADER)); \
+ $(call OptionPair,-bottom,$(HTTPSERVER_BOTTOM)$(DRAFT_BOTTOM)); \
+ $(call OptionTrip,-linkoffline,$(HTTPSERVER2COREAPI),$(COREAPI_DOCSDIR)/); \
+ ) >> $@
+
+# Create a file with the package names in it
+$(HTTPSERVER_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(HTTPSERVER_PKGS))
+ $(prep-target)
+ $(call PackageFilter,$(HTTPSERVER_PKGS))
+
+#############################################################
+#
+# mgmtdocs
+#
+
+ALL_OTHER_TARGETS += mgmtdocs
+
+MGMT_DOCDIR := $(JRE_API_DOCSDIR)/management/extension
+MGMT2COREAPI := ../../$(JDKJRE2COREAPI)
+JVM_MIB_NAME := JVM-MANAGEMENT-MIB.mib
+JVM_MIB_SRC := $(JDK_TOPDIR)/src/closed/share/classes/sun/management/snmp/$(JVM_MIB_NAME)
+MGMT_DOCTITLE := Monitoring and Management Interface for the Java$(TRADEMARK) Platform
+MGMT_WINDOWTITLE := Monitoring and Management Interface for the Java Platform
+MGMT_HEADER := <strong>Monitoring and Management Interface for the Java Platform</strong>
+MGMT_BOTTOM := $(call CommonBottom,$(MGMT_FIRST_COPYRIGHT_YEAR))
+MGMT_OVERVIEW := $(JDK_SHARE_CLASSES)/com/sun/management/mgmt-overview.html
+# MGMT_PKGS is located in NON_CORE_PKGS.gmk
+
+# The index.html, options, and packages files
+MGMT_INDEX_FILE = $(MGMT_DOCDIR)/index.html
+MGMT_OPTIONS_FILE = $(DOCSTMPDIR)/mgmt.options
+MGMT_PACKAGES_FILE = $(DOCSTMPDIR)/mgmt.packages
+
+mgmtdocs: $(MGMT_INDEX_FILE)
+
+# Set relative location to core api document root
+$(MGMT_INDEX_FILE): GET2DOCSDIR=$(MGMT2COREAPI)/..
+
+# Run javadoc if the index file is out of date or missing
+$(MGMT_INDEX_FILE): $(MGMT_OPTIONS_FILE) $(MGMT_PACKAGES_FILE) coredocs
+ $(prep-javadoc)
+ @if [ -f $(JVM_MIB_SRC) ] ; then \
+ $(ECHO) "$(CP) $(JVM_MIB_SRC) $(@D)/.."; \
+ $(CP) $(JVM_MIB_SRC) $(@D)/.. ; \
+ else \
+ $(ECHO) "WARNING: File $(JVM_MIB_NAME) not available."; \
+ fi
+ $(call JavadocSummary,$(MGMT_OPTIONS_FILE),$(MGMT_PACKAGES_FILE))
+ $(JAVADOC_CMD) -d $(@D) \
+ @$(MGMT_OPTIONS_FILE) @$(MGMT_PACKAGES_FILE)
+
+# Create file with javadoc options in it
+$(MGMT_OPTIONS_FILE): $(MGMT_OVERVIEW)
+ $(prep-target)
+ @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+ $(call OptionPair,-encoding,ascii) ; \
+ $(call OptionOnly,-nodeprecatedlist) ; \
+ $(call OptionPair,-overview,$(MGMT_OVERVIEW)) ; \
+ $(call OptionPair,-doctitle,$(MGMT_DOCTITLE)) ; \
+ $(call OptionPair,-windowtitle,$(MGMT_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+ $(call OptionPair,-header,$(MGMT_HEADER)$(DRAFT_HEADER)) ; \
+ $(call OptionPair,-bottom,$(MGMT_BOTTOM)$(DRAFT_BOTTOM)) ; \
+ $(call OptionTrip,-linkoffline,$(MGMT2COREAPI),$(COREAPI_DOCSDIR)/); \
+ ) >> $@
+
+# Create a file with the package names in it
+$(MGMT_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(MGMT_PKGS))
+ $(prep-target)
+ $(call PackageFilter,$(MGMT_PKGS))
+
+#############################################################
+#
+# attachdocs
+#
+
+ALL_OTHER_TARGETS += attachdocs
+
+ATTACH_DOCDIR := $(JDK_API_DOCSDIR)/attach/spec
+ATTACH2COREAPI := ../../$(JDKJRE2COREAPI)
+ATTACH_DOCTITLE := Attach API
+ATTACH_WINDOWTITLE := Attach API
+ATTACH_HEADER := <strong>Attach API</strong>
+ATTACH_BOTTOM := $(call CommonBottom,$(ATTACH_FIRST_COPYRIGHT_YEAR))
+# ATTACH_PKGS is located in NON_CORE_PKGS.gmk
+
+ATTACH_INDEX_HTML = $(ATTACH_DOCDIR)/index.html
+ATTACH_OPTIONS_FILE = $(DOCSTMPDIR)/attach.options
+ATTACH_PACKAGES_FILE = $(DOCSTMPDIR)/attach.packages
+
+attachdocs: $(ATTACH_INDEX_HTML)
+
+# Set relative location to core api document root
+$(ATTACH_INDEX_HTML): GET2DOCSDIR=$(ATTACH2COREAPI)/..
+
+# Run javadoc if the index file is out of date or missing
+$(ATTACH_INDEX_HTML): $(ATTACH_OPTIONS_FILE) $(ATTACH_PACKAGES_FILE) coredocs
+ $(prep-javadoc)
+ $(call JavadocSummary,$(ATTACH_OPTIONS_FILE),$(ATTACH_PACKAGES_FILE))
+ $(JAVADOC_CMD) -d $(@D) \
+ @$(ATTACH_OPTIONS_FILE) @$(ATTACH_PACKAGES_FILE)
+
+# Create file with javadoc options in it
+$(ATTACH_OPTIONS_FILE):
+ $(prep-target)
+ @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+ $(call OptionPair,-encoding,ascii) ; \
+ $(call OptionOnly,-nodeprecatedlist) ; \
+ $(call OptionPair,-doctitle,$(ATTACH_DOCTITLE)) ; \
+ $(call OptionPair,-windowtitle,$(ATTACH_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+ $(call OptionPair,-header,$(ATTACH_HEADER)$(DRAFT_HEADER)) ; \
+ $(call OptionPair,-bottom,$(ATTACH_BOTTOM)$(DRAFT_BOTTOM)) ; \
+ $(call OptionTrip,-linkoffline,$(ATTACH2COREAPI),$(COREAPI_DOCSDIR)/); \
+ ) >> $@
+
+# Create a file with the package names in it
+$(ATTACH_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(ATTACH_PKGS))
+ $(prep-target)
+ $(call PackageFilter,$(ATTACH_PKGS))
+
+#############################################################
+#
+# jconsoledocs
+#
+
+ALL_OTHER_TARGETS += jconsoledocs
+
+JCONSOLE_DOCDIR := $(JDK_API_DOCSDIR)/jconsole/spec
+JCONSOLE2COREAPI := ../../$(JDKJRE2COREAPI)
+JCONSOLE_DOCTITLE := JConsole API
+JCONSOLE_WINDOWTITLE := JConsole API
+JCONSOLE_HEADER := <strong>JConsole API</strong>
+JCONSOLE_BOTTOM := $(call CommonBottom,$(JCONSOLE_FIRST_COPYRIGHT_YEAR))
+# JCONSOLE_PKGS is located in NON_CORE_PKGS.gmk
+
+JCONSOLE_INDEX_HTML = $(JCONSOLE_DOCDIR)/index.html
+JCONSOLE_OPTIONS_FILE = $(DOCSTMPDIR)/jconsole.options
+JCONSOLE_PACKAGES_FILE = $(DOCSTMPDIR)/jconsole.packages
+
+jconsoledocs: $(JCONSOLE_INDEX_HTML)
+
+# Set relative location to core api document root
+$(JCONSOLE_INDEX_HTML): GET2DOCSDIR=$(JCONSOLE2COREAPI)/..
+
+# Run javadoc if the index file is out of date or missing
+$(JCONSOLE_INDEX_HTML): $(JCONSOLE_OPTIONS_FILE) $(JCONSOLE_PACKAGES_FILE) coredocs
+ $(prep-javadoc)
+ $(call JavadocSummary,$(JCONSOLE_OPTIONS_FILE),$(JCONSOLE_PACKAGES_FILE))
+ $(JAVADOC_CMD) -d $(@D) \
+ @$(JCONSOLE_OPTIONS_FILE) @$(JCONSOLE_PACKAGES_FILE)
+
+# Create file with javadoc options in it
+$(JCONSOLE_OPTIONS_FILE):
+ $(prep-target)
+ @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+ $(call OptionPair,-encoding,ascii) ; \
+ $(call OptionOnly,-nodeprecatedlist) ; \
+ $(call OptionPair,-doctitle,$(JCONSOLE_DOCTITLE)) ; \
+ $(call OptionPair,-windowtitle,$(JCONSOLE_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+ $(call OptionPair,-header,$(JCONSOLE_HEADER)$(DRAFT_HEADER)) ; \
+ $(call OptionPair,-bottom,$(JCONSOLE_BOTTOM)$(DRAFT_BOTTOM)) ; \
+ $(call OptionTrip,-linkoffline,$(JCONSOLE2COREAPI),$(COREAPI_DOCSDIR)/); \
+ ) >> $@
+
+# Create a file with the package names in it
+$(JCONSOLE_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JCONSOLE_PKGS))
+ $(prep-target)
+ $(call PackageFilter,$(JCONSOLE_PKGS))
+
+#############################################################
+#
+# treeapidocs
+#
+
+ALL_OTHER_TARGETS += treeapidocs
+
+TREEAPI_DOCDIR := $(JDK_API_DOCSDIR)/javac/tree
+TREEAPI2COREAPI := ../../$(JDKJRE2COREAPI)
+TREEAPI_DOCTITLE := Compiler Tree API
+TREEAPI_WINDOWTITLE := Compiler Tree API
+TREEAPI_HEADER := <strong>Compiler Tree API</strong>
+TREEAPI_BOTTOM := $(call CommonBottom,$(TREEAPI_FIRST_COPYRIGHT_YEAR))
+TREEAPI_GROUPNAME := Packages
+TREEAPI_REGEXP := com.sun.source.*
+# TREEAPI_PKGS is located in NON_CORE_PKGS.gmk
+
+TREEAPI_INDEX_HTML = $(TREEAPI_DOCDIR)/index.html
+TREEAPI_OPTIONS_FILE = $(DOCSTMPDIR)/treeapi.options
+TREEAPI_PACKAGES_FILE = $(DOCSTMPDIR)/treeapi.packages
+
+treeapidocs: $(TREEAPI_INDEX_HTML)
+
+# Set relative location to core api document root
+$(TREEAPI_INDEX_HTML): GET2DOCSDIR=$(TREEAPI2COREAPI)/..
+
+# Run javadoc if the index file is out of date or missing
+$(TREEAPI_INDEX_HTML): $(TREEAPI_OPTIONS_FILE) $(TREEAPI_PACKAGES_FILE) coredocs
+ $(prep-javadoc)
+ $(call JavadocSummary,$(TREEAPI_OPTIONS_FILE),$(TREEAPI_PACKAGES_FILE))
+ $(JAVADOC_CMD) -d $(@D) \
+ @$(TREEAPI_OPTIONS_FILE) @$(TREEAPI_PACKAGES_FILE)
+
+# Create file with javadoc options in it
+$(TREEAPI_OPTIONS_FILE):
+ $(prep-target)
+ @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+ $(call OptionPair,-encoding,ascii) ; \
+ $(call OptionPair,-doctitle,$(TREEAPI_DOCTITLE)) ; \
+ $(call OptionPair,-windowtitle,$(TREEAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+ $(call OptionPair,-header,$(TREEAPI_HEADER)$(DRAFT_HEADER)) ; \
+ $(call OptionPair,-tag,$(TAG_JLS)) ; \
+ $(call OptionPair,-bottom,$(TREEAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
+ $(call OptionTrip,-group,$(TREEAPI_GROUPNAME),$(TREEAPI_REGEXP)); \
+ $(call OptionTrip,-linkoffline,$(TREEAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
+ ) >> $@
+
+# Create a file with the package names in it
+$(TREEAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(TREEAPI_PKGS))
+ $(prep-target)
+ $(call PackageFilter,$(TREEAPI_PKGS))
+
+#############################################################
+#
+# sctpdocs
+#
+
+ALL_OTHER_TARGETS += sctpdocs
+
+SCTPAPI_DOCDIR := $(JRE_API_DOCSDIR)/nio/sctp/spec
+SCTPAPI2COREAPI := ../../../$(JDKJRE2COREAPI)
+SCTPAPI_DOCTITLE := SCTP API
+SCTPAPI_WINDOWTITLE := SCTP API
+SCTPAPI_HEADER := <strong>SCTP API</strong>
+SCTPAPI_BOTTOM := $(call CommonBottom,$(SCTPAPI_FIRST_COPYRIGHT_YEAR))
+# SCTPAPI_PKGS is located in NON_CORE_PKGS.gmk
+
+SCTPAPI_INDEX_HTML = $(SCTPAPI_DOCDIR)/index.html
+SCTPAPI_OPTIONS_FILE = $(DOCSTMPDIR)/sctp.options
+SCTPAPI_PACKAGES_FILE = $(DOCSTMPDIR)/sctp.packages
+
+sctpdocs: $(SCTPAPI_INDEX_HTML)
+
+# Set relative location to core api document root
+$(SCTPAPI_INDEX_HTML): GET2DOCSDIR=$(SCTPAPI2COREAPI)/..
+
+# Run javadoc if the index file is out of date or missing
+$(SCTPAPI_INDEX_HTML): $(SCTPAPI_OPTIONS_FILE) $(SCTPAPI_PACKAGES_FILE) coredocs
+ $(prep-javadoc)
+ $(call JavadocSummary,$(SCTPAPI_OPTIONS_FILE),$(SCTPAPI_PACKAGES_FILE))
+ $(JAVADOC_CMD) -d $(@D) \
+ @$(SCTPAPI_OPTIONS_FILE) @$(SCTPAPI_PACKAGES_FILE)
+
+# Create file with javadoc options in it
+$(SCTPAPI_OPTIONS_FILE):
+ $(prep-target)
+ @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+ $(call OptionPair,-encoding,ascii) ; \
+ $(call OptionOnly,-nodeprecatedlist) ; \
+ $(call OptionPair,-doctitle,$(SCTPAPI_DOCTITLE)) ; \
+ $(call OptionPair,-windowtitle,$(SCTPAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+ $(call OptionPair,-header,$(SCTPAPI_HEADER)$(DRAFT_HEADER)) ; \
+ $(call OptionPair,-bottom,$(SCTPAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
+ $(call OptionTrip,-linkoffline,$(SCTPAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
+ ) >> $@
+
+# Create a file with the package names in it
+$(SCTPAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(SCTPAPI_PKGS))
+ $(prep-target)
+ $(call PackageFilter,$(SCTPAPI_PKGS))
+
+#############################################################
+#
+# Get a cache of all the directories
+
+$(DIRECTORY_CACHE): $(ALL_EXISTING_SOURCE_DIRS)
+ $(prep-target)
+ @for cp in $(ALL_EXISTING_SOURCE_DIRS) ; do \
+ $(ECHO) "$(FIND) $${cp} -type f >> $@"; \
+ $(FIND) $${cp} -type f >> $@; \
+ done
+
+#############################################################
+#release version of core packages ########
+
+# The rel-coredocs and rel-docs targets were added by Eric Armstrong. rel-coredocs
+# assumes the kind of large, 32-bit machine used in the javapubs group's docs-release
+# process. It specifies memory settings accordingly to maximize performance.
+#
+# The performance settings, like the sanity check, are most important for the core
+# docs--the platform APIs. Running javadoc on those APIs takes a significant amount
+# of time and memory. Setting the initial heap size as large as possible is important
+# to prevent thrashing as the heap grows. Setting the maximum as large as necessary
+# is also important to keep the job from failing.
+#
+# -J-Xmx512 sets a maximum of 512, which became necessary in 6.0
+# -J-Xms256 sets starting size to 256 (default is 8)
+#
+# rel-coredocs also includes a sanity check to help ensure that BUILD_NUMBER and
+# MILESTONE are specified properly when docs are built outside of the normal release
+# engineering process, with the intention of releasing them on the web or in a downloaded
+# docs bundle. (When invoked in release engineering's control build, the values are always
+# set properly. But when the targets are run by themselves, they default to b00 and
+# "internal"--which silently sabotage the result of a build that can take many hours
+# to complete.
+
+# Maximize performance and ensure that build number & milestone are set.
+
+rel-coredocs: sanitycheckcoredocs
+ $(MAKE) coredocs
+
+rel-docs: rel-coredocs $(ALL_OTHER_TARGETS)
+#
+# end of production targets
+
+otherdocs: $(ALL_OTHER_TARGETS)
+
+clean:
+ $(RM) -r $(DOCSDIR) $(DOCSTMPDIR)
+
+#############################################################
+# DEBUG TARGET
+# List the values defined in the makefile hierarchy, to make sure everything
+# is set properly, and to help identify values we can use instead of making new ones.
+# (Most of them come from common/shared/Defs.gmk)
+#
+# Notes:
+# * BUILD_NUMBER defaults to b00 if not set on command line with BUILD_NUMBER=<value>
+# * MILESTONE defaults to internal unless set to beta, rc, or fcs on command line
+#
+
+#############################################################
+.PHONY: all docs coredocs rel-docs otherdocs rel-coredocs \
+ sanitycheckcoredocs $(ALL_OTHER_TARGETS)
diff --git a/make/Jprt.gmk b/make/Jprt.gmk
new file mode 100644
index 0000000..0075adc
--- /dev/null
+++ b/make/Jprt.gmk
@@ -0,0 +1,248 @@
+#
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# This file is included by the root NewerMakefile and contains targets
+# and utilities needed by JPRT.
+
+# Utilities used in this Makefile. Most of this makefile executes without
+# the context of a spec file from configure.
+CAT=cat
+CMP=cmp
+CP=cp
+ECHO=echo
+MKDIR=mkdir
+PRINTF=printf
+PWD=pwd
+# Insure we have a path that looks like it came from pwd
+# (This is mostly for Windows sake and drive letters)
+define UnixPath # path
+$(shell (cd "$1" && $(PWD)))
+endef
+
+BUILD_DIR_ROOT:=$(root_dir)/build
+
+ifdef OPENJDK
+ OPEN_BUILD=true
+else
+ OPEN_BUILD := $(if $(or $(wildcard $(root_dir)/jdk/src/closed), \
+ $(wildcard $(root_dir)/jdk/make/closed), \
+ $(wildcard $(root_dir)/jdk/test/closed), \
+ $(wildcard $(root_dir)/hotspot/src/closed), \
+ $(wildcard $(root_dir)/hotspot/make/closed), \
+ $(wildcard $(root_dir)/hotspot/test/closed)), \
+ false,true)
+endif
+
+HOTSPOT_AVAILABLE := $(if $(wildcard $(root_dir)/hotspot),true,false)
+
+###########################################################################
+# To help in adoption of the new configure&&make build process, a bridge
+# build will use the old settings to run configure and do the build.
+
+# Build with the configure bridge. After running configure, restart make
+# to parse the new spec file.
+BRIDGE_TARGETS := all
+# Add bootcycle-images target if legacy variable is set.
+ifeq ($(SKIP_BOOT_CYCLE),false)
+ BRIDGE_TARGETS += bootcycle-images
+endif
+bridgeBuild: bridge2configure
+ @cd $(root_dir) && $(MAKE) -f Makefile $(BRIDGE_TARGETS)
+
+# Bridge from old Makefile ALT settings to configure options
+bridge2configure: $(BUILD_DIR_ROOT)/.bridge2configureOpts
+ bash ./configure $(strip $(shell $(CAT) $<))
+
+# Create a file with configure options created from old Makefile mechanisms.
+$(BUILD_DIR_ROOT)/.bridge2configureOpts: $(BUILD_DIR_ROOT)/.bridge2configureOptsLatest
+ $(RM) $@
+ $(CP) $< $@
+
+# Use this file to only change when obvious things have changed
+$(BUILD_DIR_ROOT)/.bridge2configureOptsLatest: FRC
+ $(RM) $@.tmp
+ $(MKDIR) -p $(BUILD_DIR_ROOT)
+ @$(ECHO) " --with-debug-level=$(if $(DEBUG_LEVEL),$(DEBUG_LEVEL),release) " >> $@.tmp
+ ifdef ARCH_DATA_MODEL
+ @$(ECHO) " --with-target-bits=$(ARCH_DATA_MODEL) " >> $@.tmp
+ endif
+ ifeq ($(ARCH_DATA_MODEL),32)
+ @$(ECHO) " --with-jvm-variants=client,server " >> $@.tmp
+ endif
+ ifdef ALT_PARALLEL_COMPILE_JOBS
+ @$(ECHO) " --with-num-cores=$(ALT_PARALLEL_COMPILE_JOBS) " >> $@.tmp
+ endif
+ ifdef ALT_BOOTDIR
+ @$(ECHO) " --with-boot-jdk=$(call UnixPath,$(ALT_BOOTDIR)) " >> $@.tmp
+ endif
+ ifdef ALT_CUPS_HEADERS_PATH
+ @$(ECHO) " --with-cups-include=$(call UnixPath,$(ALT_CUPS_HEADERS_PATH)) " >> $@.tmp
+ endif
+ ifdef ALT_FREETYPE_HEADERS_PATH
+ @$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp
+ endif
+ ifdef ENABLE_SJAVAC
+ @$(ECHO) " --enable-sjavac" >> $@.tmp
+ endif
+ ifeq ($(HOTSPOT_AVAILABLE),false)
+ ifdef ALT_JDK_IMPORT_PATH
+ @$(ECHO) " --with-import-hotspot=$(call UnixPath,$(ALT_JDK_IMPORT_PATH)) " >> $@.tmp
+ endif
+ endif
+ ifeq ($(OPEN_BUILD),true)
+ @$(ECHO) " --enable-openjdk-only " >> $@.tmp
+ else
+# Todo: move to closed?
+ ifdef ALT_MOZILLA_HEADERS_PATH
+ @$(ECHO) " --with-mozilla-headers=$(call UnixPath,$(ALT_MOZILLA_HEADERS_PATH)) " >> $@.tmp
+ endif
+ ifdef ALT_JUNIT_DIR
+ @$(ECHO) " --with-junit-dir=$(call UnixPath,$(ALT_JUNIT_DIR)) " >> $@.tmp
+ endif
+ ifdef ANT_HOME
+ @$(ECHO) " --with-ant-home=$(call UnixPath,$(ANT_HOME)) " >> $@.tmp
+ endif
+ ifdef ALT_JAVAFX_ZIP_DIR
+ @$(ECHO) " --with-javafx-zip-dir=$(call UnixPath,$(ALT_JAVAFX_ZIP_DIR)) " >> $@.tmp
+ endif
+ ifdef ALT_JMC_ZIP_DIR
+ @$(ECHO) " --with-jmc-zip-dir=$(call UnixPath,$(ALT_JMC_ZIP_DIR)) " >> $@.tmp
+ endif
+ ifdef ALT_WIXDIR
+ @$(ECHO) " --with-wix=$(call UnixPath,$(ALT_WIXDIR)) " >> $@.tmp
+ endif
+ ifdef ALT_INSTALL_LZMA_PATH
+ @$(ECHO) " --with-lzma-path=$(call UnixPath,$(ALT_INSTALL_LZMA_PATH)) " >> $@.tmp
+ endif
+ ifdef ALT_INSTALL_UPX_PATH
+ @$(ECHO) " --with-upx-path=$(call UnixPath,$(ALT_INSTALL_UPX_PATH)) " >> $@.tmp
+ endif
+ ifdef ALT_INSTALL_UPX_FILENAME
+ @$(ECHO) " --with-upx-filename=$(call UnixPath,$(ALT_INSTALL_UPX_FILENAME)) " >> $@.tmp
+ endif
+ ifdef ALT_CCSS_SIGNING_DIR
+ @$(ECHO) " --with-ccss-signing=$(call UnixPath,$(ALT_CCSS_SIGNING_DIR)) " >> $@.tmp
+ endif
+ ifdef ALT_SLASH_JAVA
+ @$(ECHO) " --with-java-devtools=$(call UnixPath,$(ALT_SLASH_JAVA)/devtools) " >> $@.tmp
+ endif
+ ifdef ALT_SPARKLE_FRAMEWORK_DIR
+ @$(ECHO) " --with-sparkle-framework=$(call UnixPath,$(ALT_SPARKLE_FRAMEWORK_DIR)) " >> $@.tmp
+ endif
+ endif
+ @if [ -f $@ ] ; then \
+ if ! $(CMP) $@ $@.tmp > /dev/null ; then \
+ $(CP) $@.tmp $@ ; \
+ fi ; \
+ else \
+ $(CP) $@.tmp $@ ; \
+ fi
+ $(RM) $@.tmp
+
+PHONY_LIST += bridge2configure bridgeBuild
+
+###########################################################################
+# JPRT targets
+
+ifndef JPRT_ARCHIVE_BUNDLE
+ JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip
+endif
+ifndef JPRT_ARCHIVE_INSTALL_BUNDLE
+ JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip
+endif
+
+# These targets execute in a SPEC free context, before calling bridgeBuild
+# to generate the SPEC.
+jprt_build_product: DEBUG_LEVEL=release
+jprt_build_product: BUILD_DIRNAME=*-release
+jprt_build_product: jprt_build_generic
+
+jprt_build_fastdebug: DEBUG_LEVEL=fastdebug
+jprt_build_fastdebug: BUILD_DIRNAME=*-fastdebug
+jprt_build_fastdebug: jprt_build_generic
+
+jprt_build_debug: DEBUG_LEVEL=slowdebug
+jprt_build_debug: BUILD_DIRNAME=*-debug
+jprt_build_debug: jprt_build_generic
+
+jprt_build_generic: BRIDGE_TARGETS+=jprt_bundle
+jprt_build_generic: bridgeBuild
+
+# This target must be called in the context of a SPEC file
+jprt_bundle: $(JPRT_ARCHIVE_BUNDLE)
+ @$(call CheckIfMakeAtEnd)
+
+# This target must be called in the context of a SPEC file
+$(JPRT_ARCHIVE_BUNDLE): bundles
+ $(MKDIR) -p $(@D)
+ $(RM) $@
+ $(CP) $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip $@
+
+SRC_JDK_IMAGE_DIR := $(JDK_IMAGE_DIR)
+SRC_JRE_IMAGE_DIR := $(JRE_IMAGE_DIR)
+SRC_JDK_BUNDLE_DIR := $(JDK_BUNDLE_DIR)
+SRC_JRE_BUNDLE_DIR := $(JRE_BUNDLE_DIR)
+
+# Bundle up the images
+bundles: all bundles-only
+bundles-only: start-make
+ @$(call TargetEnter)
+ $(MKDIR) -p $(BUILD_OUTPUT)/bundles
+ $(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIP) -y -q -r $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip .
+ $(CD) $(SRC_JRE_IMAGE_DIR) && $(ZIP) -y -q -r $(BUILD_OUTPUT)/bundles/$(JRE_IMAGE_SUBDIR).zip .
+ if [ -d $(BUILD_OUTPUT)/install/bundles ] ; then \
+ $(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -y -q -r $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \
+ fi
+ @$(call TargetExit)
+
+# Copy images to one unified location regardless of platform etc.
+final-images: all final-images-only
+final-images-only: start-make
+ @$(call TargetEnter)
+ $(RM) -r $(BUILD_OUTPUT)/final-images
+ $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)
+ $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)
+ $(CP) -R -P $(SRC_JDK_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)/
+ $(CP) -R -P $(SRC_JRE_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)/
+ ifeq ($(OPENJDK_TARGET_OS),macosx)
+ $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)
+ $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)
+ $(CP) -R -P $(SRC_JDK_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)/
+ $(CP) -R -P $(SRC_JRE_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)/
+ endif
+ @$(call TargetExit)
+
+
+# Keep track of phony targets
+PHONY_LIST += jprt_build_product jprt_build_fastdebug jprt_build_debug \
+ jprt_build_generic bundles jprt_bundle \
+ final-images final-images-only
+
+###########################################################################
+# Phony targets
+.PHONY: $(PHONY_LIST)
+
+# Force target
+FRC:
diff --git a/make/Main.gmk b/make/Main.gmk
new file mode 100644
index 0000000..2988f78
--- /dev/null
+++ b/make/Main.gmk
@@ -0,0 +1,245 @@
+#
+# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+### This is the main part of the Makefile, for the normal case with SPEC specifying a single existing spec.gmk file.
+
+# Now load the spec
+include $(SPEC)
+
+# Load the vital tools for all the makefiles.
+include $(SRC_ROOT)/make/common/MakeBase.gmk
+
+# Include the corresponding custom file, if present.
+-include $(CUSTOM_MAKE_DIR)/Main.gmk
+
+### Clean up from previous run
+
+# Remove any build.log from a previous run, if they exist
+ifneq (,$(BUILD_LOG))
+ ifneq (,$(BUILD_LOG_PREVIOUS))
+ # Rotate old log
+ $(shell $(RM) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
+ $(shell $(MV) $(BUILD_LOG) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
+ else
+ $(shell $(RM) $(BUILD_LOG) 2> /dev/null)
+ endif
+ $(shell $(RM) $(OUTPUT_ROOT)/build-trace-time.log 2> /dev/null)
+endif
+# Remove any javac server logs and port files. This
+# prevents a new make run to reuse the previous servers.
+ifneq (,$(SJAVAC_SERVER_DIR))
+ $(shell $(MKDIR) -p $(SJAVAC_SERVER_DIR) && $(RM) -rf $(SJAVAC_SERVER_DIR)/*)
+endif
+
+# Reset the build timers.
+$(eval $(call ResetAllTimers))
+
+# Setup number of jobs to use. -jN is unfortunately not available for us to parse from the command line,
+# hence this workaround.
+MAKE_ARGS:=$(MAKE_ARGS) -j$(JOBS)
+
+### Main targets
+
+default: jdk
+ @$(call CheckIfMakeAtEnd)
+
+all: images docs
+ @$(call CheckIfMakeAtEnd)
+
+# Setup a rule for SPEC file that fails if executed. This check makes sure the configuration
+# is up to date after changes to configure
+$(SPEC): $(wildcard $(SRC_ROOT)/common/autoconf/*)
+ @$(ECHO) ERROR: $(SPEC) is not up to date
+ @$(ECHO) Please rerun configure!
+ @if test "x$(IGNORE_OLD_CONFIG)" != "xtrue"; then exit 1; fi
+
+start-make: $(SPEC)
+ @$(call AtMakeStart)
+
+langtools: langtools-only
+langtools-only: start-make
+ @$(call TargetEnter)
+ @($(CD) $(LANGTOOLS_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildLangtools.gmk)
+ @$(call TargetExit)
+
+corba: langtools corba-only
+corba-only: start-make
+ @$(call TargetEnter)
+ @($(CD) $(CORBA_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildCorba.gmk)
+ @$(call TargetExit)
+
+jaxp: langtools jaxp-only
+jaxp-only: start-make
+ @$(call TargetEnter)
+ @($(CD) $(JAXP_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJaxp.gmk)
+ @$(call TargetExit)
+
+jaxws: langtools jaxp jaxws-only
+jaxws-only: start-make
+ @$(call TargetEnter)
+ @($(CD) $(JAXWS_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJaxws.gmk)
+ @$(call TargetExit)
+
+ifeq ($(BUILD_HOTSPOT),true)
+ hotspot: hotspot-only
+ hotspot-only: start-make
+ @$(call TargetEnter)
+ @($(CD) $(SRC_ROOT)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk)
+ @$(call TargetExit)
+endif
+
+jdk: langtools hotspot corba jaxp jaxws jdk-only
+jdk-only: start-make
+ @$(call TargetEnter)
+ @($(CD) $(JDK_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk $(JDK_TARGET))
+ @$(call TargetExit)
+
+nashorn: jdk nashorn-only
+nashorn-only: start-make
+ @$(call TargetEnter)
+ @($(CD) $(NASHORN_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildNashorn.gmk)
+ @$(call TargetExit)
+
+demos: jdk demos-only
+demos-only: start-make
+ @$(call TargetEnter)
+ @($(CD) $(JDK_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk demos)
+ @$(call TargetExit)
+
+# Note: This double-colon rule is intentional, to support
+# custom make file integration.
+images:: source-tips demos nashorn images-only
+images-only: start-make
+ @$(call TargetEnter)
+ @($(CD) $(JDK_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk images)
+ @$(call TargetExit)
+
+overlay-images: source-tips demos overlay-images-only
+overlay-images-only: start-make
+ @$(call TargetEnter)
+ @($(CD) $(JDK_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk overlay-images)
+ @$(call TargetExit)
+
+profiles: profiles-oscheck source-tips jdk hotspot profiles-only
+profiles-only: start-make
+ @$(call TargetEnter)
+ @($(CD) $(JDK_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk profiles)
+ @$(call TargetExit)
+
+profiles-oscheck:
+ ifneq ($(OPENJDK_TARGET_OS), linux)
+ @echo "Error: The Java SE 8 Compact Profiles are only implemented for Linux at this time" && exit 1
+ endif
+
+install: images install-only
+install-only: start-make
+ @$(call TargetEnter)
+ @($(CD) $(JDK_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk install)
+ @$(call TargetExit)
+
+docs: jdk docs-only
+docs-only: start-make
+ @$(call TargetEnter)
+ @($(CD) $(SRC_ROOT)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs)
+ @$(call TargetExit)
+
+sign-jars: jdk sign-jars-only
+sign-jars-only: start-make
+ @$(call TargetEnter)
+ @($(CD) $(JDK_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk sign-jars)
+ @$(call TargetExit)
+
+bootcycle-images: images bootcycle-images-only
+bootcycle-images-only: start-make
+ @$(ECHO) Boot cycle build step 2: Building a new JDK image using previously built image
+ @($(CD) $(SRC_ROOT) && $(BUILD_LOG_WRAPPER) $(MAKE) SPEC=$(dir $(SPEC))bootcycle-spec.gmk images)
+
+test: images test-only
+test-only: start-make
+ @$(call TargetEnter)
+ @($(CD) $(SRC_ROOT)/test && $(BUILD_LOG_WRAPPER) $(MAKE) -j1 -k MAKEFLAGS= JT_HOME=$(JT_HOME) PRODUCT_HOME=$(JDK_IMAGE_DIR) ALT_OUTPUTDIR=$(OUTPUT_ROOT) CONCURRENCY=$(JOBS) $(TEST)) || true
+ @$(call TargetExit)
+
+# Stores the tips for each repository. This file is be used when constructing the jdk image and can be
+# used to track the exact sources used to build that image.
+source-tips: $(OUTPUT_ROOT)/source_tips
+$(OUTPUT_ROOT)/source_tips: FRC
+ @$(MKDIR) -p $(@D)
+ @$(RM) $@
+ @$(call GetSourceTips)
+
+
+# Remove everything, except the output from configure.
+clean: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-nashorn clean-images clean-overlay-images clean-bootcycle-build clean-docs clean-test
+ @($(CD) $(OUTPUT_ROOT) && $(RM) -r tmp source_tips build.log* build-trace*.log*)
+ @$(ECHO) Cleaned all build artifacts.
+
+# Remove everything, including configure configuration.
+# If the output directory was created by configure and now becomes empty, remove it as well.
+# FIXME: tmp should not be here, fix ResetTimers instead. And remove spec.sh!
+dist-clean: clean
+ @($(CD) $(OUTPUT_ROOT) && $(RM) -r *spec.gmk config.* configure-arguments Makefile compare.sh spec.sh tmp javacservers)
+ @$(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \
+ if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \
+ $(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ; \
+ else \
+ ($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" && $(RM) -r $(OUTPUT_ROOT)) \
+ fi \
+ )
+ @$(ECHO) Cleaned everything, you will have to re-run configure.
+
+clean-langtools:
+ $(call CleanComponent,langtools)
+clean-corba:
+ $(call CleanComponent,corba)
+clean-jaxp:
+ $(call CleanComponent,jaxp)
+clean-jaxws:
+ $(call CleanComponent,jaxws)
+clean-hotspot:
+ $(call CleanComponent,hotspot)
+clean-jdk:
+ $(call CleanComponent,jdk)
+clean-nashorn:
+ $(call CleanComponent,nashorn)
+clean-images:
+ $(call CleanComponent,images)
+clean-overlay-images:
+ $(call CleanComponent,overlay-images)
+clean-bootcycle-build:
+ $(call CleanComponent,bootcycle-build)
+clean-docs:
+ $(call CleanComponent,docs)
+ $(call CleanComponent,docstemp)
+clean-test:
+ $(call CleanComponent,testoutput)
+
+.PHONY: langtools corba jaxp jaxws hotspot jdk nashorn images overlay-images install test docs
+.PHONY: langtools-only corba-only jaxp-only jaxws-only hotspot-only jdk-only nashorn-only images-only overlay-images-only install-only test-only docs-only
+.PHONY: default all clean dist-clean bootcycle-images start-make
+.PHONY: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-nashorn clean-images clean-docs clean-test clean-overlay-images clean-bootcycle-build
+.PHONY: profiles profiles-only profiles-oscheck
+
+FRC: # Force target
diff --git a/make/MakeHelpers.gmk b/make/MakeHelpers.gmk
new file mode 100644
index 0000000..63223ee
--- /dev/null
+++ b/make/MakeHelpers.gmk
@@ -0,0 +1,306 @@
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+################################################################
+#
+# This file contains helper functions for the top-level Makefile that does
+# not depend on the spec.gmk file having been read. (The purpose of this
+# file is ju to avoid cluttering the top-level Makefile.)
+#
+################################################################
+
+ifndef _MAKEHELPERS_GMK
+_MAKEHELPERS_GMK := 1
+
+##############################
+# Stuff to run at include time
+##############################
+
+# Find out which variables were passed explicitely on the make command line. These
+# will be passed on to sub-makes, overriding spec.gmk settings.
+MAKE_ARGS=$(foreach var,$(subst =command,,$(filter %=command,$(foreach var,$(.VARIABLES),$(var)=$(firstword $(origin $(var)))))),$(var)=$($(var)))
+
+list_alt_overrides_with_origins=$(filter ALT_%=environment ALT_%=command,$(foreach var,$(.VARIABLES),$(var)=$(firstword $(origin $(var)))))
+list_alt_overrides=$(subst =command,,$(subst =environment,,$(list_alt_overrides_with_origins)))
+
+# Store the build times in this directory.
+BUILDTIMESDIR=$(OUTPUT_ROOT)/tmp/buildtimes
+
+# Global targets are possible to run either with or without a SPEC. The prototypical
+# global target is "help".
+global_targets=help jprt% bridgeBuild
+
+##############################
+# Functions
+##############################
+
+define CheckEnvironment
+ # Find all environment or command line variables that begin with ALT.
+ $(if $(list_alt_overrides),
+ @$(PRINTF) "\nWARNING: You have the following ALT_ variables set:\n"
+ @$(PRINTF) "$(foreach var,$(list_alt_overrides),$(var)=$$$(var))\n"
+ @$(PRINTF) "ALT_ variables are deprecated and will be ignored. Please clean your environment.\n\n"
+ )
+endef
+
+### Functions for timers
+
+# Record starting time for build of a sub repository.
+define RecordStartTime
+ $(MKDIR) -p $(BUILDTIMESDIR)
+ $(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_start_$1
+ $(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_start_$1_human_readable
+endef
+
+# Record ending time and calculate the difference and store it in a
+# easy to read format. Handles builds that cross midnight. Expects
+# that a build will never take 24 hours or more.
+define RecordEndTime
+ $(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_end_$1
+ $(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_end_$1_human_readable
+ $(ECHO) `$(CAT) $(BUILDTIMESDIR)/build_time_start_$1` `$(CAT) $(BUILDTIMESDIR)/build_time_end_$1` $1 | \
+ $(NAWK) '{ F=$$7; T=$$14; if (F > T) { T+=3600*24 }; D=T-F; H=int(D/3600); \
+ M=int((D-H*3600)/60); S=D-H*3600-M*60; printf("%02d:%02d:%02d %s\n",H,M,S,$$15); }' \
+ > $(BUILDTIMESDIR)/build_time_diff_$1
+endef
+
+# Find all build_time_* files and print their contents in a list sorted
+# on the name of the sub repository.
+define ReportBuildTimes
+ $(BUILD_LOG_WRAPPER) $(PRINTF) -- "----- Build times -------\nStart %s\nEnd %s\n%s\n%s\n-------------------------\n" \
+ "`$(CAT) $(BUILDTIMESDIR)/build_time_start_TOTAL_human_readable`" \
+ "`$(CAT) $(BUILDTIMESDIR)/build_time_end_TOTAL_human_readable`" \
+ "`$(LS) $(BUILDTIMESDIR)/build_time_diff_* | $(GREP) -v _TOTAL | $(XARGS) $(CAT) | $(SORT) -k 2`" \
+ "`$(CAT) $(BUILDTIMESDIR)/build_time_diff_TOTAL`"
+endef
+
+define ResetAllTimers
+ $$(shell $(MKDIR) -p $(BUILDTIMESDIR) && $(RM) $(BUILDTIMESDIR)/build_time_*)
+endef
+
+define StartGlobalTimer
+ $(call RecordStartTime,TOTAL)
+endef
+
+define StopGlobalTimer
+ $(call RecordEndTime,TOTAL)
+endef
+
+### Functions for managing makefile structure (start/end of makefile and individual targets)
+
+# Do not indent this function, this will add whitespace at the start which the caller won't handle
+define GetRealTarget
+$(strip $(if $(MAKECMDGOALS),$(MAKECMDGOALS),default))
+endef
+
+# Do not indent this function, this will add whitespace at the start which the caller won't handle
+define LastGoal
+$(strip $(lastword $(call GetRealTarget)))
+endef
+
+# Check if the current target is the final target, as specified by
+# the user on the command line. If so, call AtRootMakeEnd.
+define CheckIfMakeAtEnd
+ # Check if the current target is the last goal
+ $(if $(filter $@,$(call LastGoal)),$(call AtMakeEnd))
+ # If the target is 'foo-only', check if our goal was stated as 'foo'
+ $(if $(filter $@,$(call LastGoal)-only),$(call AtMakeEnd))
+endef
+
+# Hook to be called when starting to execute a top-level target
+define TargetEnter
+ $(BUILD_LOG_WRAPPER) $(PRINTF) "## Starting $(patsubst %-only,%,$@)\n"
+ $(call RecordStartTime,$(patsubst %-only,%,$@))
+endef
+
+# Hook to be called when finish executing a top-level target
+define TargetExit
+ $(call RecordEndTime,$(patsubst %-only,%,$@))
+ $(BUILD_LOG_WRAPPER) $(PRINTF) "## Finished $(patsubst %-only,%,$@) (build time %s)\n\n" \
+ "`$(CAT) $(BUILDTIMESDIR)/build_time_diff_$(patsubst %-only,%,$@) | $(CUT) -f 1 -d ' '`"
+ $(call CheckIfMakeAtEnd)
+endef
+
+# Hook to be called as the very first thing when running a normal build
+define AtMakeStart
+ $(if $(findstring --jobserver,$(MAKEFLAGS)),$(error make -j is not supported, use make JOBS=n))
+ $(call CheckEnvironment)
+ @$(PRINTF) $(LOG_INFO) "Running make as '$(MAKE) $(MFLAGS) $(MAKE_ARGS)'\n"
+ @$(PRINTF) "Building $(PRODUCT_NAME) for target '$(call GetRealTarget)' in configuration '$(CONF_NAME)'\n\n"
+ $(call StartGlobalTimer)
+endef
+
+# Hook to be called as the very last thing for targets that are "top level" targets
+define AtMakeEnd
+ [ -f $(SJAVAC_SERVER_DIR)/server.port ] && echo Stopping sjavac server && $(TOUCH) $(SJAVAC_SERVER_DIR)/server.port.stop; true
+ $(call StopGlobalTimer)
+ $(call ReportBuildTimes)
+ @$(PRINTF) "Finished building $(PRODUCT_NAME) for target '$(call GetRealTarget)'\n"
+ $(call CheckEnvironment)
+endef
+
+### Functions for parsing and setting up make options from command-line
+
+define FatalError
+ # If the user specificed a "global" target (e.g. 'help'), do not exit but continue running
+ $$(if $$(filter-out $(global_targets),$$(call GetRealTarget)),$$(error Cannot continue))
+endef
+
+define ParseLogLevel
+ ifeq ($$(origin VERBOSE),undefined)
+ # Setup logging according to LOG (but only if VERBOSE is not given)
+
+ # If the "nofile" argument is given, act on it and strip it away
+ ifneq ($$(findstring nofile,$$(LOG)),)
+ # Reset the build log wrapper, regardless of other values
+ override BUILD_LOG_WRAPPER=
+ # COMMA is defined in spec.gmk, but that is not included yet
+ COMMA=,
+ # First try to remove ",nofile" if it exists
+ LOG_STRIPPED1=$$(subst $$(COMMA)nofile,,$$(LOG))
+ # Otherwise just remove "nofile"
+ LOG_STRIPPED2=$$(subst nofile,,$$(LOG_STRIPPED1))
+ # We might have ended up with a leading comma. Remove it
+ LOG_STRIPPED3=$$(strip $$(patsubst $$(COMMA)%,%,$$(LOG_STRIPPED2)))
+ LOG_LEVEL:=$$(LOG_STRIPPED3)
+ else
+ LOG_LEVEL:=$$(LOG)
+ endif
+
+ ifeq ($$(LOG_LEVEL),)
+ # Set LOG to "warn" as default if not set (and no VERBOSE given)
+ override LOG_LEVEL=warn
+ endif
+ ifeq ($$(LOG_LEVEL),warn)
+ VERBOSE=-s
+ else ifeq ($$(LOG_LEVEL),info)
+ VERBOSE=-s
+ else ifeq ($$(LOG_LEVEL),debug)
+ VERBOSE=
+ else ifeq ($$(LOG_LEVEL),trace)
+ VERBOSE=
+ else
+ $$(info Error: LOG must be one of: warn, info, debug or trace.)
+ $$(eval $$(call FatalError))
+ endif
+ else
+ # Provide resonable interpretations of LOG_LEVEL if VERBOSE is given.
+ ifeq ($(VERBOSE),)
+ LOG_LEVEL:=debug
+ else
+ LOG_LEVEL:=warn
+ endif
+ ifneq ($$(LOG),)
+ # We have both a VERBOSE and a LOG argument. This is OK only if this is a repeated call by ourselves,
+ # but complain if this is the top-level make call.
+ ifeq ($$(MAKELEVEL),0)
+ $$(info Cannot use LOG=$$(LOG) and VERBOSE=$$(VERBOSE) at the same time. Choose one.)
+ $$(eval $$(call FatalError))
+ endif
+ endif
+ endif
+endef
+
+define ParseConfAndSpec
+ ifneq ($$(filter-out $(global_targets),$$(call GetRealTarget)),)
+ # If we only have global targets, no need to bother with SPEC or CONF
+ ifneq ($$(origin SPEC),undefined)
+ # We have been given a SPEC, check that it works out properly
+ ifeq ($$(wildcard $$(SPEC)),)
+ $$(info Cannot locate spec.gmk, given by SPEC=$$(SPEC))
+ $$(eval $$(call FatalError))
+ endif
+ ifneq ($$(origin CONF),undefined)
+ # We also have a CONF argument. This is OK only if this is a repeated call by ourselves,
+ # but complain if this is the top-level make call.
+ ifeq ($$(MAKELEVEL),0)
+ $$(info Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
+ $$(eval $$(call FatalError))
+ endif
+ endif
+ # ... OK, we're satisfied, we'll use this SPEC later on
+ else
+ # Find all spec.gmk files in the build output directory
+ output_dir=$$(root_dir)/build
+ all_spec_files=$$(wildcard $$(output_dir)/*/spec.gmk)
+ ifeq ($$(all_spec_files),)
+ $$(info No configurations found for $$(root_dir)! Please run configure to create a configuration.)
+ $$(eval $$(call FatalError))
+ endif
+ # Extract the configuration names from the path
+ all_confs=$$(patsubst %/spec.gmk,%,$$(patsubst $$(output_dir)/%,%,$$(all_spec_files)))
+
+ ifneq ($$(origin CONF),undefined)
+ # User have given a CONF= argument.
+ ifeq ($$(CONF),)
+ # If given CONF=, match all configurations
+ matching_confs=$$(strip $$(all_confs))
+ else
+ # Otherwise select those that contain the given CONF string
+ matching_confs=$$(strip $$(foreach var,$$(all_confs),$$(if $$(findstring $$(CONF),$$(var)),$$(var))))
+ endif
+ ifeq ($$(matching_confs),)
+ $$(info No configurations found matching CONF=$$(CONF))
+ $$(info Available configurations:)
+ $$(foreach var,$$(all_confs),$$(info * $$(var)))
+ $$(eval $$(call FatalError))
+ else
+ ifeq ($$(words $$(matching_confs)),1)
+ $$(info Building '$$(matching_confs)' (matching CONF=$$(CONF)))
+ else
+ $$(info Building target '$(call GetRealTarget)' in the following configurations (matching CONF=$$(CONF)):)
+ $$(foreach var,$$(matching_confs),$$(info * $$(var)))
+ endif
+ endif
+
+ # Create a SPEC definition. This will contain the path to one or more spec.gmk files.
+ SPEC=$$(addsuffix /spec.gmk,$$(addprefix $$(output_dir)/,$$(matching_confs)))
+ else
+ # No CONF or SPEC given, check the available configurations
+ ifneq ($$(words $$(all_spec_files)),1)
+ $$(info No CONF given, but more than one configuration found in $$(output_dir).)
+ $$(info Available configurations:)
+ $$(foreach var,$$(all_confs),$$(info * $$(var)))
+ $$(info Please retry building with CONF=<config pattern> (or SPEC=<specfile>))
+ $$(eval $$(call FatalError))
+ endif
+
+ # We found exactly one configuration, use it
+ SPEC=$$(strip $$(all_spec_files))
+ endif
+ endif
+ endif
+endef
+
+### Convenience functions from Main.gmk
+
+# Cleans the component given as $1
+define CleanComponent
+ @$(PRINTF) "Cleaning $1 build artifacts ..."
+ @($(CD) $(OUTPUT_ROOT) && $(RM) -r $1)
+ @$(PRINTF) " done\n"
+endef
+
+endif # _MAKEHELPERS_GMK
diff --git a/make/README.pre-components b/make/README.pre-components
deleted file mode 100644
index cb79e68..0000000
--- a/make/README.pre-components
+++ /dev/null
@@ -1,41 +0,0 @@
-README-pre-components:
----------------------
-Current pre-components are langtools, jaxws, jaxp, and corba.
-
-Pre-components can use ant to build but must have a make/Makefile for
-building (a GNU make Makefile).
-All ant knowledge is being isolated in the workspaces that use it.
-
-Also for various reasons it is nice to have a Makefile wrapper over the
-running of ant, but in general having to do
-anything with shell commands is much easier to do in a Makefile
-than in an ant script.
-
-The make/makefile rules are:
-
- Variables:
- ALT_BOOTDIR The jdk home to use to build, if provided
- ALT_LANGTOOLS_DIST The dist area from a langtools build to use, if provided
- ALT_OUTPUTDIR Parent dir of build and dist directories, if provided
- VARIANT If DBG, debug build, if OPT, optimized build
- TARGET_CLASS_VERSION The classfile version number (currently 7)
- ANT_HOME Home of ant to use, if provided
- QUIET If defined, be quiet
- VERBOSE If defined, be verbose
- JDK_VERSION Version being built
- FULL_VERSION Full version string for this jdk build
- MILESTONE fcs, beta, internal or empty
- BUILD_NUMBER Number of the jdk build
- JPRT_ARCHIVE_BUNDLE Path to zip bundle to create for JPRT
-
- Targets:
- all Build everything, including dist
- build Build build area
- clean Clean up
- clobber Same as clean (don't ask)
- sanity Perform any sanity checks, exit non-zero if errors
- jprt_build_product JPRT product build, zip results into JPRT_ARCHIVE_BUNDLE
- jprt_build_debug JPRT debug build, zip results into JPRT_ARCHIVE_BUNDLE
- jprt_build_fastdebug JPRT fastdebug build, zip results into JPRT_ARCHIVE_BUNDLE
-
-Then of course we expect a dist/lib/classes.jar, dist/lib/src.zip and dist/lib/bin.zip.
diff --git a/make/common/CORE_PKGS.gmk b/make/common/CORE_PKGS.gmk
new file mode 100644
index 0000000..9c85da6
--- /dev/null
+++ b/make/common/CORE_PKGS.gmk
@@ -0,0 +1,300 @@
+#
+# Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# EXCLUDE_PKGS is the list of packages to exclude from the
+# Java API Specification. Do not add these to CORE_PKGS.
+# The concatenation of EXCLUDE_PKGS and CORE_PKGS
+# should make up the list of all packages under the
+# src/shared/classes directory of the JDK source tree.
+#
+EXCLUDE_PKGS = \
+ java.awt.peer \
+ java.awt.dnd.peer \
+ sun.* \
+ com.sun.* \
+ org.apache.* \
+ org.jcp.* \
+ org.w3c.dom.css \
+ org.w3c.dom.html \
+ org.w3c.dom.stylesheets \
+ org.w3c.dom.traversal \
+ org.w3c.dom.ranges \
+ org.omg.stub.javax.management.remote.rmi
+
+#
+# ACTIVE_JSR_PKGS are packages that are part of an active JSR process--
+# one that is doing its own review. These packages are not included when
+# creating diff pages for the platform's JCP process.
+#
+# (see /java/pubs/apisrc/jdk/6.0/beta/make/docs/active_jsr_pkgs)
+# Note:
+# This is a list of regular expressions. So foo.* matches "foo" and "foo.bar".
+#
+ACTIVE_JSR_PKGS= \
+ java.lang.invoke \
+ java.sql \
+ javax.activation \
+ javax.annotation.* \
+ javax.jws.* \
+ javax.lang.* \
+ javax.management.* \
+ javax.script \
+ javax.sql.* \
+ javax.tools.* \
+ javax.xml.* \
+ org.w3c.* \
+ org.xml.sax
+
+#
+# CORE_PKGS is the list of packages that form the
+# Java API Specification.
+#
+### ***IMPORTANT NOTE***
+### There is also a "REGEXP" variable in the docs/makefile that
+### determines which table the packages go in on the main page.
+### Currently, there is only table ("Platform Packages") and
+### everything goes in it, so REGEXP is "*". But if that policy
+### changes, packages added will need to be reflected in that
+### list of wildcard expressions, as well.
+###
+CORE_PKGS = \
+ java.applet \
+ java.awt \
+ java.awt.color \
+ java.awt.datatransfer \
+ java.awt.dnd \
+ java.awt.event \
+ java.awt.font \
+ java.awt.geom \
+ java.awt.im \
+ java.awt.im.spi \
+ java.awt.image \
+ java.awt.image.renderable \
+ java.awt.print \
+ java.beans \
+ java.beans.beancontext \
+ java.io \
+ java.lang \
+ java.lang.annotation \
+ java.lang.instrument \
+ java.lang.invoke \
+ java.lang.management \
+ java.lang.ref \
+ java.lang.reflect \
+ java.math \
+ java.net \
+ java.nio \
+ java.nio.channels \
+ java.nio.channels.spi \
+ java.nio.charset \
+ java.nio.charset.spi \
+ java.nio.file \
+ java.nio.file.attribute \
+ java.nio.file.spi \
+ java.rmi \
+ java.rmi.activation \
+ java.rmi.dgc \
+ java.rmi.registry \
+ java.rmi.server \
+ java.security \
+ java.security.acl \
+ java.security.cert \
+ java.security.interfaces \
+ java.security.spec \
+ java.sql \
+ java.text \
+ java.text.spi \
+ java.time \
+ java.time.chrono \
+ java.time.format \
+ java.time.temporal \
+ java.time.zone \
+ java.util \
+ java.util.concurrent \
+ java.util.concurrent.atomic \
+ java.util.concurrent.locks \
+ java.util.function \
+ java.util.jar \
+ java.util.logging \
+ java.util.prefs \
+ java.util.regex \
+ java.util.spi \
+ java.util.stream \
+ java.util.zip \
+ javax.accessibility \
+ javax.activation \
+ javax.activity \
+ javax.annotation \
+ javax.annotation.processing \
+ javax.crypto \
+ javax.crypto.interfaces \
+ javax.crypto.spec \
+ javax.imageio \
+ javax.imageio.event \
+ javax.imageio.metadata \
+ javax.imageio.plugins.jpeg \
+ javax.imageio.plugins.bmp \
+ javax.imageio.spi \
+ javax.imageio.stream \
+ javax.jws \
+ javax.jws.soap \
+ javax.lang.model \
+ javax.lang.model.element \
+ javax.lang.model.type \
+ javax.lang.model.util \
+ javax.management \
+ javax.management.loading \
+ javax.management.monitor \
+ javax.management.relation \
+ javax.management.openmbean \
+ javax.management.timer \
+ javax.management.modelmbean \
+ javax.management.remote \
+ javax.management.remote.rmi \
+ javax.naming \
+ javax.naming.directory \
+ javax.naming.event \
+ javax.naming.ldap \
+ javax.naming.spi \
+ javax.net \
+ javax.net.ssl \
+ javax.print \
+ javax.print.attribute \
+ javax.print.attribute.standard \
+ javax.print.event \
+ javax.rmi \
+ javax.rmi.CORBA \
+ javax.rmi.ssl \
+ javax.script \
+ javax.security.auth \
+ javax.security.auth.callback \
+ javax.security.auth.kerberos \
+ javax.security.auth.login \
+ javax.security.auth.spi \
+ javax.security.auth.x500 \
+ javax.security.cert \
+ javax.security.sasl \
+ javax.sound.sampled \
+ javax.sound.sampled.spi \
+ javax.sound.midi \
+ javax.sound.midi.spi \
+ javax.sql \
+ javax.sql.rowset \
+ javax.sql.rowset.serial \
+ javax.sql.rowset.spi \
+ javax.swing \
+ javax.swing.border \
+ javax.swing.colorchooser \
+ javax.swing.filechooser \
+ javax.swing.event \
+ javax.swing.table \
+ javax.swing.text \
+ javax.swing.text.html \
+ javax.swing.text.html.parser \
+ javax.swing.text.rtf \
+ javax.swing.tree \
+ javax.swing.undo \
+ javax.swing.plaf \
+ javax.swing.plaf.basic \
+ javax.swing.plaf.metal \
+ javax.swing.plaf.multi \
+ javax.swing.plaf.nimbus \
+ javax.swing.plaf.synth \
+ javax.tools \
+ javax.tools.annotation \
+ javax.transaction \
+ javax.transaction.xa \
+ javax.xml.parsers \
+ javax.xml.bind \
+ javax.xml.bind.annotation \
+ javax.xml.bind.annotation.adapters \
+ javax.xml.bind.attachment \
+ javax.xml.bind.helpers \
+ javax.xml.bind.util \
+ javax.xml.soap \
+ javax.xml.ws \
+ javax.xml.ws.handler \
+ javax.xml.ws.handler.soap \
+ javax.xml.ws.http \
+ javax.xml.ws.soap \
+ javax.xml.ws.spi \
+ javax.xml.ws.spi.http \
+ javax.xml.ws.wsaddressing \
+ javax.xml.transform \
+ javax.xml.transform.sax \
+ javax.xml.transform.dom \
+ javax.xml.transform.stax \
+ javax.xml.transform.stream \
+ javax.xml \
+ javax.xml.crypto \
+ javax.xml.crypto.dom \
+ javax.xml.crypto.dsig \
+ javax.xml.crypto.dsig.dom \
+ javax.xml.crypto.dsig.keyinfo \
+ javax.xml.crypto.dsig.spec \
+ javax.xml.datatype \
+ javax.xml.validation \
+ javax.xml.namespace \
+ javax.xml.xpath \
+ javax.xml.stream \
+ javax.xml.stream.events \
+ javax.xml.stream.util \
+ org.ietf.jgss \
+ org.omg.CORBA \
+ org.omg.CORBA.DynAnyPackage \
+ org.omg.CORBA.ORBPackage \
+ org.omg.CORBA.TypeCodePackage \
+ org.omg.stub.java.rmi \
+ org.omg.CORBA.portable \
+ org.omg.CORBA_2_3 \
+ org.omg.CORBA_2_3.portable \
+ org.omg.CosNaming \
+ org.omg.CosNaming.NamingContextExtPackage \
+ org.omg.CosNaming.NamingContextPackage \
+ org.omg.SendingContext \
+ org.omg.PortableServer \
+ org.omg.PortableServer.CurrentPackage \
+ org.omg.PortableServer.POAPackage \
+ org.omg.PortableServer.POAManagerPackage \
+ org.omg.PortableServer.ServantLocatorPackage \
+ org.omg.PortableServer.portable \
+ org.omg.PortableInterceptor \
+ org.omg.PortableInterceptor.ORBInitInfoPackage \
+ org.omg.Messaging \
+ org.omg.IOP \
+ org.omg.IOP.CodecFactoryPackage \
+ org.omg.IOP.CodecPackage \
+ org.omg.Dynamic \
+ org.omg.DynamicAny \
+ org.omg.DynamicAny.DynAnyPackage \
+ org.omg.DynamicAny.DynAnyFactoryPackage \
+ org.w3c.dom \
+ org.w3c.dom.events \
+ org.w3c.dom.bootstrap \
+ org.w3c.dom.ls \
+ org.w3c.dom.views \
+ org.xml.sax \
+ org.xml.sax.ext \
+ org.xml.sax.helpers
diff --git a/make/common/IdlCompilation.gmk b/make/common/IdlCompilation.gmk
new file mode 100644
index 0000000..d816f23
--- /dev/null
+++ b/make/common/IdlCompilation.gmk
@@ -0,0 +1,106 @@
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+PREFIXES=-pkgPrefix CORBA org.omg \
+ -pkgPrefix CosNaming org.omg \
+ -pkgPrefix CosTransactions org.omg \
+ -pkgPrefix CosTSInteroperation org.omg \
+ -pkgPrefix DynamicAny org.omg \
+ -pkgPrefix Dynamic org.omg \
+ -pkgPrefix IOP org.omg \
+ -pkgPrefix Messaging org.omg \
+ -pkgPrefix PortableInterceptor org.omg \
+ -pkgPrefix PortableServer org.omg \
+ -pkgPrefix activation com.sun.corba.se.spi \
+ -pkgPrefix GIOP com.sun.corba.se \
+ -pkgPrefix PortableActivationIDL com.sun.corba.se \
+ -pkgPrefix messages com.sun.corba.se
+
+define add_idl_package
+ # param 1 = MYPACKAGE
+ # param 2 = src root
+ # param 3 = gensrc root
+ # param 4 = source idl to compile
+ # param 5 = target idl package
+ # param 6 = delete these files that were output from the idlj
+ # param 7 = idls that match these patterns should be compiled with -oldImplBase
+ # param 8 = the idlj command
+ # Save the generated java files to a temporary directory so
+ # that we can find them and create proper dependencies.
+ # After that, we move them to the real gensrc target dir.
+ $4_TMPDIR:=tmp___$(subst /,_,$(patsubst $2/%,%,$4))___
+ ifneq ($$(filter $7,$4),)
+ $4_OLDIMPLBASE:=-oldImplBase
+ $4_OLDIMPLBASE_MSG:=with -oldImplBase
+ endif
+ $5 : $4
+ $(MKDIR) -p $3/$$($4_TMPDIR)
+ $(RM) -rf $3/$$($4_TMPDIR)
+ $(MKDIR) -p $(dir $5)
+ $(ECHO) $(LOG_INFO) Compiling IDL $(patsubst $2/%,%,$4)
+ $8 -td $3/$$($4_TMPDIR) \
+ -i $2/org/omg/CORBA \
+ -i $2/org/omg/PortableInterceptor \
+ -i $2/org/omg/PortableServer \
+ -D CORBA3 -corba 3.0 \
+ -fall \
+ $$($4_OLDIMPLBASE) \
+ $(PREFIXES) \
+ $4
+ $(RM) -f $$(addprefix $3/$$($4_TMPDIR)/,$6)
+ $(CP) -r $3/$$($4_TMPDIR)/* $3
+ ($(CD) $3/$$($4_TMPDIR) && $(FIND) . -type f | $(SED) 's!\./!$3/!g' | $(NAWK) '{ print $$$$1 ": $4" }' > $5)
+ $(RM) -rf $3/$$($4_TMPDIR)
+endef
+
+define SetupIdlCompilation
+ # param 1 is for example BUILD_IDLS
+ # param 2,3,4,5,6,7,8 are named args.
+ # IDLJ,SRC,BIN,INCLUDES,EXCLUDES,OLDIMPLBASES,DELETES
+ $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
+ $(call LogSetupMacroEntry,SetupIdlCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
+ $(if $(16),$(error Internal makefile error: Too many arguments to SetupIdlCompilation, please update IdlCompilation.gmk))
+
+ # Find all existing java files and existing class files.
+ $$(eval $$(call MakeDir,$$($1_BIN)))
+ $1_SRCS := $$(shell find $$($1_SRC) -name "*.idl")
+ $1_BINS := $$(shell find $$($1_BIN) -name "*.java")
+ # Prepend the source/bin path to the filter expressions.
+ $1_SRC_INCLUDES := $$(addprefix $$($1_SRC)/,$$($1_INCLUDES))
+ $1_SRC_EXCLUDES := $$(addprefix $$($1_SRC)/,$$($1_EXCLUDES))
+ $1_BIN_INCLUDES := $$(addprefix $$($1_BIN)/,$$($1_INCLUDES))
+ $1_BIN_EXCLUDES := $$(addprefix $$($1_BIN)/,$$($1_EXCLUDES))
+ $1_OLDIMPLBASES := $$(addprefix $$($1_SRC)/,$$($1_OLDIMPLBASES))
+ # Now remove unwanted java/class files.
+ $1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
+ $1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
+ $1_BINS := $$(filter $$($1_BIN_INCLUDES),$$($1_BINS))
+ $1_BINS := $$(filter-out $$($1_BIN_EXCLUDES),$$($1_BINS))
+ $1 := $$(sort $$(patsubst $$($1_SRC)/%.idl,$$($1_BIN)/%.idl.d,$$($1_SRCS)))
+ # Now create the dependencies for each idl target.
+ $$(foreach p,$$($1),$$(eval $$(call add_idl_package,$1,$$($1_SRC),$$($1_BIN),$$(patsubst $$($1_BIN)/%.idl.d,$$($1_SRC)/%.idl,$$p),$$p,$$($1_DELETES),$$($1_OLDIMPLBASES),$$($1_IDLJ))))
+endef
+
+.SUFFIXES: .java .class .package
diff --git a/make/common/JavaCompilation.gmk b/make/common/JavaCompilation.gmk
new file mode 100644
index 0000000..6180327
--- /dev/null
+++ b/make/common/JavaCompilation.gmk
@@ -0,0 +1,592 @@
+#
+# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# This makefile is much simpler now that it can use the smart javac wrapper
+# for dependency tracking between java packages and incremental compiles.
+# It could be even more simple if we added support for incremental jar updates
+# directly from the smart javac wrapper.
+
+# Cleaning/copying properties here is not a good solution. The properties
+# should be cleaned/copied by a annotation processor in sjavac.
+
+# When you read this source. Remember that $(sort ...) has the side effect
+# of removing duplicates. It is actually this side effect that is
+# desired whenever sort is used below!
+
+ifeq (,$(_MAKEBASE_GMK))
+ $(error You must include MakeBase.gmk prior to including JavaCompilation.gmk)
+endif
+
+FALSE_FIND_PATTERN:=-name FILE_NAME_THAT_DOESNT_EXIST
+
+define SetupJavaCompiler
+ # param 1 is for example GENERATE_OLD_BYTECODE or GENERATE_NEW_JDKBYTECODE
+ # This is the name of the compiler setup.
+ # param 2-9 are named args.
+ # JVM:=The jvm used to run the javac/javah command
+ # JAVAC:=The javac jar and bootstrap classpath changes, or just bin/javac if JVM is left out
+ # FLAGS:=Flags to be supplied to javac
+ # SERVER_DIR:=Use a javac server (-XDserver) and store the server related files here
+ # SERVER_JVM:=Use this JVM for the server. Defaults to the JVM above.
+ $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
+ $(call LogSetupMacroEntry,SetupJavaCompiler($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
+ $(if $(16),$(error Internal makefile error: Too many arguments to SetupJavaCompiler, please update JavaCompilation.gmk))
+
+ # The port file contains the tcp/ip on which the server listens
+ # and the cookie necessary to talk to the server.
+ $1_SJAVAC_PORTFILE:=$$($1_SERVER_DIR)/server.port
+ # You can use a different JVM to run the background javac server.
+ ifeq ($$($1_SERVER_JVM),)
+ # It defaults to the same JVM that is used to start the javac command.
+ $1_SERVER_JVM:=$$($1_JVM)
+ endif
+endef
+
+define SetupArchive
+ # param 1 is for example ARCHIVE_MYPACKAGE
+ # param 2 are the dependecies
+ # param 3,4,5,6,7,8,9 are named args.
+ # SRCS:=List of directories in where to find files to add to archive
+ # SUFFIXES:=File suffixes to include in jar
+ # INCLUDES:=List of directories/packages in SRCS that should be included
+ # EXCLUDES:=List of directories/packages in SRCS that should be excluded
+ # EXCLUDE_FILES:=List of files in SRCS that should be excluded
+ # EXTRA_FILES:=List of files in SRCS that should be included regardless of suffix match.
+ # JAR:=Jar file to create
+ # MANIFEST:=Optional manifest file template.
+ # JARMAIN:=Optional main class to add to manifest
+ # JARINDEX:=true means generate the index in the jar file.
+ # SKIP_METAINF:=Set to prevent contents of an META-INF directory to be automatically
+ # added to the archive.
+ # EXTRA_MANIFEST_ATTR:=Extra attribute to add to manifest.
+ # CHECK_COMPRESS_JAR Check the COMPRESS_JAR variable
+
+ # NOTE: $2 is dependencies, not a named argument!
+ $(foreach i,3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
+ $(call LogSetupMacroEntry,SetupArchive($1),<dependencies>,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
+ $(if $(findstring $(LOG_LEVEL),trace), $(info *[2] <dependencies> = $(strip $2)))
+ $(if $(16),$(error Internal makefile error: Too many arguments to SetupArchive, please update JavaCompilation.gmk))
+
+ $1_JARMAIN:=$(strip $$($1_JARMAIN))
+ $1_JARNAME:=$$(notdir $$($1_JAR))
+ $1_MANIFEST_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_manifest
+ $1_DELETESS_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_deletess
+ $1_DELETES_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_deletes
+ $1_BIN:=$$(dir $$($1_JAR))
+
+ ifeq (,$$($1_SUFFIXES))
+ # No suffix was set, default to classes.
+ $1_SUFFIXES:=.class
+ endif
+ # Convert suffixes to a find expression
+ $1_FIND_PATTERNS:=$(FALSE_FIND_PATTERN) $$(patsubst %,$(SPACE)-o$(SPACE)-name$(SPACE)$(DQUOTE)*%$(DQUOTE),$$($1_SUFFIXES))
+ # On windows, a lot of includes/excludes risk making the command line too long, so
+ # writing the grep patterns to files.
+ ifneq (,$$($1_INCLUDES))
+ $1_GREP_INCLUDE_PATTERNS:=$$(foreach src,$$($1_SRCS), \
+ $$(addprefix $$(src)/,$$($1_INCLUDES)))
+ # If there are a lot of include patterns, output to file to shorten command lines
+ ifeq ($$(word 20,$$($1_GREP_INCLUDE_PATTERNS)),)
+ $1_GREP_INCLUDES:=| $(GREP) $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_INCLUDE_PATTERNS))
+ else
+ $1_GREP_INCLUDE_OUTPUT:=$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_include $$(NEWLINE) \
+ $$(call ListPathsSafely,$1_GREP_INCLUDE_PATTERNS,\n, \
+ >> $$($1_BIN)/_the.$$($1_JARNAME)_include)
+ $1_GREP_INCLUDES:=| $(GREP) -f $$($1_BIN)/_the.$$($1_JARNAME)_include
+ endif
+ endif
+ ifneq (,$$($1_EXCLUDES)$$($1_EXCLUDE_FILES))
+ $1_GREP_EXCLUDE_PATTERNS:=$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/, \
+ $$($1_EXCLUDES) $$($1_EXCLUDE_FILES)))
+ # If there are a lot of include patterns, output to file to shorten command lines
+ ifeq ($$(word 20,$$($1_GREP_EXCLUDE_PATTERNS)),)
+ $1_GREP_EXCLUDES:=| $(GREP) -v $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_EXCLUDE_PATTERNS))
+ else
+ $1_GREP_EXCLUDE_OUTPUT=$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_exclude $$(NEWLINE) \
+ $$(call ListPathsSafely,$1_GREP_EXCLUDE_PATTERNS,\n, \
+ >> $$($1_BIN)/_the.$$($1_JARNAME)_exclude)
+ $1_GREP_EXCLUDES:=| $(GREP) -v -f $$($1_BIN)/_the.$$($1_JARNAME)_exclude
+ endif
+ endif
+
+ # Check if this jar needs to have its index generated.
+ ifneq (,$$($1_JARINDEX))
+ $1_JARINDEX = (cd $$(dir $$@) && $(JAR) -i $$(notdir $$@))
+ else
+ $1_JARINDEX = true
+ endif
+ # When this macro is run in the same makefile as the java compilation, dependencies are
+ # transfered in make variables. When the macro is run in a different makefile than the
+ # java compilation, the dependencies need to be found in the filesystem.
+ ifneq (,$2)
+ $1_DEPS:=$2
+ else
+ $1_DEPS:=$$(filter $$(addprefix %,$$($1_SUFFIXES)), \
+ $$(call CacheFind,$$($1_SRCS)))
+ ifneq (,$$($1_GREP_INCLUDE_PATTERNS))
+ $1_DEPS:=$$(filter $$(addsuffix %,$$($1_GREP_INCLUDE_PATTERNS)),$$($1_DEPS))
+ endif
+ ifneq (,$$($1_GREP_EXCLUDE_PATTERNS))
+ $1_DEPS:=$$(filter-out $$(addsuffix %,$$($1_GREP_EXCLUDE_PATTERNS)),$$($1_DEPS))
+ endif
+ # The subst of \ is needed because $ has to be escaped with \ in EXTRA_FILES for the command
+ # lines, but not here for use in make dependencies.
+ $1_DEPS+=$$(subst \,,$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/,$$($1_EXTRA_FILES))))
+ ifeq (,$$($1_SKIP_METAINF))
+ $1_DEPS+=$$(call CacheFind,$$(wildcard $$(addsuffix /META-INF,$$($1_SRCS))))
+ endif
+ endif
+
+ # Utility macros, to make the shell script receipt somewhat easier to decipher.
+
+ # The capture contents macro finds all files (matching the patterns, typically
+ # .class and .prp) that are newer than the jar-file, ie the new content to be put into the jar.
+ $1_CAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS), \
+ (($(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) -a -newer $$@ $$($1_GREP_INCLUDES) \
+ $$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/||g' && \
+ $(ECHO) $$(subst $$(src)/,,$$($1_EXTRA_FILES))) > \
+ $$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
+ # The capture metainf macro finds all files below the META-INF directory that are newer than the jar-file.
+ ifeq (,$$($1_SKIP_METAINF))
+ $1_CAPTURE_METAINF =$$(foreach src,$$($1_SRCS),($(FIND) $$(src)/META-INF -type f -a -newer $$@ 2> /dev/null | $(SED) 's|$$(src)/||g' >> $$(src)/_the.$$($1_JARNAME)_contents ) $$(NEWLINE))
+ endif
+ # The capture deletes macro finds all deleted files and concatenates them. The resulting file
+ # tells us what to remove from the jar-file.
+ $1_CAPTURE_DELETES=$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.deleted -newer $$@ -exec $(SED) 's|$$(src)||g' \{\} >> $$($1_DELETES_FILE) \;) $$(NEWLINE))
+ # The update contents macro updates the jar file with the previously capture contents.
+ # xargs is used to trim the whitespace from the contents file, to see if it is empty.
+ $1_UPDATE_CONTENTS=$$(foreach src,$$($1_SRCS), \
+ (cd $$(src) && \
+ if [ -n "`$(CAT) _the.$$($1_JARNAME)_contents | $(XARGS)`" ]; then \
+ $(ECHO) " updating" `$(WC) -l _the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'` files && \
+ $(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @_the.$$($1_JARNAME)_contents; \
+ fi) $$(NEWLINE))
+ # The s-variants of the above macros are used when the jar is created from scratch.
+ $1_SCAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS), \
+ (($(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) $$($1_GREP_INCLUDES) \
+ $$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/||g' && \
+ $$(subst $$(src)/,,$(ECHO) $$($1_EXTRA_FILES))) > \
+ $$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
+
+ ifeq (,$$($1_SKIP_METAINF))
+ $1_SCAPTURE_METAINF=$$(foreach src,$$($1_SRCS), \
+ ($(FIND) $$(src)/META-INF -type f 2> /dev/null | $(SED) 's|$$(src)/||g' >> \
+ $$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
+ endif
+ $1_SUPDATE_CONTENTS=$$(foreach src,$$($1_SRCS), \
+ (cd $$(src) && $(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @$$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
+
+ # Use a slightly shorter name for logging, but with enough path to identify this jar.
+ $1_NAME:=$$(subst $$(OUTPUT_ROOT)/,,$$($1_JAR))
+
+ ifneq (,$$($1_CHECK_COMPRESS_JAR))
+ $1_JAR_CREATE_OPTIONS := c0fm
+ $1_JAR_UPDATE_OPTIONS := u0f
+ ifeq ($(COMPRESS_JARS), true)
+ $1_JAR_CREATE_OPTIONS := cfm
+ $1_JAR_UPDATE_OPTIONS := uf
+ endif
+ else
+ $1_JAR_CREATE_OPTIONS := cfm
+ $1_JAR_UPDATE_OPTIONS := uf
+ endif
+
+ # Here is the rule that creates/updates the jar file.
+ $$($1_JAR) : $$($1_DEPS)
+ $(MKDIR) -p $$($1_BIN)
+ $$($1_GREP_INCLUDE_OUTPUT)
+ $$($1_GREP_EXCLUDE_OUTPUT)
+ $$(if $$($1_MANIFEST), \
+ $(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
+ -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $$($1_MANIFEST) > $$($1_MANIFEST_FILE) \
+ , \
+ $(RM) $$($1_MANIFEST_FILE) && $(TOUCH) $$($1_MANIFEST_FILE))
+ $$(if $$($1_JARMAIN),$(ECHO) "Main-Class: $$(strip $$($1_JARMAIN))" >> $$($1_MANIFEST_FILE))
+ $$(if $$($1_EXTRA_MANIFEST_ATTR),$(PRINTF) "$$($1_EXTRA_MANIFEST_ATTR)\n" >> $$($1_MANIFEST_FILE))
+ $$(if $$(wildcard $$@), \
+ $(ECHO) Modifying $$($1_NAME) $$(NEWLINE) \
+ $$($1_CAPTURE_CONTENTS) \
+ $$($1_CAPTURE_METAINF) \
+ $(RM) $$($1_DELETES_FILE) $$(NEWLINE) \
+ $$($1_CAPTURE_DELETES) \
+ $(CAT) $$($1_DELETES_FILE) > $$($1_DELETESS_FILE) $$(NEWLINE) \
+ if [ -s $$($1_DELETESS_FILE) ]; then \
+ $(ECHO) " deleting" `$(WC) -l $$($1_DELETESS_FILE) | $(AWK) '{ print $$$$1 }'` files && \
+ $(ZIP) -q -d $$@ `$(CAT) $$($1_DELETESS_FILE)` ; \
+ fi $$(NEWLINE) \
+ $$($1_UPDATE_CONTENTS) true $$(NEWLINE) \
+ $$($1_JARINDEX) && true \
+ , \
+ $(ECHO) Creating $$($1_NAME) && $(JAR) $$($1_JAR_CREATE_OPTIONS) $$@ $$($1_MANIFEST_FILE) $$(NEWLINE) \
+ $$($1_SCAPTURE_CONTENTS) \
+ $$($1_SCAPTURE_METAINF) \
+ $$($1_SUPDATE_CONTENTS) \
+ $$($1_JARINDEX) && true )
+
+endef
+
+define SetupZipArchive
+ # param 1 is for example ZIP_MYSOURCE
+ # param 2,3,4,5,6,7,8,9 are named args.
+ # SRC,ZIP,INCLUDES,INCLUDE_FILES,EXCLUDES,EXCLUDE_FILES,SUFFIXES,EXTRA_DEPS
+ $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
+ $(call LogSetupMacroEntry,SetupZipArchive($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
+ $(if $(16),$(error Internal makefile error: Too many arguments to SetupZipArchive, please update JavaCompilation.gmk))
+
+ # To avoid running find over too large sets of files, which causes make to crash
+ # on some configurations (cygwin), use INCLUDES and INCLUDE_FILES to build a set
+ # of directories to run find in, if available.
+ ifneq ($$($1_INCLUDES)$$($1_INCLUDE_FILES),)
+ $1_FIND_LIST := $$(wildcard $$(foreach i,$$($1_SRC), \
+ $$(addprefix $$i/,$$($1_INCLUDES) $$($1_INCLUDE_FILES))))
+ else
+ $1_FIND_LIST := $$($1_SRC)
+ endif
+
+ # Find all files in the source tree.
+ $1_ALL_SRCS := $$(call not-containing,_the.,$$(call CacheFind,$$($1_FIND_LIST)))
+
+ # Filter on suffixes if set
+ ifneq ($$($1_SUFFIXES),)
+ $1_ALL_SRCS := $$(filter $$(addprefix %, $$($1_SUFFIXES)), $$($1_ALL_SRCS))
+ endif
+
+ ifneq ($$($1_INCLUDES),)
+ ifneq ($$($1_SUFFIXES),)
+ $1_ZIP_INCLUDES := $$(foreach s,$$($1_SUFFIXES), \
+ $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$$s$(DQUOTE),$$($1_INCLUDES))))
+ else
+ $1_ZIP_INCLUDES := $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_INCLUDES)))
+ endif
+ endif
+ ifneq ($$($1_INCLUDE_FILES),)
+ $1_ZIP_INCLUDES += $$(addprefix -i$(SPACE),$$($1_INCLUDE_FILES))
+ endif
+ ifneq ($$($1_EXCLUDES),)
+ $1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
+ $1_ZIP_EXCLUDES := $$(addprefix -x$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_EXCLUDES)))
+ $1_ALL_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_ALL_SRCS))
+ endif
+
+ # Use a slightly shorter name for logging, but with enough path to identify this zip.
+ $1_NAME:=$$(subst $$(OUTPUT_ROOT)/,,$$($1_ZIP))
+
+ # Now $1_ALL_SRCS should contain all sources that are going to be put into the zip.
+ # I.e. the zip -i and -x options should match the filtering done in the makefile.
+ # Explicitly excluded files can be given with absolute path. The patsubst solution
+ # isn't perfect but the likelyhood of an absolute path to match something in a src
+ # dir is very small.
+ # If zip has nothing to do, it returns 12 and would fail the build. Check for 12
+ # and only fail if it's not.
+ $$($1_ZIP) : $$($1_ALL_SRCS) $$($1_EXTRA_DEPS)
+ $(MKDIR) -p $$(@D)
+ $(ECHO) Updating $$($1_NAME)
+ $$(foreach i,$$($1_SRC),(cd $$i && $(ZIP) -qru $$@ . $$($1_ZIP_INCLUDES) $$($1_ZIP_EXCLUDES) -x \*_the.\* $$(addprefix -x$(SPACE),$$(patsubst $$i/%,%,$$($1_EXCLUDE_FILES))) || test "$$$$?" = "12" )$$(NEWLINE)) true
+ $(TOUCH) $$@
+endef
+
+define add_file_to_copy
+ # param 1 = BUILD_MYPACKAGE
+ # parma 2 = The source file to copy.
+ $2_TARGET:=$2
+ # Remove the source prefix.
+ $$(foreach i,$$($1_SRC),$$(eval $$(call remove_string,$$i,$2_TARGET)))
+ # Now we can setup the depency that will trigger the copying.
+ $$($1_BIN)$$($2_TARGET) : $2
+ $(MKDIR) -p $$(@D)
+ $(CP) $$< $$@
+ $(CHMOD) -f ug+w $$@
+
+ # And do not forget this target
+ $1_ALL_COPY_TARGETS += $$($1_BIN)$$($2_TARGET)
+endef
+
+
+# This macro is used only for properties files that are to be
+# copied over to the classes directory in cleaned form:
+# Previously this was inconsistently done in different repositories.
+# This is the new clean standard. Though it is to be superseded by
+# a standard annotation processor from with sjavac.
+define add_file_to_copy_and_clean
+ # param 1 = BUILD_MYPACKAGE
+ # parma 2 = The source file to copy and clean.
+ $2_TARGET:=$2
+ # Remove the source prefix.
+ $$(foreach i,$$($1_SRC),$$(eval $$(call remove_string,$$i,$2_TARGET)))
+ # Now we can setup the depency that will trigger the copying.
+ $$($1_BIN)$$($2_TARGET) : $2
+ $(MKDIR) -p $$(@D)
+ $(CAT) $$< | $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
+ | $(SED) -f "$(SRC_ROOT)/make/common/support/unicode2x.sed" \
+ | $(SED) -e '/^#/d' -e '/^$$$$/d' \
+ -e :a -e '/\\$$$$/N; s/\\\n//; ta' \
+ -e 's/^[ \t]*//;s/[ \t]*$$$$//' \
+ -e 's/\\=/=/' | LANG=C $(SORT) > $$@
+ $(CHMOD) -f ug+w $$@
+
+ # And do not forget this target
+ $1_ALL_COPY_CLEAN_TARGETS += $$($1_BIN)$$($2_TARGET)
+endef
+
+define remove_string
+ $2 := $$(subst $1,,$$($2))
+endef
+
+define replace_space_with_pathsep
+ $1:=$(subst $(SPACE),$(PATH_SEP),$(strip $(patsubst %,%,$2)))
+endef
+
+define SetupJavaCompilation
+ # param 1 is for example BUILD_MYPACKAGE
+ # param 2,3,4,5,6,7,8 are named args.
+ # SETUP:=must point to a previously setup java compiler, for example: SETUP:=BOOTJAVAC
+ # JVM:=path to ..bin/java
+ # ADD_JAVAC_FLAGS:=javac flags to append to the default ones.
+ # SRC:=one or more directories to search for sources
+ # BIN:=store classes here
+ # INCLUDES:=myapp.foo means will only compile java files in myapp.foo or any of its sub-packages.
+ # EXCLUDES:=myapp.foo means will do not compile java files in myapp.foo or any of its sub-packages.
+ # COPY:=.prp means copy all prp files to the corresponding package in BIN.
+ # CLEAN:=.properties means copy and clean all properties file to the corresponding package in BIN.
+ # COPY_FILES:=myapp/foo/setting.txt means copy this file over to the package myapp/foo
+ # SRCZIP:=Create a src.zip based on the found sources and copied files.
+ # INCLUDE_FILES:="com/sun/SolarisFoobar.java" means only compile this file!
+ # EXCLUDE_FILES:="com/sun/SolarisFoobar.java" means do not compile this particular file!
+ # "SolarisFoobar.java" means do not compile SolarisFoobar, wherever it is found.
+ # JAVAC_SOURCE_PATH_OVERRIDE:=This forces an explicit -sourcepath to javac instead of the complete
+ # source roots from SRC. This is sometimes needed when compiling specific subsets of the source.
+ # HEADERS:=path to directory where all generated c-headers are written.
+ # DEPENDS:=Extra dependecy
+ $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
+ $(call LogSetupMacroEntry,SetupJavaCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
+ $(if $(16),$(error Internal makefile error: Too many arguments to SetupJavaCompilation, please update JavaCompilation.gmk))
+
+ # Extract the info from the java compiler setup.
+ $1_JVM := $$($$($1_SETUP)_JVM)
+ $1_JAVAC := $$($$($1_SETUP)_JAVAC)
+ $1_FLAGS := $$($$($1_SETUP)_FLAGS) $(JAVAC_FLAGS) $$($1_ADD_JAVAC_FLAGS)
+ ifeq ($$($1_JAVAC),)
+ $$(error The Java compilation $1 refers to a non-existant java compiler setup $$($1_SETUP))
+ endif
+ $1_SJAVAC_PORTFILE := $$($$($1_SETUP)_SJAVAC_PORTFILE)
+ $1_SERVER_JVM := $$($$($1_SETUP)_SERVER_JVM)
+
+ # Handle addons and overrides.
+ $1_SRC:=$$(call ADD_SRCS,$$($1_SRC))
+ # Make sure the dirs exist.
+ $$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupJavaCompilation $1 contains missing directory $$d)))
+ $$(eval $$(call MakeDir,$$($1_BIN)))
+ # Find all files in the source trees.
+ $1_ALL_SRCS += $$(filter-out $(OVR_SRCS),$$(call CacheFind,$$($1_SRC)))
+ # Extract the java files.
+ ifneq ($$($1_EXCLUDE_FILES),)
+ $1_EXCLUDE_FILES_PATTERN:=$$(addprefix %,$$($1_EXCLUDE_FILES))
+ endif
+ $1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES_PATTERN),$$(filter %.java,$$($1_ALL_SRCS)))
+ ifneq ($$($1_INCLUDE_FILES),)
+ $1_INCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
+ $1_SRCS := $$(filter $$($1_INCLUDE_FILES), $$($1_SRCS))
+ endif
+
+ # Now we have a list of all java files to compile: $$($1_SRCS)
+
+ # Create the corresponding smart javac wrapper command line.
+ $1_SJAVAC_ARGS:=$$(addprefix -x ,$$(addsuffix .*,$$(subst /,.,$$($1_EXCLUDES)))) \
+ $$(addprefix -i ,$$(addsuffix .*,$$(subst /,.,$$($1_INCLUDES)))) \
+ $$(addprefix -xf *,$$(strip $$($1_EXCLUDE_FILES))) \
+ $$(addprefix -if *,$$(strip $$($1_INCLUDE_FILES))) \
+ -src "$$(subst $$(SPACE),$$(PATH_SEP),$$(strip $$($1_SRC)))"
+
+ # Prepend the source/bin path to the filter expressions.
+ ifneq ($$($1_INCLUDES),)
+ $1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
+ $1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
+ endif
+ ifneq ($$($1_EXCLUDES),)
+ $1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
+ $1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
+ endif
+
+ # Find all files to be copied from source to bin.
+ ifneq (,$$($1_COPY))
+ # Search for all files to be copied.
+ $1_ALL_COPIES := $$(filter $$(addprefix %,$$($1_COPY)),$$($1_ALL_SRCS))
+ # Copy these explicitly
+ $1_ALL_COPIES += $$($1_COPY_FILES)
+ # Copy must also respect filters.
+ ifneq (,$$($1_INCLUDES))
+ $1_ALL_COPIES := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_COPIES))
+ endif
+ ifneq (,$$($1_EXCLUDES))
+ $1_ALL_COPIES := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_ALL_COPIES))
+ endif
+ ifneq (,$$($1_EXCLUDE_FILES))
+ $1_ALL_COPIES := $$(filter-out $$($1_EXCLUDE_FILES_PATTERN),$$($1_ALL_COPIES))
+ endif
+ # All files below META-INF are always copied.
+ $1_ALL_COPIES += $$(filter $$(addsuffix /META-INF%,$$($1_SRC)),$$($1_ALL_SRCS))
+ ifneq (,$$($1_ALL_COPIES))
+ # Yep, there are files to be copied!
+ $1_ALL_COPY_TARGETS:=
+ $$(foreach i,$$($1_ALL_COPIES),$$(eval $$(call add_file_to_copy,$1,$$i)))
+ # Now we can depend on $$($1_ALL_COPY_TARGETS) to copy all files!
+ endif
+ endif
+
+ # Find all property files to be copied and cleaned from source to bin.
+ ifneq (,$$($1_CLEAN))
+ # Search for all files to be copied.
+ $1_ALL_CLEANS := $$(filter $$(addprefix %,$$($1_CLEAN)),$$($1_ALL_SRCS))
+ # Copy and clean must also respect filters.
+ ifneq (,$$($1_INCLUDES))
+ $1_ALL_CLEANS := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_CLEANS))
+ endif
+ ifneq (,$$($1_EXCLUDES))
+ $1_ALL_CLEANS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_ALL_CLEANS))
+ endif
+ ifneq (,$$($1_EXCLUDE_FILES))
+ $1_ALL_CLEANS := $$(filter-out $$($1_EXCLUDE_FILES_PATTERN),$$($1_ALL_CLEANS))
+ endif
+ ifneq (,$$($1_ALL_CLEANS))
+ # Yep, there are files to be copied and cleaned!
+ $1_ALL_COPY_CLEAN_TARGETS:=
+ $$(foreach i,$$($1_ALL_CLEANS),$$(eval $$(call add_file_to_copy_and_clean,$1,$$i)))
+ # Now we can depend on $$($1_ALL_COPY_CLEAN_TARGETS) to copy all files!
+ endif
+ endif
+
+ # Prep the source paths.
+ ifneq ($$($1_JAVAC_SOURCE_PATH_OVERRIDE),)
+ $$(eval $$(call replace_space_with_pathsep,$1_SRCROOTSC,$$($1_JAVAC_SOURCE_PATH_OVERRIDE)))
+ else
+ $$(eval $$(call replace_space_with_pathsep,$1_SRCROOTSC,$$($1_SRC)))
+ endif
+
+ # Create a sed expression to remove the source roots and to replace / with .
+ # and remove .java at the end.
+ $1_REWRITE_INTO_CLASSES:=$$(foreach i,$$($1_SRC),-e 's|$$i/||g') -e 's|/|.|g' -e 's|.java$$$$||g'
+
+ ifeq ($$($1_DISABLE_SJAVAC)x$$(ENABLE_SJAVAC),xyes)
+ ifneq (,$$($1_HEADERS))
+ $1_HEADERS_ARG := -h $$($1_HEADERS)
+ endif
+
+ # Using sjavac to compile.
+ $1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/javac_state
+
+ # Create SJAVAC variable form JAVAC variable. Expects $1_JAVAC to be
+ # "bootclasspathprepend -cp .../javac.jar com.sun.tools.javac.Main"
+ # and javac is simply replaced with sjavac.
+ $1_SJAVAC:=$$(subst com.sun.tools.javac.Main,com.sun.tools.sjavac.Main,$$($1_JAVAC))
+
+ # Set the $1_REMOTE to spawn a background javac server.
+ $1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),id=$1,sjavac=$$(subst $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC))))
+
+ $$($1_BIN)/javac_state: $$($1_SRCS) $$($1_DEPENDS)
+ $(MKDIR) -p $$(@D)
+ $$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.$1_batch.tmp)
+ $(ECHO) Compiling $1
+ ($$($1_JVM) $$($1_SJAVAC) \
+ $$($1_REMOTE) \
+ -j $(JOBS) \
+ --permit-unidentified-artifacts \
+ --permit-sources-without-package \
+ --compare-found-sources $$($1_BIN)/_the.$1_batch.tmp \
+ --log=$(LOG_LEVEL) \
+ $$($1_SJAVAC_ARGS) \
+ $$($1_FLAGS) \
+ $$($1_HEADERS_ARG) \
+ -d $$($1_BIN) && \
+ $(MV) $$($1_BIN)/_the.$1_batch.tmp $$($1_BIN)/_the.$1_batch)
+ else
+ # Using plain javac to batch compile everything.
+ $1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/_the.$1_batch
+
+ # When building in batch, put headers in a temp dir to filter out those that actually
+ # changed before copying them to the real header dir.
+ ifneq (,$$($1_HEADERS))
+ $1_HEADERS_ARG := -h $$($1_HEADERS).tmp
+
+ $$($1_HEADERS)/_the.$1_headers: $$($1_BIN)/_the.$1_batch
+ $(MKDIR) -p $$(@D)
+ for f in `ls $$($1_HEADERS).tmp`; do \
+ if [ ! -f "$$($1_HEADERS)/$$$$f" ] || [ "`$(DIFF) $$($1_HEADERS)/$$$$f $$($1_HEADERS).tmp/$$$$f`" != "" ]; then \
+ $(CP) -f $$($1_HEADERS).tmp/$$$$f $$($1_HEADERS)/$$$$f; \
+ fi; \
+ done
+ $(RM) -r $$($1_HEADERS).tmp
+ $(TOUCH) $$@
+
+ $1 += $$($1_HEADERS)/_the.$1_headers
+ endif
+
+ # When not using sjavac, pass along all sources to javac using an @file.
+ $$($1_BIN)/_the.$1_batch: $$($1_SRCS) $$($1_DEPENDS)
+ $(MKDIR) -p $$(@D)
+ $(RM) $$($1_BIN)/_the.$1_batch $$($1_BIN)/_the.$1_batch.tmp
+ $$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.$1_batch.tmp)
+ $(ECHO) Compiling `$(WC) $$($1_BIN)/_the.$1_batch.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files for $1
+ ($$($1_JVM) $$($1_JAVAC) $$($1_FLAGS) \
+ -implicit:none -sourcepath "$$($1_SRCROOTSC)" \
+ -d $$($1_BIN) $$($1_HEADERS_ARG) @$$($1_BIN)/_the.$1_batch.tmp && \
+ $(MV) $$($1_BIN)/_the.$1_batch.tmp $$($1_BIN)/_the.$1_batch)
+
+ endif
+
+ # Check if a jar file was specified, then setup the rules for the jar.
+ ifneq (,$$($1_JAR))
+ # If no suffixes was explicitly set for this jar file.
+ # Use class and the cleaned/copied properties file suffixes as the default
+ # for the types of files to be put into the jar.
+ ifeq (,$$($1_SUFFIXES))
+ $1_SUFFIXES:=.class $$($1_CLEAN) $$($1_COPY)
+ endif
+
+ $$(eval $$(call SetupArchive,ARCHIVE_$1,$$($1), \
+ SRCS:=$$($1_BIN), \
+ SUFFIXES:=$$($1_SUFFIXES), \
+ EXCLUDE:=$$($1_EXCLUDES), \
+ INCLUDES:=$$($1_INCLUDES), \
+ EXTRA_FILES:=$$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS), \
+ JAR:=$$($1_JAR), \
+ JARMAIN:=$$($1_JARMAIN), \
+ MANIFEST:=$$($1_MANIFEST), \
+ EXTRA_MANIFEST_ATTR:=$$($1_EXTRA_MANIFEST_ATTR), \
+ JARINDEX:=$$($1_JARINDEX), \
+ HEADERS:=$$($1_HEADERS), \
+ SETUP:=$$($1_SETUP)))
+ endif
+
+ # Check if a srczip was specified, then setup the rules for the srczip.
+ ifneq (,$$($1_SRCZIP))
+ $$(eval $$(call SetupZipArchive,ARCHIVE_$1, \
+ SRC:=$$($1_SRC), \
+ ZIP:=$$($1_SRCZIP), \
+ INCLUDES:=$$($1_INCLUDES), \
+ EXCLUDES:=$$($1_EXCLUDES), \
+ EXCLUDE_FILES:=$$($1_EXCLUDE_FILES)))
+ endif
+
+endef
diff --git a/make/common/MakeBase.gmk b/make/common/MakeBase.gmk
new file mode 100644
index 0000000..2b276c6
--- /dev/null
+++ b/make/common/MakeBase.gmk
@@ -0,0 +1,449 @@
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+################################################################
+#
+# Check that GNU make and cygwin are recent enough.
+# Setup common utility functions.
+#
+################################################################
+
+ifndef _MAKEBASE_GMK
+_MAKEBASE_GMK := 1
+
+# If the variable that you want to send to stdout for piping into a file or otherwise,
+# is potentially long, for example the a list of file paths, eg a list of all package directories.
+# Then you need to use ListPathsSafely, which optimistically splits the output into several shell
+# calls as well as use compression on recurrent file paths segments, to get around the potential
+# command line length problem that exists in cygwin and other shells.
+compress_pre:=$(strip $(shell $(CAT) $(SRC_ROOT)/make/common/support/ListPathsSafely-pre-compress.incl))
+compress_post:=$(strip $(shell $(CAT) $(SRC_ROOT)/make/common/support/ListPathsSafely-post-compress.incl))
+compress_paths=$(compress_pre)\
+$(subst $(SRC_ROOT),X97,\
+$(subst $(OUTPUT_ROOT),X98,\
+$(subst X,X00,\
+$(subst $(SPACE),\n,$(strip $1)))))\
+$(compress_post)
+
+decompress_paths=$(SED) -f $(SRC_ROOT)/make/common/support/ListPathsSafely-uncompress.sed -e 's|X99|\\n|g' \
+ -e 's|X98|$(OUTPUT_ROOT)|g' -e 's|X97|$(SRC_ROOT)|g' \
+ -e 's|X00|X|g' | tr '\n' '$2'
+
+define ListPathsSafely_If
+ $(if $(word $3,$($1)),$(eval $1_LPS$3:=$(call compress_paths,$(wordlist $3,$4,$($1)))))
+endef
+
+define ListPathsSafely_Printf
+ $(if $(strip $($1_LPS$4)),$(if $(findstring $(LOG_LEVEL),trace),,@)printf \
+ -- "$(strip $($1_LPS$4))\n" | $(decompress_paths) $3)
+endef
+
+# Receipt example:
+# rm -f thepaths
+# $(call ListPathsSafely,THEPATHS,\n, >> thepaths)
+# The \n argument means translate spaces into \n
+# if instead , , (a space) is supplied, then spaces remain spaces.
+define ListPathsSafely
+ $(if $(word 16001,$($1)),$(error Cannot list safely more than 16000 paths. $1 has $(words $($1)) paths!))
+ $(ECHO) $(LOG_DEBUG) Writing $(words $($1)) paths to '$3'
+ $(call ListPathsSafely_If,$1,$2,1,250)
+ $(call ListPathsSafely_If,$1,$2,251,500)
+ $(call ListPathsSafely_If,$1,$2,501,750)
+ $(call ListPathsSafely_If,$1,$2,751,1000)
+
+ $(call ListPathsSafely_If,$1,$2,1001,1250)
+ $(call ListPathsSafely_If,$1,$2,1251,1500)
+ $(call ListPathsSafely_If,$1,$2,1501,1750)
+ $(call ListPathsSafely_If,$1,$2,1751,2000)
+
+ $(call ListPathsSafely_If,$1,$2,2001,2250)
+ $(call ListPathsSafely_If,$1,$2,2251,2500)
+ $(call ListPathsSafely_If,$1,$2,2501,2750)
+ $(call ListPathsSafely_If,$1,$2,2751,3000)
+
+ $(call ListPathsSafely_If,$1,$2,3001,3250)
+ $(call ListPathsSafely_If,$1,$2,3251,3500)
+ $(call ListPathsSafely_If,$1,$2,3501,3750)
+ $(call ListPathsSafely_If,$1,$2,3751,4000)
+
+ $(call ListPathsSafely_If,$1,$2,4001,4250)
+ $(call ListPathsSafely_If,$1,$2,4251,4500)
+ $(call ListPathsSafely_If,$1,$2,4501,4750)
+ $(call ListPathsSafely_If,$1,$2,4751,5000)
+
+ $(call ListPathsSafely_If,$1,$2,5001,5250)
+ $(call ListPathsSafely_If,$1,$2,5251,5500)
+ $(call ListPathsSafely_If,$1,$2,5501,5750)
+ $(call ListPathsSafely_If,$1,$2,5751,6000)
+
+ $(call ListPathsSafely_If,$1,$2,6001,6250)
+ $(call ListPathsSafely_If,$1,$2,6251,6500)
+ $(call ListPathsSafely_If,$1,$2,6501,6750)
+ $(call ListPathsSafely_If,$1,$2,6751,7000)
+
+ $(call ListPathsSafely_If,$1,$2,7001,7250)
+ $(call ListPathsSafely_If,$1,$2,7251,7500)
+ $(call ListPathsSafely_If,$1,$2,7501,7750)
+ $(call ListPathsSafely_If,$1,$2,7751,8000)
+
+ $(call ListPathsSafely_If,$1,$2,8001,8250)
+ $(call ListPathsSafely_If,$1,$2,8251,8500)
+ $(call ListPathsSafely_If,$1,$2,8501,8750)
+ $(call ListPathsSafely_If,$1,$2,8751,9000)
+
+ $(call ListPathsSafely_If,$1,$2,9001,9250)
+ $(call ListPathsSafely_If,$1,$2,9251,9500)
+ $(call ListPathsSafely_If,$1,$2,9501,9750)
+ $(call ListPathsSafely_If,$1,$2,9751,10000)
+
+ $(call ListPathsSafely_If,$1,$2,10001,10250)
+ $(call ListPathsSafely_If,$1,$2,10251,10500)
+ $(call ListPathsSafely_If,$1,$2,10501,10750)
+ $(call ListPathsSafely_If,$1,$2,10751,11000)
+
+ $(call ListPathsSafely_If,$1,$2,11001,11250)
+ $(call ListPathsSafely_If,$1,$2,11251,11500)
+ $(call ListPathsSafely_If,$1,$2,11501,11750)
+ $(call ListPathsSafely_If,$1,$2,11751,12000)
+
+ $(call ListPathsSafely_If,$1,$2,12001,12250)
+ $(call ListPathsSafely_If,$1,$2,12251,12500)
+ $(call ListPathsSafely_If,$1,$2,12501,12750)
+ $(call ListPathsSafely_If,$1,$2,12751,13000)
+
+ $(call ListPathsSafely_If,$1,$2,13001,13250)
+ $(call ListPathsSafely_If,$1,$2,13251,13500)
+ $(call ListPathsSafely_If,$1,$2,13501,13750)
+ $(call ListPathsSafely_If,$1,$2,13751,14000)
+
+ $(call ListPathsSafely_If,$1,$2,14001,14250)
+ $(call ListPathsSafely_If,$1,$2,14251,14500)
+ $(call ListPathsSafely_If,$1,$2,14501,14750)
+ $(call ListPathsSafely_If,$1,$2,14751,15000)
+
+ $(call ListPathsSafely_If,$1,$2,15001,15250)
+ $(call ListPathsSafely_If,$1,$2,15251,15500)
+ $(call ListPathsSafely_If,$1,$2,15501,15750)
+ $(call ListPathsSafely_If,$1,$2,15751,16000)
+
+ $(call ListPathsSafely_Printf,$1,$2,$3,1)
+ $(call ListPathsSafely_Printf,$1,$2,$3,251)
+ $(call ListPathsSafely_Printf,$1,$2,$3,501)
+ $(call ListPathsSafely_Printf,$1,$2,$3,751)
+
+ $(call ListPathsSafely_Printf,$1,$2,$3,1001)
+ $(call ListPathsSafely_Printf,$1,$2,$3,1251)
+ $(call ListPathsSafely_Printf,$1,$2,$3,1501)
+ $(call ListPathsSafely_Printf,$1,$2,$3,1751)
+
+ $(call ListPathsSafely_Printf,$1,$2,$3,2001)
+ $(call ListPathsSafely_Printf,$1,$2,$3,2251)
+ $(call ListPathsSafely_Printf,$1,$2,$3,2501)
+ $(call ListPathsSafely_Printf,$1,$2,$3,2751)
+
+ $(call ListPathsSafely_Printf,$1,$2,$3,3001)
+ $(call ListPathsSafely_Printf,$1,$2,$3,3251)
+ $(call ListPathsSafely_Printf,$1,$2,$3,3501)
+ $(call ListPathsSafely_Printf,$1,$2,$3,3751)
+
+ $(call ListPathsSafely_Printf,$1,$2,$3,4001)
+ $(call ListPathsSafely_Printf,$1,$2,$3,4251)
+ $(call ListPathsSafely_Printf,$1,$2,$3,4501)
+ $(call ListPathsSafely_Printf,$1,$2,$3,4751)
+
+ $(call ListPathsSafely_Printf,$1,$2,$3,5001)
+ $(call ListPathsSafely_Printf,$1,$2,$3,5251)
+ $(call ListPathsSafely_Printf,$1,$2,$3,5501)
+ $(call ListPathsSafely_Printf,$1,$2,$3,5751)
+
+ $(call ListPathsSafely_Printf,$1,$2,$3,6001)
+ $(call ListPathsSafely_Printf,$1,$2,$3,6251)
+ $(call ListPathsSafely_Printf,$1,$2,$3,6501)
+ $(call ListPathsSafely_Printf,$1,$2,$3,6751)
+
+ $(call ListPathsSafely_Printf,$1,$2,$3,7001)
+ $(call ListPathsSafely_Printf,$1,$2,$3,7251)
+ $(call ListPathsSafely_Printf,$1,$2,$3,7501)
+ $(call ListPathsSafely_Printf,$1,$2,$3,7751)
+
+ $(call ListPathsSafely_Printf,$1,$2,$3,8001)
+ $(call ListPathsSafely_Printf,$1,$2,$3,8251)
+ $(call ListPathsSafely_Printf,$1,$2,$3,8501)
+ $(call ListPathsSafely_Printf,$1,$2,$3,8751)
+
+ $(call ListPathsSafely_Printf,$1,$2,$3,9001)
+ $(call ListPathsSafely_Printf,$1,$2,$3,9251)
+ $(call ListPathsSafely_Printf,$1,$2,$3,9501)
+ $(call ListPathsSafely_Printf,$1,$2,$3,9751)
+
+ $(call ListPathsSafely_Printf,$1,$2,$3,10001)
+ $(call ListPathsSafely_Printf,$1,$2,$3,10251)
+ $(call ListPathsSafely_Printf,$1,$2,$3,10501)
+ $(call ListPathsSafely_Printf,$1,$2,$3,10751)
+
+ $(call ListPathsSafely_Printf,$1,$2,$3,11001)
+ $(call ListPathsSafely_Printf,$1,$2,$3,11251)
+ $(call ListPathsSafely_Printf,$1,$2,$3,11501)
+ $(call ListPathsSafely_Printf,$1,$2,$3,11751)
+
+ $(call ListPathsSafely_Printf,$1,$2,$3,12001)
+ $(call ListPathsSafely_Printf,$1,$2,$3,12251)
+ $(call ListPathsSafely_Printf,$1,$2,$3,12501)
+ $(call ListPathsSafely_Printf,$1,$2,$3,12751)
+
+ $(call ListPathsSafely_Printf,$1,$2,$3,13001)
+ $(call ListPathsSafely_Printf,$1,$2,$3,13251)
+ $(call ListPathsSafely_Printf,$1,$2,$3,13501)
+ $(call ListPathsSafely_Printf,$1,$2,$3,13751)
+
+ $(call ListPathsSafely_Printf,$1,$2,$3,14001)
+ $(call ListPathsSafely_Printf,$1,$2,$3,14251)
+ $(call ListPathsSafely_Printf,$1,$2,$3,14501)
+ $(call ListPathsSafely_Printf,$1,$2,$3,14751)
+
+ $(call ListPathsSafely_Printf,$1,$2,$3,15001)
+ $(call ListPathsSafely_Printf,$1,$2,$3,15251)
+ $(call ListPathsSafely_Printf,$1,$2,$3,15501)
+ $(call ListPathsSafely_Printf,$1,$2,$3,15751)
+endef
+
+define ListPathsSafelyNow_IfPrintf
+ ifneq (,$$(word $4,$$($1)))
+ $$(eval $1_LPS$4:=$$(call compress_paths,$$(wordlist $4,$5,$$($1))))
+ $$(shell printf -- "$$(strip $$($1_LPS$4))\n" | $(decompress_paths) $3)
+ endif
+endef
+
+# And an non-receipt version:
+define ListPathsSafelyNow
+ ifneq (,$$(word 10001,$$($1)))
+ $$(error Cannot list safely more than 10000 paths. $1 has $$(words $$($1)) paths!)
+ endif
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1,250)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,251,500)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,501,750)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,751,1000)
+
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1001,1250)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1251,1500)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1501,1750)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1751,2000)
+
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2001,2250)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2251,2500)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2501,2750)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2751,3000)
+
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3001,3250)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3251,3500)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3501,3750)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3751,4000)
+
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4001,4250)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4251,4500)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4501,4750)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4751,5000)
+
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5001,5250)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5251,5500)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5501,5750)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5751,6000)
+
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6001,6250)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6251,6500)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6501,6750)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6751,7000)
+
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7001,7250)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7251,7500)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7501,7750)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7751,8000)
+
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8001,8250)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8251,8500)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8501,8750)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8751,9000)
+
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9001,9250)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9251,9500)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9501,9750)
+ $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9751,10000)
+
+endef
+
+# The source tips can come from the Mercurial repository, or in the files
+# $(HGTIP_FILENAME) which contains the tip but is also positioned in the same
+# directory as the original $(HGDIR) directory.
+# These should not be := assignments, only used from the root Makefile.
+HG_VERSION = $(shell $(HG) version 2> /dev/null)
+HG_DIRECTORY=.hg
+HGTIP_FILENAME=.hgtip
+HG_SEARCH = ./REPO ./*/REPO ./*/*/REPO ./*/*/*/REPO
+REPO_LIST = $(patsubst ./%,%,$(patsubst %/,%,$(sort $(dir \
+ $(shell $(CD) $(SRC_ROOT) ; ( $(LS) -d $(HG_SEARCH:%/REPO=%/$(HG_DIRECTORY)) ; \
+ $(LS) $(HG_SEARCH:%/REPO=%/$(HGTIP_FILENAME)) ) \
+ 2> /dev/null)))))
+
+# Emit the repo:tip pairs to $@
+define GetSourceTips
+ $(CD) $(SRC_ROOT) ; \
+ for i in $(REPO_LIST) IGNORE ; do \
+ if [ "$${i}" = "IGNORE" ] ; then \
+ continue; \
+ elif [ -d $${i}/$(HG_DIRECTORY) -a "$(HG_VERSION)" != "" ] ; then \
+ $(PRINTF) " %s:%s" \
+ "$${i}" `$(HG) tip --repository $${i} --template '{node|short}\n'` ; \
+ elif [ -f $${i}/$(HGTIP_FILENAME) ] ; then \
+ $(PRINTF) " %s:%s" \
+ "$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \
+ fi; \
+ done >> $@
+ $(PRINTF) "\n" >> $@
+endef
+
+# Create the HGTIP_FILENAME file. Called from jdk/make/closed/bundles.gmk
+define CreateHgTip
+ $(HG) tip --repository $1 --template '{node|short}\n' > $1/$(HGTIP_FILENAME); \
+ $(ECHO) $1/$(HGTIP_FILENAME)
+endef
+
+define SetupLogging
+ ifeq ($$(LOG_LEVEL),trace)
+ # Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
+ # For each target executed, will print
+ # Building <TARGET> (from <FIRST PREREQUISITE>) (<ALL NEWER PREREQUISITES> newer)
+ # but with a limit of 20 on <ALL NEWER PREREQUISITES>, to avoid cluttering logs too much
+ # (and causing a crash on Cygwin).
+ # Default shell seems to always be /bin/sh. Must override with bash to get this to work on Solaris.
+ # Only use time if it's GNU time which supports format and output file.
+ WRAPPER_SHELL:=/bin/bash $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(findstring yes,$$(IS_GNU_TIME)),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log /bin/bash
+ SHELL=$$(warning $$(if $$@,Building $$@,Running shell command) $$(if $$<, (from $$<))$$(if $$?, ($$(wordlist 1, 20, $$?) $$(if $$(wordlist 21, 22, $$?), ... [in total $$(words $$?) files]) newer)))$$(WRAPPER_SHELL)
+ endif
+ # Never remove warning messages; this is just for completeness
+ LOG_WARN=
+ ifneq ($$(findstring $$(LOG_LEVEL),info debug trace),)
+ LOG_INFO=
+ else
+ LOG_INFO=> /dev/null
+ endif
+ ifneq ($$(findstring $$(LOG_LEVEL),debug trace),)
+ LOG_DEBUG=
+ else
+ LOG_DEBUG=> /dev/null
+ endif
+ ifneq ($$(findstring $$(LOG_LEVEL),trace),)
+ LOG_TRACE=
+ else
+ LOG_TRACE=> /dev/null
+ endif
+endef
+
+# Make sure logging is setup for everyone that includes MakeBase.gmk.
+$(eval $(call SetupLogging))
+
+# This is to be called by all SetupFoo macros
+define LogSetupMacroEntry
+ $(if $(27),$(error Internal makefile error: Too many arguments to LogSetupMacroEntry, please update MakeBase.gmk))
+ $(if $(findstring $(LOG_LEVEL),debug trace), $(info $1 $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26,$(if $($i),$(NEWLINE) $(strip [$i] $($i))))))
+endef
+
+# Make directory without forking mkdir if not needed
+define MakeDir
+ ifneq ($$(wildcard $1 $2 $3 $4 $5 $6 $7 $8 $9),$$(strip $1 $2 $3 $4 $5 $6 $7 $8 $9))
+ $$(shell $(MKDIR) -p $1 $2 $3 $4 $5 $6 $7 $8 $9)
+ endif
+endef
+
+ifeq ($(OPENJDK_TARGET_OS),solaris)
+ # On Solaris, if the target is a symlink and exists, cp won't overwrite.
+ # Cp has to operate in recursive mode to allow for -P flag, to preserve soft links. If the
+ # name of the target file differs from the source file, rename after copy.
+ define install-file
+ $(MKDIR) -p $(@D)
+ $(RM) '$@'
+ $(CP) -f -r -P '$<' '$(@D)'
+ if [ "$(@F)" != "$(<F)" ]; then $(MV) '$(@D)/$(<F)' '$@'; fi
+ endef
+else ifeq ($(OPENJDK_TARGET_OS),macosx)
+ # On mac, extended attributes sometimes creep into the source files, which may later
+ # cause the creation of ._* files which confuses testing. Clear these with xattr if
+ # set. Some files get their write permissions removed after being copied to the
+ # output dir. When these are copied again to images, xattr would fail. By only clearing
+ # attributes when they are present, failing on this is avoided.
+ define install-file
+ $(MKDIR) -p $(@D)
+ $(CP) -fRP '$<' '$@'
+ if [ -n "`$(XATTR) -l '$@'`" ]; then $(XATTR) -c '$@'; fi
+ endef
+else
+ define install-file
+ $(MKDIR) -p $(@D)
+ $(CP) -fP '$<' '$@'
+ endef
+endif
+
+# Convenience functions for working around make's limitations with $(filter ).
+containing = $(foreach v,$2,$(if $(findstring $1,$v),$v))
+not-containing = $(foreach v,$2,$(if $(findstring $1,$v),,$v))
+
+################################################################################
+# In Cygwin, finds are very costly, both because of expensive forks and because
+# of bad file system caching. Find is used extensively in $(shell) commands to
+# find source files. This makes rerunning make with no or few changes rather
+# expensive. To speed this up, these two macros are used to cache the results
+# of simple find commands for reuse.
+#
+# Runs a find and stores both the directories where it was run and the results.
+# This macro can be called multiple times to add to the cache. Only finds files
+# with no filters.
+#
+# Needs to be called with $(eval )
+#
+# Param 1 - Dir to find in
+ifeq ($(OPENJDK_BUILD_OS),windows)
+ define FillCacheFind
+ FIND_CACHE_DIR += $1
+ FIND_CACHE := $$(sort $$(FIND_CACHE) $$(shell $(FIND) $1 -type f -o -type l))
+ endef
+else
+ define FillCacheFind
+ endef
+endif
+
+# Mimics find by looking in the cache if all of the directories have been cached.
+# Otherwise reverts to shell find. This is safe to call on all platforms, even if
+# cache is deactivated.
+#
+# The extra - is needed when FIND_CACHE_DIR is empty but should be harmless.
+# Param 1 - Dirs to find in
+define CacheFind
+ $(if $(filter-out $(addsuffix %,- $(FIND_CACHE_DIR)),$1), \
+ $(shell $(FIND) $1 -type f -o -type l), \
+ $(filter $(addsuffix %,$1),$(FIND_CACHE)))
+endef
+
+################################################################################
+
+endif # _MAKEBASE_GMK
diff --git a/make/common/NON_CORE_PKGS.gmk b/make/common/NON_CORE_PKGS.gmk
new file mode 100644
index 0000000..0b9975d
--- /dev/null
+++ b/make/common/NON_CORE_PKGS.gmk
@@ -0,0 +1,110 @@
+#
+# Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+#
+# This file contains the package names of all the "non-core"
+# API published in the Java 2 SDK documentation. "Non-core" means
+# it includes all published API outside of the JDK API specification.
+#
+# These environment variables are used by javadoc in
+# make/docs/Makefile and are referenced by the localization
+# team when determining which APIs to extract javadoc
+# comments from.
+
+DOMAPI_PKGS = com.sun.java.browser.dom \
+ org.w3c.dom \
+ org.w3c.dom.bootstrap \
+ org.w3c.dom.ls \
+ org.w3c.dom.ranges \
+ org.w3c.dom.traversal \
+ org.w3c.dom.html \
+ org.w3c.dom.stylesheets \
+ org.w3c.dom.css \
+ org.w3c.dom.events \
+ org.w3c.dom.views
+
+JDI_PKGS = com.sun.jdi \
+ com.sun.jdi.event \
+ com.sun.jdi.request \
+ com.sun.jdi.connect \
+ com.sun.jdi.connect.spi
+
+MGMT_PKGS = com.sun.management
+
+JAAS_PKGS = com.sun.security.auth \
+ com.sun.security.auth.callback \
+ com.sun.security.auth.login \
+ com.sun.security.auth.module
+
+JGSS_PKGS = com.sun.security.jgss
+
+OLD_JSSE_PKGS = com.sun.net.ssl
+
+HTTPSERVER_PKGS = com.sun.net.httpserver \
+ com.sun.net.httpserver.spi
+
+NIO_PKGS = com.sun.nio.file
+
+DOCLETAPI_PKGS = com.sun.javadoc
+
+TAGLETAPI_FILE = com/sun/tools/doclets/Taglet.java
+
+TAGLETAPI_PKGS = com.sun.tools.doclets
+
+ATTACH_PKGS = com.sun.tools.attach \
+ com.sun.tools.attach.spi
+
+JCONSOLE_PKGS = com.sun.tools.jconsole
+
+TREEAPI_PKGS = com.sun.source.doctree \
+ com.sun.source.tree \
+ com.sun.source.util \
+ jdk
+
+SMARTCARDIO_PKGS = javax.smartcardio
+
+SCTPAPI_PKGS = com.sun.nio.sctp
+
+ifeq ($(PLATFORM), macosx)
+ APPLE_EXT_PKGS = com.apple.concurrent \
+ com.apple.eawt \
+ com.apple.eawt.event \
+ com.apple.eio
+endif
+
+JDK_PKGS = jdk
+
+# non-core packages in rt.jar
+NON_CORE_PKGS = $(DOMAPI_PKGS) \
+ $(MGMT_PKGS) \
+ $(JAAS_PKGS) \
+ $(JGSS_PKGS) \
+ $(NIO_PKGS) \
+ $(OLD_JSSE_PKGS) \
+ $(HTTPSERVER_PKGS) \
+ $(SMARTCARDIO_PKGS) \
+ $(SCTPAPI_PKGS) \
+ $(APPLE_EXT_PKGS) \
+ $(JDK_PKGS)
diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk
new file mode 100644
index 0000000..6ee497f
--- /dev/null
+++ b/make/common/NativeCompilation.gmk
@@ -0,0 +1,594 @@
+#
+# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# When you read this source. Remember that $(sort ...) has the side effect
+# of removing duplicates. It is actually this side effect that is
+# desired whenever sort is used below!
+
+ifeq (,$(_MAKEBASE_GMK))
+ $(error You must include MakeBase.gmk prior to including NativeCompilation.gmk)
+endif
+
+ifeq ($(COMPILER_TYPE),CC)
+ COMPILING_MSG=echo $(LOG_INFO) "Compiling $(notdir $1) (for $(notdir $2))"
+ LINKING_MSG=echo $(LOG_INFO) "Linking $1"
+ LINKING_EXE_MSG=echo $(LOG_INFO) "Linking executable $1"
+ ARCHIVING_MSG=echo $(LOG_INFO) "Archiving $1"
+else
+ COMPILING_MSG=
+ LINKING_MSG=
+ LINKING_EXE_MSG=
+ ARCHIVING_MSG=
+endif
+
+define add_native_source
+ # param 1 = BUILD_MYPACKAGE
+ # parma 2 = the source file name (..../alfa.c or .../beta.cpp)
+ # param 3 = the bin dir that stores all .o (.obj) and .d files.
+ # param 4 = the c flags to the compiler
+ # param 5 = the c compiler
+ # param 6 = the c++ flags to the compiler
+ # param 7 = the c++ compiler
+ # param 8 = the flags to the assembler
+
+ ifneq (,$$(filter %.c,$2))
+ # Compile as a C file
+ $1_$2_FLAGS=$4 $$($1_$(notdir $2)_CFLAGS) -DTHIS_FILE='"$$(<F)"' -c
+ $1_$2_COMP=$5
+ $1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
+ else ifneq (,$$(filter %.m,$2))
+ # Compile as a objective-c file
+ $1_$2_FLAGS=-x objective-c $4 $$($1_$(notdir $2)_CFLAGS) -DTHIS_FILE='"$$(<F)"' -c
+ $1_$2_COMP=$5
+ $1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
+ else ifneq (,$$(filter %.s,$2))
+ # Compile as assembler file
+ $1_$2_FLAGS=$8 -DTHIS_FILE='"$$(<F)"'
+ $1_$2_COMP=$(AS)
+ $1_$2_DEP_FLAG:=
+ else
+ # Compile as a C++ file
+ $1_$2_FLAGS=$6 $$($1_$(notdir $2)_CXXFLAGS) -DTHIS_FILE='"$$(<F)"' -c
+ $1_$2_COMP=$7
+ $1_$2_DEP_FLAG:=$(CXX_FLAG_DEPS)
+ endif
+ # Generate the .o (.obj) file name and place it in the bin dir.
+ $1_$2_OBJ:=$3/$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(patsubst %.m,%$(OBJ_SUFFIX),$$(patsubst %.s,%$(OBJ_SUFFIX),$$(notdir $2)))))
+ # Only continue if this object file hasn't been processed already. This lets the first found
+ # source file override any other with the same name.
+ ifeq (,$$(findstring $$($1_$2_OBJ),$$($1_OBJS_SO_FAR)))
+ $1_OBJS_SO_FAR+=$$($1_$2_OBJ)
+ ifeq (,$$(filter %.s,$2))
+ # And this is the dependency file for this obj file.
+ $1_$2_DEP:=$$(patsubst %$(OBJ_SUFFIX),%.d,$$($1_$2_OBJ))
+ # Include previously generated dependency information. (if it exists)
+ -include $$($1_$2_DEP)
+
+ ifeq ($(COMPILER_TYPE),CL)
+ $1_$2_DEBUG_OUT_FLAGS:=-Fd$$(patsubst %$(OBJ_SUFFIX),%.pdb,$$($1_$2_OBJ)) \
+ -Fm$$(patsubst %$(OBJ_SUFFIX),%.map,$$($1_$2_OBJ))
+ endif
+ endif
+
+ $$($1_$2_OBJ) : $2
+ ifeq ($(COMPILER_TYPE),CC)
+ $$(call COMPILING_MSG,$2,$$($1_TARGET))
+ # The Sun studio compiler doesn't output the full path to the object file in the
+ # generated deps files. Fixing it with sed. If compiling assembly, don't try this.
+ ifeq ($(COMPILER_NAME)$$(filter %.s,$2),ossc)
+ $$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP).tmp $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
+ $(SED) 's|^$$(@F):|$$@:|' $$($1_$2_DEP).tmp > $$($1_$2_DEP)
+ else
+ $$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
+ endif
+ endif
+ # The Visual Studio compiler lacks a feature for generating make dependencies, but by
+ # setting -showIncludes, all included files are printed. These are filtered out and
+ # parsed into make dependences.
+ ifeq ($(COMPILER_TYPE),CL)
+ ($$($1_$2_COMP) $$($1_$2_FLAGS) -showIncludes $$($1_$2_DEBUG_OUT_FLAGS) \
+ $(CC_OUT_OPTION)$$($1_$2_OBJ) $2 ; echo $$$$? > $$($1_$2_DEP).exitvalue) \
+ | $(TEE) $$($1_$2_DEP).raw | $(GREP) -v "^Note: including file:" \
+ && exit `cat $$($1_$2_DEP).exitvalue`
+ $(RM) $$($1_$2_DEP).exitvalue
+ ($(ECHO) $$@: \\ \
+ && $(SED) -e '/^Note: including file:/!d' \
+ -e 's|Note: including file: *||' \
+ -e 's|\\|/|g' \
+ -e 's|^\([a-zA-Z]\):|/cygdrive/\1|g' \
+ -e '/$(subst /,\/,$(TOPDIR))/!d' \
+ -e 's|$$$$| \\|g' \
+ $$($1_$2_DEP).raw) > $$($1_$2_DEP)
+ endif
+ endif
+endef
+
+define SetupNativeCompilation
+ # param 1 is for example BUILD_MYPACKAGE
+ # param 2,3,4,5,6,7,8 are named args.
+ # SRC one or more directory roots to scan for C/C++ files.
+ # LANG C or C++
+ # CFLAGS the compiler flags to be used, used both for C and C++.
+ # CXXFLAGS the compiler flags to be used for c++, if set overrides CFLAGS.
+ # LDFLAGS the linker flags to be used, used both for C and C++.
+ # LDFLAGS_SUFFIX the linker flags to be added last on the commandline
+ # typically the libraries linked to.
+ # ARFLAGS the archiver flags to be used
+ # OBJECT_DIR the directory where we store the object files
+ # LIBRARY the resulting library file
+ # PROGRAM the resulting exec file
+ # INCLUDES only pick source from these directories
+ # EXCLUDES do not pick source from these directories
+ # INCLUDE_FILES only compile exactly these files!
+ # EXCLUDE_FILES with these names
+ # VERSIONINFO_RESOURCE Input file for RC. Setting this implies that RC will be run
+ # RC_FLAGS flags for RC.
+ # MAPFILE mapfile
+ # REORDER reorder file
+ # DEBUG_SYMBOLS add debug symbols (if configured on)
+ # CC the compiler to use, default is $(CC)
+ # LDEXE the linker to use for linking executables, default is $(LDEXE)
+ # OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST
+ $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
+ $(call LogSetupMacroEntry,SetupNativeCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15),$(16),$(17),$(18),$(19),$(20),$(21),$(22),$(23),$(24),$(25),$(26))
+ $(if $(27),$(error Internal makefile error: Too many arguments to SetupNativeCompilation, please update NativeCompilation.gmk))
+
+ ifneq (,$$($1_BIN))
+ $$(error BIN has been replaced with OBJECT_DIR)
+ endif
+
+ ifneq (,$$($1_LIB))
+ $$(error LIB has been replaced with LIBRARY)
+ endif
+
+ ifneq (,$$($1_EXE))
+ $$(error EXE has been replaced with PROGRAM)
+ endif
+
+ ifneq (,$$($1_LIBRARY))
+ ifeq (,$$($1_OUTPUT_DIR))
+ $$(error LIBRARY requires OUTPUT_DIR)
+ endif
+
+ ifneq ($$($1_LIBRARY),$(basename $$($1_LIBRARY)))
+ $$(error directory of LIBRARY should be specified using OUTPUT_DIR)
+ endif
+
+ ifneq (,$(findstring $(SHARED_LIBRARY_SUFFIX),$$($1_LIBRARY)))
+ $$(error LIBRARY should be specified without SHARED_LIBRARY_SUFFIX: $(SHARED_LIBRARY_SUFFIX))
+ endif
+
+ ifneq (,$(findstring $(LIBRARY_PREFIX),$$($1_LIBRARY)))
+ $$(error LIBRARY should be specified without LIBRARY_PREFIX: $(LIBRARY_PREFIX))
+ endif
+
+ $1_BASENAME:=$(LIBRARY_PREFIX)$$($1_LIBRARY)$(SHARED_LIBRARY_SUFFIX)
+ $1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
+
+ endif
+
+ ifneq (,$$($1_STATIC_LIBRARY))
+ ifeq (,$$($1_OUTPUT_DIR))
+ $$(error STATIC_LIBRARY requires OUTPUT_DIR)
+ endif
+
+ ifneq ($$($1_STATIC_LIBRARY),$(basename $$($1_STATIC_LIBRARY)))
+ $$(error directory of STATIC_LIBRARY should be specified using OUTPUT_DIR)
+ endif
+
+ ifneq (,$(findstring $(STATIC_LIBRARY_SUFFIX),$$($1_STATIC_LIBRARY)))
+ $$(error STATIC_LIBRARY should be specified without STATIC_LIBRARY_SUFFIX: $(STATIC_LIBRARY_SUFFIX))
+ endif
+
+ ifneq (,$(findstring $(LIBRARY_PREFIX),$$($1_STATIC_LIBRARY)))
+ $$(error STATIC_LIBRARY should be specified without LIBRARY_PREFIX: $(LIBRARY_PREFIX))
+ endif
+
+ $1_BASENAME:=$(LIBRARY_PREFIX)$$($1_STATIC_LIBRARY)$(STATIC_LIBRARY_SUFFIX)
+ $1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
+ endif
+
+ ifneq (,$$($1_PROGRAM))
+ ifeq (,$$($1_OUTPUT_DIR))
+ $$(error PROGRAM requires OUTPUT_DIR)
+ endif
+
+ ifneq ($$($1_PROGRAM),$(basename $$($1_PROGRAM)))
+ $$(error directory of PROGRAM should be specified using OUTPUT_DIR)
+ endif
+
+ ifneq (,$(findstring $(EXE_SUFFIX),$$($1_PROGRAM)))
+ $$(error PROGRAM should be specified without EXE_SUFFIX: $(EXE_SUFFIX))
+ endif
+
+ $1_BASENAME:=$$($1_PROGRAM)$(EXE_SUFFIX)
+ $1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
+
+ endif
+
+ ifeq (,$$($1_TARGET))
+ $$(error Neither PROGRAM, LIBRARY nor STATIC_LIBRARY has been specified for SetupNativeCompilation)
+ endif
+
+ ifeq (,$$($1_LANG))
+ $$(error You have to specify LANG for native compilation $1)
+ endif
+ ifeq (C,$$($1_LANG))
+ ifeq ($$($1_LDEXE),)
+ $1_LDEXE:=$(LDEXE)
+ endif
+ $1_LD:=$(LD)
+ else
+ ifeq (C++,$$($1_LANG))
+ $1_LD:=$(LDCXX)
+ $1_LDEXE:=$(LDEXECXX)
+ else
+ $$(error Unknown native language $$($1_LANG) for $1)
+ endif
+ endif
+
+ ifeq ($$($1_CC),)
+ $1_CC:=$(CC)
+ endif
+
+ # Make sure the dirs exist.
+ $$(eval $$(call MakeDir,$$($1_OBJECT_DIR) $$($1_OUTPUT_DIR)))
+ $$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupNativeCompilation $1 contains missing directory $$d)))
+
+ # Find all files in the source trees. Sort to remove duplicates.
+ $1_ALL_SRCS := $$(sort $$(call CacheFind,$$($1_SRC)))
+ # Extract the C/C++ files.
+ $1_EXCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_EXCLUDE_FILES)))
+ $1_INCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
+ ifneq ($$($1_EXCLUDE_FILES),)
+ $1_EXCLUDE_FILES:=$$(addprefix %,$$($1_EXCLUDE_FILES))
+ endif
+ $1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES),$$(filter %.s %.c %.cpp %.m,$$($1_ALL_SRCS)))
+ ifneq (,$$(strip $$($1_INCLUDE_FILES)))
+ $1_SRCS := $$(filter $$($1_INCLUDE_FILES),$$($1_SRCS))
+ endif
+ ifeq (,$$($1_SRCS))
+ $$(error No sources found for $1 when looking inside the dirs $$($1_SRC))
+ endif
+ # There can be only a single bin dir root, no need to foreach over the roots.
+ $1_BINS := $$(wildcard $$($1_OBJECT_DIR)/*$(OBJ_SUFFIX))
+ # Now we have a list of all c/c++ files to compile: $$($1_SRCS)
+ # and we have a list of all existing object files: $$($1_BINS)
+
+ # Prepend the source/bin path to the filter expressions. Then do the filtering.
+ ifneq ($$($1_INCLUDES),)
+ $1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
+ $1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
+ endif
+ ifneq ($$($1_EXCLUDES),)
+ $1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
+ $1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
+ endif
+
+ # Calculate the expected output from compiling the sources (sort to remove duplicates. Also provides
+ # a reproducable order on the input files to the linker).
+ $1_EXPECTED_OBJS:=$$(sort $$(addprefix $$($1_OBJECT_DIR)/,$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(patsubst %.m,%$(OBJ_SUFFIX),$$(patsubst %.s,%$(OBJ_SUFFIX),$$(notdir $$($1_SRCS))))))))
+ # Are there too many object files on disk? Perhaps because some source file was removed?
+ $1_SUPERFLOUS_OBJS:=$$(sort $$(filter-out $$($1_EXPECTED_OBJS),$$($1_BINS)))
+ # Clean out the superfluous object files.
+ ifneq ($$($1_SUPERFLUOUS_OBJS),)
+ $$(shell $(RM) -f $$($1_SUPERFLUOUS_OBJS))
+ endif
+
+ # Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables for CFLAGS.
+ $1_EXTRA_CFLAGS:=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_CFLAGS_$(OPENJDK_TARGET_OS))
+ ifneq ($(DEBUG_LEVEL),release)
+ # Pickup extra debug dependent variables for CFLAGS
+ $1_EXTRA_CFLAGS+=$$($1_CFLAGS_debug)
+ $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)_debug)
+ $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_debug)
+ else
+ $1_EXTRA_CFLAGS+=$$($1_CFLAGS_release)
+ $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)_release)
+ $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_release)
+ endif
+
+ # Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables for CXXFLAGS.
+ $1_EXTRA_CXXFLAGS:=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS))
+ ifneq ($(DEBUG_LEVEL),release)
+ # Pickup extra debug dependent variables for CXXFLAGS
+ $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_debug)
+ $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_API)_debug)
+ $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_debug)
+ else
+ $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_release)
+ $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_API)_release)
+ $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release)
+ endif
+
+ ifneq (,$$($1_DEBUG_SYMBOLS))
+ ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
+ ifdef OPENJDK
+ # Always add debug symbols
+ $1_EXTRA_CFLAGS+=$(CFLAGS_DEBUG_SYMBOLS)
+ $1_EXTRA_CXXFLAGS+=$(CXXFLAGS_DEBUG_SYMBOLS)
+ else
+ # Programs don't get the debug symbols added in the old build. It's not clear if
+ # this is intentional.
+ ifeq ($$($1_PROGRAM),)
+ $1_EXTRA_CFLAGS+=$(CFLAGS_DEBUG_SYMBOLS)
+ $1_EXTRA_CXXFLAGS+=$(CXXFLAGS_DEBUG_SYMBOLS)
+ endif
+ endif
+ endif
+ endif
+
+ ifeq ($$($1_CXXFLAGS),)
+ $1_CXXFLAGS:=$$($1_CFLAGS)
+ endif
+ ifeq ($$(strip $$($1_EXTRA_CXXFLAGS)),)
+ $1_EXTRA_CXXFLAGS:=$$($1_EXTRA_CFLAGS)
+ endif
+
+ ifneq (,$$($1_REORDER))
+ $1_EXTRA_CFLAGS += $$(C_FLAG_REORDER)
+ $1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER)
+ endif
+
+ ifeq (NONE, $$($1_OPTIMIZATION))
+ $1_EXTRA_CFLAGS += $(C_O_FLAG_NONE)
+ $1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_NONE)
+ else ifeq (LOW, $$($1_OPTIMIZATION))
+ $1_EXTRA_CFLAGS += $(C_O_FLAG_NORM)
+ $1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_NORM)
+ else ifeq (HIGH, $$($1_OPTIMIZATION))
+ $1_EXTRA_CFLAGS += $(C_O_FLAG_HI)
+ $1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_HI)
+ else ifeq (HIGHEST, $$($1_OPTIMIZATION))
+ $1_EXTRA_CFLAGS += $(C_O_FLAG_HIGHEST)
+ $1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_HIGHEST)
+ else ifneq (, $$($1_OPTIMIZATION))
+ $$(error Unknown value for OPTIMIZATION: $$($1_OPTIMIZATION))
+ endif
+
+ # Now call add_native_source for each source file we are going to compile.
+ $$(foreach p,$$($1_SRCS), \
+ $$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR), \
+ $$($1_CFLAGS) $$($1_EXTRA_CFLAGS),$$($1_CC), \
+ $$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS),$(CXX),$$($1_ASFLAGS))))
+
+ # On windows we need to create a resource file
+ ifeq ($(OPENJDK_TARGET_OS), windows)
+ ifneq (,$$($1_VERSIONINFO_RESOURCE))
+ $1_RES:=$$($1_OBJECT_DIR)/$$($1_BASENAME).res
+ $$($1_RES): $$($1_VERSIONINFO_RESOURCE)
+ $(RC) $$($1_RC_FLAGS) $(CC_OUT_OPTION)$$@ $$($1_VERSIONINFO_RESOURCE)
+ endif
+ ifneq (,$$($1_MANIFEST))
+ $1_GEN_MANIFEST:=$$($1_OBJECT_DIR)/$$($1_PROGRAM).manifest
+ IMVERSIONVALUE:=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VERSION).$(COOKED_BUILD_NUMBER)
+ $$($1_GEN_MANIFEST): $$($1_MANIFEST)
+ $(SED) 's%IMVERSION%$$(IMVERSIONVALUE)%g;s%PROGRAM%$$($1_PROGRAM)%g' $$< > $$@
+ endif
+ endif
+
+ # mapfile doesnt seem to be implemented on macosx (yet??)
+ ifneq ($(OPENJDK_TARGET_OS),macosx)
+ ifneq ($(OPENJDK_TARGET_OS),windows)
+ $1_REAL_MAPFILE:=$$($1_MAPFILE)
+ ifneq (,$$($1_REORDER))
+ $1_REAL_MAPFILE:=$$($1_OBJECT_DIR)/mapfile
+
+ $$($1_REAL_MAPFILE) : $$($1_MAPFILE) $$($1_REORDER)
+ $$(MKDIR) -p $$(@D)
+ $$(CP) $$($1_MAPFILE) $$@.tmp
+ $$(SED) -e 's=OUTPUTDIR=$$($1_OBJECT_DIR)=' $$($1_REORDER) >> $$@.tmp
+ $$(MV) $$@.tmp $$@
+ endif
+ endif
+ endif
+
+ # Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables
+ # for LDFLAGS and LDFLAGS_SUFFIX
+ $1_EXTRA_LDFLAGS:=$$($1_LDFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS))
+ $1_EXTRA_LDFLAGS_SUFFIX:=$$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS))
+ ifneq (,$$($1_REAL_MAPFILE))
+ $1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))
+ endif
+
+ $1 := $$($1_TARGET)
+ ifneq (,$$($1_LIBRARY))
+ # Generating a dynamic library.
+ $1_EXTRA_LDFLAGS+=$$(call SET_SHARED_LIBRARY_NAME,$$($1_BASENAME))
+ ifeq ($(OPENJDK_TARGET_OS), windows)
+ $1_EXTRA_LDFLAGS+="-implib:$$($1_OBJECT_DIR)/$$($1_LIBRARY).lib"
+ endif
+
+ $1_EXTRA_LDFLAGS_SUFFIX += $(GLOBAL_LDFLAGS_SUFFIX)
+
+ ifneq (,$$($1_DEBUG_SYMBOLS))
+ ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
+ ifeq ($(OPENJDK_TARGET_OS), windows)
+ $1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_LIBRARY).pdb" \
+ "-map:$$($1_OBJECT_DIR)/$$($1_LIBRARY).map"
+ endif
+
+ ifneq ($$($1_OUTPUT_DIR),$$($1_OBJECT_DIR))
+ $$($1_OUTPUT_DIR)/% : $$($1_OBJECT_DIR)/%
+ $(CP) $$< $$@
+ endif
+
+ ifneq ($(OPENJDK_TARGET_OS), macosx) # OBJCOPY is not used on MacOS X
+ ifneq ($(OPENJDK_TARGET_OS), windows) # nor on Windows
+ ifeq ($(OPENJDK_TARGET_OS), solaris)
+ # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
+ # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
+ # empty section headers until a fixed $(OBJCOPY) is available.
+ # An empty section header has sh_addr == 0 and sh_size == 0.
+ # This problem has only been seen on Solaris X64, but we call this tool
+ # on all Solaris builds just in case.
+ #
+ # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
+ # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
+ $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET) \
+ $(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
+ $(RM) $$@
+ $(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
+ $(OBJCOPY) --only-keep-debug $$< $$@
+ $(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
+ else # not solaris
+ $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET)
+ $(RM) $$@
+ $(OBJCOPY) --only-keep-debug $$< $$@
+ $(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
+ endif # Touch to not retrigger rule on rebuild
+ $(TOUCH) $$@
+ endif # !windows
+ endif # !macosx
+
+ ifeq ($(ZIP_DEBUGINFO_FILES), true)
+ifneq ($(OPENJDK_TARGET_OS), macosx) # no MacOS X support yet
+ $1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz
+
+ ifeq ($(OPENJDK_TARGET_OS), windows)
+ $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz : $$($1_TARGET)
+ $(CD) $$($1_OBJECT_DIR) \
+ && $(ZIP) -q $$@ $$($1_LIBRARY).map $$($1_LIBRARY).pdb
+ else
+ $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz : $$($1_TARGET) \
+ $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
+ $(CD) $$($1_OBJECT_DIR) \
+ && $(ZIP) -q $$@ $$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
+ endif
+endif # no MacOS X support yet
+ else
+ ifeq ($(OPENJDK_TARGET_OS), windows)
+ $1 += $$($1_OUTPUT_DIR)/$$($1_LIBRARY).map \
+ $$($1_OUTPUT_DIR)/$$($1_LIBRARY).pdb
+ else ifneq ($(OPENJDK_TARGET_OS), macosx) # MacOS X does not use .debuginfo files
+ $1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
+ endif
+ endif
+ endif
+ endif
+
+ $$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_REAL_MAPFILE)
+ $$(call LINKING_MSG,$$($1_BASENAME))
+ $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(LD_OUT_OPTION)$$@ \
+ $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \
+ $$($1_EXTRA_LDFLAGS_SUFFIX)
+
+ endif
+
+ ifneq (,$$($1_STATIC_LIBRARY))
+ # Generating a static library, ie object file archive.
+ $$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES)
+ $$(call ARCHIVING_MSG,$$($1_LIBRARY))
+ $(AR) $$($1_AR_FLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_EXPECTED_OBJS) \
+ $$($1_RES) $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)
+ endif
+
+ ifneq (,$$($1_PROGRAM))
+ # A executable binary has been specified, setup the target for it.
+ ifneq (,$$($1_DEBUG_SYMBOLS))
+ ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
+ ifeq ($(OPENJDK_TARGET_OS), windows)
+ $1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_PROGRAM).pdb" \
+ "-map:$$($1_OBJECT_DIR)/$$($1_PROGRAM).map"
+ endif
+
+ ifneq ($$($1_OUTPUT_DIR),$$($1_OBJECT_DIR))
+ $$($1_OUTPUT_DIR)/% : $$($1_OBJECT_DIR)/%
+ $(CP) $$< $$@
+ endif
+
+ ifneq ($(OPENJDK_TARGET_OS), macosx) # OBJCOPY is not used on MacOS X
+ ifneq ($(OPENJDK_TARGET_OS), windows) # nor on Windows
+ ifeq ($(OPENJDK_TARGET_OS), solaris)
+ # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
+ # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
+ # empty section headers until a fixed $(OBJCOPY) is available.
+ # An empty section header has sh_addr == 0 and sh_size == 0.
+ # This problem has only been seen on Solaris X64, but we call this tool
+ # on all Solaris builds just in case.
+ #
+ # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
+ # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
+ $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET) \
+ $(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
+ $(RM) $$@
+ $(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
+ $(OBJCOPY) --only-keep-debug $$< $$@
+ $(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
+ else # not solaris
+ $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET)
+ $(RM) $$@
+ $(OBJCOPY) --only-keep-debug $$< $$@
+ $(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
+ endif
+ $(TOUCH) $$@
+ endif # !windows
+ endif # !macosx
+
+ ifeq ($(ZIP_DEBUGINFO_FILES), true)
+ifneq ($(OPENJDK_TARGET_OS), macosx) # no MacOS X support yet
+ $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).diz
+
+ ifeq ($(OPENJDK_TARGET_OS), windows)
+ $$($1_OBJECT_DIR)/$$($1_PROGRAM).diz : $$($1_TARGET)
+ $(CD) $$($1_OBJECT_DIR) \
+ && $(ZIP) -q $$@ $$($1_PROGRAM).map $$($1_PROGRAM).pdb
+ else
+ $$($1_OBJECT_DIR)/$$(PROGRAM_PREFIX)$$($1_PROGRAM).diz : $$($1_TARGET) \
+ $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo
+ $(CD) $$($1_OBJECT_DIR) \
+ && $(ZIP) -q $$@ $$($1_PROGRAM).debuginfo
+ endif
+endif # no MacOS X support yet
+ else
+ ifeq ($(OPENJDK_TARGET_OS), windows)
+ $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).map \
+ $$($1_OUTPUT_DIR)/$$($1_PROGRAM).pdb
+ else ifneq ($(OPENJDK_TARGET_OS), macosx) # MacOS X does not use .debuginfo files
+ $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).debuginfo
+ endif
+ endif
+ endif
+ endif
+
+ $1_EXTRA_LDFLAGS_SUFFIX += $(GLOBAL_LDFLAGS_SUFFIX)
+
+ $$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_GEN_MANIFEST)
+ $$(call LINKING_EXE_MSG,$$($1_BASENAME))
+ $$($1_LDEXE) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(EXE_OUT_OPTION)$$($1_TARGET) \
+ $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \
+ $$($1_EXTRA_LDFLAGS_SUFFIX)
+ ifneq (,$$($1_GEN_MANIFEST))
+ $(MT) -nologo -manifest $$($1_GEN_MANIFEST) -outputresource:$$@;#1
+ endif
+ # This only works if the openjdk_codesign identity is present on the system. Let
+ # silently fail otherwise.
+ ifneq (,$(CODESIGN))
+ ifneq (,$$($1_CODESIGN))
+ $(CODESIGN) -s openjdk_codesign $$@
+ endif
+ endif
+ endif
+endef
diff --git a/make/common/RMICompilation.gmk b/make/common/RMICompilation.gmk
new file mode 100644
index 0000000..2c87b70
--- /dev/null
+++ b/make/common/RMICompilation.gmk
@@ -0,0 +1,96 @@
+#
+# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+define SetupRMICompilation
+ # param 1 is a name for a variable to depend on.
+ # param 2 and up are named args.
+ # CLASSES:=List of classes to generate stubs for
+ # CLASSES_DIR:=Directory where to look for classes
+ # STUB_CLASSES_DIR:=Directory in where to put stub classes
+ # RUN_V11:=Set to run rmic with -v1.1
+ # RUN_V12:=Set to run rmic with -v1.2
+ # RUN_IIOP:=Set to run rmic with -iiop
+ # RUN_IIOP_STDPKG:=Set to run rmic with -iiop -standardPackage
+ # KEEP_GENERATED:=Set to keep generated sources around
+ $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
+ $(call LogSetupMacroEntry,SetupRMICompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
+ $(if $(16),$(error Internal makefile error: Too many arguments to SetupRMICompilation, please update RMICompilation.gmk))
+
+ $1_DEP_FILE := $$($1_STUB_CLASSES_DIR)/_the.$1_rmic.generated
+
+ $1_CLASSES_SLASH := $$(subst .,/,$$($1_CLASSES))
+ $1_CLASS_FILES := $$(addprefix $$($1_CLASSES_DIR)/,$$(addsuffix .class,$$($1_CLASSES_SLASH)))
+ $1_STUB_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Stub.class,$$($1_CLASSES_SLASH)))
+ $1_TARGETS := $$($1_STUB_FILES)
+ $1_ARGS :=
+ ifneq (,$$($1_RUN_V11))
+ $1_SKEL_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Skel.class,$$($1_CLASSES_SLASH)))
+ $1_TARGETS += $$($1_SKEL_FILES)
+ $1_ARGS += -v1.1
+ endif
+ ifneq (,$$($1_RUN_V12))
+ $1_ARGS += -v1.2
+ endif
+
+ $1_TIE_BASE_FILES := $$(foreach f,$$($1_CLASSES_SLASH),$$(dir $$f)_$$(notdir $$f))
+ $1_TIE_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/org/omg/stub/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
+ $1_TIE_STDPKG_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
+
+ ifneq (,$$($1_RUN_IIOP))
+ $1_TARGETS += $$($1_TIE_FILES)
+ $1_ARGS += -iiop -emitPermissionCheck
+ endif
+ ifneq (,$$($1_RUN_IIOP_STDPKG))
+ $1_TARGETS += $$($1_TIE_STDPKG_FILES)
+ $1_ARGS2 := -iiop -emitPermissionCheck -standardPackage
+ endif
+
+ ifneq (,$$($1_KEEP_GENERATED))
+ $1_ARGS += -keepgenerated
+ $1_TARGETS += $$(subst .class,.java,$$($1_TARGETS))
+ endif
+
+ $1_DOLLAR_SAFE_CLASSES := $$(subst $$$$,\$$$$,$$($1_CLASSES))
+
+ $$($1_TARGETS): $$($1_DEP_FILE) $$($1_CLASS_FILES)
+
+ $$($1_DEP_FILE): $$($1_CLASS_FILES)
+ $(MKDIR) -p $$($1_STUB_CLASSES_DIR)
+ if [ "x$$($1_ARGS)" != "x" ]; then \
+ $(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) && \
+ $(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
+ -d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
+ fi;
+ if [ "x$$($1_ARGS2)" != "x" ]; then \
+ $(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) && \
+ $(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \
+ -d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
+ fi;
+ $(TOUCH) $$@
+
+
+ $1 := $$($1_TARGETS) $$($1_DEP_FILE)
+
+endef
diff --git a/make/common/support/ListPathsSafely-post-compress.incl b/make/common/support/ListPathsSafely-post-compress.incl
new file mode 100644
index 0000000..d8ccf22
--- /dev/null
+++ b/make/common/support/ListPathsSafely-post-compress.incl
@@ -0,0 +1 @@
+))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
diff --git a/make/common/support/ListPathsSafely-pre-compress.incl b/make/common/support/ListPathsSafely-pre-compress.incl
new file mode 100644
index 0000000..7230c6c
--- /dev/null
+++ b/make/common/support/ListPathsSafely-pre-compress.incl
@@ -0,0 +1 @@
+$(subst com,X01,$(subst org,X02,$(subst sun,X03,$(subst java,X04,$(subst javax,X05,$(subst sun/io,X06,$(subst com/sun,X07,$(subst java/io,X08,$(subst org/omg,X09,$(subst org/w3c,X10,$(subst org/xml,X11,$(subst sun/awt,X12,$(subst sun/net,X13,$(subst sun/nio,X14,$(subst sun/rmi,X15,$(subst java/awt,X16,$(subst java/net,X17,$(subst java/nio,X18,$(subst java/rmi,X19,$(subst META-INF,X20,$(subst sun/font,X21,$(subst sun/misc,X22,$(subst sun/text,X23,$(subst sun/util,X24,$(subst java/lang,X25,$(subst java/math,X26,$(subst java/text,X27,$(subst java/util,X28,$(subst javax/jws,X29,$(subst javax/net,X30,$(subst javax/rmi,X31,$(subst javax/xml,X32,$(subst sun/corba,X33,$(subst sun/print,X34,$(subst sun/swing,X35,$(subst java/beans,X36,$(subst javax/lang,X37,$(subst sun/applet,X38,$(subst sun/java2d,X39,$(subst java/applet,X40,$(subst javax/print,X41,$(subst javax/sound,X42,$(subst javax/swing,X43,$(subst javax/tools,X44,$(subst jdk/classes,X45,$(subst org/relaxng,X46,$(subst sun/reflect,X47,$(subst javax/crypto,X48,$(subst javax/naming,X49,$(subst jaxp/classes,X50,$(subst sun/security,X51,$(subst corba/classes,X52,$(subst java/security,X53,$(subst javax/imageio,X54,$(subst jdk/btclasses,X55,$(subst javax/activity,X56,$(subst javax/security,X57,$(subst jdk/newclasses,X58,$(subst sun/instrument,X59,$(subst sun/management,X60,$(subst corba/btclasses,X61,$(subst jdk/democlasses,X62,$(subst javax/activation,X63,$(subst javax/annotation,X64,$(subst javax/management,X65,$(subst javax/transaction,X66,$(subst jaxws/jaf_classes,X67,$(subst langtools/classes,X68,$(subst META-INF/services,X69,$(subst jdk/newdemoclasses,X70,$(subst javax/accessibility,X71,$(subst jaxws/jaxws_classes,X72,
diff --git a/make/common/support/ListPathsSafely-uncompress.sed b/make/common/support/ListPathsSafely-uncompress.sed
new file mode 100644
index 0000000..cd6966c
--- /dev/null
+++ b/make/common/support/ListPathsSafely-uncompress.sed
@@ -0,0 +1,72 @@
+s|X01|com|g
+s|X02|org|g
+s|X03|sun|g
+s|X04|java|g
+s|X05|javax|g
+s|X06|sun/io|g
+s|X07|com/sun|g
+s|X08|java/io|g
+s|X09|org/omg|g
+s|X10|org/w3c|g
+s|X11|org/xml|g
+s|X12|sun/awt|g
+s|X13|sun/net|g
+s|X14|sun/nio|g
+s|X15|sun/rmi|g
+s|X16|java/awt|g
+s|X17|java/net|g
+s|X18|java/nio|g
+s|X19|java/rmi|g
+s|X20|META-INF|g
+s|X21|sun/font|g
+s|X22|sun/misc|g
+s|X23|sun/text|g
+s|X24|sun/util|g
+s|X25|java/lang|g
+s|X26|java/math|g
+s|X27|java/text|g
+s|X28|java/util|g
+s|X29|javax/jws|g
+s|X30|javax/net|g
+s|X31|javax/rmi|g
+s|X32|javax/xml|g
+s|X33|sun/corba|g
+s|X34|sun/print|g
+s|X35|sun/swing|g
+s|X36|java/beans|g
+s|X37|javax/lang|g
+s|X38|sun/applet|g
+s|X39|sun/java2d|g
+s|X40|java/applet|g
+s|X41|javax/print|g
+s|X42|javax/sound|g
+s|X43|javax/swing|g
+s|X44|javax/tools|g
+s|X45|jdk/classes|g
+s|X46|org/relaxng|g
+s|X47|sun/reflect|g
+s|X48|javax/crypto|g
+s|X49|javax/naming|g
+s|X50|jaxp/classes|g
+s|X51|sun/security|g
+s|X52|corba/classes|g
+s|X53|java/security|g
+s|X54|javax/imageio|g
+s|X55|jdk/btclasses|g
+s|X56|javax/activity|g
+s|X57|javax/security|g
+s|X58|jdk/newclasses|g
+s|X59|sun/instrument|g
+s|X60|sun/management|g
+s|X61|corba/btclasses|g
+s|X62|jdk/democlasses|g
+s|X63|javax/activation|g
+s|X64|javax/annotation|g
+s|X65|javax/management|g
+s|X66|javax/transaction|g
+s|X67|jaxws/jaf_classes|g
+s|X68|langtools/classes|g
+s|X69|META-INF/services|g
+s|X70|jdk/newdemoclasses|g
+s|X71|javax/accessibility|g
+s|X72|jaxws/jaxws_classes|g
diff --git a/make/common/support/unicode2x.sed b/make/common/support/unicode2x.sed
new file mode 100644
index 0000000..5188b97
--- /dev/null
+++ b/make/common/support/unicode2x.sed
@@ -0,0 +1,100 @@
+s/\\u0020/\x20/g
+s/\\u003A/\x3A/g
+s/\\u006B/\x6B/g
+s/\\u0075/\x75/g
+s/\\u00A0/\xA0/g
+s/\\u00A3/\xA3/g
+s/\\u00B0/\xB0/g
+s/\\u00B7/\xB7/g
+s/\\u00BA/\xBA/g
+s/\\u00BF/\xBF/g
+s/\\u00C0/\xC0/g
+s/\\u00C1/\xC1/g
+s/\\u00C2/\xC2/g
+s/\\u00C4/\xC4/g
+s/\\u00C5/\xC5/g
+s/\\u00C8/\xC8/g
+s/\\u00C9/\xC9/g
+s/\\u00CA/\xCA/g
+s/\\u00CD/\xCD/g
+s/\\u00CE/\xCE/g
+s/\\u00D3/\xD3/g
+s/\\u00D4/\xD4/g
+s/\\u00D6/\xD6/g
+s/\\u00DA/\xDA/g
+s/\\u00DC/\xDC/g
+s/\\u00DD/\xDD/g
+s/\\u00DF/\xDF/g
+s/\\u00E0/\xE0/g
+s/\\u00E1/\xE1/g
+s/\\u00E2/\xE2/g
+s/\\u00E3/\xE3/g
+s/\\u00E4/\xE4/g
+s/\\u00E5/\xE5/g
+s/\\u00E6/\xE6/g
+s/\\u00E7/\xE7/g
+s/\\u00E8/\xE8/g
+s/\\u00E9/\xE9/g
+s/\\u00EA/\xEA/g
+s/\\u00EB/\xEB/g
+s/\\u00EC/\xEC/g
+s/\\u00ED/\xED/g
+s/\\u00EE/\xEE/g
+s/\\u00EF/\xEF/g
+s/\\u00F1/\xF1/g
+s/\\u00F2/\xF2/g
+s/\\u00F3/\xF3/g
+s/\\u00F4/\xF4/g
+s/\\u00F5/\xF5/g
+s/\\u00F6/\xF6/g
+s/\\u00F9/\xF9/g
+s/\\u00FA/\xFA/g
+s/\\u00FC/\xFC/g
+s/\\u0020/\x20/g
+s/\\u003f/\x3f/g
+s/\\u006f/\x6f/g
+s/\\u0075/\x75/g
+s/\\u00a0/\xa0/g
+s/\\u00a3/\xa3/g
+s/\\u00b0/\xb0/g
+s/\\u00ba/\xba/g
+s/\\u00bf/\xbf/g
+s/\\u00c1/\xc1/g
+s/\\u00c4/\xc4/g
+s/\\u00c5/\xc5/g
+s/\\u00c8/\xc8/g
+s/\\u00c9/\xc9/g
+s/\\u00ca/\xca/g
+s/\\u00cd/\xcd/g
+s/\\u00d6/\xd6/g
+s/\\u00dc/\xdc/g
+s/\\u00dd/\xdd/g
+s/\\u00df/\xdf/g
+s/\\u00e0/\xe0/g
+s/\\u00e1/\xe1/g
+s/\\u00e2/\xe2/g
+s/\\u00e3/\xe3/g
+s/\\u00e4/\xe4/g
+s/\\u00e5/\xe5/g
+s/\\u00e7/\xe7/g
+s/\\u00e8/\xe8/g
+s/\\u00e9/\xe9/g
+s/\\u00ea/\xea/g
+s/\\u00eb/\xeb/g
+s/\\u00ec/\xec/g
+s/\\u00ed/\xed/g
+s/\\u00ee/\xee/g
+s/\\u00ef/\xef/g
+s/\\u00f0/\xf0/g
+s/\\u00f1/\xf1/g
+s/\\u00f2/\xf2/g
+s/\\u00f3/\xf3/g
+s/\\u00f4/\xf4/g
+s/\\u00f5/\xf5/g
+s/\\u00f6/\xf6/g
+s/\\u00f7/\xf7/g
+s/\\u00f8/\xf8/g
+s/\\u00f9/\xf9/g
+s/\\u00fa/\xfa/g
+s/\\u00fc/\xfc/g
+s/\\u00ff/\xff/g
diff --git a/make/corba-rules.gmk b/make/corba-rules.gmk
deleted file mode 100644
index 7bfedde..0000000
--- a/make/corba-rules.gmk
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-################################################################
-# CORBA TARGETS
-################################################################
-
-CORBA_BUILD_ARGUMENTS = \
- $(COMMON_BUILD_ARGUMENTS) \
- ALT_OUTPUTDIR=$(CORBA_OUTPUTDIR) \
- ALT_BOOTDIR=$(BOOTDIR) \
- ALT_JDK_IMPORT_PATH=$(JDK_IMPORT_PATH)
-
-ifeq ($(BUILD_LANGTOOLS), true)
- CORBA_BUILD_ARGUMENTS += ALT_LANGTOOLS_DIST=$(ABS_LANGTOOLS_DIST)
-endif
-
-corba: corba-build
-corba-build:
- $(MKDIR) -p $(CORBA_OUTPUTDIR)
- @$(call MakeStart,corba,all)
- ($(CD) $(CORBA_TOPDIR)/make && \
- $(MAKE) $(CORBA_BUILD_ARGUMENTS) all)
- @$(call MakeFinish,corba,all)
-
-corba-clobber::
- $(MKDIR) -p $(CORBA_OUTPUTDIR)
- @$(call MakeStart,corba,clobber)
- ($(CD) $(CORBA_TOPDIR)/make && \
- $(MAKE) $(CORBA_BUILD_ARGUMENTS) clobber)
- @$(call MakeFinish,corba,clobber)
-
-.PHONY: corba corba-build corba-clobber
-
diff --git a/make/deploy-rules.gmk b/make/deploy-rules.gmk
deleted file mode 100644
index 69c493d..0000000
--- a/make/deploy-rules.gmk
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-################################################################
-# DEPLOY TARGETS
-################################################################
-
-deploy: deploy-build
-
-DEPLOY = deploy
-
-# put the generated bundles in their own place in OUTPUTDIR
-DEPLOY_OUTPUTDIR = $(ABS_OUTPUTDIR)
-
-# NO_IMAGES may be set in conjunction with DEV_ONLY
-ifdef NO_IMAGES
- IMAGES_TARGET =
-else
- IMAGES_TARGET = images
-endif
-
-DEPLOY_BUILD_TARGETS = sanity deploy
-
-ifneq ($(JQS), off)
- ifeq ($(ARCH_DATA_MODEL), 32)
- ifeq ($(PLATFORM), windows)
- DEPLOY_BUILD_TARGETS += jqs-all
- endif
- endif
-endif
-
-ifndef DEV_ONLY
- DEPLOY_BUILD_TARGETS += images
-else
- DEPLOY_BUILD_TARGETS += $(IMAGES_TARGET)
-endif
-
-DEPLOY_BUILD_ARGUMENTS = $(COMMON_BUILD_ARGUMENTS) \
- ALT_OUTPUTDIR=$(DEPLOY_OUTPUTDIR)
-
-ifeq ($(BUILD_LANGTOOLS), true)
- DEPLOY_BUILD_ARGUMENTS += ALT_LANGTOOLS_DIST=$(ABS_LANGTOOLS_DIST)
-endif
-
-ifdef ALT_IMAGE_DIR
- DEPLOY_BUILD_ARGUMENTS += ALT_IMAGE_DIR=$(ALT_IMAGE_DIR)
-endif
-
-ifdef ALT_BUNDLE_DATE
- DEPLOY_BUILD_ARGUMENTS += ALT_BUNDLE_DATE=$(ALT_BUNDLE_DATE)
-endif
-
-ifdef ALT_JAVAWS_BOOTDIR
- DEPLOY_BUILD_ARGUMENTS += ALT_JAVAWS_BOOTDIR=$(ALT_JAVAWS_BOOTDIR)
-endif
-
-ifdef CERT
- DEPLOY_BUILD_ARGUMENTS += CERT=$(CERT)
-endif
-
-ifdef PKEY
- DEPLOY_BUILD_ARGUMENTS += PKEY=$(PKEY)
-endif
-
-deploy-build:
-ifeq ($(BUILD_DEPLOY), true)
- @$(call MakeStart,deploy,$(DEPLOY_BUILD_TARGETS))
- ($(CD) $(DEPLOY_TOPDIR)/make && \
- $(MAKE) $(DEPLOY_BUILD_TARGETS) $(DEPLOY_BUILD_ARGUMENTS))
- @$(call MakeFinish,deploy,$(DEPLOY_BUILD_TARGETS))
-endif
-
-deploy-clobber::
-ifeq ($(BUILD_DEPLOY), true)
- @$(call MakeStart,deploy,clobber)
- ($(CD) $(DEPLOY_TOPDIR)/make && \
- $(MAKE) clobber $(DEPLOY_BUILD_ARGUMENTS))
- @$(call MakeFinish,deploy,clobber)
-endif
-
-deploy-sanity::
-ifeq ($(BUILD_DEPLOY), true)
- ($(CD) $(DEPLOY_TOPDIR)/make && \
- $(MAKE) sanity $(DEPLOY_BUILD_ARGUMENTS))
-endif
-
-.PHONY: deploy deploy-build deploy-clobber deploy-sanity
-
diff --git a/make/devkit/Makefile b/make/devkit/Makefile
new file mode 100644
index 0000000..a6a5ca9
--- /dev/null
+++ b/make/devkit/Makefile
@@ -0,0 +1,121 @@
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+##########################################################################################
+#
+# This Makefile, together with Tools.gmk, can be used to compile a set of
+# gcc based cross compilation, portable, self contained packages, capable
+# of building OpenJDK.
+#
+# In addition to the makefiles, access to Oracle Linux installation
+# media is required. This has been tested against Oracle Enterprise Linux
+# 5.5. Set variables RPM_DIR_x86_64 and RPM_DIR_i686 respectively to point
+# to directory containing the RPMs.
+#
+# By default this Makefile will build crosstools for:
+# * i686-unknown-linux-gnu
+# * x86_64-unknown-linux-gnu
+# The x86_64 version of the compilers will work in multi arch mode and will
+# be able to compile 32bit binaries with the -m32 flag. This makes the
+# explicit cross compiler for i686 somewhat redundant and is a known issue.
+#
+# To build the full set of crosstools, use a command line looking like this:
+#
+# make tars RPM_DIR_x86_64=/tmp/oel55-x86_64/Server/ RPM_DIR_i686=/tmp/oel55-i686/Server/
+#
+# To create a x86_64 package without the redundant i686 cross compiler, do
+# like this:
+#
+# make tars platforms=x86_64-unknown-linux-gnu RPM_DIR_x86_64=/tmp/oel55-x86_64/Server/ RPM_DIR_i686=/tmp/oel55-i686/Server/
+
+#
+# Main makefile which iterates over all host and target platforms.
+#
+
+os := $(shell uname -o)
+cpu := x86_64
+#$(shell uname -p)
+
+#
+# This wrapper script can handle exactly these platforms
+#
+platforms := $(foreach p,x86_64 i686,$(p)-unknown-linux-gnu)
+#platforms := $(foreach p,x86_64,$(p)-unknown-linux-gnu)
+
+# Figure out what platform this is building on.
+me := $(cpu)-$(if $(findstring Linux,$(os)),unknown-linux-gnu)
+
+$(info Building on platform $(me))
+
+all compile : $(platforms)
+
+ifeq (,$(SKIP_ME))
+ $(foreach p,$(filter-out $(me),$(platforms)),$(eval $(p) : $$(me)))
+endif
+
+OUTPUT_ROOT = $(abspath ../../../build/devkit)
+RESULT = $(OUTPUT_ROOT)/result
+
+submakevars = HOST=$@ BUILD=$(me) \
+ RESULT=$(RESULT) PREFIX=$(RESULT)/$@ \
+ OUTPUT_ROOT=$(OUTPUT_ROOT)
+$(platforms) :
+ @echo 'Building compilers for $@'
+ @echo 'Targets: $(platforms)'
+ for p in $@ $(filter-out $@,$(platforms)); do \
+ $(MAKE) -f Tools.gmk all $(submakevars) \
+ TARGET=$$p || exit 1 ; \
+ done
+ @echo 'Building ccache program for $@'
+ $(MAKE) -f Tools.gmk ccache $(submakevars) TARGET=$@
+ @echo 'All done"'
+
+$(foreach a,i686 x86_64,$(eval $(a) : $(filter $(a)%,$(platforms))))
+
+ia32 : i686
+today := $(shell date +%Y%m%d)
+
+
+define Mktar
+ $(1)_tar = $$(RESULT)/sdk-$(1)-$$(today).tar.gz
+ $$($(1)_tar) : PLATFORM = $(1)
+ TARFILES += $$($(1)_tar)
+ $$($(1)_tar) : $(1) $$(shell find $$(RESULT)/$(1))
+endef
+
+$(foreach p,$(platforms),$(eval $(call Mktar,$(p))))
+
+tars : all $(TARFILES)
+onlytars : $(TARFILES)
+%.tar.gz :
+ @echo 'Creating compiler package $@'
+ cd $(RESULT)/$(PLATFORM) && tar -czf $@ *
+ touch $@
+
+clean :
+ rm -rf build result
+
+FORCE :
+.PHONY : $(configs) $(platforms)
diff --git a/make/devkit/Tools.gmk b/make/devkit/Tools.gmk
new file mode 100644
index 0000000..457dacb
--- /dev/null
+++ b/make/devkit/Tools.gmk
@@ -0,0 +1,473 @@
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+##########################################################################################
+#
+# Workhorse makefile for creating ONE cross compiler
+# Needs either to be from BUILD -> BUILD OR have
+# BUILD -> HOST prebuilt
+#
+# NOTE: There is a bug here. We don't limit the
+# PATH when building BUILD -> BUILD, which means that
+# if you configure after you've once build the BUILD->BUILD
+# compiler THAT one will be picked up as the compiler for itself.
+# This is not so great, especially if you did a partial delete
+# of the target tree.
+#
+# Fix this...
+#
+
+$(info TARGET=$(TARGET))
+$(info HOST=$(HOST))
+$(info BUILD=$(BUILD))
+
+ARCH := $(word 1,$(subst -, ,$(TARGET)))
+
+##########################################################################################
+# Define external dependencies
+
+# Latest that could be made to work.
+gcc_ver := gcc-4.7.3
+binutils_ver := binutils-2.22
+ccache_ver := ccache-3.1.9
+mpfr_ver := mpfr-3.0.1
+gmp_ver := gmp-4.3.2
+mpc_ver := mpc-1.0.1
+
+GCC := http://ftp.gnu.org/pub/gnu/gcc/$(gcc_ver)/$(gcc_ver).tar.bz2
+BINUTILS := http://ftp.gnu.org/pub/gnu/binutils/$(binutils_ver).tar.bz2
+CCACHE := http://samba.org/ftp/ccache/$(ccache_ver).tar.gz
+MPFR := http://www.mpfr.org/${mpfr_ver}/${mpfr_ver}.tar.bz2
+GMP := http://ftp.gnu.org/pub/gnu/gmp/${gmp_ver}.tar.bz2
+MPC := http://www.multiprecision.org/mpc/download/${mpc_ver}.tar.gz
+
+# RPMs in OEL5.5
+RPM_LIST := \
+ kernel-headers \
+ glibc-2 glibc-headers glibc-devel \
+ cups-libs cups-devel \
+ libX11 libX11-devel \
+ xorg-x11-proto-devel \
+ alsa-lib alsa-lib-devel \
+ libXext libXext-devel \
+ libXtst libXtst-devel \
+ libXrender libXrender-devel \
+ freetype freetype-devel \
+ libXt libXt-devel \
+ libSM libSM-devel \
+ libICE libICE-devel \
+ libXi libXi-devel \
+ libXdmcp libXdmcp-devel \
+ libXau libXau-devel \
+ libgcc
+
+
+ifeq ($(ARCH),x86_64)
+ RPM_DIR ?= $(RPM_DIR_x86_64)
+ RPM_ARCHS := x86_64
+ ifeq ($(BUILD),$(HOST))
+ ifeq ($(TARGET),$(HOST))
+ # When building the native compiler for x86_64, enable mixed mode.
+ RPM_ARCHS += i386 i686
+ endif
+ endif
+else
+ RPM_DIR ?= $(RPM_DIR_i686)
+ RPM_ARCHS := i386 i686
+endif
+
+# Sort to remove duplicates
+RPM_FILE_LIST := $(sort $(foreach a,$(RPM_ARCHS),$(wildcard $(patsubst %,$(RPM_DIR)/%*$a.rpm,$(RPM_LIST)))))
+
+ifeq ($(RPM_FILE_LIST),)
+ $(error Found no RPMs, RPM_DIR must point to list of directories to search for RPMs)
+endif
+
+##########################################################################################
+# Define common directories and files
+
+# Ensure we have 32-bit libs also for x64. We enable mixed-mode.
+ifeq (x86_64,$(ARCH))
+ LIBDIRS := lib64 lib
+ CFLAGS_lib := -m32
+else
+ LIBDIRS := lib
+endif
+
+# Define directories
+RESULT := $(OUTPUT_ROOT)/result
+BUILDDIR := $(OUTPUT_ROOT)/$(HOST)/$(TARGET)
+PREFIX := $(RESULT)/$(HOST)
+TARGETDIR := $(PREFIX)/$(TARGET)
+SYSROOT := $(TARGETDIR)/sys-root
+DOWNLOAD := $(OUTPUT_ROOT)/download
+SRCDIR := $(OUTPUT_ROOT)/src
+
+# Marker file for unpacking rpms
+rpms := $(SYSROOT)/rpms_unpacked
+
+# Need to patch libs that are linker scripts to use non-absolute paths
+libs := $(SYSROOT)/libs_patched
+
+##########################################################################################
+# Unpack source packages
+
+# Generate downloading + unpacking of sources.
+define Download
+ $(1)_DIR = $(abspath $(SRCDIR)/$(basename $(basename $(notdir $($(1))))))
+ $(1)_CFG = $$($(1)_DIR)/configure
+ $(1)_FILE = $(DOWNLOAD)/$(notdir $($(1)))
+
+ $$($(1)_CFG) : $$($(1)_FILE)
+ mkdir -p $$(SRCDIR)
+ tar -C $$(SRCDIR) -x$$(if $$(findstring .gz, $$<),z,j)f $$<
+ $$(foreach p,$$(abspath $$(wildcard $$(notdir $$($(1)_DIR)).patch)), \
+ echo PATCHING $$(p) ; \
+ patch -d $$($(1)_DIR) -p1 -i $$(p) ; \
+ )
+ touch $$@
+
+ $$($(1)_FILE) :
+ wget -P $(DOWNLOAD) $$($(1))
+endef
+
+# Download and unpack all source packages
+$(foreach p,GCC BINUTILS CCACHE MPFR GMP MPC,$(eval $(call Download,$(p))))
+
+##########################################################################################
+# Unpack RPMS
+
+# Note. For building linux you should install rpm2cpio.
+define unrpm
+ $(SYSROOT)/$(notdir $(1)).unpacked \
+ : $(1)
+ $$(rpms) : $(SYSROOT)/$(notdir $(1)).unpacked
+endef
+
+%.unpacked :
+ $(info Unpacking target rpms and libraries from $<)
+ @(mkdir -p $(@D); \
+ cd $(@D); \
+ rpm2cpio $< | \
+ cpio --extract --make-directories \
+ -f \
+ "./usr/share/doc/*" \
+ "./usr/share/man/*" \
+ "./usr/X11R6/man/*" \
+ "*/X11/locale/*" \
+ || die ; )
+ touch $@
+
+$(foreach p,$(RPM_FILE_LIST),$(eval $(call unrpm,$(p))))
+
+##########################################################################################
+
+# Note: MUST create a <sys-root>/usr/lib even if not really needed.
+# gcc will use a path relative to it to resolve lib64. (x86_64).
+# we're creating multi-lib compiler with 32bit libc as well, so we should
+# have it anyway, but just to make sure...
+# Patch libc.so and libpthread.so to force linking against libraries in sysroot
+# and not the ones installed on the build machine.
+$(libs) : $(rpms)
+ @echo Patching libc and pthreads
+ @(for f in `find $(SYSROOT) -name libc.so -o -name libpthread.so`; do \
+ (cat $$f | sed -e 's|/usr/lib64/||g' \
+ -e 's|/usr/lib/||g' \
+ -e 's|/lib64/||g' \
+ -e 's|/lib/||g' ) > $$f.tmp ; \
+ mv $$f.tmp $$f ; \
+ done)
+ @mkdir -p $(SYSROOT)/usr/lib
+ @touch $@
+
+##########################################################################################
+
+# Define marker files for each source package to be compiled
+$(foreach t,binutils mpfr gmp mpc gcc ccache,$(eval $(t) = $(TARGETDIR)/$($(t)_ver).done))
+
+##########################################################################################
+
+# Default base config
+CONFIG = --target=$(TARGET) \
+ --host=$(HOST) --build=$(BUILD) \
+ --prefix=$(PREFIX)
+
+PATHEXT = $(RESULT)/$(BUILD)/bin:
+
+PATHPRE = PATH=$(PATHEXT)$(PATH)
+BUILDPAR = -j16
+
+# Default commands to when making
+MAKECMD =
+INSTALLCMD = install
+
+
+declare_tools = CC$(1)=$(2)gcc LD$(1)=$(2)ld AR$(1)=$(2)ar AS$(1)=$(2)as RANLIB$(1)=$(2)ranlib CXX$(1)=$(2)g++ OBJDUMP$(1)=$(2)objdump
+
+ifeq ($(HOST),$(BUILD))
+ ifeq ($(HOST),$(TARGET))
+ TOOLS = $(call declare_tools,_FOR_TARGET,)
+ endif
+endif
+
+TOOLS ?= $(call declare_tools,_FOR_TARGET,$(TARGET)-)
+
+##########################################################################################
+
+# Create a TARGET bfd + libiberty only.
+# Configure one or two times depending on mulitlib arch.
+# If multilib, the second should be 32-bit, and we resolve
+# CFLAG_<name> to most likely -m32.
+define mk_bfd
+ $$(info Libs for $(1))
+ $$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile \
+ : CFLAGS += $$(CFLAGS_$(1))
+ $$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile \
+ : LIBDIRS = --libdir=$(TARGETDIR)/$(1)
+
+ bfdlib += $$(TARGETDIR)/$$(binutils_ver)-$(subst /,-,$(1)).done
+ bfdmakes += $$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile
+endef
+
+# Create one set of bfds etc for each multilib arch
+$(foreach l,$(LIBDIRS),$(eval $(call mk_bfd,$(l))))
+
+# Only build these two libs.
+$(bfdlib) : MAKECMD = all-libiberty all-bfd
+$(bfdlib) : INSTALLCMD = install-libiberty install-bfd
+
+# Building targets libbfd + libiberty. HOST==TARGET, i.e not
+# for a cross env.
+$(bfdmakes) : CONFIG = --target=$(TARGET) \
+ --host=$(TARGET) --build=$(BUILD) \
+ --prefix=$(TARGETDIR) \
+ --with-sysroot=$(SYSROOT) \
+ $(LIBDIRS)
+
+$(bfdmakes) : TOOLS = $(call declare_tools,_FOR_TARGET,$(TARGET)-) $(call declare_tools,,$(TARGET)-)
+
+##########################################################################################
+
+$(gcc) \
+ $(binutils) \
+ $(gmp) \
+ $(mpfr) \
+ $(mpc) \
+ $(bfdmakes) \
+ $(ccache) : ENVS += $(TOOLS)
+
+# libdir to work around hateful bfd stuff installing into wrong dirs...
+# ensure we have 64 bit bfd support in the HOST library. I.e our
+# compiler on i686 will know 64 bit symbols, BUT later
+# we build just the libs again for TARGET, then with whatever the arch
+# wants.
+$(BUILDDIR)/$(binutils_ver)/Makefile : CONFIG += --enable-64-bit-bfd --libdir=$(PREFIX)/$(word 1,$(LIBDIRS))
+
+# Makefile creation. Simply run configure in build dir.
+$(bfdmakes) \
+$(BUILDDIR)/$(binutils_ver)/Makefile \
+ : $(BINUTILS_CFG)
+ $(info Configuring $@. Log in $(@D)/log.config)
+ @mkdir -p $(@D)
+ ( \
+ cd $(@D) ; \
+ $(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
+ $(BINUTILS_CFG) \
+ $(CONFIG) \
+ --with-sysroot=$(SYSROOT) \
+ --disable-nls \
+ --program-prefix=$(TARGET)- \
+ --enable-multilib \
+ ) > $(@D)/log.config 2>&1
+ @echo 'done'
+
+$(BUILDDIR)/$(mpfr_ver)/Makefile \
+ : $(MPFR_CFG)
+ $(info Configuring $@. Log in $(@D)/log.config)
+ @mkdir -p $(@D)
+ ( \
+ cd $(@D) ; \
+ $(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
+ $(MPFR_CFG) \
+ $(CONFIG) \
+ --program-prefix=$(TARGET)- \
+ --enable-shared=no \
+ --with-gmp=$(PREFIX) \
+ ) > $(@D)/log.config 2>&1
+ @echo 'done'
+
+$(BUILDDIR)/$(gmp_ver)/Makefile \
+ : $(GMP_CFG)
+ $(info Configuring $@. Log in $(@D)/log.config)
+ @mkdir -p $(@D)
+ ( \
+ cd $(@D) ; \
+ $(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
+ $(GMP_CFG) \
+ --host=$(HOST) --build=$(BUILD) \
+ --prefix=$(PREFIX) \
+ --disable-nls \
+ --program-prefix=$(TARGET)- \
+ --enable-shared=no \
+ --with-mpfr=$(PREFIX) \
+ ) > $(@D)/log.config 2>&1
+ @echo 'done'
+
+$(BUILDDIR)/$(mpc_ver)/Makefile \
+ : $(MPC_CFG)
+ $(info Configuring $@. Log in $(@D)/log.config)
+ @mkdir -p $(@D)
+ ( \
+ cd $(@D) ; \
+ $(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
+ $(MPC_CFG) \
+ $(CONFIG) \
+ --program-prefix=$(TARGET)- \
+ --enable-shared=no \
+ --with-mpfr=$(PREFIX) \
+ --with-gmp=$(PREFIX) \
+ ) > $(@D)/log.config 2>&1
+ @echo 'done'
+
+# Only valid if glibc target -> linux
+# proper destructor handling for c++
+ifneq (,$(findstring linux,$(TARGET)))
+ $(BUILDDIR)/$(gcc_ver)/Makefile : CONFIG += --enable-__cxa_atexit
+endif
+
+# Want:
+# c,c++
+# shared libs
+# multilib (-m32/-m64 on x64)
+# skip native language.
+# and link and assemble with the binutils we created
+# earlier, so --with-gnu*
+$(BUILDDIR)/$(gcc_ver)/Makefile \
+ : $(GCC_CFG)
+ $(info Configuring $@. Log in $(@D)/log.config)
+ mkdir -p $(@D)
+ ( \
+ cd $(@D) ; \
+ $(PATHPRE) $(ENVS) $(GCC_CFG) $(EXTRA_CFLAGS) \
+ $(CONFIG) \
+ --with-sysroot=$(SYSROOT) \
+ --enable-languages=c,c++ \
+ --enable-shared \
+ --enable-multilib \
+ --disable-nls \
+ --with-gnu-as \
+ --with-gnu-ld \
+ --with-mpfr=$(PREFIX) \
+ --with-gmp=$(PREFIX) \
+ --with-mpc=$(PREFIX) \
+ ) > $(@D)/log.config 2>&1
+ @echo 'done'
+
+# need binutils for gcc
+$(gcc) : $(binutils)
+
+# as of 4.3 or so need these for doing config
+$(BUILDDIR)/$(gcc_ver)/Makefile : $(gmp) $(mpfr) $(mpc)
+$(mpfr) : $(gmp)
+$(mpc) : $(gmp) $(mpfr)
+
+##########################################################################################
+# very straightforward. just build a ccache. it is only for host.
+$(BUILDDIR)/$(ccache_ver)/Makefile \
+ : $(CCACHE_CFG)
+ $(info Configuring $@. Log in $(@D)/log.config)
+ @mkdir -p $(@D)
+ @( \
+ cd $(@D) ; \
+ $(PATHPRE) $(ENVS) $(CCACHE_CFG) \
+ $(CONFIG) \
+ ) > $(@D)/log.config 2>&1
+ @echo 'done'
+
+gccpatch = $(TARGETDIR)/gcc-patched
+
+##########################################################################################
+# For some reason cpp is not created as a target-compiler
+ifeq ($(HOST),$(TARGET))
+ $(gccpatch) : $(gcc) link_libs
+ @echo -n 'Creating compiler symlinks...'
+ @for f in cpp; do \
+ if [ ! -e $(PREFIX)/bin/$(TARGET)-$$f ]; \
+ then \
+ cd $(PREFIX)/bin && \
+ ln -s $$f $(TARGET)-$$f ; \
+ fi \
+ done
+ @touch $@
+ @echo 'done'
+
+ ##########################################################################################
+ # Ugly at best. Seems that when we compile host->host compiler, that are NOT
+ # the BUILD compiler, the result will not try searching for libs in package root.
+ # "Solve" this by create links from the target libdirs to where they are.
+ link_libs:
+ @echo -n 'Creating library symlinks...'
+ @$(foreach l,$(LIBDIRS), \
+ for f in `cd $(PREFIX)/$(l) && ls`; do \
+ if [ ! -e $(TARGETDIR)/$(l)/$$f ]; then \
+ mkdir -p $(TARGETDIR)/$(l) && \
+ cd $(TARGETDIR)/$(l)/ && \
+ ln -s $(if $(findstring /,$(l)),../,)../../$(l)/$$f $$f; \
+ fi \
+ done;)
+ @echo 'done'
+else
+ $(gccpatch) :
+ @echo 'done'
+endif
+
+##########################################################################################
+# Build in two steps.
+# make <default>
+# make install.
+# Use path to our build hosts cross tools
+# Always need to build cross tools for build host self.
+$(TARGETDIR)/%.done : $(BUILDDIR)/%/Makefile
+ $(info Building $(basename $@). Log in $(<D)/log.build)
+ $(PATHPRE) $(ENVS) $(MAKE) $(BUILDPAR) -f $< -C $(<D) $(MAKECMD) $(MAKECMD.$(notdir $@)) > $(<D)/log.build 2>&1
+ @echo -n 'installing...'
+ $(PATHPRE) $(MAKE) $(INSTALLPAR) -f $< -C $(<D) $(INSTALLCMD) $(MAKECMD.$(notdir $@)) > $(<D)/log.install 2>&1
+ @touch $@
+ @echo 'done'
+
+##########################################################################################
+
+bfdlib : $(bfdlib)
+binutils : $(binutils)
+rpms : $(rpms)
+libs : $(libs)
+sysroot : rpms libs
+gcc : sysroot $(gcc) $(gccpatch)
+all : binutils gcc bfdlib
+
+# this is only built for host. so separate.
+ccache : $(ccache)
+
+.PHONY : gcc all binutils bfdlib link_libs rpms libs sysroot
diff --git a/make/hotspot-rules.gmk b/make/hotspot-rules.gmk
deleted file mode 100644
index 4271210..0000000
--- a/make/hotspot-rules.gmk
+++ /dev/null
@@ -1,120 +0,0 @@
-#
-# Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-################################################################
-# HOTSPOT TARGETS
-################################################################
-
-# All the output from a hotspot build should be re-located to the
-# build output area.
-#
-HOTSPOT_OUTPUTDIR = $(HOTSPOT_DIR)/outputdir
-
-# HOTSPOT_EXPORT_PATH points to a dir that contains files
-# that are needed in an SDK build, in the same relative positions as
-# these files are in an SDK image.
-# The SDK java/redist/Makefile will copy files from HOTSPOT_EXPORT_PATH
-# into the SDK being built.
-# This is the export path supplied to the hotspot makefiles.
-#
-HOTSPOT_EXPORT_PATH = $(HOTSPOT_DIR)/import
-
-# Default targets
-HOTSPOT = hotspot-sanity hotspot-build
-
-hotspot:: $(HOTSPOT)
-
-# Hotspot clobber removes the output directory and exported files
-hotspot-clobber::
- $(RM) -r $(HOTSPOT_OUTPUTDIR)
- $(RM) -r $(HOTSPOT_EXPORT_PATH)
-
-hotspot-sanity::
- @$(MKDIR) -p $(HOTSPOT_OUTPUTDIR)
- @$(MKDIR) -p $(HOTSPOT_EXPORT_PATH)
- @$(ECHO) "Hotspot Settings: \n" \
- " HOTSPOT_BUILD_JOBS = $(HOTSPOT_BUILD_JOBS) \n" \
- " HOTSPOT_OUTPUTDIR = $(HOTSPOT_OUTPUTDIR) \n" \
- " HOTSPOT_EXPORT_PATH = $(HOTSPOT_EXPORT_PATH) \n" \
- "\n" >> $(MESSAGE_FILE)
-
-#
-# Basic hotspot build and export of it's files
-#
-
-HOTSPOT_TARGET = all_product
-ifeq ($(DEBUG_NAME), debug)
- HOTSPOT_TARGET = all_debug
-endif
-ifeq ($(DEBUG_NAME), fastdebug)
- HOTSPOT_TARGET = all_fastdebug
-endif
-BUILD_FLAVOR=$(HOTSPOT_TARGET:all_%=%)
-
-ifeq ($(ZERO_BUILD), true)
- ifeq ($(SHARK_BUILD), true)
- HOTSPOT_TARGET := $(HOTSPOT_TARGET)shark
- else
- HOTSPOT_TARGET := $(HOTSPOT_TARGET)zero
- endif
-endif
-
-HOTSPOT_BUILD_ARGUMENTS += $(COMMON_BUILD_ARGUMENTS)
-HOTSPOT_BUILD_ARGUMENTS += ALT_OUTPUTDIR=$(HOTSPOT_OUTPUTDIR)
-HOTSPOT_BUILD_ARGUMENTS += ALT_EXPORT_PATH=$(HOTSPOT_EXPORT_PATH)
-HOTSPOT_BUILD_ARGUMENTS += BUILD_FLAVOR=$(BUILD_FLAVOR)
-
-# Why do these need to be passed in? Because of windows nmake? and MAKEFLAGS=?
-# Or is there something wrong with hotspot/make/Makefile?
-HOTSPOT_BUILD_ARGUMENTS += ALT_SLASH_JAVA=$(SLASH_JAVA)
-HOTSPOT_BUILD_ARGUMENTS += ALT_BOOTDIR=$(BOOTDIR)
-
-ifeq ($(BUILD_LANGTOOLS), true)
- HOTSPOT_BUILD_ARGUMENTS += ALT_LANGTOOLS_DIST=$(ABS_LANGTOOLS_DIST)
-endif
-
-# Move to COMMON_BUILD_ARGUMENTS when all repos support
-# FULL_DEBUG_SYMBOLS and ZIP_DEBUGINFO_FILES:
-ifdef FULL_DEBUG_SYMBOLS
- HOTSPOT_BUILD_ARGUMENTS += FULL_DEBUG_SYMBOLS=$(FULL_DEBUG_SYMBOLS)
-endif
-
-ifdef ZIP_DEBUGINFO_FILES
- HOTSPOT_BUILD_ARGUMENTS += ZIP_DEBUGINFO_FILES="$(ZIP_DEBUGINFO_FILES)"
-endif
-
-hotspot-build::
- $(MKDIR) -p $(HOTSPOT_OUTPUTDIR)
- $(MKDIR) -p $(HOTSPOT_EXPORT_PATH)
- @$(call MakeStart,hotspot,$(HOTSPOT_TARGET))
- $(CD) $(HOTSPOT_TOPDIR)/make && \
- $(MAKE) $(HOTSPOT_BUILD_ARGUMENTS) $(HOTSPOT_TARGET)
- @$(call MakeFinish,hotspot,$(HOTSPOT_TARGET))
-
-#####################
-# .PHONY
-#####################
-.PHONY: hotspot-build hotspot-clobber hotspot-sanity
-
diff --git a/make/install-rules.gmk b/make/install-rules.gmk
deleted file mode 100644
index 2ba4a66..0000000
--- a/make/install-rules.gmk
+++ /dev/null
@@ -1,121 +0,0 @@
-#
-# Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-################################################################
-# INSTALL TARGETS
-################################################################
-
-install: install-build
-
-# The generated java files are generated as a set, so instead of
-# setting the INSTALL variable to that list of files, set it to
-# the .PHONY target that generates the set of files.
-INSTALL = install
-
-# put the generated patch in their own place in OUTPUTDIR
-INSTALL_OUTPUTDIR = $(ABS_OUTPUTDIR)
-
-INSTALL_DEBUG_NAME=fastdebug
-
-INSTALL_BUILD_TARGETS = sanity all
-INSTALL_BUILD_ARGUMENTS = $(COMMON_BUILD_ARGUMENTS) \
- ALT_OUTPUTDIR=$(INSTALL_OUTPUTDIR) \
- ALT_RTPATCH_DIR=$(ALT_RTPATCH_DIR) \
- ALT_BASE_IMAGE_ZIP=$(ALT_BASE_IMAGE_ZIP) \
- ALT_BASE_IMAGE_DIR=$(ALT_BASE_IMAGE_DIR) \
- ALT_NEW_IMAGE_DIR=$(ALT_NEW_IMAGE_DIR) \
- ALT_BUNDLE_DATE=$(BUNDLE_DATE) \
- INSTALL_DEBUG_NAME=$(INSTALL_DEBUG_NAME)
-
-ifeq ($(BUILD_LANGTOOLS), true)
- INSTALL_BUILD_ARGUMENTS += ALT_LANGTOOLS_DIST=$(ABS_LANGTOOLS_DIST)
-endif
-
-install: install-build
-
-install-build:
-ifeq ($(BUILD_INSTALL), true)
- @$(call MakeStart,install,$(INSTALL_BUILD_TARGETS))
- ($(CD) $(INSTALL_TOPDIR)/make && \
- $(MAKE) $(INSTALL_BUILD_TARGETS) $(INSTALL_BUILD_ARGUMENTS))
- @$(call MakeFinish,install,$(INSTALL_BUILD_TARGETS))
-endif
-
-update-patcher:
-ifeq ($(BUILD_INSTALL), true)
- if [ -r $(INSTALL_TOPDIR)/make/update/Makefile ]; then \
- $(call MakeStart,install_update,all); \
- ( $(CD) $(INSTALL_TOPDIR)/make/update && \
- $(MAKE) all $(INSTALL_BUILD_ARGUMENTS) ); \
- $(call MakeFinish,install_update,all); \
- fi
-endif
-
-update-patchgen:
-ifeq ($(BUILD_INSTALL), true)
- if [ -r $(INSTALL_TOPDIR)/make/update/Makefile ]; then \
- $(call MakeStart,install_update,patchgen); \
- ( $(CD) $(INSTALL_TOPDIR)/make/update && \
- $(MAKE) patchgen $(INSTALL_BUILD_ARGUMENTS) ); \
- $(call MakeFinish,install_update,patchgen); \
- fi
-endif
-
-installer:
-ifeq ($(BUILD_INSTALL), true)
- if [ -r $(INSTALL_TOPDIR)/make/installer/Makefile ]; then \
- $(call MakeStart,install_installer,all); \
- ( $(CD) $(INSTALL_TOPDIR)/make/installer && \
- $(MAKE) all $(INSTALL_BUILD_ARGUMENTS) ); \
- $(call MakeFinish,install_installer,all); \
- fi
-endif
-
-combo_build:
- @$(ECHO) $@ installer combo build started: `$(DATE) '+%y-%m-%d %H:%M'`
- $(CD) $(INSTALL_TOPDIR)/make/installer/bundles/windows/ishield/wrapper/wrapper.jreboth ; $(MAKE) all
- $(CD) $(INSTALL_TOPDIR)/make/installer/bundles/windows/ishield/jre ; $(MAKE) au_combo
- $(CD) $(INSTALL_TOPDIR)/make/installer/bundles/windows/xmlinffile ; $(MAKE) all
-
-install-clobber:
-ifeq ($(BUILD_INSTALL), true)
- @$(call MakeStart,install,clobber)
- ($(CD) $(INSTALL_TOPDIR)/make && \
- $(MAKE) clobber $(INSTALL_BUILD_ARGUMENTS))
- @$(call MakeFinish,install,clobber)
-endif
-
-install-sanity::
-ifeq ($(BUILD_INSTALL), true)
- ($(CD) $(INSTALL_TOPDIR)/make && \
- $(MAKE) sanity $(INSTALL_BUILD_ARGUMENTS))
-endif
-
-######################################
-# Rules for making the install
-######################################
-
-.PHONY: install install-build install-clobber install-sanity \
- update-installer update-patchgen installer
diff --git a/make/jaxp-rules.gmk b/make/jaxp-rules.gmk
deleted file mode 100644
index 8f542fa..0000000
--- a/make/jaxp-rules.gmk
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-################################################################
-# JAXP TARGETS
-################################################################
-
-JAXP_BUILD_ARGUMENTS = \
- $(COMMON_BUILD_ARGUMENTS) \
- ALT_OUTPUTDIR=$(JAXP_OUTPUTDIR) \
- ALT_BOOTDIR=$(BOOTDIR) \
- ALT_JDK_IMPORT_PATH=$(JDK_IMPORT_PATH)
-
-ifeq ($(BUILD_LANGTOOLS), true)
- JAXP_BUILD_ARGUMENTS += ALT_LANGTOOLS_DIST=$(ABS_LANGTOOLS_DIST)
-endif
-
-jaxp: jaxp-build
-jaxp-build:
- $(MKDIR) -p $(JAXP_OUTPUTDIR)
- @$(call MakeStart,jaxp,all)
- ($(CD) $(JAXP_TOPDIR)/make && \
- $(MAKE) $(JAXP_BUILD_ARGUMENTS) all)
- @$(call MakeFinish,jaxp,all)
-
-jaxp-clobber::
- $(MKDIR) -p $(JAXP_OUTPUTDIR)
- @$(call MakeStart,jaxp,clobber)
- ($(CD) $(JAXP_TOPDIR)/make && \
- $(MAKE) $(JAXP_BUILD_ARGUMENTS) clobber)
- @$(call MakeFinish,jaxp,clobber)
-
-.PHONY: jaxp jaxp-build jaxp-clobber
-
diff --git a/make/jdk-rules.gmk b/make/jdk-rules.gmk
deleted file mode 100644
index dc6b555..0000000
--- a/make/jdk-rules.gmk
+++ /dev/null
@@ -1,121 +0,0 @@
-#
-# Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-################################################################
-# JDK TARGETS
-################################################################
-
-JDK_JAVA_EXE = $(OUTPUTDIR)/bin/java$(EXE_SUFFIX)
-
-# NO_IMAGES may be set in conjunction with DEV_ONLY
-IMAGES_TARGET = images
-ifdef DEV_ONLY
- ifdef NO_IMAGES
- IMAGES_TARGET =
- endif
-endif
-
-# GENERATE_DOCS determines if we ask for the docs target
-DOCS_TARGET = docs
-ifeq ($(GENERATE_DOCS),false)
- DOCS_TARGET =
-endif
-
-JDK_BUILD_TARGETS = sanity all $(DOCS_TARGET) $(IMAGES_TARGET)
-
-JDK_CLOBBER_TARGETS = clobber
-
-JDK_BUILD_ARGUMENTS = $(COMMON_BUILD_ARGUMENTS) \
- ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)
-
-ifeq ($(BUILD_LANGTOOLS), true)
- JDK_BUILD_ARGUMENTS += ALT_LANGTOOLS_DIST=$(ABS_LANGTOOLS_DIST)
-endif
-ifeq ($(BUILD_CORBA), true)
- JDK_BUILD_ARGUMENTS += ALT_CORBA_DIST=$(ABS_CORBA_DIST)
-endif
-ifeq ($(BUILD_JAXP), true)
- JDK_BUILD_ARGUMENTS += ALT_JAXP_DIST=$(ABS_JAXP_DIST)
-endif
-ifeq ($(BUILD_JAXWS), true)
- JDK_BUILD_ARGUMENTS += ALT_JAXWS_DIST=$(ABS_JAXWS_DIST)
-endif
-ifeq ($(BUILD_NASHORN), true)
- JDK_BUILD_ARGUMENTS += ALT_NASHORN_DIST=$(ABS_NASHORN_DIST)
-endif
-
-ifeq ($(BUILD_HOTSPOT), true)
- JDK_BUILD_ARGUMENTS += ALT_HOTSPOT_IMPORT_PATH=$(HOTSPOT_DIR)/import
-endif
-
-JDK_BUILD_ARGUMENTS += \
- BUILD_HOTSPOT=$(BUILD_HOTSPOT)
-
-# Move to COMMON_BUILD_ARGUMENTS when all repos support
-# FULL_DEBUG_SYMBOLS and ZIP_DEBUGINFO_FILES:
-ifdef FULL_DEBUG_SYMBOLS
- JDK_BUILD_ARGUMENTS += FULL_DEBUG_SYMBOLS=$(FULL_DEBUG_SYMBOLS)
-endif
-
-ifdef ZIP_DEBUGINFO_FILES
- JDK_BUILD_ARGUMENTS += ZIP_DEBUGINFO_FILES="$(ZIP_DEBUGINFO_FILES)"
-endif
-
-
-$(JDK_JAVA_EXE):: jdk-build
-
-jdk: jdk-build
-jdk-build:
- @$(call MakeStart,jdk,$(JDK_BUILD_TARGETS))
- ( $(CD) $(JDK_TOPDIR)/make && \
- $(MAKE) $(JDK_BUILD_TARGETS) $(JDK_BUILD_ARGUMENTS) ; )
- @$(call MakeFinish,jdk,$(JDK_BUILD_TARGETS))
-
-jdk-clobber::
- @$(call MakeStart,jdk,$(JDK_CLOBBER_TARGETS))
- ( $(CD) $(JDK_TOPDIR)/make && \
- $(MAKE) $(JDK_CLOBBER_TARGETS) $(JDK_BUILD_ARGUMENTS) ; )
- @$(call MakeFinish,jdk,$(JDK_CLOBBER_TARGETS))
-
-jdk-sanity::
- ( $(CD) $(JDK_TOPDIR)/make && \
- $(MAKE) sanity HOTSPOT_IMPORT_CHECK=false $(JDK_BUILD_ARGUMENTS) ; )
-
-compare-images: compare-image
-compare-image:
- @$(call MakeStart,jdk,compare-image)
- ( $(CD) $(JDK_TOPDIR)/make && \
- $(MAKE) ALT_OUTPUTDIR=$(ABS_OUTPUTDIR) compare-image )
- @$(call MakeFinish,jdk,compare-image)
-
-compare-images-clobber: compare-image-clobber
-compare-image-clobber:
- @$(call MakeStart,jdk,compare-image-clobber)
- ( $(CD) $(JDK_TOPDIR)/make && \
- $(MAKE) ALT_OUTPUTDIR=$(ABS_OUTPUTDIR) compare-image-clobber )
- @$(call MakeFinish,jdk,compare-image-clobber)
-
-.PHONY: jdk jdk-build jdk-clobber jdk-sanity
-
diff --git a/make/jprt.gmk b/make/jprt.gmk
deleted file mode 100644
index 09505a4..0000000
--- a/make/jprt.gmk
+++ /dev/null
@@ -1,67 +0,0 @@
-#
-# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-################################################################
-# JPRT rule to build
-################################################################
-
-# To get all the bundles from JPRT, use:
-# jprt submit -buildenv HAVE_JPRT_SAVE_BUNDLES=true -control "..." ...
-
-DEFAULT_BUILD_FLAVOR=product
-
-# JPRT will define these when it builds
-JPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(DEFAULT_BUILD_FLAVOR)-bundle.zip
-JPRT_ARCHIVE_INSTALL_BUNDLE=$(ABS_OUTPUTDIR)/$(DEFAULT_BUILD_FLAVOR)-install-bundle.zip
-
-ifeq ($(PLATFORM),windows)
- ZIPFLAGS=-q
-else
- # store symbolic links as the link
- ZIPFLAGS=-q -y
-endif
-
-jprt_build_product: sanity all_product_build
- ( $(CD) $(OUTPUTDIR)/$(JDK_IMAGE_DIRNAME) && \
- $(ZIPEXE) $(ZIPFLAGS) -r $(JPRT_ARCHIVE_BUNDLE) . )
-ifdef HAVE_JPRT_SAVE_BUNDLES
- ( $(CD) $(OUTPUTDIR)/bundles && \
- $(ZIPEXE) $(ZIPFLAGS) -r $(JPRT_ARCHIVE_INSTALL_BUNDLE) . )
-endif
-
-jprt_build_fastdebug: fastdebug_build
- ( $(CD) $(OUTPUTDIR)/$(REL_JDK_FASTDEBUG_IMAGE_DIR) && \
- $(ZIPEXE) $(ZIPFLAGS) -r $(JPRT_ARCHIVE_BUNDLE) . )
-
-jprt_build_debug: debug_build
- ( $(CD) $(OUTPUTDIR)/$(REL_JDK_DEBUG_IMAGE_DIR) && \
- $(ZIPEXE) $(ZIPFLAGS) -r $(JPRT_ARCHIVE_BUNDLE) . )
-
-################################################################
-# PHONY
-################################################################
-
-.PHONY: jprt_build_product jprt_build_fastdebug jprt_build_debug
-
diff --git a/make/langtools-rules.gmk b/make/langtools-rules.gmk
deleted file mode 100644
index ea96295..0000000
--- a/make/langtools-rules.gmk
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-################################################################
-# LANGTOOLS TARGETS
-################################################################
-
-LANGTOOLS_BUILD_ARGUMENTS = \
- $(COMMON_BUILD_ARGUMENTS) \
- ALT_OUTPUTDIR=$(LANGTOOLS_OUTPUTDIR) \
- ALT_BOOTDIR=$(BOOTDIR)
-
-langtools: langtools-build
-langtools-build:
- $(MKDIR) -p $(LANGTOOLS_OUTPUTDIR)
- @$(call MakeStart,langtools,all)
- ($(CD) $(LANGTOOLS_TOPDIR)/make && \
- $(MAKE) $(LANGTOOLS_BUILD_ARGUMENTS) all)
- @$(call MakeFinish,langtools,all)
-
-langtools-clobber::
- $(MKDIR) -p $(LANGTOOLS_OUTPUTDIR)
- @$(call MakeStart,langtools,clobber)
- ($(CD) $(LANGTOOLS_TOPDIR)/make && \
- $(MAKE) $(LANGTOOLS_BUILD_ARGUMENTS) clobber)
- @$(call MakeFinish,langtools,clobber)
-
-.PHONY: langtools langtools-build langtools-clobber
-
diff --git a/make/nashorn-rules.gmk b/make/nashorn-rules.gmk
deleted file mode 100644
index a86a047..0000000
--- a/make/nashorn-rules.gmk
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-################################################################
-# NASHORN TARGETS
-################################################################
-
-NASHORN_BUILD_ARGUMENTS = \
- $(COMMON_BUILD_ARGUMENTS) \
- ALT_OUTPUTDIR=$(NASHORN_OUTPUTDIR) \
- ALT_BOOTDIR=$(BOOTDIR) \
- ALT_JDK_IMPORT_PATH=$(JDK_IMPORT_PATH)
-
-ifeq ($(BUILD_LANGTOOLS), true)
- NASHORN_BUILD_ARGUMENTS += ALT_LANGTOOLS_DIST=$(ABS_LANGTOOLS_DIST)
-endif
-
-# Default targets
-NASHORN = nashorn-build
-
-nashorn: nashorn-build
-nashorn-build:
- $(MKDIR) -p $(NASHORN_OUTPUTDIR)
- @$(call MakeStart,nashorn,all)
- ($(CD) $(NASHORN_TOPDIR)/make && \
- $(MAKE) $(NASHORN_BUILD_ARGUMENTS) all)
- @$(call MakeFinish,nashorn,all)
-
-nashorn-clobber::
- $(MKDIR) -p $(NASHORN_OUTPUTDIR)
- @$(call MakeStart,nashorn,clobber)
- ($(CD) $(NASHORN_TOPDIR)/make && \
- $(MAKE) $(NASHORN_BUILD_ARGUMENTS) clobber)
- @$(call MakeFinish,nashorn,clobber)
-
-.PHONY: nashorn nashorn-build nashorn-clobber
-
diff --git a/make/sanity-rules.gmk b/make/sanity-rules.gmk
deleted file mode 100644
index ee3d6f8..0000000
--- a/make/sanity-rules.gmk
+++ /dev/null
@@ -1,336 +0,0 @@
-#
-# Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-################################################################
-# SANITY
-################################################################
-
-sanity:: pre-sanity settings insane environment
-
-ifeq ($(BUILD_HOTSPOT), true)
- sanity:: hotspot-sanity
-endif
-
-ifeq ($(BUILD_DEPLOY), true)
- sanity:: deploy-sanity
-endif
-
-ifeq ($(BUILD_JDK), true)
- sanity:: jdk-sanity
-endif
-
-# Only need these sanity rules when not doing a debug build
-ifeq ($(DEBUG_NAME),)
-
- ifeq ($(BUILD_INSTALL), true)
- sanity:: install-sanity
- endif
-
- ifeq ($(BUILD_SPONSORS), true)
- sanity:: sponsors-sanity
- endif
-
-endif
-
-sanity:: post-sanity
-
-source-sanity : pre-sanity post-sanity
-
-$(ERROR_FILE) $(WARNING_FILE) $(MESSAGE_FILE):
- @$(prep-target)
-
-purge-sanity: $(ERROR_FILE) $(WARNING_FILE) $(MESSAGE_FILE)
- -@$(RM) $(ERROR_FILE) $(WARNING_FILE) $(MESSAGE_FILE)
-
-pre-sanity: purge-sanity
-
-# this should be the last rule in any target's sanity rule.
-post-sanity post-sanity-hotspot post-sanity-jdk post-sanity-install post-sanity-deploy:
- @if [ -r $(MESSAGE_FILE) ]; then \
- $(ECHO) "" ; \
- $(CAT) $(MESSAGE_FILE) ; \
- fi
- @if [ -r $(WARNING_FILE) ]; then \
- $(CAT) $(WARNING_FILE) ; \
- fi
- @if [ "x$(INSANE)" != x ]; then \
- $(ECHO) "INSANE mode requested. \n" \
- "Sanity will not force a build termination, even with errors.\n" \
- "" >> $(ERROR_FILE); \
- fi
- @if [ -r $(ERROR_FILE) ]; then \
- if [ "x$(INSANE)" = x ]; then \
- $(ECHO) "Exiting because of the above error(s). \n" \
- "">> $(ERROR_FILE); \
- fi ; \
- $(CAT) $(ERROR_FILE) ; \
- if [ "x$(INSANE)" = x ]; then \
- exit 1 ; \
- fi ; \
- fi
-ifdef PEDANTIC
- @if [ -r $(WARNING_FILE) ]; then \
- $(ECHO) "PEDANTIC mode requested. \n" \
- "Exiting because of the above warning(s). \n" \
- "" >> $(ERROR_FILE); \
- $(CAT) $(ERROR_FILE) ; \
- exit 1 ; \
- fi
-endif
- @if [ ! -r $(ERROR_FILE) ]; then \
- $(ECHO) "Sanity check passed." ; \
- fi
-
-insane:
-ifdef INSANE
- @$(ECHO) "WARNING: You are building in 'INSANE' mode. You \n" \
- " should not use this mode, and in fact, \n" \
- " it may be removed at any time. If you \n" \
- " have build problems as a result of using \n" \
- " INSANE mode, then you should not expect \n" \
- " assistance from anyone with the problems \n" \
- " or consequences you experience. \n" \
- "" >> $(WARNING_FILE)
-endif
-
-# Get list of environment variables set that we do not want set
-ifdef ALT_HOTSPOT_SERVER_PATH
- DO_NOT_SET_LIST += ALT_HOTSPOT_SERVER_PATH
-endif
-ifdef ALT_HOTSPOT_CLIENT_PATH
- DO_NOT_SET_LIST += ALT_HOTSPOT_CLIENT_PATH
-endif
-ifdef ALT_HOTSPOT_LIB_PATH
- DO_NOT_SET_LIST += ALT_HOTSPOT_LIB_PATH
-endif
-
-# Error message for environment variable set that should not be
-%.do_not_set:
- @$(ECHO) "ERROR: Your build environment has the variable\n" \
- " $* defined. Please unset it and restart your build. \n" \
- "" >> $(ERROR_FILE)
-
-# Check the environment variables
-environment: $(DO_NOT_SET_LIST:%=%.do_not_set)
-ifeq ($(LANGTOOLS_SRC_AVAILABLE), true)
- ifneq ($(BUILD_LANGTOOLS), true)
- @$(ECHO) "WARNING: You are not building the LANGTOOLS sources.\n" \
- " Lang tools (javac) will be obtained from \n" \
- " the location set in ALT_JDK_IMPORT_PATH. \n" \
- "" >> $(WARNING_FILE)
- endif
-endif
-ifeq ($(JAXP_SRC_AVAILABLE), true)
- ifneq ($(BUILD_JAXP), true)
- @$(ECHO) "WARNING: You are not building the JAXP sources.\n" \
- " The jaxp files will be obtained from \n" \
- " the location set in ALT_JDK_IMPORT_PATH. \n" \
- "" >> $(WARNING_FILE)
- endif
-endif
-ifeq ($(JAXWS_SRC_AVAILABLE), true)
- ifneq ($(BUILD_JAXWS), true)
- @$(ECHO) "WARNING: You are not building the JAXWS sources.\n" \
- " The jaxws files will be obtained from \n" \
- " the location set in ALT_JDK_IMPORT_PATH. \n" \
- "" >> $(WARNING_FILE)
- endif
-endif
-ifeq ($(CORBA_SRC_AVAILABLE), true)
- ifneq ($(BUILD_CORBA), true)
- @$(ECHO) "WARNING: You are not building the CORBA sources.\n" \
- " The corba files will be obtained from \n" \
- " the location set in ALT_JDK_IMPORT_PATH. \n" \
- "" >> $(WARNING_FILE)
- endif
-endif
-ifeq ($(HOTSPOT_SRC_AVAILABLE), true)
- ifneq ($(BUILD_HOTSPOT), true)
- @$(ECHO) "WARNING: You are not building the HOTSPOT sources.\n" \
- " Hotspot libs will be obtained from \n" \
- " the location set in ALT_HOTSPOT_IMPORT_PATH. \n" \
- "" >> $(WARNING_FILE)
- endif
-endif
-ifeq ($(JDK_SRC_AVAILABLE), true)
- ifneq ($(BUILD_JDK), true)
- @$(ECHO) "WARNING: You are not building the JDK sources.\n" \
- " This will result in a development-only\n" \
- " build of the JDK , lacking the jdk binaries.\n" \
- "" >> $(WARNING_FILE)
- endif
-endif
-ifeq ($(NASHORN_SRC_AVAILABLE), true)
- ifneq ($(BUILD_NASHORN), true)
- @$(ECHO) "WARNING: You are not building the NASHORN sources.\n" \
- " The nashorn files will be obtained from \n" \
- " the location set in ALT_JDK_IMPORT_PATH. \n" \
- "" >> $(WARNING_FILE)
- endif
-endif
-ifeq ($(DEPLOY_SRC_AVAILABLE), true)
- ifneq ($(BUILD_DEPLOY), true)
- @$(ECHO) "WARNING: You are not building the DEPLOY sources.\n" \
- " This will result in a development-only\n" \
- " build of the JDK, lacking the plugin and javaws binaries.\n" \
- "" >> $(WARNING_FILE)
- endif
-endif
-ifeq ($(INSTALL_SRC_AVAILABLE), true)
- ifneq ($(BUILD_INSTALL), true)
- @$(ECHO) "WARNING: You are not building the INSTALL sources.\n" \
- " This will result in a development-only\n" \
- " build of the JDK, lacking the installation bundles\n" \
- "" >> $(WARNING_FILE)
- endif
-endif
-ifeq ($(SPONSORS_SRC_AVAILABLE), true)
- ifneq ($(BUILD_SPONSORS), true)
- @$(ECHO) "WARNING: You are not building the SPONSORS sources.\n" \
- "" >> $(WARNING_FILE)
- endif
-endif
-ifeq ($(GENERATE_DOCS),false)
- @$(ECHO) "WARNING: This build does not include generating javadoc.\n" \
- "" >> $(WARNING_FILE)
-endif
-ifdef NO_DEMOS
- @$(ECHO) "WARNING: This build and any install images will not include demos.\n" \
- "" >> $(WARNING_FILE)
-endif
-ifdef NO_SAMPLES
- @$(ECHO) "WARNING: This build and any install images will not include samples.\n" \
- "" >> $(WARNING_FILE)
-endif
-ifdef NO_IMAGES
- @$(ECHO) "WARNING: Your build environment has the variable NO_IMAGES\n" \
- " defined. This will result in a development-only\n" \
- " build of the JDK, lacking the install images\n" \
- " and bundles.\n" \
- "" >> $(WARNING_FILE)
-endif
-ifdef DEV_ONLY
- @$(ECHO) "WARNING: Your build environment has the variable DEV_ONLY\n" \
- " defined. This will result in a development-only\n" \
- " build of the JDK, lacking the documentation\n" \
- " build and installation bundles.\n" \
- "" >> $(WARNING_FILE)
-endif
-
-######################################################
-# dump out the variable settings...
-######################################################
-ifneq ($(PLATFORM), windows)
- ifndef HOSTNAME
- HOSTNAME := $(shell hostname)
- endif
-endif
-settings::
- @$(ECHO) "Build Machine Information:" >> $(MESSAGE_FILE)
-ifeq ($(PLATFORM), windows)
- @$(ECHO) " build machine = $(COMPUTERNAME)" >> $(MESSAGE_FILE)
-else
- @$(ECHO) " build machine = $(HOSTNAME)" >> $(MESSAGE_FILE)
-endif
- @$(ECHO) "" >> $(MESSAGE_FILE)
- @$(ECHO) "Build Directory Structure:" >> $(MESSAGE_FILE)
- @$(ECHO) " CWD = `$(PWD)`" >> $(MESSAGE_FILE)
- @$(ECHO) " TOPDIR = $(TOPDIR)" >> $(MESSAGE_FILE)
-ifeq ($(LANGTOOLS_SRC_AVAILABLE), true)
- @$(ECHO) " LANGTOOLS_TOPDIR = $(LANGTOOLS_TOPDIR)" >> $(MESSAGE_FILE)
-endif
-ifeq ($(JAXP_SRC_AVAILABLE), true)
- @$(ECHO) " JAXP_TOPDIR = $(JAXP_TOPDIR)" >> $(MESSAGE_FILE)
-endif
-ifeq ($(JAXWS_SRC_AVAILABLE), true)
- @$(ECHO) " JAXWS_TOPDIR = $(JAXWS_TOPDIR)" >> $(MESSAGE_FILE)
-endif
-ifeq ($(CORBA_SRC_AVAILABLE), true)
- @$(ECHO) " CORBA_TOPDIR = $(CORBA_TOPDIR)" >> $(MESSAGE_FILE)
-endif
-ifeq ($(HOTSPOT_SRC_AVAILABLE), true)
- @$(ECHO) " HOTSPOT_TOPDIR = $(HOTSPOT_TOPDIR)" >> $(MESSAGE_FILE)
-endif
-ifeq ($(JDK_SRC_AVAILABLE), true)
- @$(ECHO) " JDK_TOPDIR = $(JDK_TOPDIR)" >> $(MESSAGE_FILE)
-endif
-ifeq ($(NASHORN_SRC_AVAILABLE), true)
- @$(ECHO) " NASHORN_TOPDIR = $(NASHORN_TOPDIR)" >> $(MESSAGE_FILE)
-endif
-ifeq ($(DEPLOY_SRC_AVAILABLE), true)
- @$(ECHO) " DEPLOY_TOPDIR = $(DEPLOY_TOPDIR)" >> $(MESSAGE_FILE)
-endif
-ifeq ($(INSTALL_SRC_AVAILABLE), true)
- @$(ECHO) " INSTALL_TOPDIR = $(INSTALL_TOPDIR)" >> $(MESSAGE_FILE)
-endif
-ifeq ($(SPONSORS_SRC_AVAILABLE), true)
- @$(ECHO) " SPONSORS_TOPDIR = $(SPONSORS_TOPDIR)" >> $(MESSAGE_FILE)
-endif
- @$(ECHO) "" >> $(MESSAGE_FILE)
-ifneq ($(SKIP_COMPARE_IMAGES), true)
- @$(ECHO) "External File/Binary Locations:" >> $(MESSAGE_FILE)
- @$(ECHO) " PREVIOUS_JRE_BUNDLE = $(PREVIOUS_JRE_BUNDLE) " >> $(MESSAGE_FILE)
- @$(ECHO) " PREVIOUS_JDK_BUNDLE = $(PREVIOUS_JDK_BUNDLE) " >> $(MESSAGE_FILE)
- @$(ECHO) "" >> $(MESSAGE_FILE)
-endif
- @$(ECHO) "Build Directives:" >> $(MESSAGE_FILE)
-ifeq ($(LANGTOOLS_SRC_AVAILABLE), true)
- @$(ECHO) " BUILD_LANGTOOLS = $(BUILD_LANGTOOLS) " >> $(MESSAGE_FILE)
-endif
-ifeq ($(JAXP_SRC_AVAILABLE), true)
- @$(ECHO) " BUILD_JAXP = $(BUILD_JAXP) " >> $(MESSAGE_FILE)
-endif
-ifeq ($(JAXWS_SRC_AVAILABLE), true)
- @$(ECHO) " BUILD_JAXWS = $(BUILD_JAXWS) " >> $(MESSAGE_FILE)
-endif
-ifeq ($(CORBA_SRC_AVAILABLE), true)
- @$(ECHO) " BUILD_CORBA = $(BUILD_CORBA) " >> $(MESSAGE_FILE)
-endif
-ifeq ($(HOTSPOT_SRC_AVAILABLE), true)
- @$(ECHO) " BUILD_HOTSPOT = $(BUILD_HOTSPOT) " >> $(MESSAGE_FILE)
-endif
-ifeq ($(JDK_SRC_AVAILABLE), true)
- @$(ECHO) " BUILD_JDK = $(BUILD_JDK) " >> $(MESSAGE_FILE)
-endif
-ifeq ($(NASHORN_SRC_AVAILABLE), true)
- @$(ECHO) " BUILD_NASHORN = $(BUILD_NASHORN) " >> $(MESSAGE_FILE)
-endif
-ifeq ($(DEPLOY_SRC_AVAILABLE), true)
- @$(ECHO) " BUILD_DEPLOY = $(BUILD_DEPLOY) " >> $(MESSAGE_FILE)
-endif
-ifeq ($(INSTALL_SRC_AVAILABLE), true)
- @$(ECHO) " BUILD_INSTALL = $(BUILD_INSTALL) " >> $(MESSAGE_FILE)
-endif
-ifeq ($(SPONSORS_SRC_AVAILABLE), true)
- @$(ECHO) " BUILD_SPONSORS = $(BUILD_SPONSORS) " >> $(MESSAGE_FILE)
-endif
- @$(ECHO) " DEBUG_CLASSFILES = $(DEBUG_CLASSFILES) " >> $(MESSAGE_FILE)
- @$(ECHO) " DEBUG_BINARIES = $(DEBUG_BINARIES) " >> $(MESSAGE_FILE)
- @$(ECHO) "" >> $(MESSAGE_FILE)
-
-.PHONY: sanity settings pre-sanity insane \
- post-sanity post-sanity-hotspot post-sanity-jdk \
- post-sanity-install post-sanity-deploy \
- environment
diff --git a/make/scripts/fixpath.pl b/make/scripts/fixpath.pl
deleted file mode 100644
index 36ec981..0000000
--- a/make/scripts/fixpath.pl
+++ /dev/null
@@ -1,169 +0,0 @@
-#!/bin/perl
-
-#
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Crunch down the input(s) to Windows short (mangled) form.
-# Any elements not actually found in the filesystem will be dropped.
-#
-# This script needs three modes:
-# 1) DOS mode with drive letter followed by : and ; path separator
-# 2) Cygwin mode with /cygdrive/<drive letter>/ and : path separator
-# 3) MinGW/MSYS mode with /<drive letter>/ and : path separator
-
-use strict;
-use warnings;
-use Getopt::Std;
-
-sub Usage() {
- print ("Usage:\n $0 -d | -c | -m \<PATH\>\n");
- print (" -d DOS style (drive letter, :, and ; path separator)\n");
- print (" -c Cywgin style (/cygdrive/drive/ and : path separator)\n");
- print (" -m MinGW style (/drive/ and : path separator)\n");
- exit 1;
-}
-# Process command line options:
-my %opts;
-getopts('dcm', \%opts) || Usage();
-
-if (scalar(@ARGV) != 1) {Usage()};
-
-# Translate drive letters such as C:/
-# if MSDOS, Win32::GetShortPathName() does the work (see below).
-# if Cygwin, use the /cygdrive/c/ form.
-# if MinGW, use the /c/ form.
-my $path0;
-my $sep2;
-if (defined ($opts{'d'})) {
- #MSDOS
- $path0 = '';
- $sep2 = ';';
-} elsif (defined ($opts{'c'})) {
- #Cygwin
- $path0 = '/cygdrive';
- $sep2 = ':';
-} elsif (defined ($opts{'m'})) {
- #MinGW/MSYS
- $path0 = '';
- $sep2 = ':';
-} else {
- Usage();
-}
-
-my $input = $ARGV[0];
-my $sep1;
-
-# Is the input ';' separated, or ':' separated, or a simple string?
-if (($input =~ tr/;/;/) > 0) {
- # One or more ';' implies Windows style path.
- $sep1 = ';';
-} elsif (($input =~ tr/:/:/) > 1) {
- # Two or more ':' implies Cygwin or MinGW/MSYS style path.
- $sep1 = ':';
-} else {
- # Otherwise, this is not a path - take up to the end of string in
- # one piece.
- $sep1 = '/$/';
-}
-
-# Split the input on $sep1 PATH separator and process the pieces.
-my @pieces;
-for (split($sep1, $input)) {
- my $try = $_;
-
- if (($try =~ /^\/cygdrive\/(.)\/(.*)$/) || ($try =~ /^\/(.)\/(.*)$/)) {
- # Special case #1: This is a Cygwin /cygrive/<drive letter/ path.
- # Special case #2: This is a MinGW/MSYS /<drive letter/ path.
- $try = $1.':/'.$2;
- } elsif ($try =~ /^\/(.*)$/) {
- # Special case #3: check for a Cygwin or MinGW/MSYS form with a
- # leading '/' for example '/usr/bin/bash'.
- # Look up where this is mounted and rebuild the
- # $try string with that information
- my $cmd = "df --portability --all --human-readable $try";
- my $line = qx ($cmd);
- my $status = $?;
- if ($status == 0) {
- my @lines = split ('\n', $line);
- my ($device, $junk, $mountpoint);
- # $lines[0] is the df header.
- # Example string for split - we want the first and last elements:
- # C:\jprt\products\P1\MinGW\msys\1.0 200G 78G 123G 39% /usr
- ($device, $junk, $junk, $junk, $junk, $mountpoint) = split (/\s+/, $lines[1]);
- # Replace $mountpoint with $device/ in the original string
- $try =~ s|$mountpoint|$device/|;
- } else {
- printf ("Error %d from command %s\n%s\n", $status, $cmd, $line);
- }
- }
-
- my $str = Win32::GetShortPathName($try);
- if (!defined($str)){
- # Special case #4: If the lookup did not work, loop through
- # adding extensions listed in PATHEXT, looking for the first
- # match.
- for (split(';', $ENV{'PATHEXT'})) {
- $str = Win32::GetShortPathName($try.$_);
- if (defined($str)) {
- last;
- }
- }
- }
-
- if (defined($str)){
- if (!defined($opts{'d'})) {
- # If not MSDOS, change C: to [/cygdrive]/c/
- if ($str =~ /^(\S):(.*)$/) {
- my $path1 = $1;
- my $path2 = $2;
- $str = $path0 . '/' . $path1 . '/' . $path2;
- }
- }
- push (@pieces, $str);
- }
-}
-
-# If input was a PATH, join the pieces back together with $sep2 path
-# separator.
-my $result;
-if (scalar(@pieces > 1)) {
- $result = join ($sep2, @pieces);
-} else {
- $result = $pieces[0];
-}
-
-if (defined ($result)) {
-
- # Change all '\' to '/'
- $result =~ s/\\/\//g;
-
- # Remove duplicate '/'
- $result =~ s/\/\//\//g;
-
- # Map to lower case
- $result =~ tr/A-Z/a-z/;
-
- print ("$result\n");
-}
diff --git a/make/scripts/vsvars.sh b/make/scripts/vsvars.sh
deleted file mode 100644
index 7a162de..0000000
--- a/make/scripts/vsvars.sh
+++ /dev/null
@@ -1,619 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# This file should be used to set the Visual Studio environment
-# variables normally set by the vcvars32.bat or vcvars64.bat file or
-# SetEnv.cmd for older SDKs.
-
-########################################################################
-# Error functions
-msg() # message
-{
- echo "$1" 1>&2
-}
-error() # message
-{
- msg "ERROR: $1"
- exit 1
-}
-warning() # message
-{
- msg "WARNING: $1"
-}
-envpath() # path
-{
- if [ "${fixpath}" != "" -a -d "$1" ] ; then
- ${fixpath} "$1"
- else
- echo "$1"
- fi
-}
-########################################################################
-
-
-# Defaults settings
-debug="false"
-verbose="false"
-
-set -e
-
-CYGWIN="nodosfilewarning ntsec"
-export CYGWIN
-
-# pathsepIn is always ; because the input strings are coming from
-# vcvarsxx.bat. This is true under all of MKS, Cygwin, MINGW/msys
-pathsepIn=';'
-
-OS="`uname -s`"
-case "${OS}" in
- CYGWIN*)
- pathflag='-c'
- devnull=/dev/null
- pathsepOut=':'
- ;;
-
- MINGW*)
- pathflag='-m'
- devnull=/dev/null
- pathsepOut=':'
- ;;
-
- *)
- # MKS?
- # Continue using dosname -s
- pathflag='-s'
- fixpath="dosname ${pathflag}"
- fixpath_windows="${fixpath}"
- fixpath_path="echo"
- devnull=NUL
- pathsepOut=';'
- ;;
-esac
-
-case "${OS}" in
- CYGWIN*|MINGW*)
- t=`dirname ${0}`
- wd=`cd ${t} 2> ${devnull} && pwd`
- fixpath_script="${wd}/fixpath.pl"
- if [ ! -f "${fixpath_script}" ] ; then
- error "Does not exist: ${fixpath_script}"
- fi
- fixpath="perl ${fixpath_script} ${pathflag}"
- fixpath_windows="perl ${fixpath_script} -d"
- fixpath_path="${fixpath_windows}"
- ;;
-esac
-
-shellStyle="sh"
-## As far as I can tell from hg history, this has not worked
-## for a long time because PPID is unset. When run under Cygwin
-## the script quits due to the 1 return from grep.
-##parentCsh="` ps -p ${PPID} 2> ${devnull} | grep csh `"
-##if [ "${parentCsh}" != "" ] ; then
-## shellStyle="csh"
-##fi
-
-# Check environment first
-if [ "${PROGRAMFILES}" != "" ] ; then
- progfiles=`envpath "${PROGRAMFILES}"`
-elif [ "${ProgramFiles}" != "" ] ; then
- progfiles=`envpath "${ProgramFiles}"`
-elif [ "${SYSTEMDRIVE}" != "" ] ; then
- progfiles=`envpath "${SYSTEMDRIVE}/Program Files"`
-elif [ "${SystemDrive}" != "" ] ; then
- progfiles=`envpath "${SystemDrive}/Program Files"`
-else
- error "No PROGRAMFILES or SYSTEMDRIVE defined in environment"
-fi
-
-# Arch data model
-if [ "${PROCESSOR_IDENTIFIER}" != "" ] ; then
- arch=`echo "${PROCESSOR_IDENTIFIER}" | cut -d' ' -f1`
-else
- if [ "${MACHTYPE}" != "" ] ; then
- if [ "`echo ${MACHTYPE} | grep 64`" != "" ] ; then
- # Assume this is X64, not IA64
- arch="x64"
- else
- arch="x86"
- fi
- else
- arch="`uname -m`"
- fi
- PROCESSOR_IDENTIFIER="${arch}"
- export PROCESSOR_IDENTIFIER
-fi
-if [ "${arch}" = "X86" -o \
- "${arch}" = "386" -o "${arch}" = "i386" -o \
- "${arch}" = "486" -o "${arch}" = "i486" -o \
- "${arch}" = "586" -o "${arch}" = "i586" -o \
- "${arch}" = "686" -o "${arch}" = "i686" -o \
- "${arch}" = "86" ] ; then
- arch="x86"
-fi
-if [ "${arch}" = "X64" -o \
- "${arch}" = "8664" -o "${arch}" = "i8664" -o \
- "${arch}" = "amd64" -o "${arch}" = "AMD64" -o \
- "${arch}" = "EM64T" -o "${arch}" = "emt64t" -o \
- "${arch}" = "intel64" -o "${arch}" = "Intel64" -o \
- "${arch}" = "64" ] ; then
- arch="x64"
- binarch64="\\amd64"
-fi
-if [ "${arch}" = "IA64" ] ; then
- arch="ia64"
- binarch64="\\ia64"
-fi
-if [ "${arch}" != "x86" -a "${arch}" != "x64" -a "${arch}" != "ia64" ] ; then
- error "No PROCESSOR_IDENTIFIER or MACHTYPE environment variables and uname -m is not helping"
-fi
-if [ "${arch}" = "x86" ] ; then
- arch_data_model=32
- progfiles32="${progfiles}"
- progfiles64="${progfiles}"
-else
- arch_data_model=64
- progfiles32="${progfiles}"
- if [ "${PROGRAMW6432}" != "" ] ; then
- progfiles64=`envpath "${PROGRAMW6432}"`
- else
- progfiles64=`envpath "C:/Program Files"`
- fi
-fi
-
-# VS2012 (VC11)
-if [ "${VS110COMNTOOLS}" = "" ] ; then
- VS110COMNTOOLS="${progfiles32}/Microsoft Visual Studio 11.0/Common7/Tools/"
- export VS110COMNTOOLS
-fi
-vc11Bin32Dir=`envpath "${VS110COMNTOOLS}"`/../../VC/Bin
-vc11Bin64Dir="${vc11Bin32Dir}"
-vc11vars32Bat="vcvars32.bat"
-vc11vars64Bat="vcvars64.bat"
-
-# VS2010 (VC10)
-if [ "${VS100COMNTOOLS}" = "" ] ; then
- VS100COMNTOOLS="${progfiles32}/Microsoft Visual Studio 10.0/Common7/Tools/"
- export VS100COMNTOOLS
-fi
-vc10Bin32Dir=`envpath "${VS100COMNTOOLS}"`/../../VC/Bin
-vc10Bin64Dir="${vc10Bin32Dir}${binarch64}"
-vc10vars32Bat="vcvars32.bat"
-vc10vars64Bat="vcvars64.bat"
-
-# VS2008 (VC9)
-if [ "${VS90COMNTOOLS}" = "" ] ; then
- VS90COMNTOOLS="${progfiles32}/Microsoft Visual Studio 9.0/Common7/Tools/"
- export VS90COMNTOOLS
-fi
-vc9Bin32Dir=`envpath "${VS90COMNTOOLS}"`/../../VC/Bin
-vc9Bin64Dir="${vc9Bin32Dir}"
-vc9vars32Bat="vcvars32.bat"
-vc9vars64Bat="vcvars64.bat"
-
-# VS2005 (VC8)
-if [ "${VS80COMNTOOLS}" = "" ] ; then
- VS80COMNTOOLS="${progfiles32}/Microsoft Visual Studio 8.0/Common7/Tools/"
- export VS80COMNTOOLS
-fi
-vc8Bin32Dir=`envpath "${VS80COMNTOOLS}"`/../../VC/Bin
-vc8Bin64Dir="${progfiles64}/Microsoft Platform SDK"
-vc8vars32Bat="vcvars32.bat"
-vc8vars64Bat="SetEnv.cmd /X64"
-
-# VS2003 (VC7)
-if [ "${VS71COMNTOOLS}" = "" ] ; then
- VS71COMNTOOLS="${progfiles32}/Microsoft Visual Studio .NET 2003/Common7/Tools/"
- export VS71COMNTOOLS
-fi
-vc7Bin32Dir=`envpath "${VS71COMNTOOLS}"`/../../VC7/Bin
-vc7Bin64Dir="${progfiles64}/Microsoft Platform SDK"
-vc7vars32Bat="vcvars32.bat"
-vc7vars64Bat="SetEnv.cmd /X64"
-
-# Force user to select
-vcSelection=""
-
-# Parse options
-usage="Usage: $0 [-help] [-debug] [-v] [-c] [-s] [-p] [-v11] [-v10] [-v9] [-v8] [-v7] [-32] [-64]"
-while [ $# -gt 0 ] ; do
- if [ "$1" = "-help" ] ; then
- msg "${usage}"
- msg " -help Print out this help message"
- msg " -debug Print out extra env variables to help debug this script"
- msg " -v Verbose output warns about missing directories"
- msg " -c Print out csh style output"
- msg " -s Print out sh style output"
- msg " -p Print out properties style output"
- msg " -v11 Use Visual Studio 11 VS2012"
- msg " -v10 Use Visual Studio 10 VS2010"
- msg " -v9 Use Visual Studio 9 VS2008"
- msg " -v8 Use Visual Studio 8 VS2005"
- msg " -v7 Use Visual Studio 7 VS2003"
- msg " -32 Force 32bit"
- msg " -64 Force 64bit"
- exit 0
- elif [ "$1" = "-debug" ] ; then
- debug="true"
- shift
- elif [ "$1" = "-v" ] ; then
- verbose="true"
- shift
- elif [ "$1" = "-c" ] ; then
- shellStyle="csh"
- shift
- elif [ "$1" = "-s" ] ; then
- shellStyle="sh"
- shift
- elif [ "$1" = "-p" ] ; then
- shellStyle="props"
- shift
- elif [ "$1" = "-v11" ] ; then
- vcBin32Dir="${vc11Bin32Dir}"
- vcBin64Dir="${vc11Bin64Dir}"
- vcvars32Bat="${vc11vars32Bat}"
- vcvars64Bat="${vc11vars64Bat}"
- vcSelection="11"
- shift
- elif [ "$1" = "-v10" ] ; then
- vcBin32Dir="${vc10Bin32Dir}"
- vcBin64Dir="${vc10Bin64Dir}"
- vcvars32Bat="${vc10vars32Bat}"
- vcvars64Bat="${vc10vars64Bat}"
- vcSelection="10"
- shift
- elif [ "$1" = "-v9" ] ; then
- vcBin32Dir="${vc9Bin32Dir}"
- vcBin64Dir="${vc9Bin64Dir}"
- vcvars32Bat="${vc9vars32Bat}"
- vcvars64Bat="${vc9vars64Bat}"
- vcSelection="9"
- shift
- elif [ "$1" = "-v8" ] ; then
- vcBin32Dir="${vc8Bin32Dir}"
- vcBin64Dir="${vc8Bin64Dir}"
- vcvars32Bat="${vc8vars32Bat}"
- vcvars64Bat="${vc8vars64Bat}"
- vcSelection="8"
- shift
- elif [ "$1" = "-v7" ] ; then
- vcBin32Dir="${vc7Bin32Dir}"
- vcBin64Dir="${vc7Bin64Dir}"
- vcvars32Bat="${vc7vars32Bat}"
- vcvars64Bat="${vc7vars64Bat}"
- vcSelection="7"
- shift
- elif [ "$1" = "-32" ] ; then
- arch_data_model=32
- shift
- elif [ "$1" = "-64" ] ; then
- arch_data_model=64
- shift
- else
- msg "${usage}"
- error "Unknown option: $1"
- fi
-done
-
-# Need to pick
-if [ "${vcSelection}" = "" ] ; then
- msg "${usage}"
- error "You must pick the version"
-fi
-
-# Which vcvars bat file to run
-if [ "${arch_data_model}" = "32" ] ; then
- vcBinDir="${vcBin32Dir}"
- vcvarsBat="${vcvars32Bat}"
-fi
-if [ "${arch_data_model}" = "64" ] ; then
- vcBinDir="${vcBin64Dir}"
- vcvarsBat="${vcvars64Bat}"
-fi
-
-# Do not allow any error returns
-set -e
-
-# Different systems have different awk's
-if [ -f /usr/bin/nawk ] ; then
- awk="nawk"
-elif [ -f /usr/bin/gawk ] ; then
- awk="gawk"
-else
- awk="awk"
-fi
-
-if [ "${verbose}" = "true" ] ; then
- echo "# Welcome to verbose mode"
- set -x
-fi
-
-if [ "${debug}" = "true" ] ; then
- echo "# Welcome to debug mode"
- set -x
-fi
-
-# Temp file area
-tmp="/tmp/vsvars.$$"
-rm -f -r ${tmp}
-mkdir -p ${tmp}
-
-# Check paths
-checkPaths() # var path sep
-{
- set -e
- sep="$3"
- checklist="${tmp}/checklist"
- printf "%s\n" "$2" | \
- sed -e 's@\\@/@g' | \
- sed -e 's@//@/@g' | \
- ${awk} -F"${sep}" '{for(i=1;i<=NF;i++){printf "%s\n",$i;}}' \
- > ${checklist}
- cat ${checklist} | while read orig; do
- if [ "${orig}" != "" ] ; then
- if [ ! -d "${orig}" ] ; then
- warning "Directory in $1 does not exist: ${orig}"
- fi
- fi
- done
-}
-
-# Remove all duplicate entries
-removeDeadDups() # string sepIn sepOut
-{
- set -e
- sepIn="$2"
- sepOut="$3"
- pathlist="${tmp}/pathlist"
- printf "%s\n" "$1" | \
- sed -e 's@\\@/@g' | \
- sed -e 's@//@/@g' | \
- ${awk} -F"${sepIn}" '{for(i=1;i<=NF;i++){printf "%s\n",$i;}}' \
- > ${pathlist}
- upaths="${tmp}/upaths"
- cat ${pathlist} | while read orig; do
- p="${orig}"
- if [ "${fixpath}" != "" ] ; then
- if [ "${p}" != "" ] ; then
- if [ -d "${p}" ] ; then
- short=`${fixpath} "${p}"`
- if [ "${short}" != "" -a -d "${short}" ] ; then
- p="${short}"
- fi
- echo "${p}" >> ${upaths}
- fi
- fi
- fi
- done
- newpaths=""
- for i in `cat ${upaths}` ; do
- # For some reason, \r characters can get into this
- i=`echo "${i}" | tr -d '\r' | sed -e 's@/$@@'`
- if [ "${newpaths}" = "" ] ; then
- newpaths="${i}"
- else
- newpaths="${newpaths}${sepOut}${i}"
- fi
- done
- printf "%s\n" "${newpaths}" | \
- ${awk} -F"${sepOut}" \
- '{a[$1];printf "%s",$1;for(i=2;i<=NF;i++){if(!($i in a)){a[$i];printf "%s%s",FS,$i;}};printf "\n";}'
-}
-
-# Create bat file to process Visual Studio vcvars*.bat files
-createBat() # batfile bindir command
-{
- bat="$1"
- bindir="$2"
- command="$3"
- stdout="${bat}.stdout"
- rm -f ${bat} ${stdout}
- echo "Output from: ${command}" > ${stdout}
- bdir=`envpath "${bindir}"`
- cat > ${bat} << EOF
-REM Pick the right vcvars bat file
-REM Empty these out so we only get the additions we want
-set INCLUDE=
-set LIB=
-set LIBPATH=
-set MSVCDIR=
-set MSSdk=
-set Mstools=
-set DevEnvDir=
-set VCINSTALLDIR=
-set VSINSTALLDIR=
-set WindowsSdkDir=
-REM Run the vcvars bat file, send all output to stderr
-call `${fixpath_windows} ${bdir}`\\${command} > `${fixpath_windows} "${stdout}"`
-REM Echo out env var settings
-echo VS_VS71COMNTOOLS="%VS71COMNTOOLS%"
-echo export VS_VS71COMNTOOLS
-echo VS_VS80COMNTOOLS="%VS80COMNTOOLS%"
-echo export VS_VS80COMNTOOLS
-echo VS_VS90COMNTOOLS="%VS90COMNTOOLS%"
-echo export VS_VS90COMNTOOLS
-echo VS_VS100COMNTOOLS="%VS100COMNTOOLS%"
-echo export VS_VS100COMNTOOLS
-echo VS_VS110COMNTOOLS="%VS110COMNTOOLS%"
-echo export VS_VS110COMNTOOLS
-echo VS_VCINSTALLDIR="%VCINSTALLDIR%"
-echo export VS_VCINSTALLDIR
-echo VS_VSINSTALLDIR="%VSINSTALLDIR%"
-echo export VS_VSINSTALLDIR
-echo VS_DEVENVDIR="%DevEnvDir%"
-echo export VS_DEVENVDIR
-echo VS_MSVCDIR="%MSVCDIR%"
-echo export VS_MSVCDIR
-echo VS_MSSDK="%MSSdk%"
-echo export VS_MSSDK
-echo VS_MSTOOLS="%Mstools%"
-echo export VS_MSTOOLS
-echo VS_WINDOWSSDKDIR="%WindowsSdkDir%"
-echo export VS_WINDOWSSDKDIR
-echo VS_INCLUDE="%INCLUDE%"
-echo export VS_INCLUDE
-echo VS_LIB="%LIB%"
-echo export VS_LIB
-echo VS_LIBPATH="%LIBPATH%"
-echo export VS_LIBPATH
-echo VS_WPATH="%PATH%"
-echo export VS_WPATH
-EOF
- chmod a+x ${bat}
-}
-
-# Create env file
-createEnv() # batfile envfile
-{
- rm -f ${1}.stdout ${1}.temp1 ${1}.temp2
- batfile=`${fixpath} ${1}`
- cmd.exe -Q -C < "$batfile" 1> ${1}.temp1 2> ${1}.temp2
- cat ${1}.temp1 | \
- sed -e 's@^Microsoft.*@@' \
- -e 's@^.*Copyright.*@@' \
- -e 's@^.*>REM.*@@' \
- -e 's@^.*>set.*@@' \
- -e 's@^.*>echo.*@@' \
- -e 's@^.*>call.*@@' \
- -e 's@^.*>$@@' \
- -e 's@\\@/@g' | \
- sed -e 's@//@/@g' > $2
- if [ -f "${1}.stdout" ] ; then
- cat ${1}.stdout 1>&2
- fi
- chmod a+x $2
-}
-
-printEnv() # name pname vsname val
-{
- name="$1"
- pname="$2"
- vsname="$3"
- val="$4"
- if [ "${val}" != "" ] ; then
- if [ "${shellStyle}" = "csh" ] ; then
- if [ "${debug}" = "true" ] ; then
- echo "setenv ${vsname} \"${val}\";"
- fi
- echo "setenv ${name} \"${val}\";"
- elif [ "${shellStyle}" = "sh" ] ; then
- if [ "${debug}" = "true" ] ; then
- echo "${vsname}=\"${val}\";"
- echo "export ${vsname};"
- fi
- echo "${name}=\"${val}\";"
- echo "export ${name};"
- elif [ "${shellStyle}" = "props" ] ; then
- echo "vs.${pname}=${val}"
- fi
- fi
-}
-
-#############################################################################
-
-# Get Visual Studio settings
-if [ "${fixpath}" != "" ] ; then
-
- # Create bat file to run
- batfile="${tmp}/vs-to-env.bat"
- if [ ! -d "${vcBinDir}" ] ; then
- error "Does not exist: ${vcBinDir}"
- elif [ "${vcvarsBat}" = "" ] ; then
- error "No vcvars script: ${vcvarsBat}"
- else
- createBat "${batfile}" "${vcBinDir}" "${vcvarsBat}"
- fi
-
- # Run bat file to create environment variable settings
- envfile="${tmp}/env.sh"
- createEnv "${batfile}" "${envfile}"
-
- # Read in the VS_* settings
- . ${envfile}
-
- # Derive unix style path, save old, and define new (remove dups)
- VS_UPATH=`${fixpath_path} "${VS_WPATH}"`
- export VS_UPATH
- VS_OPATH=`printf "%s" "${PATH}" | sed -e 's@\\\\@/@g'`
- export VS_OPATH
- VS_PATH=`removeDeadDups "${VS_UPATH}${pathsepIn}${VS_OPATH}" "${pathsepIn}" "${pathsepOut}"`
- export VS_PATH
-
-fi
-
-# Adjustments due to differences in vcvars*bat files
-if [ "${VS_MSVCDIR}" = "" ] ; then
- VS_MSVCDIR="${VS_VCINSTALLDIR}"
-fi
-if [ "${VS_DEVENVDIR}" = "" ] ; then
- VS_DEVENVDIR="${VS_VSINSTALLDIR}"
-fi
-
-# Print env settings
-# env vs.prop vs env value
-# ------- ------- ---------- -----
-printEnv INCLUDE include VS_INCLUDE "${VS_INCLUDE}"
-printEnv LIB lib VS_LIB "${VS_LIB}"
-printEnv LIBPATH libpath VS_LIBPATH "${VS_LIBPATH}"
-if [ "${debug}" = "true" ] ; then
- printEnv UPATH upath VS_UPATH "${VS_UPATH}"
- printEnv WPATH wpath VS_WPATH "${VS_WPATH}"
- printEnv OPATH opath VS_OPATH "${VS_OPATH}"
-fi
-printEnv PATH path VS_PATH "${VS_PATH}"
-printEnv VCINSTALLDIR vcinstalldir VS_VCINSTALLDIR "${VS_VCINSTALLDIR}"
-printEnv VSINSTALLDIR vsinstalldir VS_VSINSTALLDIR "${VS_VSINSTALLDIR}"
-printEnv MSVCDIR msvcdir VS_MSVCDIR "${VS_MSVCDIR}"
-printEnv MSSDK mssdk VS_MSSDK "${VS_MSSDK}"
-printEnv MSTOOLS mstools VS_MSTOOLS "${VS_MSTOOLS}"
-printEnv DEVENVDIR devenvdir VS_DEVENVDIR "${VS_DEVENVDIR}"
-printEnv WINDOWSSDKDIR windowssdkdir VS_WINDOWSSDKDIR "${VS_WINDOWSSDKDIR}"
-if [ "${vcSelection}" = "11" ] ; then
- printEnv VS110COMNTOOLS vs110comntools VS_VS110COMNTOOLS "${VS_VS110COMNTOOLS}"
-elif [ "${vcSelection}" = "10" ] ; then
- printEnv VS100COMNTOOLS vs100comntools VS_VS100COMNTOOLS "${VS_VS100COMNTOOLS}"
-elif [ "${vcSelection}" = "9" ] ; then
- printEnv VS90COMNTOOLS vs90comntools VS_VS90COMNTOOLS "${VS_VS90COMNTOOLS}"
-elif [ "${vcSelection}" = "7" ] ; then
- printEnv VS71COMNTOOLS vs71comntools VS_VS71COMNTOOLS "${VS_VS71COMNTOOLS}"
-elif [ "${vcSelection}" = "8" ] ; then
- printEnv VS80COMNTOOLS vs80comntools VS_VS80COMNTOOLS "${VS_VS80COMNTOOLS}"
-fi
-
-# Check final settings
-if [ "${verbose}" = "true" ] ; then
- checkPaths "Windows PATH" "${VS_WPATH}" ";"
- checkPaths LIB "${VS_LIB}" ";"
- checkPaths INCLUDE "${VS_INCLUDE}" ";"
- checkPaths PATH "${VS_PATH}" "${pathsepIn}"
-fi
-
-# Remove all temp files
-if [ "${debug}" != "true" ] ; then
- rm -f -r ${tmp}
-fi
-
-exit 0
-
diff --git a/make/sponsors-rules.gmk b/make/sponsors-rules.gmk
deleted file mode 100644
index a3813b5..0000000
--- a/make/sponsors-rules.gmk
+++ /dev/null
@@ -1,74 +0,0 @@
-#
-# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-################################################################
-# SPONSORS TARGETS
-################################################################
-
-ifeq ($(PLATFORM)-$(ARCH), windows-i586)
-sponsors: sponsors-build
-else
-sponsors:
-endif
-
-# The generated java files are generated as a set, so instead of
-# setting the SPONSORS variable to that list of files, set it to
-# the .PHONY target that generates the set of files.
-SPONSORS = sponsors
-
-# put the generated patch in their own place in OUTPUTDIR
-SPONSORS_OUTPUTDIR = $(ABS_OUTPUTDIR)
-
-SPONSORS_BUILD_TARGETS = dll installer
-SPONSORS_BUILD_ARGUMENTS = \
- MAKEFLAGS= \
- $(COMMON_BUILD_ARGUMENTS) \
- ALT_OUTPUTDIR=$(SPONSORS_OUTPUTDIR) \
- ALT_RTPATCH_DIR=$(ALT_RTPATCH_DIR) \
- ALT_BASE_IMAGE_ZIP=$(ALT_BASE_IMAGE_ZIP) \
- ALT_BASE_IMAGE_DIR=$(ALT_BASE_IMAGE_DIR) \
- ALT_NEW_IMAGE_DIR=$(ALT_NEW_IMAGE_DIR) \
- ALT_BUNDLE_DATE=$(BUNDLE_DATE)
-
-ifeq ($(BUILD_LANGTOOLS), true)
- SPONSORS_BUILD_ARGUMENTS += ALT_LANGTOOLS_DIST=$(ABS_LANGTOOLS_DIST)
-endif
-
-sponsors-build:
-ifeq ($(ARCH_DATA_MODEL), 32)
- ifeq ($(BUILD_SPONSORS), true)
- @$(call MakeStart,sponsors,$(SPONSORS_BUILD_TARGETS))
- ($(CD) $(SPONSORS_TOPDIR)/make && \
- $(MAKE) $(SPONSORS_BUILD_TARGETS) $(SPONSORS_BUILD_ARGUMENTS))
- @$(call MakeFinish,sponsors,$(SPONSORS_BUILD_TARGETS))
- endif
-endif
-
-sponsors-sanity:
-
-sponsors-clobber::
-
-.PHONY: sponsors sponsors-build sponsors-sanity sponsors-clobber
-