8049367: Modular Run-Time Images
Reviewed-by: chegar, dfuchs, ihse, joehw, mullan, psandoz, wetmore
Contributed-by: alan.bateman@oracle.com, alex.buckley@oracle.com, bradford.wetmore@oracle.com, chris.hegarty@oracle.com, erik.joelsson@oracle.com, james.laskey@oracle.com, jonathan.gibbons@oracle.com, karen.kinnear@oracle.com, magnus.ihse.bursie@oracle.com, mandy.chung@oracle.com, mark.reinhold@oracle.com, paul.sandoz@oracle.com, sundararajan.athijegannathan@oracle.com
--- a/Makefile Tue Nov 18 15:25:13 2014 -0800
+++ b/Makefile Wed Dec 03 14:20:21 2014 +0000
@@ -143,31 +143,37 @@
$(info . make [default] # Compile all modules in langtools, hotspot, jaxp, jaxws,)
$(info . # corba and jdk and create a runnable "exploded" image)
$(info . make all # Compile everything, all repos, docs and images)
- $(info . make images # Create complete j2sdk and j2re images)
+ $(info . make images # Create complete jdk and jre images)
+ $(info . make <phase> # Compile the specified phase and everything it depends on)
+ $(info . # (gensrc, java, copy, libs, launchers, gendata, rmic))
+ $(info . make *-only # Applies to most targets and disables compling the)
+ $(info . # dependencies for the target. This is faster but may)
+ $(info . # result in incorrect build results!)
$(info . make docs # Create all docs)
$(info . make docs-javadoc # Create just javadocs, depends on less than full docs)
- $(info . make profiles # Create complete j2re compact profile images)
+ $(info . make profiles # Create complete jre compact profile images)
$(info . make bootcycle-images # Build images twice, second time with newly built JDK)
$(info . make install # Install the generated images locally)
$(info . make reconfigure # Rerun configure with the same arguments as last time)
- $(info . make clean # Remove all files generated by make, but not those)
- $(info . # generated by configure)
- $(info . make dist-clean # Remove all files, including configuration)
$(info . make help # Give some help on using make)
$(info . make test # Run tests, default is all tests (see TEST below))
$(info )
+ $(info Targets for cleaning)
+ $(info . make clean # Remove all files generated by make, but not those)
+ $(info . # generated by configure)
+ $(info . make dist-clean # Remove all files, including configuration)
+ $(info . make clean-<outputdir> # Remove the subdir in the output dir with the name)
+ $(info . make clean-<phase> # Remove all build results related to a certain build)
+ $(info . # phase (gensrc, java, libs, launchers))
+ $(info . make clean-<module> # Remove all build results related to a certain module)
+ $(info . make clean-<module>-<phase> # Remove all build results related to a certain)
+ $(info . # module and phase)
+ $(info )
$(info Targets for specific modules)
$(info . make <module> # Build <module> and everything it depends on. )
- $(info . make <module>-only # Build <module> only, without dependencies. This)
- $(info . # is faster but can result in incorrect build results!)
- $(info . make <module>-java # Compile java classes for <module> and everything it)
- $(info . # depends on)
- $(info . make <module>-libs # Build native libraries for <module> and everything it)
- $(info . # depends on)
- $(info . make <module>-launchers# Build native executables for <module> and everything it)
- $(info . # depends on)
- $(info . make <module>-gensrc # Execute the gensrc step for <module> and everything it)
- $(info . # depends on)
+ $(info . make <module>-<phase> # Compile the specified phase for the specified module)
+ $(info . # and everything it depends on)
+ $(info . # (gensrc, java, copy, libs, launchers, gendata, rmic))
$(info )
$(info Useful make variables)
$(info . make CONF= # Build all configurations (note, assignment is empty))
--- a/common/autoconf/boot-jdk.m4 Tue Nov 18 15:25:13 2014 -0800
+++ b/common/autoconf/boot-jdk.m4 Wed Dec 03 14:20:21 2014 +0000
@@ -305,20 +305,6 @@
AC_MSG_ERROR([Cannot continue])
fi
- # Setup proper paths for what we found
- BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
- if test ! -f "$BOOT_RTJAR"; then
- # On MacOSX it is called classes.jar
- BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
- if test -f "$BOOT_RTJAR"; then
- # Remove the ..
- BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
- fi
- fi
- BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
- BOOT_JDK="$BOOT_JDK"
- AC_SUBST(BOOT_RTJAR)
- AC_SUBST(BOOT_TOOLSJAR)
AC_SUBST(BOOT_JDK)
# Setup tools from the Boot JDK.
--- a/common/autoconf/bootcycle-spec.gmk.in Tue Nov 18 15:25:13 2014 -0800
+++ b/common/autoconf/bootcycle-spec.gmk.in Wed Dec 03 14:20:21 2014 +0000
@@ -42,13 +42,12 @@
# Override specific values to do a boot cycle build
+# Use a different Boot JDK
+BOOT_JDK := $(JDK_IMAGE_DIR)
+
# The bootcycle build has a different output directory
BUILD_OUTPUT:=@BUILD_OUTPUT@/bootcycle-build
-
-# Use a different Boot JDK
-OLD_BOOT_JDK:=$(BOOT_JDK)
-BOOT_JDK:=@BUILD_OUTPUT@/images/j2sdk-image
-BOOT_RTJAR:=$(BOOT_JDK)/jre/lib/rt.jar
+SJAVAC_SERVER_DIR:=$(subst @BUILD_OUTPUT@,$(BUILD_OUTPUT),$(SJAVAC_SERVER_DIR))
JAVA_CMD:=$(BOOT_JDK)/bin/java
JAVAC_CMD:=$(BOOT_JDK)/bin/javac
--- a/common/autoconf/compare.sh.in Tue Nov 18 15:25:13 2014 -0800
+++ b/common/autoconf/compare.sh.in Wed Dec 03 14:20:21 2014 +0000
@@ -46,6 +46,7 @@
FIND="@FIND@"
GREP="@GREP@"
JAVAP="@FIXPATH@ @BOOT_JDK@/bin/javap @JAVA_TOOL_FLAGS_SMALL@"
+JIMAGE="@FIXPATH@ @BUILD_OUTPUT@/jdk/bin/jimage"
LDD="@LDD@"
MKDIR="@MKDIR@"
NAWK="@NAWK@"
--- a/common/autoconf/flags.m4 Tue Nov 18 15:25:13 2014 -0800
+++ b/common/autoconf/flags.m4 Wed Dec 03 14:20:21 2014 +0000
@@ -784,24 +784,24 @@
LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${JDK_OUTPUTDIR}/lib"
+ LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
LDFLAGS_JDKLIB_SUFFIX=""
else
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS} \
- -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
+ -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
# On some platforms (mac) the linker warns about non existing -L dirs.
# Add server first if available. Linking aginst client does not always produce the same results.
# Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
# Default to server for other variants.
if test "x$JVM_VARIANT_SERVER" = xtrue; then
- LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
+ LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
- LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
+ LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
- LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
+ LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
else
- LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
+ LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
fi
LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
--- a/common/autoconf/generated-configure.sh Tue Nov 18 15:25:13 2014 -0800
+++ b/common/autoconf/generated-configure.sh Wed Dec 03 14:20:21 2014 +0000
@@ -820,8 +820,6 @@
JAVAC
JAVA
BOOT_JDK
-BOOT_TOOLSJAR
-BOOT_RTJAR
JAVA_CHECK
JAVAC_CHECK
COOKED_BUILD_NUMBER
@@ -4328,7 +4326,7 @@
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1415179461
+DATE_WHEN_GENERATED=1416999037
###############################################################################
#
@@ -25533,20 +25531,6 @@
as_fn_error $? "Cannot continue" "$LINENO" 5
fi
- # Setup proper paths for what we found
- BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
- if test ! -f "$BOOT_RTJAR"; then
- # On MacOSX it is called classes.jar
- BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
- if test -f "$BOOT_RTJAR"; then
- # Remove the ..
- BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
- fi
- fi
- BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
- BOOT_JDK="$BOOT_JDK"
-
-
# Setup tools from the Boot JDK.
@@ -42870,24 +42854,24 @@
LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${JDK_OUTPUTDIR}/lib"
+ LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
LDFLAGS_JDKLIB_SUFFIX=""
else
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS} \
- -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
+ -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
# On some platforms (mac) the linker warns about non existing -L dirs.
# Add server first if available. Linking aginst client does not always produce the same results.
# Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
# Default to server for other variants.
if test "x$JVM_VARIANT_SERVER" = xtrue; then
- LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
+ LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
- LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
+ LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
- LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
- else
- LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
+ LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
+ else
+ LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
fi
LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
--- a/common/autoconf/spec.gmk.in Tue Nov 18 15:25:13 2014 -0800
+++ b/common/autoconf/spec.gmk.in Wed Dec 03 14:20:21 2014 +0000
@@ -236,31 +236,23 @@
BUILD_OUTPUT:=@BUILD_OUTPUT@
# Colon left out to be able to override IMAGES_OUTPUTDIR for bootcycle-images
-LANGTOOLS_OUTPUTDIR=$(BUILD_OUTPUT)/langtools
-CORBA_OUTPUTDIR=$(BUILD_OUTPUT)/corba
-JAXP_OUTPUTDIR=$(BUILD_OUTPUT)/jaxp
-JAXWS_OUTPUTDIR=$(BUILD_OUTPUT)/jaxws
+SUPPORT_OUTPUTDIR=$(BUILD_OUTPUT)/support
+BUILDTOOLS_OUTPUTDIR=$(BUILD_OUTPUT)/buildtools
+MAKESUPPORT_OUTPUTDIR=$(BUILD_OUTPUT)/makesupport
+
HOTSPOT_OUTPUTDIR=$(BUILD_OUTPUT)/hotspot
JDK_OUTPUTDIR=$(BUILD_OUTPUT)/jdk
-NASHORN_OUTPUTDIR=$(BUILD_OUTPUT)/nashorn
IMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images
TESTMAKE_OUTPUTDIR=$(BUILD_OUTPUT)/testmake
MAKESUPPORT_OUTPUTDIR=$(BUILD_OUTPUT)/make-support
-LANGTOOLS_DIST=$(LANGTOOLS_OUTPUTDIR)/dist
-CORBA_DIST=$(CORBA_OUTPUTDIR)/dist
-JAXP_DIST=$(JAXP_OUTPUTDIR)/dist
-JAXWS_DIST=$(JAXWS_OUTPUTDIR)/dist
HOTSPOT_DIST=@HOTSPOT_DIST@
-NASHORN_DIST=$(NASHORN_OUTPUTDIR)/dist
BUILD_HOTSPOT=@BUILD_HOTSPOT@
-# The boot jdk to use. These are overridden in bootcycle-spec.gmk. Make sure to keep
-# them in sync.
+# The boot jdk to use. This is overridden in bootcycle-spec.gmk. Make sure to keep
+# it in sync.
BOOT_JDK:=@BOOT_JDK@
-BOOT_RTJAR:=@BOOT_RTJAR@
-BOOT_TOOLSJAR=$(BOOT_JDK)/lib/tools.jar
# When compiling Java source to be run by the boot jdk
# use these extra flags, eg -source 6 -target 6
@@ -484,13 +476,14 @@
JAVAC_FLAGS?=@JAVAC_FLAGS@
# You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ...
-INTERIM_LANGTOOLS_JAR := $(LANGTOOLS_OUTPUTDIR)/dist/interim_langtools.jar
-INTERIM_LANGTOOLS_ARGS := "-Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR)" -cp $(INTERIM_LANGTOOLS_JAR)
+# Use = assignment to be able to override in bootcycle-spec.gmk
+INTERIM_LANGTOOLS_JAR = $(BUILDTOOLS_OUTPUTDIR)/interim_langtools.jar
+INTERIM_LANGTOOLS_ARGS = "-Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR)" -cp $(INTERIM_LANGTOOLS_JAR)
NEW_JAVAC = $(INTERIM_LANGTOOLS_ARGS) com.sun.tools.javac.Main
NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) com.sun.tools.javadoc.Main
# The interim corba jar is needed for running rmic
-INTERIM_CORBA_JAR := $(CORBA_OUTPUTDIR)/dist/interim_corba.jar
+INTERIM_CORBA_JAR = $(BUILDTOOLS_OUTPUTDIR)/interim_corba.jar
# Base flags for RC
# Guarding this against resetting value. Legacy make files include spec multiple
@@ -695,19 +688,15 @@
OS_VERSION_MICRO:=@OS_VERSION_MICRO@
# Images directory definitions
-JDK_IMAGE_SUBDIR:=j2sdk-image
-JRE_IMAGE_SUBDIR:=j2re-image
-JDK_OVERLAY_IMAGE_SUBDIR:=j2sdk-overlay-image
-JRE_OVERLAY_IMAGE_SUBDIR:=j2re-overlay-image
+JDK_IMAGE_SUBDIR:=jdk
+JRE_IMAGE_SUBDIR:=jre
# Colon left out to be able to override output dir for bootcycle-images
JDK_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR)
JRE_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR)
-JDK_OVERLAY_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_OVERLAY_IMAGE_SUBDIR)
-JRE_OVERLAY_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_OVERLAY_IMAGE_SUBDIR)
# Macosx bundles directory definitions
-JDK_BUNDLE_SUBDIR=j2sdk-bundle/jdk$(JDK_VERSION).jdk/Contents
-JRE_BUNDLE_SUBDIR=j2re-bundle/jre$(JDK_VERSION).jre/Contents
+JDK_BUNDLE_SUBDIR=jdk-bundle/jdk$(JDK_VERSION).jdk/Contents
+JRE_BUNDLE_SUBDIR=jre-bundle/jre$(JDK_VERSION).jre/Contents
JDK_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_BUNDLE_SUBDIR)
JRE_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_BUNDLE_SUBDIR)
--- a/common/bin/compare.sh Tue Nov 18 15:25:13 2014 -0800
+++ b/common/bin/compare.sh Wed Dec 03 14:20:21 2014 +0000
@@ -103,8 +103,8 @@
-e '[0-9]\{2\}/[0-9]\{2\}/[0-9]\{4\}' \
-e thePoint -e aPoint -e setItemsPtr \
-e 'lambda\$[a-zA-Z0-9]*\$[0-9]' ${THIS_FILE} > /dev/null; then
- $JAVAP -c -constants -l -p ${OTHER_FILE} > ${OTHER_FILE}.javap
- $JAVAP -c -constants -l -p ${THIS_FILE} > ${THIS_FILE}.javap
+ $JAVAP -c -constants -l -p "${OTHER_FILE}" > ${OTHER_FILE}.javap
+ $JAVAP -c -constants -l -p "${THIS_FILE}" > ${THIS_FILE}.javap
TMP=$($DIFF ${OTHER_FILE}.javap ${THIS_FILE}.javap | \
$GREP '^[<>]' | \
$SED -e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d' \
@@ -298,7 +298,7 @@
WORK_DIR=$3
GENERAL_FILES=$(cd $THIS_DIR && $FIND . -type f ! -name "*.so" ! -name "*.jar" ! -name "*.zip" \
- ! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \
+ ! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" ! -name "*.jimage" \
! -name "ct.sym" ! -name "*.diz" ! -name "*.dll" \
! -name "*.pdb" ! -name "*.exp" ! -name "*.ilk" \
! -name "*.lib" ! -name "*.war" ! -name "JavaControlPanel" \
@@ -395,8 +395,14 @@
$RM -rf $THIS_UNZIPDIR $OTHER_UNZIPDIR
$MKDIR -p $THIS_UNZIPDIR
$MKDIR -p $OTHER_UNZIPDIR
- (cd $THIS_UNZIPDIR && $UNARCHIVE $THIS_ZIP)
- (cd $OTHER_UNZIPDIR && $UNARCHIVE $OTHER_ZIP)
+ if [ "$TYPE" = "jimage" ]
+ then
+ (cd $THIS_UNZIPDIR && $JIMAGE extract $THIS_ZIP)
+ (cd $OTHER_UNZIPDIR && $JIMAGE extract $OTHER_ZIP)
+ else
+ (cd $THIS_UNZIPDIR && $UNARCHIVE $THIS_ZIP)
+ (cd $OTHER_UNZIPDIR && $UNARCHIVE $OTHER_ZIP)
+ fi
# Find all archives inside and unzip them as well to compare the contents rather than
# the archives. pie.jar.pack.gz i app3.war is corrupt, skip it.
@@ -525,7 +531,7 @@
# TODO filter?
ZIPS=$(cd $THIS_DIR && $FIND . -type f -name "*.jar" -o -name "*.war" \
- | $SORT | $FILTER)
+ -o -name "*.jimage" | $SORT | $FILTER)
if [ -n "$ZIPS" ]; then
echo Jar files...
@@ -633,7 +639,7 @@
if cmp $OTHER_FILE $THIS_FILE > /dev/null; then
# The files were bytewise identical.
if [ -n "$VERBOSE" ]; then
- echo " : : : : : $BIN_FILE"
+ echo " : : : : : : $BIN_FILE"
fi
return 0
fi
@@ -1136,17 +1142,8 @@
if [ "$SKIP_DEFAULT" != "true" ]; then
if [ -z "$OTHER" ]; then
- OTHER="$THIS/../$LEGACY_BUILD_DIR"
- if [ -d "$OTHER" ]; then
- OTHER="$( cd "$OTHER" && pwd )"
- else
- echo "Default old build directory does not exist:"
- echo "$OTHER"
- exit 1
- fi
- echo "Comparing to default old build:"
- echo "$OTHER"
- echo
+ echo "Nothing to compare to, set with -o"
+ exit 1
else
if [ ! -d "$OTHER" ]; then
echo "Other build directory does not exist:"
@@ -1160,90 +1157,36 @@
fi
- # Figure out the layout of the this build. Which kinds of images have been produced
- if [ -d "$THIS/install/j2sdk-image" ]; then
- THIS_J2SDK="$THIS/install/j2sdk-image"
- THIS_J2RE="$THIS/install/j2re-image"
- echo "Selecting install images in this build"
- elif [ -d "$THIS/deploy/j2sdk-image" ]; then
- THIS_J2SDK="$THIS/deploy/j2sdk-image"
- THIS_J2RE="$THIS/deploy/j2re-image"
- echo "Selecting deploy images in this build"
- elif [ -d "$THIS/images/j2sdk-image" ]; then
- THIS_J2SDK="$THIS/images/j2sdk-image"
- THIS_J2RE="$THIS/images/j2re-image"
- echo "Selecting jdk images in this build"
- fi
-
- if [ -d "$THIS/images/j2sdk-overlay-image" ]; then
- if [ -d "$THIS/install/j2sdk-image" ]; then
- # If there is an install image, prefer that, it's also overlay
- THIS_J2SDK_OVERLAY="$THIS/install/j2sdk-image"
- THIS_J2RE_OVERLAY="$THIS/install/j2re-image"
- echo "Selecting install overlay images in this build"
- else
- THIS_J2SDK_OVERLAY="$THIS/images/j2sdk-overlay-image"
- THIS_J2RE_OVERLAY="$THIS/images/j2re-overlay-image"
- echo "Selecting jdk overlay images in this build"
- fi
- fi
-
- if [ -d "$THIS/images/j2sdk-bundle" ]; then
- THIS_J2SDK_BUNDLE="$THIS/images/j2sdk-bundle"
- THIS_J2RE_BUNDLE="$THIS/images/j2re-bundle"
- echo "Selecting bundles in this build"
+ # Find the common images to compare, prioritizing later build stages
+ if [ -d "$THIS/install/jdk" ] && [ -d "$OTHER/install/jdk" ]; then
+ THIS_J2SDK="$THIS/install/jdk"
+ THIS_J2RE="$THIS/install/jre"
+ OTHER_J2SDK="$OTHER/install/jdk"
+ OTHER_J2RE="$OTHER/install/jre"
+ echo "Selecting install images for compare"
+ elif [ -d "$THIS/deploy/jdk" ] && [ -d "$OTHER/deploy/jdk" ]; then
+ THIS_J2SDK="$THIS/deploy/jdk"
+ THIS_J2RE="$THIS/deploy/jre"
+ OTHER_J2SDK="$OTHER/deploy/jdk"
+ OTHER_J2RE="$OTHER/deploy/jre"
+ echo "Selecting deploy images for compare"
+ elif [ -d "$THIS/images/jdk" ] && [ -d "$OTHER/images/jdk" ]; then
+ THIS_J2SDK="$THIS/images/jdk"
+ THIS_J2RE="$THIS/images/jre"
+ OTHER_J2SDK="$OTHER/images/jdk"
+ OTHER_J2RE="$OTHER/images/jre"
+ echo "Selecting jdk images for compare"
+ else
+ echo "No common images found."
+ exit 1
fi
- # Figure out the layout of the other build (old or new, normal or overlay image)
- if [ -d "$OTHER/j2sdk-image" ]; then
- if [ -f "$OTHER/j2sdk-image/LICENSE" ]; then
- OTHER_J2SDK="$OTHER/j2sdk-image"
- OTHER_J2RE="$OTHER/j2re-image"
- echo "Selecting old-style images in other build"
- else
- OTHER_J2SDK_OVERLAY="$OTHER/j2sdk-image"
- OTHER_J2RE_OVERLAY="$OTHER/j2re-image"
- echo "Selecting overlay images in other build"
- fi
- elif [ -d "$OTHER/install/j2sdk-image" ]; then
- OTHER_J2SDK="$OTHER/install/j2sdk-image"
- OTHER_J2RE="$OTHER/install/j2re-image"
- echo "Selecting install images in other build"
- elif [ -d "$OTHER/deploy/j2sdk-image" ]; then
- OTHER_J2SDK="$OTHER/deploy/j2sdk-image"
- OTHER_J2RE="$OTHER/deploy/j2re-image"
- echo "Selecting deploy images in other build"
- elif [ -d "$OTHER/images/j2sdk-image" ]; then
- OTHER_J2SDK="$OTHER/images/j2sdk-image"
- OTHER_J2RE="$OTHER/images/j2re-image"
- echo "Selecting jdk images in other build"
- fi
-
- if [ -d "$OTHER/j2sdk-bundle" ]; then
- OTHER_J2SDK_BUNDLE="$OTHER/j2sdk-bundle"
- OTHER_J2RE_BUNDLE="$OTHER/j2re-bundle"
- echo "Selecting bundles in other build"
- elif [ -d "$OTHER/images/j2sdk-bundle" ]; then
- OTHER_J2SDK_BUNDLE="$OTHER/images/j2sdk-bundle"
- OTHER_J2RE_BUNDLE="$OTHER/images/j2re-bundle"
- echo "Selecting jdk bundles in other build"
- fi
-
- if [ -z "$THIS_J2SDK" ] || [ -z "$THIS_J2RE" ]; then
- if [ -z "$THIS_J2SDK_OVERLAY" ]; then
- echo "Cannot locate images for this build. Are you sure you have run 'make images'?"
- exit 1
- fi
- fi
-
- if [ -z "$OTHER_J2SDK" ] && [ -n "$OTHER_J2SDK_OVERLAY" ] && [ -z "$THIS_J2SDK_OVERLAY" ]; then
- echo "OTHER build only has an overlay image while this build does not. Nothing to compare!"
- exit 1
- fi
-
- if [ -z "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
- echo "WARNING! OTHER build has bundles built while this build does not."
- echo "Skipping bundle compare!"
+ if [ -d "$THIS/images/jdk-bundle" ] && [ -d "$OTHER/images/jdk-bundle" ]; then
+ THIS_J2SDK_BUNDLE="$THIS/images/jdk-bundle"
+ THIS_J2RE_BUNDLE="$THIS/images/jre-bundle"
+ OTHER_J2SDK_BUNDLE="$OTHER/images/jdk-bundle"
+ OTHER_J2RE_BUNDLE="$OTHER/images/jre-bundle"
+ echo "Also comparing macosx bundles"
fi
if [ -d "$OTHER/images" ]; then
@@ -1266,22 +1209,13 @@
THIS_JGSS_WINDOWS_BIN="$THIS_SEC_DIR/$JGSS_WINDOWS_BIN"
fi
- if [ -d "$THIS/docs" ]; then
+ if [ -d "$THIS/docs" ] && [ -d "$OTHER/docs" ]; then
THIS_DOCS="$THIS/docs"
- fi
-
- if [ -d "$OTHER/docs" ]; then
OTHER_DOCS="$OTHER/docs"
- fi
-
- if [ -z "$THIS_DOCS" ]; then
+ echo "Also comparing docs"
+ else
echo "WARNING! Docs haven't been built and won't be compared."
fi
-
- if [ -z "$OTHER_DOCS" ]; then
- echo "WARNING! Other build doesn't contain docs, skipping doc compare."
- fi
-
fi
##########################################################################################
@@ -1299,27 +1233,16 @@
echo -n "J2RE "
compare_files $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
fi
- if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
- echo -n "J2SDK Overlay "
- compare_dirs $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
- echo -n "J2RE Overlay "
- compare_dirs $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
-
- echo -n "J2SDK Overlay "
- compare_files $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
- echo -n "J2RE Overlay "
- compare_files $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
- fi
if [ -n "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
echo -n "J2SDK Bundle "
- compare_dirs $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/j2sdk-bundle
+ compare_dirs $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/jdk-bundle
echo -n "J2RE Bundle "
- compare_dirs $THIS_J2RE_BUNDLE $OTHER_J2RE_BUNDLE $COMPARE_ROOT/j2re-bundle
+ compare_dirs $THIS_J2RE_BUNDLE $OTHER_J2RE_BUNDLE $COMPARE_ROOT/jre-bundle
echo -n "J2SDK Bundle "
- compare_files $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/j2sdk-bundle
+ compare_files $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/jdk-bundle
echo -n "J2RE Bundle "
- compare_files $THIS_J2RE_BUNDLE $OTHER_J2RE_BUNDLE $COMPARE_ROOT/j2re-bundle
+ compare_files $THIS_J2RE_BUNDLE $OTHER_J2RE_BUNDLE $COMPARE_ROOT/jre-bundle
fi
if [ -n "$THIS_DOCS" ] && [ -n "$OTHER_DOCS" ]; then
echo -n "Docs "
@@ -1340,18 +1263,6 @@
echo -n "J2RE "
compare_permissions $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
fi
- if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
- echo -n "J2SDK Overlay "
- compare_permissions $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
- echo -n "J2RE Overlay "
- compare_permissions $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
- fi
- if [ -n "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
- echo -n "J2SDK Bundle "
- compare_permissions $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/j2sdk-bundle
- echo -n "J2RE Bundle "
- compare_permissions $THIS_J2RE_BUNDLE $OTHER_J2RE_BUNDLE $COMPARE_ROOT/j2re-bundle
- fi
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_permissions $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi
@@ -1364,17 +1275,11 @@
echo -n "J2RE "
compare_file_types $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
fi
- if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
- echo -n "J2SDK Overlay "
- compare_file_types $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
- echo -n "J2RE Overlay "
- compare_file_types $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
- fi
if [ -n "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
echo -n "J2SDK Bundle "
- compare_file_types $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/j2sdk-bundle
+ compare_file_types $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/jdk-bundle
echo -n "J2RE Bundle "
- compare_file_types $THIS_J2RE_BUNDLE $OTHER_J2RE_BUNDLE $COMPARE_ROOT/j2re-bundle
+ compare_file_types $THIS_J2RE_BUNDLE $OTHER_J2RE_BUNDLE $COMPARE_ROOT/jre-bundle
fi
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_file_types $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
@@ -1388,17 +1293,11 @@
echo -n "J2RE "
compare_general_files $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
fi
- if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
- echo -n "J2SDK Overlay "
- compare_general_files $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
- echo -n "J2RE Overlay "
- compare_general_files $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
- fi
if [ -n "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
echo -n "J2SDK Bundle "
- compare_general_files $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/j2sdk-bundle
+ compare_general_files $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/jdk-bundle
echo -n "J2RE Bundle "
- compare_general_files $THIS_J2RE_BUNDLE $OTHER_J2RE_BUNDLE $COMPARE_ROOT/j2re-bundle
+ compare_general_files $THIS_J2RE_BUNDLE $OTHER_J2RE_BUNDLE $COMPARE_ROOT/jre-bundle
fi
if [ -n "$THIS_DOCS" ] && [ -n "$OTHER_DOCS" ]; then
echo -n "Docs "
@@ -1454,10 +1353,6 @@
compare_all_libs $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
fi
fi
- if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
- echo -n "Bundle "
- compare_all_libs $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
- fi
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_all_libs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi
@@ -1467,10 +1362,6 @@
if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
compare_all_execs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
fi
- if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
- echo -n "Overlay "
- compare_all_execs $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
- fi
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_all_execs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi
--- a/common/bin/compare_exceptions.sh.incl Tue Nov 18 15:25:13 2014 -0800
+++ b/common/bin/compare_exceptions.sh.incl Wed Dec 03 14:20:21 2014 +0000
@@ -84,7 +84,9 @@
./bin/jconsole
./bin/jdb
./bin/jhat
+./bin/jimage
./bin/jinfo
+./bin/jjs
./bin/jmap
./bin/jps
./bin/jrunscript
@@ -171,7 +173,9 @@
./bin/jconsole
./bin/jdb
./bin/jhat
+./bin/jimage
./bin/jinfo
+./bin/jjs
./bin/jmap
./bin/jps
./bin/jrunscript
@@ -314,7 +318,9 @@
./bin/jconsole
./bin/jdb
./bin/jhat
+./bin/jimage
./bin/jinfo
+./bin/jjs
./bin/jmap
./bin/jps
./bin/jrunscript
@@ -453,7 +459,9 @@
./bin/amd64/jconsole
./bin/amd64/jdb
./bin/amd64/jhat
+./bin/amd64/jimage
./bin/amd64/jinfo
+./bin/amd64/jjs
./bin/amd64/jmap
./bin/amd64/jps
./bin/amd64/jrunscript
@@ -611,7 +619,9 @@
./bin/jconsole
./bin/jdb
./bin/jhat
+./bin/jimage
./bin/jinfo
+./bin/jjs
./bin/jmap
./bin/jps
./bin/jrunscript
@@ -755,7 +765,9 @@
./bin/sparcv9/jconsole
./bin/sparcv9/jdb
./bin/sparcv9/jhat
+./bin/sparcv9/jimage
./bin/sparcv9/jinfo
+./bin/sparcv9/jjs
./bin/sparcv9/jmap
./bin/sparcv9/jps
./bin/sparcv9/jrunscript
@@ -836,7 +848,9 @@
./bin/jconsole.exe
./bin/jdb.exe
./bin/jhat.exe
+./bin/jimage.exe
./bin/jinfo.exe
+./bin/jjs.exe
./bin/jmap.exe
./bin/jps.exe
./bin/jrunscript.exe
@@ -930,7 +944,9 @@
./bin/jconsole
./bin/jdb
./bin/jhat
+./bin/jimage
./bin/jinfo
+./bin/jjs
./bin/jmap
./bin/jps
./bin/jrunscript
--- a/common/bin/unshuffle_list.txt Tue Nov 18 15:25:13 2014 -0800
+++ b/common/bin/unshuffle_list.txt Wed Dec 03 14:20:21 2014 +0000
@@ -1212,6 +1212,7 @@
jdk/src/java.rmi/share/doc/stub/java/rmi/activation : jdk/src/share/doc/stub/java/rmi/activation
jdk/src/java.rmi/unix/bin/java-rmi.cgi.sh : jdk/src/solaris/bin/java-rmi.cgi.sh
jdk/src/java.scripting/share/classes/javax/script : jdk/src/share/classes/javax/script
+jdk/src/java.scripting/share/classes/com/sun/tools/script/shell : jdk/src/share/classes/com/sun/tools/script/shell
jdk/src/java.security.acl/share/classes/java/security/acl : jdk/src/share/classes/java/security/acl
jdk/src/java.security.acl/share/classes/sun/security/acl : jdk/src/share/classes/sun/security/acl
jdk/src/java.security.jgss/macosx/native/libosxkrb5/nativeccache.c : jdk/src/share/native/sun/security/krb5/nativeccache.c
@@ -1301,7 +1302,6 @@
jdk/src/jdk.deploy.osx/macosx/native/libosx/KeystoreImpl.m : jdk/src/macosx/native/apple/security/KeystoreImpl.m
jdk/src/jdk.dev/share/classes/com/sun/jarsigner : jdk/src/share/classes/com/sun/jarsigner
jdk/src/jdk.dev/share/classes/com/sun/tools/hat : jdk/src/share/classes/com/sun/tools/hat
-jdk/src/jdk.dev/share/classes/com/sun/tools/script/shell : jdk/src/share/classes/com/sun/tools/script/shell
jdk/src/jdk.dev/share/classes/sun/security/tools/jarsigner : jdk/src/share/classes/sun/security/tools/jarsigner
jdk/src/jdk.dev/share/classes/sun/tools/jar : jdk/src/share/classes/sun/tools/jar
jdk/src/jdk.dev/share/classes/sun/tools/native2ascii : jdk/src/share/classes/sun/tools/native2ascii
--- a/make/CompileJavaModules.gmk Tue Nov 18 15:25:13 2014 -0800
+++ b/make/CompileJavaModules.gmk Wed Dec 03 14:20:21 2014 +0000
@@ -235,6 +235,11 @@
################################################################################
+java.scripting_COPY := .js
+java.scripting_CLEAN := .properties
+
+################################################################################
+
java.sql_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
################################################################################
@@ -318,6 +323,9 @@
################################################################################
jdk.compiler_COPY := javax.tools.JavaCompilerTool
+jdk.compiler_CLEAN_FILES := $(wildcard \
+ $(patsubst %, $(JDK_TOPDIR)/src/jdk.compiler/share/classes/%/*.properties, \
+ sun/tools/serialver/resources))
################################################################################
@@ -366,12 +374,6 @@
################################################################################
-jdk.compiler_CLEAN_FILES := $(wildcard \
- $(patsubst %, $(JDK_TOPDIR)/src/jdk.compiler/share/classes/%/*.properties, \
- sun/tools/serialver/resources))
-
-################################################################################
-
jdk.jdi_EXCLUDES += \
com/sun/tools/example/debug/bdi \
com/sun/tools/example/debug/event \
@@ -426,10 +428,8 @@
#
# To use this variable, use $(call ALL_SRC_DIRS,module) with no space.
GENERATED_SRC_DIRS += \
- $(JDK_OUTPUTDIR)/gensrc/$1 \
- $(LANGTOOLS_OUTPUTDIR)/gensrc/$1 \
- $(CORBA_OUTPUTDIR)/gensrc/$1 \
- $(JDK_OUTPUTDIR)/gensrc_no_srczip/$1 \
+ $(SUPPORT_OUTPUTDIR)/gensrc/$1 \
+ $(SUPPORT_OUTPUTDIR)/gensrc_no_docs/$1 \
#
OS_SRC_DIRS += $(JDK_TOPDIR)/src/$1/$(OPENJDK_TARGET_OS)/classes
@@ -488,7 +488,7 @@
SRC := $$(wildcard $$(call ALL_SRC_DIRS,$1)), \
INCLUDES:=$(JDK_USER_DEFINED_FILTER),\
BIN := $(JDK_OUTPUTDIR)/modules/$1, \
- HEADERS := $(JDK_OUTPUTDIR)/gensrc_headers/$1, \
+ HEADERS := $(SUPPORT_OUTPUTDIR)/headers/$1, \
ADD_JAVAC_FLAGS := $$($1_JAVAC_FLAGS)))
$1: $$($1) $$($1_COPY_EXTRA)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/make/Images.gmk Wed Dec 03 14:20:21 2014 +0000
@@ -0,0 +1,496 @@
+#
+# Copyright (c) 2014, 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.
+#
+
+default: all
+
+include $(SPEC)
+include MakeBase.gmk
+
+TOOL_TARGETS :=
+JDK_TARGETS :=
+JRE_TARGETS :=
+
+# Hook to include the corresponding custom file, if present.
+$(eval $(call IncludeCustomExtension, , Images-pre.gmk))
+
+############################################################################
+
+MAIN_MODULES += java.se java.smartcardio jdk.httpserver jdk.sctp \
+ jdk.security.auth jdk.security.jgss jdk.runtime
+
+# providers
+PROVIDER_MODULES += jdk.charsets jdk.crypto.ec jdk.crypto.pkcs11 jdk.jvmstat jdk.localedata \
+ jdk.naming.dns jdk.naming.rmi jdk.scripting.nashorn jdk.zipfs
+
+# tools
+TOOLS_MODULES += jdk.attach jdk.compiler jdk.dev jdk.javadoc jdk.jcmd jdk.jconsole \
+ jdk.hotspot.agent jdk.hprof.agent jdk.jdi jdk.jdwp.agent jdk.rmic \
+ jdk.xml.bind jdk.xml.ws
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+ PROVIDER_MODULES += jdk.crypto.mscapi
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+ PROVIDER_MODULES += jdk.crypto.ucrypto
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+ MAIN_MODULES += jdk.deploy.osx
+endif
+
+JRE_MODULES := $(MAIN_MODULES) $(PROVIDER_MODULES)
+JDK_MODULES := $(JRE_MODULES) $(TOOLS_MODULES)
+
+# compact3 builds have additional modules
+JDK_COMPACT3_MODULES := java.compact3 java.smartcardio jdk.httpserver jdk.naming.dns \
+ jdk.naming.rmi jdk.sctp jdk.security.auth
+
+# Replacing double-comma with a single comma is to workaround the issue
+# with some version of make on windows that doesn't substitute spaces
+# with one comma properly as with make 4.0
+define SubstComma
+ $(subst $(COMMA)$(COMMA),$(COMMA),$(subst $(SPACE),$(COMMA),$(strip $1)))
+endef
+JRE_MODULES_LIST := $(call SubstComma, $(JRE_MODULES))
+JDK_MODULES_LIST := $(call SubstComma, $(JDK_MODULES))
+
+################################################################################
+
+JRE_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/jre-sorted-modules
+JDK_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/jdk-sorted-modules
+JRE_COMPACT1_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/compact1-sorted-modules
+JRE_COMPACT2_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/compact2-sorted-modules
+JRE_COMPACT3_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/compact3-sorted-modules
+
+
+MODULES_CMDS := $(SUPPORT_OUTPUTDIR)/modules_cmds-stripped
+MODULES_LIBS := $(SUPPORT_OUTPUTDIR)/modules_libs-stripped
+MODULES_CONF := $(SUPPORT_OUTPUTDIR)/modules_conf
+
+JIMAGE_TOOL := $(JAVA_SMALL) \
+ -Xbootclasspath/p:$(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes \
+ -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes build.tools.module.ImageBuilder \
+ --cmds $(MODULES_CMDS) \
+ --libs $(MODULES_LIBS) \
+ --configs $(MODULES_CONF) \
+ --classes $(JDK_OUTPUTDIR)/modules \
+ --endian $(OPENJDK_TARGET_CPU_ENDIAN) \
+ #
+
+MODULES_XML += $(SRC_ROOT)/modules.xml
+DEPENDENCIES := $(call CacheFind, \
+ $(SUPPORT_OUTPUTDIR)/modules_cmds \
+ $(SUPPORT_OUTPUTDIR)/modules_libs) \
+ $(wildcard $(JDK_OUTPUTDIR)/modules/*/_*) \
+ $(MODULES_XML)
+ #
+
+# Use this file inside the image as target for make rule
+JIMAGE_TARGET_FILE := bin/java$(EXE_SUFFIX)
+
+$(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES)
+ $(ECHO) Creating jdk jimage
+ $(RM) -r $(JDK_IMAGE_DIR) $(JDK_SORTED_MODULES)
+ $(JIMAGE_TOOL) --mods $(JDK_MODULES_LIST) --output $(JDK_IMAGE_DIR) \
+ $(MODULES_XML) > $(JDK_SORTED_MODULES)
+ $(TOUCH) $@
+
+$(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES)
+ $(ECHO) Creating jre jimage
+ $(RM) -r $(JRE_IMAGE_DIR) $(JRE_SORTED_MODULES)
+ $(JIMAGE_TOOL) --mods $(JRE_MODULES_LIST) --output $(JRE_IMAGE_DIR) \
+ $(MODULES_XML) > $(JRE_SORTED_MODULES)
+ $(TOUCH) $@
+
+JRE_COMPACT1_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact1
+JRE_COMPACT2_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact2
+JRE_COMPACT3_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact3
+
+COMPACT_EXTRA_MODULES := jdk.localedata jdk.crypto.pkcs11 jdk.crypto.ec
+
+$(JRE_COMPACT1_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES)
+ $(ECHO) Creating jre compact1 jimage
+ $(RM) -r $(JRE_COMPACT1_IMAGE_DIR) $(JRE_COMPACT1_SORTED_MODULES)
+ $(JIMAGE_TOOL) \
+ --mods $(call SubstComma, java.compact1 $(COMPACT_EXTRA_MODULES)) \
+ --output $(JRE_COMPACT1_IMAGE_DIR) \
+ $(MODULES_XML) > $(JRE_COMPACT1_SORTED_MODULES)
+ $(TOUCH) $@
+
+$(JRE_COMPACT2_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES)
+ $(ECHO) Creating jre compact2 jimage
+ $(RM) -r $(JRE_COMPACT2_IMAGE_DIR) $(JRE_COMPACT2_SORTED_MODULES)
+ $(JIMAGE_TOOL) \
+ --mods $(call SubstComma, java.compact2 $(COMPACT_EXTRA_MODULES)) \
+ --output $(JRE_COMPACT2_IMAGE_DIR) \
+ $(MODULES_XML) > $(JRE_COMPACT2_SORTED_MODULES)
+ $(TOUCH) $@
+
+$(JRE_COMPACT3_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES)
+ $(ECHO) Creating jre compact3 jimage
+ $(RM) -r $(JRE_COMPACT3_IMAGE_DIR) $(JRE_COMPACT3_SORTED_MODULES)
+ $(JIMAGE_TOOL) \
+ --mods $(call SubstComma, $(JDK_COMPACT3_MODULES) $(COMPACT_EXTRA_MODULES)) \
+ --output $(JRE_COMPACT3_IMAGE_DIR) \
+ $(MODULES_XML) > $(JRE_COMPACT3_SORTED_MODULES)
+ $(TOUCH) $@
+
+TOOL_JRE_TARGETS := $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
+TOOL_JDK_TARGETS := $(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
+TOOL_JRE_COMPACT1_TARGETS := $(JRE_COMPACT1_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
+TOOL_JRE_COMPACT2_TARGETS := $(JRE_COMPACT2_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
+TOOL_JRE_COMPACT3_TARGETS := $(JRE_COMPACT3_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
+
+################################################################################
+# /man dir
+#
+# All variables in this section are assigned with simple =, without :, to enable
+# more selective overriding from the custom version of this file.
+#
+# Avoid evaluating this whole section on windows for speed and stability
+ifneq ($(OPENJDK_TARGET_OS), windows)
+ JRE_MAN_PAGES += \
+ java.1 \
+ jjs.1 \
+ keytool.1 \
+ orbd.1 \
+ pack200.1 \
+ policytool.1 \
+ rmid.1 \
+ rmiregistry.1 \
+ servertool.1 \
+ tnameserv.1 \
+ unpack200.1
+
+ ifndef OPENJDK
+ ifneq ($(OPENJDK_TARGET_OS), solaris)
+ JRE_MAN_PAGES += javaws.1
+ endif
+ endif
+
+ JDK_MAN_PAGES += \
+ $(JRE_MAN_PAGES) \
+ appletviewer.1 \
+ idlj.1 \
+ jar.1 \
+ jarsigner.1 \
+ javac.1 \
+ javadoc.1 \
+ javah.1 \
+ javap.1 \
+ jconsole.1 \
+ jcmd.1 \
+ jdb.1 \
+ jdeps.1 \
+ jhat.1 \
+ jinfo.1 \
+ jmap.1 \
+ jps.1 \
+ jrunscript.1 \
+ jsadebugd.1 \
+ jstack.1 \
+ jstat.1 \
+ jstatd.1 \
+ native2ascii.1 \
+ rmic.1 \
+ schemagen.1 \
+ serialver.1 \
+ wsgen.1 \
+ wsimport.1 \
+ xjc.1
+
+ # This variable is potentially overridden in the closed makefile.
+ MAN_SRC_BASEDIR ?= $(JDK_TOPDIR)/src
+
+ ifeq ($(OPENJDK_TARGET_OS), linux)
+ MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/linux/doc
+ MAN1_SUBDIR = man
+ endif
+ ifeq ($(OPENJDK_TARGET_OS), solaris)
+ MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/solaris/doc
+ MAN1_SUBDIR = sun/man/man1
+ endif
+ ifeq ($(OPENJDK_TARGET_OS), macosx)
+ MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/bsd/doc
+ MAN1_SUBDIR = man
+ endif
+
+ $(JRE_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/%
+ $(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+ $(install-file)
+
+ $(JDK_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/%
+ $(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+ $(install-file)
+
+ define install-ja-manpage
+ $(MKDIR) -p $(@D)
+ $(CAT) $< \
+ | $(NATIVE2ASCII) -encoding eucJP \
+ | $(SED) 's/@@VERSION@@/$(THIS_JDK_VERSION)/g' \
+ | $(NATIVE2ASCII) -reverse -encoding $1 \
+ > $@
+ endef
+
+ $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
+ $(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+ $(call install-ja-manpage, UTF-8)
+
+ $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
+ $(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+ $(call install-ja-manpage, UTF-8)
+
+ $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
+ $(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+ $(call install-ja-manpage, PCK)
+
+ $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
+ $(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+ $(call install-ja-manpage, PCK)
+
+ ifeq ($(OPENJDK_TARGET_OS), solaris)
+ $(JRE_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
+ $(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+ $(install-file)
+
+ $(JDK_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
+ $(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+ $(install-file)
+ endif
+
+ ifneq ($(findstring $(OPENJDK_TARGET_OS), linux macosx), )
+ $(JRE_IMAGE_DIR)/man/ja:
+ $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+ $(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
+
+ $(JDK_IMAGE_DIR)/man/ja:
+ $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+ $(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
+ endif
+
+ ifeq ($(OPENJDK_TARGET_OS), solaris)
+ JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \
+ $(addprefix $(JRE_IMAGE_DIR)/man/ja/man1/, $(JRE_MAN_PAGES)) \
+ $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \
+ $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JRE_MAN_PAGES))
+
+ JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \
+ $(addprefix $(JDK_IMAGE_DIR)/man/ja/man1/, $(JDK_MAN_PAGES)) \
+ $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \
+ $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JDK_MAN_PAGES))
+ endif
+
+ ifneq ($(findstring $(OPENJDK_TARGET_OS), linux macosx), )
+ JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \
+ $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \
+ $(JRE_IMAGE_DIR)/man/ja
+
+ JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \
+ $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \
+ $(JDK_IMAGE_DIR)/man/ja
+ endif
+
+ JRE_TARGETS += $(JRE_MAN_PAGE_LIST)
+ JDK_TARGETS += $(JDK_MAN_PAGE_LIST)
+endif # Windows
+
+################################################################################
+# /include dir
+
+$(eval $(call SetupCopyFiles,COPY_INCLUDES, \
+ SRC := $(JDK_OUTPUTDIR)/include, \
+ DEST := $(JDK_IMAGE_DIR)/include, \
+ FILES := $(call CacheFind,$(JDK_OUTPUTDIR)/include)))
+
+JDK_TARGETS += $(COPY_INCLUDES)
+
+################################################################################
+# doc files
+
+JRE_DOC_FILES ?= LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README
+JDK_DOC_FILES ?= LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README
+JRE_DOC_LOCATION ?= $(JDK_TOPDIR)
+JDK_DOC_LOCATION ?= $(JDK_TOPDIR)
+
+JRE_DOC_TARGETS := $(addprefix $(JRE_IMAGE_DIR)/, $(JRE_DOC_FILES))
+JDK_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/, $(JDK_DOC_FILES))
+
+# Processing license files from source area to image area
+# These are modified to have the platform specific EOL chars.
+define process-doc-file
+ $(ECHO) $(LOG_INFO) Processing $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+ $(MKDIR) -p $(@D)
+ $(RM) $@
+ LC_ALL=C $(SED) 's/$$//g' $< > $@
+ $(CHMOD) 444 $@
+endef
+
+$(JRE_IMAGE_DIR)/%: $(JRE_DOC_LOCATION)/%
+ $(process-doc-file)
+
+$(JDK_IMAGE_DIR)/%: $(JDK_DOC_LOCATION)/%
+ $(process-doc-file)
+
+JRE_TARGETS += $(JRE_DOC_TARGETS)
+JDK_TARGETS += $(JDK_DOC_TARGETS)
+
+################################################################################
+# Release file
+
+JRE_INFO_FILE := $(JRE_IMAGE_DIR)/release
+JDK_INFO_FILE := $(JDK_IMAGE_DIR)/release
+JRE_COMPACT1_INFO_FILE := $(JRE_COMPACT1_IMAGE_DIR)/release
+JRE_COMPACT2_INFO_FILE := $(JRE_COMPACT2_IMAGE_DIR)/release
+JRE_COMPACT3_INFO_FILE := $(JRE_COMPACT3_IMAGE_DIR)/release
+
+# Common way to emit a line into the release or info file
+define info-file-item # name value
+ $(PRINTF) '%s="%s"\n' $1 $2 >> $@
+endef
+
+# Param 1 - The file containing the MODULES list
+define create-info-file
+ $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+ $(MKDIR) -p $(@D)
+ $(RM) $@
+ $(call info-file-item, "JAVA_VERSION", "$(JDK_VERSION)")
+ $(call info-file-item, "OS_NAME", "$(REQUIRED_OS_NAME)")
+ $(call info-file-item, "OS_VERSION", "$(REQUIRED_OS_VERSION)")
+ $(call info-file-item, "OS_ARCH", "$(OPENJDK_TARGET_CPU_LEGACY)")
+ $(if $(JDK_ARCH_ABI_PROP_NAME), \
+ $(call info-file-item, "SUN_ARCH_ABI", "$(JDK_ARCH_ABI_PROP_NAME)"))
+ $(call info-file-item, "SOURCE", "$(ALL_SOURCE_TIPS)")
+ $(call info-file-item, "MODULES", "`$(CAT) $1`")
+endef
+
+ALL_SOURCE_TIPS = $(shell \
+ if [ -f $(SUPPORT_OUTPUTDIR)/source_tips ] ; then \
+ $(CAT) $(SUPPORT_OUTPUTDIR)/source_tips ; \
+ fi)
+
+$(JRE_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(SUPPORT_OUTPUTDIR)/source_tips
+ $(call create-info-file, $(JRE_SORTED_MODULES))
+
+$(JDK_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(SUPPORT_OUTPUTDIR)/source_tips
+ $(call create-info-file, $(JDK_SORTED_MODULES))
+
+$(JRE_COMPACT1_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(SUPPORT_OUTPUTDIR)/source_tips
+ $(call create-info-file, $(JRE_COMPACT1_SORTED_MODULES))
+ $(call info-file-item, "JAVA_PROFILE", "compact1")
+
+$(JRE_COMPACT2_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(SUPPORT_OUTPUTDIR)/source_tips
+ $(call create-info-file, $(JRE_COMPACT2_SORTED_MODULES))
+ $(call info-file-item, "JAVA_PROFILE", "compact2")
+
+$(JRE_COMPACT3_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(SUPPORT_OUTPUTDIR)/source_tips
+ $(call create-info-file, $(JRE_COMPACT3_SORTED_MODULES))
+ $(call info-file-item, "JAVA_PROFILE", "compact3")
+
+JRE_TARGETS += $(JRE_INFO_FILE)
+JDK_TARGETS += $(JDK_INFO_FILE)
+JRE_COMPACT1_TARGETS += $(JRE_COMPACT1_INFO_FILE)
+JRE_COMPACT2_TARGETS += $(JRE_COMPACT2_INFO_FILE)
+JRE_COMPACT3_TARGETS += $(JRE_COMPACT3_INFO_FILE)
+
+################################################################################
+# src.zip
+
+$(JDK_IMAGE_DIR)/src.zip: $(SUPPORT_OUTPUTDIR)/src.zip
+ $(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+ $(install-file)
+
+JDK_TARGETS += $(JDK_IMAGE_DIR)/src.zip
+
+################################################################################
+# /demo dir
+
+# The db demo contains an empty dir that needs to be copied. The other
+# directories will always trigger the rule for recompile since
+# _the.list_of_packages files are touched.
+ifneq ($(findstring images, $(MAKECMDGOALS)), )
+ $(JDK_IMAGE_DIR)/demo/%: $(SUPPORT_OUTPUTDIR)/demo/image/%
+ if [ ! -d "$@" ]; then \
+ $(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'; \
+ $(MKDIR) -p $(@D); \
+ if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) '$<' '$@'; fi \
+ fi
+
+ # Find all files including directories
+ JDK_DEMO_TARGETS := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/demo/image), \
+ $(patsubst $(SUPPORT_OUTPUTDIR)/demo/image/%, $(JDK_IMAGE_DIR)/demo/%, \
+ $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/demo/image \
+ ! \( -name "_the*" -o -name "javac_state" \) )))
+
+ JDK_TARGETS += $(JDK_DEMO_TARGETS)
+endif
+
+################################################################################
+# /sample dir
+
+$(eval $(call SetupCopyFiles,COPY_SAMPLES, \
+ SRC := $(SUPPORT_OUTPUTDIR)/sample, \
+ DEST := $(JDK_IMAGE_DIR)/sample, \
+ FILES := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/sample), \
+ $(call CacheFind,$(SUPPORT_OUTPUTDIR)/sample))))
+
+JDK_TARGETS += $(COPY_SAMPLES)
+
+################################################################################
+# jrt-fs.jar
+
+$(eval $(call SetupCopyFiles,COPY_JRTFS_JAR, \
+ SRC := $(SUPPORT_OUTPUTDIR), \
+ DEST := $(JDK_IMAGE_DIR), \
+ FILES := $(SUPPORT_OUTPUTDIR)/jrt-fs.jar))
+
+JDK_TARGETS += $(COPY_JRTFS_JAR)
+
+################################################################################
+
+# Include custom post hook here to make it possible to augment the target lists
+# before actual target prerequisites are declared.
+$(eval $(call IncludeCustomExtension, , Images-post.gmk))
+
+################################################################################
+
+$(JRE_TARGETS): $(TOOL_JRE_TARGETS)
+$(JDK_TARGETS): $(TOOL_JDK_TARGETS)
+
+jimages: $(TOOL_JRE_TARGETS) $(TOOL_JDK_TARGETS) $(JRE_TARGETS) $(JDK_TARGETS)
+
+
+$(JRE_COMPACT1_TARGETS): $(TOOL_JRE_COMPACT1_TARGETS)
+$(JRE_COMPACT2_TARGETS): $(TOOL_JRE_COMPACT2_TARGETS)
+$(JRE_COMPACT3_TARGETS): $(TOOL_JRE_COMPACT3_TARGETS)
+
+profiles: $(TOOL_JRE_COMPACT1_TARGETS) \
+ $(TOOL_JRE_COMPACT2_TARGETS) \
+ $(TOOL_JRE_COMPACT3_TARGETS) \
+ $(JRE_COMPACT1_TARGETS) \
+ $(JRE_COMPACT2_TARGETS) \
+ $(JRE_COMPACT3_TARGETS)
+
+.PHONY: default all jimages profiles
--- a/make/Javadoc.gmk Tue Nov 18 15:25:13 2014 -0800
+++ b/make/Javadoc.gmk Wed Dec 03 14:20:21 2014 +0000
@@ -44,8 +44,8 @@
# Definitions for directories
#
-DOCSDIR := $(OUTPUT_ROOT)/docs
-TEMPDIR := $(OUTPUT_ROOT)/docstemp
+DOCSDIR := $(IMAGES_OUTPUTDIR)/docs
+DOCSTMPDIR = $(SUPPORT_OUTPUTDIR)/docs
HOTSPOT_DOCS_IMPORT_PATH=$(HOTSPOT_OUTPUTDIR)/docs
@@ -142,9 +142,8 @@
$(CORBA_TOPDIR)/src/*/share/classes \
$(JAXP_TOPDIR)/src/*/share/classes \
$(JAXWS_TOPDIR)/src/*/share/classes \
- $(JDK_OUTPUTDIR)/gensrc/j* \
- $(JDK_OUTPUTDIR)/gendocsrc_rmic \
- $(CORBA_OUTPUTDIR)/gensrc/j* \
+ $(SUPPORT_OUTPUTDIR)/gensrc/j* \
+ $(SUPPORT_OUTPUTDIR)/rmic/j* \
$(JDK_TOPDIR)/src/*/share/doc/stub \
) \
#
@@ -202,11 +201,6 @@
endef
#
-# Temporary directory for javadoc creation
-#
-DOCSTMPDIR = $(TEMPDIR)/doctmp
-
-#
# Different api directories created from root directory
#
COREAPI_DOCSDIR = $(DOCSDIR)/api
@@ -271,7 +265,6 @@
$(call OptionOnly,-quiet) ; \
$(call OptionOnly,-use) ; \
$(call OptionOnly,-keywords) ; \
- $(call OptionPair,-Xprofilespath,$(JDK_TOPDIR)/make/profile-rtjar-includes.txt) ; \
$(call OptionOnly,$(ADDITIONAL_JAVADOCFLAGS))
endef
@@ -668,7 +661,7 @@
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
+$(JDWP_DOCDIR)/jdwp-protocol.html : $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html
$(MKDIR) -p $(@D)
$(RM) $@
$(CP) $< $@
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/make/JrtfsJar.gmk Wed Dec 03 14:20:21 2014 +0000
@@ -0,0 +1,37 @@
+#
+# Copyright (c) 2014, 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.
+#
+
+default: all
+
+include $(SPEC)
+include MakeBase.gmk
+include JavaCompilation.gmk
+
+$(eval $(call SetupArchive,JRTFS_JAR, , \
+ SRCS := $(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes, \
+ JAR := $(SUPPORT_OUTPUTDIR)/jrt-fs.jar, \
+ MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf))
+
+all: $(JRTFS_JAR)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/make/MacBundles.gmk Wed Dec 03 14:20:21 2014 +0000
@@ -0,0 +1,137 @@
+#
+# 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.
+#
+
+include $(SPEC)
+include MakeBase.gmk
+
+default: bundles
+
+# Only macosx has bundles defined.
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+
+ bundles: jre-bundle jdk-bundle
+
+ # JDK_BUNDLE_DIR and JRE_BUNDLE_DIR are defined in SPEC.
+
+ MACOSX_PLIST_SRC := $(JDK_TOPDIR)/make/data/bundle
+
+ # All these OPENJDK checks are needed since there is no coherency between
+ # these values in open and closed. Should probably be fixed.
+ ifndef OPENJDK
+ BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(JDK_MINOR_VERSION)u$(JDK_UPDATE_VERSION)
+ else
+ BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE)
+ endif
+ BUNDLE_ID_JRE := $(BUNDLE_ID).jre
+ BUNDLE_ID_JDK := $(BUNDLE_ID).jdk
+
+ BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_MINOR_VERSION)
+ BUNDLE_NAME_JRE := $(BUNDLE_NAME)
+ BUNDLE_NAME_JDK := $(BUNDLE_NAME)
+
+ ifndef OPENJDK
+ BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_VERSION)
+ else
+ BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) ($(JDK_VERSION))
+ endif
+ BUNDLE_INFO_JRE := $(BUNDLE_INFO)
+ BUNDLE_INFO_JDK := $(BUNDLE_INFO)
+
+ BUNDLE_PLATFORM_VERSION := $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION)
+ BUNDLE_VERSION := $(JDK_VERSION)
+ ifeq ($(COMPANY_NAME), N/A)
+ BUNDLE_VENDOR := UNDEFINED
+ else
+ BUNDLE_VENDOR := $(COMPANY_NAME)
+ endif
+
+
+ JDK_FILE_LIST := $(shell $(FIND) $(JDK_IMAGE_DIR))
+ JRE_FILE_LIST := $(shell $(FIND) $(JRE_IMAGE_DIR))
+
+ JDK_TARGET_LIST := $(subst $(JDK_IMAGE_DIR)/,$(JDK_BUNDLE_DIR)/Home/,$(JDK_FILE_LIST))
+ JRE_TARGET_LIST := $(subst $(JRE_IMAGE_DIR)/,$(JRE_BUNDLE_DIR)/Home/,$(JRE_FILE_LIST))
+
+ # Copy empty directories (jre/lib/applet).
+ $(JDK_BUNDLE_DIR)/Home/%: $(JDK_IMAGE_DIR)/%
+ $(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+ $(MKDIR) -p $(@D)
+ if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi
+
+ $(JRE_BUNDLE_DIR)/Home/%: $(JRE_IMAGE_DIR)/%
+ $(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+ $(MKDIR) -p $(@D)
+ if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi
+
+ $(JDK_BUNDLE_DIR)/MacOS/libjli.dylib:
+ $(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+ $(MKDIR) -p $(@D)
+ $(RM) $@
+ $(LN) -s ../Home/lib/jli/libjli.dylib $@
+
+ $(JRE_BUNDLE_DIR)/MacOS/libjli.dylib:
+ $(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+ $(MKDIR) -p $(@D)
+ $(RM) $@
+ $(LN) -s ../Home/lib/jli/libjli.dylib $@
+
+ $(JDK_BUNDLE_DIR)/Info.plist: $(SPEC)
+ $(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+ $(MKDIR) -p $(@D)
+ $(SED) -e "s/@@ID@@/$(BUNDLE_ID_JDK)/g" \
+ -e "s/@@NAME@@/$(BUNDLE_NAME_JDK)/g" \
+ -e "s/@@INFO@@/$(BUNDLE_INFO_JDK)/g" \
+ -e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" \
+ -e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" \
+ -e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" \
+ < $(MACOSX_PLIST_SRC)/JDK-Info.plist > $@
+
+ $(JRE_BUNDLE_DIR)/Info.plist: $(SPEC)
+ $(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+ $(MKDIR) -p $(@D)
+ $(SED) -e "s/@@ID@@/$(BUNDLE_ID_JRE)/g" \
+ -e "s/@@NAME@@/$(BUNDLE_NAME_JRE)/g" \
+ -e "s/@@INFO@@/$(BUNDLE_INFO_JRE)/g" \
+ -e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" \
+ -e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" \
+ -e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" \
+ < $(MACOSX_PLIST_SRC)/JRE-Info.plist > $@
+
+ jdk-bundle: $(JDK_TARGET_LIST) $(JDK_BUNDLE_DIR)/MacOS/libjli.dylib \
+ $(JDK_BUNDLE_DIR)/Info.plist
+ $(SETFILE) -a B $(dir $(JDK_BUNDLE_DIR))
+
+ jre-bundle: $(JRE_TARGET_LIST) $(JRE_BUNDLE_DIR)/MacOS/libjli.dylib \
+ $(JRE_BUNDLE_DIR)/Info.plist
+ $(SETFILE) -a B $(dir $(JRE_BUNDLE_DIR))
+
+else # Not macosx
+
+ bundles:
+ $(ECHO) "No bundles defined for $(OPENJDK_TARGET_OS)"
+
+endif # macosx
+
+.PHONY: jdk-bundle jre-bundle bundles
--- a/make/Main.gmk Tue Nov 18 15:25:13 2014 -0800
+++ b/make/Main.gmk Wed Dec 03 14:20:21 2014 +0000
@@ -39,9 +39,6 @@
include $(SRC_ROOT)/make/common/MakeBase.gmk
include $(SRC_ROOT)/make/common/Modules.gmk
-# Load common profile names definitions
-include $(JDK_TOPDIR)/make/ProfileNames.gmk
-
# Declare ALL_TARGETS as an immediate variable. This variable is a list of all
# valid top level targets. It's used to declare them all as PHONY and to
# generate the -only targets.
@@ -64,19 +61,23 @@
################################################################################
# Interim/build tools targets, compiling tools used during the build
+buildtools-langtools:
+ +($(CD) $(LANGTOOLS_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Tools.gmk)
+
interim-langtools:
+($(CD) $(LANGTOOLS_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterim.gmk)
interim-corba:
- +($(CD) $(CORBA_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileCorba.gmk)
+ +($(CD) $(CORBA_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterim.gmk)
interim-rmic:
+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimRmic.gmk)
-build-tools-jdk:
+buildtools-jdk:
+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Tools.gmk java-tools)
-ALL_TARGETS += interim-langtools interim-corba build-tools-jdk
+ALL_TARGETS += buildtools-langtools interim-langtools interim-corba \
+ interim-rmic buildtools-jdk
################################################################################
# Special targets for certain modules
@@ -87,56 +88,42 @@
unpack-sec:
+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f UnpackSecurity.gmk)
-policy-jars:
- +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CreatePolicyJars.gmk)
-
-ALL_TARGETS += import-hotspot unpack-sec policy-jars
+ALL_TARGETS += import-hotspot unpack-sec
################################################################################
# Gensrc targets, generating source before java compilation can be done
-JDK_GENSRC_MODULES := $(call FindModulesWithMakefileFor, gensrc, Gensrc)
-LANGTOOLS_GENSRC_MODULES := jdk.compiler.tools
-CORBA_GENSRC_MODULES := java.corba
-GENSRC_MODULES := $(JDK_GENSRC_MODULES) $(LANGTOOLS_GENSRC_MODULES) \
- $(CORBA_GENSRC_MODULES)
-JDK_GENSRC_TARGETS := $(addsuffix -gensrc, $(JDK_GENSRC_MODULES))
-LANGTOOLS_GENSRC_TARGETS := $(addsuffix -gensrc, $(LANGTOOLS_GENSRC_MODULES))
-CORBA_GENSRC_TARGETS := $(addsuffix -gensrc, $(CORBA_GENSRC_MODULES))
-GENSRC_TARGETS := $(addsuffix -gensrc, $(GENSRC_MODULES))
+$(eval $(call DeclareRecipesForPhase, GENSRC, \
+ TARGET_SUFFIX := gensrc, \
+ FILE_PREFIX := Gensrc, \
+ MAKE_SUBDIR := gensrc, \
+ CHECK_MODULES := $(ALL_MODULES), \
+ MULTIPLE_MAKEFILES := true))
-jdk.compiler.tools-gensrc:
- +($(CD) $(LANGTOOLS_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f GensrcLangtools.gmk)
-
-java.corba-gensrc:
- +($(CD) $(CORBA_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f GensrcCorba.gmk)
-
-# Declare recipes for all jdk <module>-gensrc targets
-$(foreach m, $(JDK_GENSRC_MODULES), $(eval $(call DeclareRecipeForModuleMakefile, \
- $m, gensrc, gensrc, Gensrc)))
+JDK_GENSRC_TARGETS := $(filter %-gensrc-jdk, $(GENSRC_TARGETS))
+LANGTOOLS_GENSRC_TARGETS := $(filter %-gensrc-langtools, $(GENSRC_TARGETS))
+CORBA_GENSRC_TARGETS := $(filter %-gensrc-corba, $(GENSRC_TARGETS))
ALL_TARGETS += $(GENSRC_TARGETS)
################################################################################
# Generate data targets
-GENDATA_MODULES := $(call FindModulesWithMakefileFor, gendata, Gendata)
-GENDATA_TARGETS := $(addsuffix -gendata, $(GENDATA_MODULES))
-
-# Declare recipes for all <module>-gendata targets
-$(foreach m, $(GENDATA_MODULES), $(eval $(call DeclareRecipeForModuleMakefile, \
- $m, gendata, gendata, Gendata)))
-
-$(foreach m, $(GENDATA_MODULES), $(eval $(call DeclareGendataRecipe,$m)))
+$(eval $(call DeclareRecipesForPhase, GENDATA, \
+ TARGET_SUFFIX := gendata, \
+ FILE_PREFIX := Gendata, \
+ MAKE_SUBDIR := gendata, \
+ CHECK_MODULES := $(ALL_MODULES), \
+ USE_WRAPPER := true))
ALL_TARGETS += $(GENDATA_TARGETS)
################################################################################
# Copy files targets
-COPY_MODULES := $(call FindModulesWithMakefileFor, copy, Copy)
-COPY_TARGETS := $(addsuffix -copy, $(COPY_MODULES))
-
-# Declare recipes for all <module>-copy targets
-$(foreach m, $(COPY_MODULES), $(eval $(call DeclareRecipeForModuleMakefile, \
- $m, copy, copy, Copy)))
+$(eval $(call DeclareRecipesForPhase, COPY, \
+ TARGET_SUFFIX := copy, \
+ FILE_PREFIX := Copy, \
+ MAKE_SUBDIR := copy, \
+ CHECK_MODULES := $(ALL_MODULES), \
+ USE_WRAPPER := true))
ALL_TARGETS += $(COPY_TARGETS)
@@ -163,36 +150,33 @@
################################################################################
# Targets for running rmic.
-RMIC_MODULES := $(call FindModulesWithMakefileFor, rmic, Rmic)
-RMIC_TARGETS := $(addsuffix -rmic, $(RMIC_MODULES))
-
-# Declare recipes for all <module>-rmic targets
-$(foreach m, $(RMIC_MODULES), $(eval $(call DeclareRecipeForModuleMakefile, \
- $m, rmic, rmic, Rmic)))
+$(eval $(call DeclareRecipesForPhase, RMIC, \
+ TARGET_SUFFIX := rmic, \
+ FILE_PREFIX := Rmic, \
+ MAKE_SUBDIR := rmic, \
+ CHECK_MODULES := $(ALL_MODULES)))
ALL_TARGETS += $(RMIC_TARGETS)
################################################################################
# Targets for compiling native libraries
-ALL_LIB_MODULES := $(call FindModulesWithMakefileFor, lib, Lib)
-LIB_MODULES := $(filter $(ALL_MODULES), $(ALL_LIB_MODULES))
-LIB_TARGETS := $(addsuffix -libs, $(LIB_MODULES))
+$(eval $(call DeclareRecipesForPhase, LIBS, \
+ TARGET_SUFFIX := libs, \
+ FILE_PREFIX := Lib, \
+ MAKE_SUBDIR := lib, \
+ CHECK_MODULES := $(ALL_MODULES), \
+ USE_WRAPPER := true))
-# Declare recipes for all <module>-libs targets
-$(foreach m, $(LIB_MODULES), $(eval $(call DeclareRecipeForModuleMakefile, \
- $m, libs, lib, Lib)))
-
-ALL_TARGETS += $(LIB_TARGETS)
+ALL_TARGETS += $(LIBS_TARGETS)
################################################################################
# Targets for compiling native executables
-ALL_LAUNCHER_MODULES := $(call FindModulesWithMakefileFor, launcher, Launcher)
-LAUNCHER_MODULES := $(filter $(ALL_MODULES), $(ALL_LAUNCHER_MODULES))
-LAUNCHER_TARGETS := $(addsuffix -launchers, $(LAUNCHER_MODULES))
-
-# Declare recipes for all <module>-launchers targets
-$(foreach m, $(LAUNCHER_MODULES), $(eval $(call DeclareRecipeForModuleMakefile, \
- $m, launchers, launcher, Launcher)))
+$(eval $(call DeclareRecipesForPhase, LAUNCHER, \
+ TARGET_SUFFIX := launchers, \
+ FILE_PREFIX := Launcher, \
+ MAKE_SUBDIR := launcher, \
+ CHECK_MODULES := $(ALL_MODULES), \
+ USE_WRAPPER := true))
ALL_TARGETS += $(LAUNCHER_TARGETS)
@@ -222,53 +206,40 @@
# 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
+source-tips: $(SUPPORT_OUTPUTDIR)/source_tips
+$(SUPPORT_OUTPUTDIR)/source_tips: FRC
@$(MKDIR) -p $(@D)
@$(RM) $@
@$(call GetSourceTips)
-security-jars:
- +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CreateSecurityJars.gmk)
-
-nashorn-jar:
- +($(CD) $(NASHORN_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f BuildNashorn.gmk all)
-
-# Creates the jar files (rt.jar resources.jar etc)
-main-jars:
- +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) PROFILE="" -f CreateJars.gmk)
-
-# Creates the images (j2sdk-image j2re-image etc)
-images:
- +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) PROFILE="" -f Images.gmk)
- ifeq ($(OPENJDK_TARGET_OS), macosx)
- +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk)
- endif
-
-# Create Compact Profile jars
-PROFILE_JARS_TARGETS := $(addsuffix -jars, $(ALL_PROFILES))
-$(PROFILE_JARS_TARGETS):
- +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) PROFILE=$(@:%-jars=%) -f CreateJars.gmk)
-
-# Create Compact Profile images
-PROFILE_IMAGES_TARGETS := $(addsuffix -images, $(ALL_PROFILES))
-$(PROFILE_IMAGES_TARGETS):
- +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) PROFILE=$(@:%-images=%) \
- JRE_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/j2re-$(word $(call profile_number,$(@:%-images=%)),$(PROFILE_NAMES))-image \
- -f Images.gmk profile-image)
-
-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
-
+BOOTCYCLE_TARGET := images
bootcycle-images:
@$(ECHO) Boot cycle build step 2: Building a new JDK image using previously built image
- +$(MAKE) $(MAKE_ARGS) -f Main.gmk SPEC=$(dir $(SPEC))bootcycle-spec.gmk images
+ +$(MAKE) $(MAKE_ARGS) -f Main.gmk SPEC=$(dir $(SPEC))bootcycle-spec.gmk $(BOOTCYCLE_TARGET)
+
+zip-security:
+ +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f ZipSecurity.gmk)
+
+zip-source:
+ +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f ZipSource.gmk)
+
+strip-binaries:
+ +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f StripBinaries.gmk)
-ALL_TARGETS += source-tips security-jars nashorn-jar main-jars images \
- $(PROFILE_JARS_TARGETS) $(PROFILE_IMAGES_TARGETS) profiles-oscheck \
- bootcycle-images
+jrtfs-jar:
+ +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f JrtfsJar.gmk)
+
+jimages:
+ +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk jimages)
+
+profiles:
+ +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk profiles)
+
+mac-bundles:
+ +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f MacBundles.gmk)
+
+ALL_TARGETS += source-tips bootcycle-images zip-security zip-source strip-binaries \
+ jrtfs-jar jimages profiles mac-bundles
################################################################################
# Docs targets
@@ -331,17 +302,19 @@
ifneq ($(findstring -only, $(MAKECMDGOALS)), )
.NOTPARALLEL:
else
+ $(LANGTOOLS_GENSRC_TARGETS): buildtools-langtools
+
interim-langtools: $(LANGTOOLS_GENSRC_TARGETS)
- build-tools-jdk: interim-langtools
+ buildtools-jdk: interim-langtools
$(CORBA_GENSRC_TARGETS): interim-langtools
- $(JDK_GENSRC_TARGETS): interim-langtools build-tools-jdk
+ $(JDK_GENSRC_TARGETS): interim-langtools buildtools-jdk
interim-corba: $(CORBA_GENSRC_TARGETS)
- $(GENDATA_TARGETS): interim-langtools build-tools-jdk
+ $(GENDATA_TARGETS): interim-langtools buildtools-jdk
interim-rmic: interim-langtools
@@ -349,7 +322,7 @@
import-hotspot: hotspot
- $(LIB_TARGETS): import-hotspot
+ $(LIBS_TARGETS): import-hotspot
$(LAUNCHER_TARGETS): java.base-libs
@@ -371,55 +344,53 @@
# Declare dependencies from <module>-lib to <module>-java
# Skip jdk.jdwp.agent as it contains no java code.
- $(foreach m, $(filter-out jdk.jdwp.agent, $(LIB_MODULES)), $(eval $m-libs: $m-java))
+ $(foreach m, $(filter-out jdk.jdwp.agent, $(LIBS_MODULES)), $(eval $m-libs: $m-java))
# Declare dependencies from all other <module>-lib to java.base-lib
- $(foreach t, $(filter-out java.base-libs, $(LIB_TARGETS)), \
+ $(foreach t, $(filter-out java.base-libs, $(LIBS_TARGETS)), \
$(eval $t: java.base-libs))
# Declare the special case dependency for jdk.deploy.osx where libosx
# links against libosxapp.
jdk.deploy.osx-libs: java.desktop-libs
- # This dependency needs to be explicitly declared. jdk.jdi-gensrc generates a
- # header file used by jdk.jdwp libs.
- jdk.jdwp.agent-libs: jdk.jdi-gensrc
+ # This dependency needs to be explicitly declared as jdk.jdi-gensrc generates a
+ # header file used by jdk.jdwp.agent-libs. The jdk.jdwp.agent-gensrc is a
+ # virtual target.
+ jdk.jdwp.agent-libs: jdk.jdwp.agent-gensrc
+
+ # Until the module system is in place, jdk.jdi-gensrc needs to combine service
+ # loader configuration with jdk.hotspot.agent so is dependent on importing
+ # hotspot.
+ jdk.jdi-gensrc-jdk: import-hotspot
# The swing beans need to have java base properly generated to avoid errors
# in javadoc.
- java.desktop-gensrc: java.base-gensrc
+ java.desktop-gensrc-jdk: java.base-gensrc
# Explicitly add dependencies for special targets
java.base-java: unpack-sec
jdk.dev-gendata: java rmic
- security-jars: java
-
- nashorn-jar: jdk.scripting.nashorn-java
-
- main-jars: java rmic security-jars nashorn-jar policy-jars import-hotspot gendata
+ zip-security: java.base-java java.security.jgss-java java.security.jgss-libs \
+ $(filter jdk.crypto%, $(JAVA_TARGETS))
- # On windows, the jars target needs to wait for jgss libs to be built.
- # Should ideally split out the sec-bin zip file generation to avoid
- # this dependency.
- ifeq ($(OPENJDK_TARGET_OS), windows)
- main-jars: java.security.jgss-libs
- endif
+ zip-source: gensrc rmic
+
+ strip-binaries: libs launchers gendata copy
+
+ jrtfs-jar: buildtools-jdk
- images: jars demos samples exploded-image verify-modules source-tips
+ jimages: exploded-image zip-source strip-binaries source-tips demos samples \
+ jrtfs-jar
- bootcycle-images: images
+ profiles: exploded-image strip-binaries source-tips
- # Need to depend on jars as otherwise there will a race between all the
- # invocations of CreateJars.gmk.
- $(PROFILE_JARS_TARGETS): jars profiles-oscheck
+ mac-bundles: jimages
- $(PROFILE_IMAGES_TARGETS): demos samples exploded-image source-tips
+ bootcycle-images: jimages
- # Declare dependencies from <profile>-images to <profile>-jars
- $(foreach p, $(ALL_PROFILES), $(eval $p-images: $p-jars))
-
- docs-javadoc: $(GENSRC_TARGETS) rmic
+ docs-javadoc: gensrc rmic
docs-jvmtidoc: hotspot
@@ -432,6 +403,9 @@
################################################################################
# Virtual targets without recipes
+buildtools: buildtools-langtools interim-langtools interim-corba interim-rmic \
+ buildtools-jdk
+
gensrc: $(GENSRC_TARGETS)
gendata: $(GENDATA_TARGETS)
@@ -442,12 +416,13 @@
rmic: $(RMIC_TARGETS)
-libs: $(LIB_TARGETS)
+libs: $(LIBS_TARGETS)
launchers: $(LAUNCHER_TARGETS)
-# Explicitly add dependencies for these special targets
-java.base: import-hotspot policy-jars
+# Explicitly declare dependency for virtual target jdk.jdwp.agent-gensrc which
+# is actually handled by jdk.jdi-gensrc
+jdk.jdwp.agent-gensrc: jdk.jdi-gensrc
# Declare dependencies from <module> to all the individual targets specific
# to that module <module>-*.
@@ -455,34 +430,33 @@
$(foreach m, $(JAVA_MODULES), $(eval $m: $m-java))
$(foreach m, $(GENDATA_MODULES), $(eval $m: $m-gendata))
$(foreach m, $(RMIC_MODULES), $(eval $m: $m-rmic))
-$(foreach m, $(LIB_MODULES), $(eval $m: $m-libs))
+$(foreach m, $(LIBS_MODULES), $(eval $m: $m-libs))
$(foreach m, $(LAUNCHER_MODULES), $(eval $m: $m-launchers))
$(foreach m, $(COPY_MODULES), $(eval $m: $m-copy))
ALL_MODULE_TARGETS := $(sort $(GENSRC_MODULES) $(JAVA_MODULES) \
- $(GENDATA_MODULES) $(LIB_MODULES) $(LAUNCHER_MODULES) $(COPY_MODULES))
+ $(GENDATA_MODULES) $(LIBS_MODULES) $(LAUNCHER_MODULES) $(COPY_MODULES))
exploded-image: $(ALL_MODULE_TARGETS)
# The old 'jdk' target most closely matches the new exploded-image. Keep an
# alias for ease of use.
jdk: exploded-image
-jars: main-jars nashorn-jar security-jars policy-jars
+images: jimages demos samples zip-security
-# Make each profile name a target that depends on it's images target.
-$(foreach p, $(ALL_PROFILES), $(eval $(p): $(p)-images $(p)-jars))
-
-profiles: $(ALL_PROFILES)
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+ images: mac-bundles
+endif
docs: docs-javadoc docs-jvmtidoc
-ALL_TARGETS += gensrc gendata copy java rmic libs launchers \
- $(ALL_MODULE_TARGETS) exploded-image jdk jars \
- $(ALL_PROFILES) profiles docs
+ALL_TARGETS += buildtools gensrc gendata copy java rmic libs launchers \
+ jdk.jdwp.agent-gensrc $(ALL_MODULE_TARGETS) exploded-image jdk images \
+ docs
################################################################################
-all: images docs
+all: images
default: exploded-image
ALL_TARGETS += default all
@@ -496,17 +470,38 @@
# Clean targets are automatically run serially by the Makefile calling this
# file.
-CLEAN_COMPONENTS += langtools corba hotspot jdk nashorn images \
- bootcycle-build docs docstemp test make-support
-CLEAN_TARGETS := $(addprefix clean-, $(CLEAN_COMPONENTS))
+CLEAN_DIRS += hotspot jdk bootcycle-build test buildtools support \
+ images make-support
+CLEAN_DIR_TARGETS := $(addprefix clean-, $(CLEAN_DIRS))
+CLEAN_PHASES := gensrc java native include
+CLEAN_PHASE_TARGETS := $(addprefix clean-, $(CLEAN_PHASES))
+CLEAN_MODULE_TARGETS := $(addprefix clean-, $(ALL_MODULES))
+# Construct targets of the form clean-$module-$phase
+CLEAN_MODULE_PHASE_TARGETS := $(addprefix clean-, $(foreach m, $(ALL_MODULES), \
+ $(addprefix $m-, $(CLEAN_PHASES))))
# Remove everything, except the output from configure.
-clean: $(CLEAN_TARGETS)
- ($(CD) $(OUTPUT_ROOT) && $(RM) -r tmp source_tips build.log* build-trace*.log*)
+clean: $(CLEAN_DIR_TARGETS)
+ ($(CD) $(OUTPUT_ROOT) && $(RM) -r source_tips build.log* build-trace*.log*)
$(ECHO) Cleaned all build artifacts.
-$(CLEAN_TARGETS):
- $(call CleanComponent,$(patsubst clean-%, %, $@))
+$(CLEAN_DIR_TARGETS):
+ $(call CleanDir,$(patsubst clean-%, %, $@))
+
+$(CLEAN_PHASE_TARGETS):
+ $(call Clean-$(patsubst clean-%,%, $@))
+
+$(CLEAN_MODULE_TARGETS):
+ $(call CleanModule,$(patsubst clean-%, %, $@))
+
+$(CLEAN_MODULE_PHASE_TARGETS):
+ $(call Clean-$(word 3, $(subst -,$(SPACE),$@)), \
+ $(word 2, $(subst -,$(SPACE),$@)))
+
+# When removing the support dir, we must also remove jdk. Building classes has
+# the side effect of generating native headers. The headers end up in support
+# while classes and touch files end up in jdk.
+clean-support: clean-jdk
clean-docs: clean-docstemp
@@ -525,7 +520,8 @@
)
$(ECHO) Cleaned everything, you will have to re-run configure.
-ALL_TARGETS += clean dist-clean $(CLEAN_TARGETS)
+ALL_TARGETS += clean dist-clean $(CLEAN_DIR_TARGETS) $(CLEAN_PHASE_TARGETS) \
+ $(CLEAN_MODULE_TARGETS) $(CLEAN_MODULE_PHASE_TARGETS)
################################################################################
@@ -557,7 +553,7 @@
# Declare *-only targets for each normal target
$(foreach t, $(ALL_TARGETS), $(eval $(t)-only: $(t)))
-ALL_TARGETS += $(addsuffix -only, $(ALL_TARGETS))
+ALL_TARGETS += $(addsuffix -only, $(filter-out clean%, $(ALL_TARGETS)))
################################################################################
--- a/make/MakeHelpers.gmk Tue Nov 18 15:25:13 2014 -0800
+++ b/make/MakeHelpers.gmk Wed Dec 03 14:20:21 2014 +0000
@@ -46,7 +46,7 @@
list_alt_overrides=$(subst =command,,$(subst =environment,,$(list_alt_overrides_with_origins)))
# Store the build times in this directory.
-BUILDTIMESDIR=$(OUTPUT_ROOT)/tmp/buildtimes
+BUILDTIMESDIR=$(OUTPUT_ROOT)/make-support/build-times
# Global targets are possible to run either with or without a SPEC. The prototypical
# global target is "help".
@@ -296,38 +296,139 @@
### Convenience functions from Main.gmk
-# Cleans the component given as $1
-define CleanComponent
+# Cleans the dir given as $1
+define CleanDir
@$(PRINTF) "Cleaning $(strip $1) build artifacts ..."
@($(CD) $(OUTPUT_ROOT) && $(RM) -r $1)
@$(PRINTF) " done\n"
endef
+define Clean-gensrc
+ @$(PRINTF) "Cleaning gensrc $(if $1,for $(strip $1) )..."
+ @$(RM) -r $(SUPPORT_OUTPUTDIR)/gensrc/$(strip $1)
+ @$(RM) -r $(SUPPORT_OUTPUTDIR)/gensrc_no_docs/$(strip $1)
+ @$(PRINTF) " done\n"
+endef
+
+define Clean-java
+ @$(PRINTF) "Cleaning java $(if $1,for $(strip $1) )..."
+ @$(RM) -r $(JDK_OUTPUTDIR)/modules/$(strip $1)
+ @$(RM) -r $(SUPPORT_OUTPUTDIR)/misc/$(strip $1)
+ @$(PRINTF) " done\n"
+ @$(PRINTF) "Cleaning headers $(if $1,for $(strip $1)) ..."
+ @$(RM) -r $(SUPPORT_OUTPUTDIR)/headers/$(strip $1)
+ @$(PRINTF) " done\n"
+endef
+
+define Clean-native
+ @$(PRINTF) "Cleaning native $(if $1,for $(strip $1) )..."
+ @$(RM) -r $(SUPPORT_OUTPUTDIR)/native/$(strip $1)
+ @$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
+ @$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_libs-stripped/$(strip $1)
+ @$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_cmds/$(strip $1)
+ @$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_cmds-stripped/$(strip $1)
+ @$(PRINTF) " done\n"
+endef
+
+define Clean-include
+ @$(PRINTF) "Cleaning include $(if $1,for $(strip $1) )..."
+ @$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_include/$(strip $1)
+ @$(PRINTF) " done\n"
+endef
+
+define CleanModule
+ $(call Clean-gensrc, $1)
+ $(call Clean-java, $1)
+ $(call Clean-native, $1)
+ $(call Clean-include, $1)
+endef
+
+
################################################################################
-MAKE_DIR_LIST := $(JDK_TOPDIR)/make
+MAKE_TOPDIR_LIST := $(JDK_TOPDIR) $(CORBA_TOPDIR) $(LANGTOOLS_TOPDIR)
+MAKE_MAKEDIR_LIST := make
+
+# Helper macro for DeclareRecipesForPhase
+# Declare a recipe for calling the module and phase specific makefile.
+# If there are multiple makefiles to call, create a rule for each topdir
+# that contains a makefile with the target $module-$suffix-$repodir,
+# (i.e: java.base-gensrc-jdk)
+# Normally there is only one makefile, and the target will just be
+# $module-$suffix
+# Param 1: Name of list to add targets to
+# Param 2: Module name
+# Param 3: Topdir
+define DeclareRecipeForModuleMakefile
+ ifeq ($$($1_MULTIPLE_MAKEFILES), true)
+ $2-$$($1_TARGET_SUFFIX): $2-$$($1_TARGET_SUFFIX)-$$(notdir $3)
+ $1 += $2-$$($1_TARGET_SUFFIX)-$$(notdir $3)
-# Find all modules that has a makefile for a certain build phase
-# Param 1: Make subdir to look in
-# Param 2: File prefix to look for
-FindModulesWithMakefileFor = $(sort $(foreach d, $(MAKE_DIR_LIST), \
- $(patsubst $d/$(strip $1)/$(strip $2)-%.gmk,%, \
- $(wildcard $d/$(strip $1)/$(strip $2)-*.gmk))))
+ $2-$$($1_TARGET_SUFFIX)-$$(notdir $3):
+ else
+ $2-$$($1_TARGET_SUFFIX):
+ endif
+ $(ECHO) $(LOG_INFO) "Building $$@"
+ ifeq ($$($1_USE_WRAPPER), true)
+ +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) \
+ -f ModuleWrapper.gmk \
+ $$(addprefix -I, $$(wildcard $$(addprefix $3/, $(MAKE_MAKEDIR_LIST)) \
+ $$(addsuffix /$$($1_MAKE_SUBDIR), $$(addprefix $3/, $(MAKE_MAKEDIR_LIST))))) \
+ MODULE=$2 MAKEFILE_PREFIX=$$($1_FILE_PREFIX))
+ else
+ +($(CD) $$(dir $$(firstword $$(wildcard $$(patsubst %, \
+ $3/%/$$($1_MAKE_SUBDIR)/$$($1_FILE_PREFIX)-$2.gmk, $(MAKE_MAKEDIR_LIST))))) \
+ && $(MAKE) $(MAKE_ARGS) \
+ -f $$($1_FILE_PREFIX)-$2.gmk \
+ $$(addprefix -I, $$(wildcard $$(addprefix $3/, $(MAKE_MAKEDIR_LIST)) \
+ $$(addsuffix /$3, $$(addprefix $3/, $(MAKE_MAKEDIR_LIST))))) \
+ MODULE=$2)
+ endif
+
+endef
-# Declare a recipe for calling such a makefile
-# Param 1: Module name
-# Param 2: Suffix for rule
-# Param 3: Make subdir
-# Param 4: Makefile prefix
-define DeclareRecipeForModuleMakefile
- $$(strip $1)-$$(strip $2):
- +($(CD) $$(dir $$(firstword $$(wildcard $$(addsuffix /$$(strip $3)/$$(strip $4)-$$(strip $1).gmk, \
- $(MAKE_DIR_LIST))))) \
- && $(MAKE) $(MAKE_ARGS) \
- -f $$(strip $4)-$$(strip $1).gmk \
- $$(addprefix -I, $$(wildcard $(MAKE_DIR_LIST) \
- $$(addsuffix /$$(strip $3), $(MAKE_DIR_LIST)))) \
- MODULE=$$(strip $1))
+# Helper macro for DeclareRecipesForPhase
+# Param 1: Name of list to add targets to
+# Param 2: Module name
+define DeclareRecipesForPhaseAndModule
+ $1_$2_TOPDIRS := $$(strip $$(sort $$(foreach d, $(MAKE_TOPDIR_LIST), \
+ $$(patsubst $$d/%, $$d, $$(filter $$d/%, \
+ $$(wildcard $$(patsubst %, %/$$($1_MAKE_SUBDIR)/$$($1_FILE_PREFIX)-$2.gmk, \
+ $$(foreach s, $(MAKE_MAKEDIR_LIST), \
+ $$(addsuffix /$$s, $(MAKE_TOPDIR_LIST))))))))))
+
+ # Only declare recipes if there are makefiles to call
+ ifneq ($$($1_$2_TOPDIRS), )
+ $$(foreach d, $$($1_$2_TOPDIRS), \
+ $$(eval $$(call DeclareRecipeForModuleMakefile,$1,$2,$$d)))
+ $1 += $2-$$($1_TARGET_SUFFIX)
+ $1_MODULES += $2
+ endif
+endef
+
+# Declare recipes for a specific module and build phase if there are makefiles
+# present for the specific combination.
+# Param 1: Name of list to add targets to
+# Named params:
+# TARGET_SUFFIX : Suffix of target to create for recipe
+# MAKE_SUBDIR : Subdir for this build phase
+# FILE_PREFIX : File prefix for this build phase
+# USE_WRAPPER : Set to true to use ModuleWrapper.gmk
+# CHECK_MODULES : List of modules to try
+# MULTIPLE_MAKEFILES : Set to true to handle makefils for the same module in
+# phase in multiple repos
+# Exported variables:
+# $1_MODULES : All modules that had rules generated
+# $1_TARGETS : All targets generated
+define DeclareRecipesForPhase
+ $(foreach i,2 3 4 5 6 7, $(if $($i),$(strip $1)_$(strip $($i)))$(NEWLINE))
+ $(if $(8),$(error Internal makefile error: Too many arguments to \
+ DeclareRecipesForPhase, please update MakeHelper.gmk))
+
+ $$(foreach m, $$($(strip $1)_CHECK_MODULES), \
+ $$(eval $$(call DeclareRecipesForPhaseAndModule,$(strip $1),$$m)))
+
+ $(strip $1)_TARGETS := $$($(strip $1))
endef
################################################################################
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/make/ModuleWrapper.gmk Wed Dec 03 14:20:21 2014 +0000
@@ -0,0 +1,88 @@
+#
+# Copyright (c) 2014, 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 called from Main.gmk, through a macro in MakeHelpers.gmk
+# and wraps calls to makefiles for specific modules and build phases. Having
+# this wrapper reduces the need for boilerplate code. It also provides
+# opportunity for automatic copying of files to an interim exploded runnable
+# image.
+
+default: all
+
+include $(SPEC)
+include MakeBase.gmk
+
+# All makefiles should add the targets to be built to this variable.
+TARGETS :=
+
+# Include the file being wrapped.
+include $(MAKEFILE_PREFIX)-$(MODULE).gmk
+
+# Setup copy rules from the modules directories to the jdk image directory.
+ifeq ($(OPENJDK_TARGET_OS), windows)
+ TO_BIN_FILTER := %$(SHARED_LIBRARY_SUFFIX) %.diz %.pdb %.map
+
+ $(eval $(call SetupCopyFiles,COPY_LIBS_TO_BIN, \
+ SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
+ DEST := $(JDK_OUTPUTDIR)/bin, \
+ FILES := $(filter $(TO_BIN_FILTER), \
+ $(filter $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/%, \
+ $(TARGETS)))))
+
+ $(eval $(call SetupCopyFiles,COPY_LIBS_TO_LIB, \
+ SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
+ DEST := $(JDK_OUTPUTDIR)/lib, \
+ FILES := $(filter-out $(TO_BIN_FILTER), \
+ $(filter $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/%, \
+ $(TARGETS)))))
+
+else
+ $(eval $(call SetupCopyFiles,COPY_LIBS_TO_LIB, \
+ SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
+ DEST := $(JDK_OUTPUTDIR)/lib, \
+ FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/%, \
+ $(TARGETS))))
+endif
+
+$(eval $(call SetupCopyFiles,COPY_INCLUDE, \
+ SRC := $(SUPPORT_OUTPUTDIR)/modules_include/$(MODULE), \
+ DEST := $(JDK_OUTPUTDIR)/include, \
+ FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_include/$(MODULE)/%, \
+ $(TARGETS))))
+
+$(eval $(call SetupCopyFiles,COPY_CMDS, \
+ SRC := $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE), \
+ DEST := $(JDK_OUTPUTDIR)/bin, \
+ FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE)/%, $(TARGETS))))
+
+$(eval $(call SetupCopyFiles,COPY_CONF, \
+ SRC := $(SUPPORT_OUTPUTDIR)/modules_conf/$(MODULE), \
+ DEST := $(JDK_OUTPUTDIR)/conf, \
+ FILES := $(filter $(SUPPORT_OUTPUTDIR)/modules_conf/$(MODULE)/%, \
+ $(TARGETS))))
+
+all: $(TARGETS) $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB) \
+ $(COPY_INCLUDE) $(COPY_CMDS) $(COPY_CONF)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/make/StripBinaries.gmk Wed Dec 03 14:20:21 2014 +0000
@@ -0,0 +1,99 @@
+#
+# Copyright (c) 2014, 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.
+#
+
+default: all
+
+include $(SPEC)
+include MakeBase.gmk
+
+################################################################################
+# Copy native libraries and executables to a secondary location to strip them
+# and filter out files that shouldn't go into the image.
+
+MODULES_CMDS_STRIPPED := $(SUPPORT_OUTPUTDIR)/modules_cmds-stripped
+MODULES_LIBS_STRIPPED := $(SUPPORT_OUTPUTDIR)/modules_libs-stripped
+
+ifneq ($(POST_STRIP_CMD), )
+ define StripRecipe
+ $(ECHO) Stripping $(LOG_INFO) $(patsubst $(OUTPUT_ROOT)/%,%,$<)
+ $(MKDIR) -p $(@D)
+ $(CP) $< $@.tmp
+ $(CHMOD) u+w $@.tmp
+ $(POST_STRIP_CMD) $@.tmp
+ $(if $(POST_MCS_CMD), $(POST_MCS_CMD) $@.tmp)
+ $(CHMOD) go-w $@.tmp
+ $(MV) $@.tmp $@
+ endef
+else
+ define StripRecipe
+ $(call install-file)
+ endef
+endif
+
+# Don't include debug info for executables.
+ALL_CMDS_SRC := $(filter-out %.debuginfo %.diz %.map %.pdb, \
+ $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_cmds -type f -o -type l))
+COPY_CMDS_SRC := $(filter %.cgi, $(ALL_CMDS_SRC))
+STRIP_CMDS_SRC := $(filter-out $(COPY_CMDS_SRC), $(ALL_CMDS_SRC))
+
+# Make sure symbolic links are copied and not stripped
+COPY_LIBS_SRC := \
+ $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_libs \
+ \( ! -name '*$(SHARED_LIBRARY_SUFFIX)' -type f \) -o -type l)
+STRIP_LIBS_SRC := \
+ $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_libs \
+ -name '*$(SHARED_LIBRARY_SUFFIX)' -type f)
+
+# On Windows, don't include debug info for libs either.
+ifeq ($(OPENJDK_TARGET_OS), windows)
+ COPY_LIBS_SRC := $(filter-out %.diz %.map %.pdb, $(COPY_LIBS_SRC))
+endif
+
+$(eval $(call SetupCopyFiles,STRIP_MODULES_CMDS, \
+ SRC := $(SUPPORT_OUTPUTDIR)/modules_cmds, \
+ DEST := $(MODULES_CMDS_STRIPPED), \
+ FILES := $(STRIP_CMDS_SRC), \
+ MACRO := StripRecipe))
+
+$(eval $(call SetupCopyFiles,COPY_MODULES_CMDS, \
+ SRC := $(SUPPORT_OUTPUTDIR)/modules_cmds, \
+ DEST := $(MODULES_CMDS_STRIPPED), \
+ FILES := $(COPY_CMDS_SRC)))
+
+$(eval $(call SetupCopyFiles,STRIP_MODULES_LIBS, \
+ SRC := $(SUPPORT_OUTPUTDIR)/modules_libs, \
+ DEST := $(MODULES_LIBS_STRIPPED), \
+ FILES := $(STRIP_LIBS_SRC), \
+ MACRO := StripRecipe))
+
+$(eval $(call SetupCopyFiles,COPY_MODULES_LIBS, \
+ SRC := $(SUPPORT_OUTPUTDIR)/modules_libs, \
+ DEST := $(MODULES_LIBS_STRIPPED), \
+ FILES := $(COPY_LIBS_SRC)))
+
+TARGETS += $(STRIP_MODULES_CMDS) $(COPY_MODULES_CMDS) \
+ $(STRIP_MODULES_LIBS) $(COPY_MODULES_LIBS)
+
+all: $(TARGETS)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/make/ZipSecurity.gmk Wed Dec 03 14:20:21 2014 +0000
@@ -0,0 +1,104 @@
+#
+# Copyright (c) 2014, 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.
+#
+
+default: all
+
+include $(SPEC)
+include MakeBase.gmk
+include JavaCompilation.gmk
+
+##########################################################################################
+#
+# sec-bin.zip is used by builds where the corresponding sources are not available
+#
+$(eval $(call SetupZipArchive,BUILD_SEC_BIN_ZIP, \
+ SRC := $(JDK_OUTPUTDIR), \
+ INCLUDES := \
+ modules/java.base/javax/crypto \
+ modules/java.base/javax/crypto/spec \
+ modules/java.base/sun/security/internal/interfaces \
+ modules/java.base/sun/security/internal/spec \
+ modules/java.base/com/sun/crypto/provider \
+ modules/jdk.crypto.ec/sun/security/ec \
+ modules/jdk.crypto.mscapi/sun/security/mscapi \
+ modules/jdk.crypto.pkcs11/sun/security/pkcs11 \
+ modules/jdk.crypto.pkcs11/sun/security/pkcs11/wrapper \
+ modules/jdk.crypto.ucrypto/com/oracle/security/ucrypto \
+ modules/java.base/javax/net \
+ modules/java.base/javax/security/cert \
+ modules/java.base/com/sun/net/ssl \
+ modules/java.base/com/sun/security/cert \
+ modules/java.base/sun/net/www/protocol/https \
+ modules/java.base/sun/security/pkcs12 \
+ modules/java.base/sun/security/ssl \
+ modules/java.security.jgss/sun/security/krb5 \
+ modules/java.security.jgss/sun/security/krb5/internal \
+ modules/java.security.jgss/sun/security/krb5/internal/ccache \
+ modules/java.security.jgss/sun/security/krb5/internal/crypto \
+ modules/java.security.jgss/sun/security/krb5/internal/ktab \
+ modules/java.security.jgss/sun/security/krb5/internal/rcache \
+ modules/java.security.jgss/sun/security/krb5/internal/util, \
+ INCLUDE_FILES := modules/java.security.jgss/sun/security/jgss/spi/GSSContextSpi.class, \
+ EXCLUDES := modules/java.security.jgss/sun/security/krb5/internal/tools, \
+ ZIP := $(IMAGES_OUTPUTDIR)/sec-bin.zip))
+
+TARGETS += $(IMAGES_OUTPUTDIR)/sec-bin.zip
+
+##########################################################################################
+#
+# Windows specific binary security packages.
+#
+ifeq ($(OPENJDK_TARGET_OS), windows)
+ # sec-windows-bin.zip is used by builds where the corresponding sources are not available
+ $(eval $(call SetupZipArchive,BUILD_SEC_WINDOWS_BIN_ZIP, \
+ SRC := $(JDK_OUTPUTDIR), \
+ INCLUDES := modules/java.security.jgss/sun/security/krb5/internal/tools, \
+ ZIP := $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip))
+
+ TARGETS += $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip
+
+ # JGSS files contain the native Kerberos library
+ ifeq ($(OPENJDK_TARGET_CPU), x86_64)
+ JGSS_ZIP_NAME = jgss-windows-x64-bin.zip
+ else
+ JGSS_ZIP_NAME = jgss-windows-i586-bin.zip
+ endif
+
+ $(eval $(call SetupZipArchive,BUILD_JGSS_BIN_ZIP, \
+ SRC := $(SUPPORT_OUTPUTDIR), \
+ INCLUDE_FILES := modules_libs/java.security.jgss/w2k_lsa_auth.dll \
+ modules_libs/java.security.jgss/w2k_lsa_auth.diz \
+ modules_libs/java.security.jgss/w2k_lsa_auth.map \
+ modules_libs/java.security.jgss/w2k_lsa_auth.pdb, \
+ ZIP := $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME)))
+
+ TARGETS += $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME)
+endif
+
+##########################################################################################
+
+all: $(TARGETS)
+
+.PHONY: default all
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/make/ZipSource.gmk Wed Dec 03 14:20:21 2014 +0000
@@ -0,0 +1,88 @@
+#
+# Copyright (c) 2014, 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.
+#
+
+default: all
+
+include $(SPEC)
+include MakeBase.gmk
+include JavaCompilation.gmk
+
+# Hook to include the corresponding custom file, if present.
+$(eval $(call IncludeCustomExtension, , ZipSource.gmk))
+
+################################################################################
+
+# Use ?= to enable override in custom makefile
+SRC_ZIP_INCLUDES ?= \
+ com \
+ java \
+ javax \
+ jdk \
+ org \
+ sun \
+ #
+
+SRC_ZIP_EXCLUDES ?=
+
+SRC_ZIP_SRCS += $(wildcard \
+ $(JDK_TOPDIR)/src/*/share/classes \
+ $(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS)/classes \
+ $(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS_API_DIR)/classes \
+ $(LANGTOOLS_TOPDIR)/src/*/share/classes \
+ $(CORBA_TOPDIR)/src/*/share/classes \
+ $(JAXP_TOPDIR)/src/*/share/classes \
+ $(JAXWS_TOPDIR)/src/*/share/classes \
+ $(SUPPORT_OUTPUTDIR)/gensrc/j* \
+ $(SUPPORT_OUTPUTDIR)/rmic/j* \
+ ) \
+ #
+
+# Need to copy launcher src files into desired directory structure
+# before zipping the sources.
+$(eval $(call SetupCopyFiles,COPY_LAUNCHER_SRC, \
+ SRC := $(JDK_TOPDIR)/src/java.base, \
+ DEST := $(SUPPORT_OUTPUTDIR)/src/launcher, \
+ FLATTEN := true, \
+ FILES := $(wildcard \
+ $(JDK_TOPDIR)/src/java.base/share/native/launcher/* \
+ $(JDK_TOPDIR)/src/java.base/share/native/libjli/* \
+ $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjli/java_md*)))
+
+# This dir needs to exist before macro is evaluated to avoid warning from find.
+$(eval $(call MakeDir, $(SUPPORT_OUTPUTDIR)/src))
+$(eval $(call SetupZipArchive,BUILD_SRC_ZIP, \
+ SRC := $(SRC_ZIP_SRCS) $(SUPPORT_OUTPUTDIR)/src, \
+ INCLUDES := $(SRC_ZIP_INCLUDES) launcher, \
+ EXCLUDES := $(SRC_ZIP_EXCLUDES), \
+ EXCLUDE_FILES := $(SRC_ZIP_EXCLUDE_FILES), \
+ SUFFIXES := .java .c .h, \
+ ZIP := $(SUPPORT_OUTPUTDIR)/src.zip, \
+ EXTRA_DEPS := $(COPY_LAUNCHER_SRC)))
+
+################################################################################
+
+all: $(BUILD_SRC_ZIP)
+
+.PHONY: default all
--- a/make/common/JavaCompilation.gmk Tue Nov 18 15:25:13 2014 -0800
+++ b/make/common/JavaCompilation.gmk Wed Dec 03 14:20:21 2014 +0000
@@ -325,10 +325,16 @@
$1_ZIP_INCLUDES += $$(addprefix -i$(SPACE),$$($1_INCLUDE_FILES))
endif
ifneq ($$($1_EXCLUDES),)
+ $1_ZIP_EXCLUDES := $$(addprefix -x$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($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
+ ifneq ($$($1_EXCLUDE_FILES),)
+ # Cannot precompute ZIP_EXCLUDE_FILES as it is dependent on which src root is being
+ # zipped at the moment.
+ $1_SRC_EXCLUDE_FILES := $$(addprefix %, $$($1_EXCLUDE_FILES)) $$($1_EXCLUDE_FILES)
+ $1_ALL_SRCS := $$(filter-out $$($1_SRC_EXCLUDE_FILES), $$($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))
@@ -343,7 +349,10 @@
$$($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
+ $$(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) $$@
# Add zip to target list
--- a/make/common/Modules.gmk Tue Nov 18 15:25:13 2014 -0800
+++ b/make/common/Modules.gmk Wed Dec 03 14:20:21 2014 +0000
@@ -64,6 +64,7 @@
SETUP := BOOT_JAVAC, \
SRC := $(JDK_TOPDIR)/make/src/classes, \
INCLUDES := build/tools/module, \
+ EXCLUDE_FILES := ImageBuilder.java ModuleArchive.java, \
BIN := $(MAKESUPPORT_OUTPUTDIR)/bt_classes_moduleslist, \
DISABLE_SJAVAC := true))
--- a/make/common/NativeCompilation.gmk Tue Nov 18 15:25:13 2014 -0800
+++ b/make/common/NativeCompilation.gmk Wed Dec 03 14:20:21 2014 +0000
@@ -450,13 +450,11 @@
$1_DEBUGINFO_FILES := $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).pdb \
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).map
- # This dependency dance ensures that windows debug info files get rebuilt
- # properly if deleted.
- $$($1_TARGET): $$($1_DEBUGINFO_FILES)
- $$($1_DEBUGINFO_FILES): $$($1_EXPECTED_OBJS)
-
else ifeq ($(OPENJDK_TARGET_OS), solaris)
$1_DEBUGINFO_FILES := $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).debuginfo
+ # Setup the command line creating debuginfo files, to be run after linking.
+ # It cannot be run separately since it updates the original target file
+ #
# 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.
@@ -466,29 +464,34 @@
#
# $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
# Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
- $$($1_DEBUGINFO_FILES): $$($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) $$<
- $(TOUCH) $$@
+ $1_CREATE_DEBUGINFO_CMDS := \
+ $(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$($1_TARGET) $$(NEWLINE) \
+ $(OBJCOPY) --only-keep-debug $$($1_TARGET) $$($1_DEBUGINFO_FILES) $$(NEWLINE) \
+ $(CD) $$($1_OUTPUT_DIR) && \
+ $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$($1_DEBUGINFO_FILES) $$($1_TARGET)
+ $1_DEBUGINFO_EXTRA_DEPS := $(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
else ifeq ($(OPENJDK_TARGET_OS), linux)
$1_DEBUGINFO_FILES := $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).debuginfo
- $$($1_DEBUGINFO_FILES): $$($1_TARGET)
- $(RM) $$@
- $(OBJCOPY) --only-keep-debug $$< $$@
- $(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
- $(TOUCH) $$@
+ # Setup the command line creating debuginfo files, to be run after linking.
+ # It cannot be run separately since it updates the original target file
+ $1_CREATE_DEBUGINFO_CMDS := \
+ $(OBJCOPY) --only-keep-debug $$($1_TARGET) $$($1_DEBUGINFO_FILES) $$(NEWLINE) \
+ $(CD) $$($1_OUTPUT_DIR) && \
+ $(OBJCOPY) --add-gnu-debuglink=$$($1_DEBUGINFO_FILES) $$($1_TARGET)
endif # No MacOS X support
+ # This dependency dance ensures that debug info files get rebuilt
+ # properly if deleted.
+ $$($1_TARGET): $$($1_DEBUGINFO_FILES)
+ $$($1_DEBUGINFO_FILES): $$($1_EXPECTED_OBJS)
+
ifeq ($(ZIP_DEBUGINFO_FILES), true)
$1_DEBUGINFO_ZIP := $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).diz
$1 += $$(subst $$($1_OBJECT_DIR),$$($1_OUTPUT_DIR),$$($1_DEBUGINFO_ZIP))
- # The dependency on TARGET is needed on windows for debuginfo files
+ # The dependency on TARGET is needed for debuginfo files
# to be rebuilt properly.
$$($1_DEBUGINFO_ZIP): $$($1_DEBUGINFO_FILES) $$($1_TARGET)
$(CD) $$($1_OBJECT_DIR) \
@@ -504,29 +507,31 @@
ifneq (,$$($1_LIBRARY))
# Generating a dynamic library.
- $1_EXTRA_LDFLAGS+=$$(call SET_SHARED_LIBRARY_NAME,$$($1_BASENAME))
+ $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"
+ $1_EXTRA_LDFLAGS += "-implib:$$($1_OBJECT_DIR)/$$($1_LIBRARY).lib"
endif
$1_EXTRA_LDFLAGS_SUFFIX += $(GLOBAL_LDFLAGS_SUFFIX)
- $$($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)
- # Touch target to make sure it has a later time stamp than the debug
- # symbol files to avoid unnecessary relinking on rebuild.
- ifeq ($(OPENJDK_TARGET_OS), windows)
- $(TOUCH) $$@
- endif
+ $$($1_TARGET): $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_REAL_MAPFILE) \
+ $$($1_DEBUGINFO_EXTRA_DEPS)
+ $$(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)
+ $$($1_CREATE_DEBUGINFO_CMDS)
+ # Touch target to make sure it has a later time stamp than the debug
+ # symbol files to avoid unnecessary relinking on rebuild.
+ ifeq ($(OPENJDK_TARGET_OS), windows)
+ $(TOUCH) $$@
+ endif
endif
ifneq (,$$($1_STATIC_LIBRARY))
# Generating a static library, ie object file archive.
- $$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES)
+ $$($1_TARGET): $$($1_EXPECTED_OBJS) $$($1_RES)
$$(call ARCHIVING_MSG,$$($1_LIBRARY))
$(AR) $$($1_ARFLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_EXPECTED_OBJS) \
$$($1_RES) $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)
@@ -536,26 +541,28 @@
# A executable binary has been specified, setup the target for it.
$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
- # Touch target to make sure it has a later time stamp than the debug
- # symbol files to avoid unnecessary relinking on rebuild.
- ifeq ($(OPENJDK_TARGET_OS), windows)
- $(TOUCH) $$@
- endif
+ $$($1_TARGET): $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_GEN_MANIFEST) \
+ $$($1_DEBUGINFO_EXTRA_DEPS)
+ $$(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
+ $$($1_CREATE_DEBUGINFO_CMDS)
+ # Touch target to make sure it has a later time stamp than the debug
+ # symbol files to avoid unnecessary relinking on rebuild.
+ ifeq ($(OPENJDK_TARGET_OS), windows)
+ $(TOUCH) $$@
+ endif
endif
endef
--- a/make/common/SetupJavaCompilers.gmk Tue Nov 18 15:25:13 2014 -0800
+++ b/make/common/SetupJavaCompilers.gmk Wed Dec 03 14:20:21 2014 +0000
@@ -48,10 +48,13 @@
# The generate old bytecode javac setup uses the new compiler to compile for the
# boot jdk to generate tools that need to be run with the boot jdk.
# Thus we force the target bytecode to the previous JDK version.
+# Add -Xlint:-options to avoid the warning about not setting -bootclasspath. Since
+# it's running on the boot jdk, the default bootclasspath is correct.
$(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE, \
JVM := $(JAVA_SMALL), \
JAVAC := $(NEW_JAVAC), \
- FLAGS := $(BOOT_JDK_SOURCETARGET) -bootclasspath $(BOOT_RTJAR) $(DISABLE_WARNINGS), \
+ FLAGS := $(BOOT_JDK_SOURCETARGET) -XDignore.symbol.file=true \
+ $(DISABLE_WARNINGS) -Xlint:-options, \
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
@@ -61,8 +64,7 @@
JVM := $(JAVA), \
JAVAC := $(NEW_JAVAC), \
FLAGS := -source 9 -target 9 \
- -encoding ascii -XDignore.symbol.file=true $(JAVAC_WARNINGS) \
- $(GENERATE_JDKBYTECODE_EXTRA_FLAGS), \
+ -encoding ascii -XDignore.symbol.file=true $(JAVAC_WARNINGS), \
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
@@ -72,8 +74,7 @@
JVM := $(JAVA), \
JAVAC := $(NEW_JAVAC), \
FLAGS := -source 9 -target 9 \
- -encoding ascii -XDignore.symbol.file=true $(DISABLE_WARNINGS) \
- $(GENERATE_JDKBYTECODE_EXTRA_FLAGS), \
+ -encoding ascii -XDignore.symbol.file=true $(DISABLE_WARNINGS), \
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
--- a/make/jprt.properties Tue Nov 18 15:25:13 2014 -0800
+++ b/make/jprt.properties Wed Dec 03 14:20:21 2014 +0000
@@ -181,8 +181,8 @@
${my.test.target.set:TESTNAME=jdk_instrument}, \
${my.test.target.set:TESTNAME=jdk_jmx}, \
${my.test.target.set:TESTNAME=jdk_jdi}, \
- ${my.test.target.set:TESTNAME=jdk_jfr}, \
- ${my.test.target.set:TESTNAME=svc_tools}
+ ${my.test.target.set:TESTNAME=svc_tools}, \
+ ${my.make.rule.test.targets.svc.extra}
# All vm test targets (testset=all)
my.test.targets.all= \
--- a/modules.xml Tue Nov 18 15:25:13 2014 -0800
+++ b/modules.xml Wed Dec 03 14:20:21 2014 +0000
@@ -211,6 +211,10 @@
<to>java.security.sasl</to>
</export>
<export>
+ <name>jdk.internal.jimage</name>
+ <to>jdk.dev</to>
+ </export>
+ <export>
<name>jdk.internal.org.objectweb.asm</name>
<to>jdk.jfr</to>
<to>jdk.scripting.nashorn</to>