changeset 655:e6cffce41bd8

Post-modules and module images build in new buildsystem Contributed-by: erik.joelsson@oracle.com
author alanb
date Sat, 23 Mar 2013 21:09:07 +0000
parents ba5b2dcaa028
children 0abc1055e3bb
files Makefile common/autoconf/boot-jdk.m4 common/autoconf/configure.ac common/autoconf/generated-configure.sh common/autoconf/source-dirs.m4 common/autoconf/spec.gmk.in common/bin/compare.sh common/makefiles/Jprt.gmk common/makefiles/Main.gmk
diffstat 9 files changed, 233 insertions(+), 144 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Wed Feb 13 15:38:35 2013 +0000
+++ b/Makefile	Sat Mar 23 21:09:07 2013 +0000
@@ -28,7 +28,7 @@
 
 # If not specified, select what the default build is
 ifndef NEWBUILD
-  NEWBUILD=false
+  NEWBUILD=true
 endif
 
 ifeq ($(NEWBUILD),true)
--- a/common/autoconf/boot-jdk.m4	Wed Feb 13 15:38:35 2013 +0000
+++ b/common/autoconf/boot-jdk.m4	Sat Mar 23 21:09:07 2013 +0000
@@ -333,3 +333,21 @@
 
 AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs)
 ])
+
+# BUILD_JDK: the location of the latest JDK that can run
+#   on the host system and supports the target class file version
+#   generated in this JDK build.  This variable should only be
+#   used after the launchers are built.
+#
+# By default, it is the JDK_OUTPUTDIR.  If the target architecture
+# is different than the host system doing the build (e.g. cross-compilation),
+# it defaults to the BOOT_JDK.
+AC_DEFUN_ONCE([BOOTJDK_SETUP_BUILD_JDK],
+[
+  if test "x$COMPILE_TYPE" = "xcross"; then
+    BUILD_JDK="$BOOT_JDK"
+  else
+    BUILD_JDK="\$(JDK_OUTPUTDIR)"
+  fi
+  AC_SUBST(BUILD_JDK)
+])
--- a/common/autoconf/configure.ac	Wed Feb 13 15:38:35 2013 +0000
+++ b/common/autoconf/configure.ac	Sat Mar 23 21:09:07 2013 +0000
@@ -135,6 +135,7 @@
 
 BOOTJDK_SETUP_BOOT_JDK
 BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS
+BOOTJDK_SETUP_BUILD_JDK
 
 ###############################################################################
 #
--- a/common/autoconf/generated-configure.sh	Wed Feb 13 15:38:35 2013 +0000
+++ b/common/autoconf/generated-configure.sh	Sat Mar 23 21:09:07 2013 +0000
@@ -758,6 +758,7 @@
 JAXP_TOPDIR
 CORBA_TOPDIR
 LANGTOOLS_TOPDIR
+BUILD_JDK
 BOOT_JDK_JVMARGS
 JAVAC_FLAGS
 BOOT_JDK_SOURCETARGET
@@ -3306,6 +3307,16 @@
 
 
 
+# BUILD_JDK: the location of the latest JDK that can run
+#   on the host system and supports the target class file version
+#   generated in this JDK build.  This variable should only be
+#   used after the launchers are built.
+#
+# By default, it is the JDK_OUTPUTDIR.  If the target architecture
+# is different than the host system doing the build (e.g. cross-compilation),
+# it defaults to the BOOT_JDK.
+
+
 #
 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -3772,7 +3783,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1360762111
+DATE_WHEN_GENERATED=1363865481
 
 ###############################################################################
 #
@@ -15688,6 +15699,14 @@
 
 
 
+  if test "x$COMPILE_TYPE" = "xcross"; then
+    BUILD_JDK="$BOOT_JDK"
+  else
+    BUILD_JDK="\$(JDK_OUTPUTDIR)"
+  fi
+
+
+
 ###############################################################################
 #
 # Configure the sources to use. We can add or override individual directories.
--- a/common/autoconf/source-dirs.m4	Wed Feb 13 15:38:35 2013 +0000
+++ b/common/autoconf/source-dirs.m4	Sat Mar 23 21:09:07 2013 +0000
@@ -246,7 +246,7 @@
     fi
     AC_MSG_CHECKING([if hotspot should be overridden])
     AC_MSG_RESULT([yes with $HOTSPOT_TOPDIR])
-fi    
+fi
 if test "x$with_override_bdb" != x; then
     CURDIR="$PWD"
     cd "$with_override_bdb"
--- a/common/autoconf/spec.gmk.in	Wed Feb 13 15:38:35 2013 +0000
+++ b/common/autoconf/spec.gmk.in	Sat Mar 23 21:09:07 2013 +0000
@@ -232,7 +232,9 @@
 HOTSPOT_OUTPUTDIR=$(BUILD_OUTPUT)/hotspot
 BDB_OUTPUTDIR=@BDB_OUTPUTDIR@
 JDK_OUTPUTDIR=$(BUILD_OUTPUT)/jdk
-IMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images
+IMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/legacy-images
+POSTMODULES_OUTPUTDIR=$(BUILD_OUTPUT)/post-modules
+MODULEIMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images
 JCE_OUTPUTDIR=$(BUILD_OUTPUT)/jce-release
 
 LANGTOOLS_DIST=$(LANGTOOLS_OUTPUTDIR)/dist
@@ -252,6 +254,8 @@
 BOOT_RTJAR:=@BOOT_RTJAR@
 BOOT_TOOLSJAR=$(BOOT_JDK)/lib/tools.jar
 
+BUILD_JDK:=@BUILD_JDK@
+
 # When compiling Java source to be run by the boot jdk
 # use these extra flags, eg -source 6 -target 6
 BOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@
@@ -432,12 +436,15 @@
 JAVAC_FLAGS?=@JAVAC_FLAGS@
 
 JAVAH=@FIXPATH@ $(BOOT_JDK)/bin/javah
-
 JAR=@FIXPATH@ $(BOOT_JDK)/bin/jar
+RMIC=@FIXPATH@ $(BOOT_JDK)/bin/rmic
+NATIVE2ASCII=@FIXPATH@ $(BOOT_JDK)/bin/native2ascii
 
-RMIC=@FIXPATH@ $(BOOT_JDK)/bin/rmic
-
-NATIVE2ASCII=@FIXPATH@ $(BOOT_JDK)/bin/native2ascii
+BUILD_JAVA_FLAGS:=-Xms64M -Xmx1100M 
+BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)
+BUILD_JAVAC=@FIXPATH@ $(BUILD_JDK)/bin/javac
+BUILD_JMOD=@FIXPATH@ $(BUILD_JDK)/bin/jmod
+BUILD_JPKG=@FIXPATH@ $(BUILD_JDK)/bin/jpkg
 
 JARSIGNER=@FIXPATH@ $(BOOT_JDK)/bin/jarsigner
 
@@ -613,6 +620,13 @@
 # Read-only single-machine data
 INSTALL_SYSCONFDIR=@sysconfdir@
 
+#
+# Location for JCE codesigning key.
+#
+SIGNING_KEY_DIR    := /security/ws/JCE-signing/src
+SIGNING_KEYSTORE   := $(SIGNING_KEY_DIR)/KeyStore.jks
+SIGNING_PASSPHRASE := $(SIGNING_KEY_DIR)/passphrase.txt
+SIGNING_ALIAS      := oracle_jce_rsa
 
 ####################################################
 #
--- a/common/bin/compare.sh	Wed Feb 13 15:38:35 2013 +0000
+++ b/common/bin/compare.sh	Sat Mar 23 21:09:07 2013 +0000
@@ -145,7 +145,7 @@
     (cd $OTHER_DIR && $FIND . -type d | $SORT > $WORK_DIR/dirs_other)
     (cd $THIS_DIR && $FIND . -type d | $SORT > $WORK_DIR/dirs_this)
 
-    $DIFF $WORK_DIR/dirs_other $WORK_DIR/dirs_other > $WORK_DIR/dirs_diff
+    $DIFF $WORK_DIR/dirs_other $WORK_DIR/dirs_this > $WORK_DIR/dirs_diff
     
     echo -n Directory structure...
     if [ -s $WORK_DIR/dirs_diff ]; then
@@ -1037,6 +1037,15 @@
         -execs)
             CMP_EXECS=true
             ;;
+        -2dirs)
+            THIS_BASE_DIR="$2"
+            OTHER_BASE_DIR="$3"
+            THIS="$2"
+            OTHER="$3"
+            SKIP_DEFAULT=true
+            shift
+            shift
+            ;;
         -2zips)
             CMP_2_ZIPS=true
             THIS_FILE=$2
@@ -1108,136 +1117,138 @@
     FILTER="$CAT"
 fi
 
-if [ -z "$OTHER" ]; then
-    OTHER="$THIS/../$LEGACY_BUILD_DIR"
-    if [ -d "$OTHER" ]; then
+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
+    else
+        if [ ! -d "$OTHER" ]; then
+            echo "Other build directory does not exist:"
+            echo "$OTHER"
+            exit 1
+        fi
         OTHER="$( cd "$OTHER" && pwd )"
-    else
-        echo "Default old build directory does not exist:"
+        echo "Comparing to:"
         echo "$OTHER"
-        exit 1
+        echo
+    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 "Comparing install images"
+    elif [ -d "$THIS/deploy/j2sdk-image" ]; then
+        THIS_J2SDK="$THIS/deploy/j2sdk-image"
+        THIS_J2RE="$THIS/deploy/j2re-image"
+        echo "Comparing deploy images"
+    elif [ -d "$THIS/images/j2sdk-image" ]; then
+        THIS_J2SDK="$THIS/images/j2sdk-image"
+        THIS_J2RE="$THIS/images/j2re-image"
+    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"
+        else
+            THIS_J2SDK_OVERLAY="$THIS/images/j2sdk-overlay-image"
+            THIS_J2RE_OVERLAY="$THIS/images/j2re-overlay-image"
+        fi
+    fi
+    
+    if [ -d "$THIS/images/j2sdk-bundle" ]; then
+        THIS_J2SDK_BUNDLE="$THIS/images/j2sdk-bundle"
+        THIS_J2RE_BUNDLE="$THIS/images/j2re-bundle"
     fi
-    echo "Comparing to default old build:"
-    echo "$OTHER"
-    echo
-else
-    if [ ! -d "$OTHER" ]; then
-        echo "Other build directory does not exist:"
-        echo "$OTHER"
+    
+    # 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"
+        else
+            OTHER_J2SDK_OVERLAY="$OTHER/j2sdk-image"
+            OTHER_J2RE_OVERLAY="$OTHER/j2re-image"
+        fi
+    elif [ -d "$OTHER/images/j2sdk-image" ]; then
+        OTHER_J2SDK="$OTHER/images/j2sdk-image"
+        OTHER_J2RE="$OTHER/images/j2re-image"
+    fi
+    
+    if [ -d "$OTHER/j2sdk-bundle" ]; then
+        OTHER_J2SDK_BUNDLE="$OTHER/j2sdk-bundle"
+        OTHER_J2RE_BUNDLE="$OTHER/j2re-bundle"
+    elif [ -d "$OTHER/images/j2sdk-bundle" ]; then
+        OTHER_J2SDK_BUNDLE="$OTHER/images/j2sdk-bundle"
+        OTHER_J2RE_BUNDLE="$OTHER/images/j2re-bundle"
+    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
-    OTHER="$( cd "$OTHER" && pwd )"
-    echo "Comparing to:"
-    echo "$OTHER"
-    echo
-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 "Comparing install images"
-elif [ -d "$THIS/deploy/j2sdk-image" ]; then
-    THIS_J2SDK="$THIS/deploy/j2sdk-image"
-    THIS_J2RE="$THIS/deploy/j2re-image"
-    echo "Comparing deploy images"
-elif [ -d "$THIS/images/j2sdk-image" ]; then
-    THIS_J2SDK="$THIS/images/j2sdk-image"
-    THIS_J2RE="$THIS/images/j2re-image"
-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"
+    
+    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!"
+    fi
+    
+    if [ -d "$THIS/docs" ]; then
+        THIS_DOCS="$THIS/docs"
+    fi
+    
+    if [ -d "$OTHER/docs" ]; then
+        OTHER_DOCS="$OTHER/docs"
+    fi
+    
+    if [ -z "$THIS_DOCS" ]; then
+        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
+    
+    if [ -d "$OTHER/images" ]; then
+        OTHER_SEC_DIR="$OTHER/images"
     else
-        THIS_J2SDK_OVERLAY="$THIS/images/j2sdk-overlay-image"
-        THIS_J2RE_OVERLAY="$THIS/images/j2re-overlay-image"
+        OTHER_SEC_DIR="$OTHER/tmp"
     fi
-fi
-
-if [ -d "$THIS/images/j2sdk-bundle" ]; then
-    THIS_J2SDK_BUNDLE="$THIS/images/j2sdk-bundle"
-    THIS_J2RE_BUNDLE="$THIS/images/j2re-bundle"
-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"
-    else
-        OTHER_J2SDK_OVERLAY="$OTHER/j2sdk-image"
-        OTHER_J2RE_OVERLAY="$OTHER/j2re-image"
+    OTHER_SEC_BIN="$OTHER_SEC_DIR/sec-bin.zip"
+    THIS_SEC_DIR="$THIS/images"
+    THIS_SEC_BIN="$THIS_SEC_DIR/sec-bin.zip"
+    if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
+        if [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then
+            JGSS_WINDOWS_BIN="jgss-windows-x64-bin.zip"
+        else
+            JGSS_WINDOWS_BIN="jgss-windows-i586-bin.zip"
+        fi
+        OTHER_SEC_WINDOWS_BIN="$OTHER_SEC_DIR/sec-windows-bin.zip"
+        OTHER_JGSS_WINDOWS_BIN="$OTHER_SEC_DIR/$JGSS_WINDOWS_BIN"
+        THIS_SEC_WINDOWS_BIN="$THIS_SEC_DIR/sec-windows-bin.zip"
+        THIS_JGSS_WINDOWS_BIN="$THIS_SEC_DIR/$JGSS_WINDOWS_BIN"
     fi
-elif [ -d "$OTHER/images/j2sdk-image" ]; then
-    OTHER_J2SDK="$OTHER/images/j2sdk-image"
-    OTHER_J2RE="$OTHER/images/j2re-image"
-fi
 
-if [ -d "$OTHER/j2sdk-bundle" ]; then
-    OTHER_J2SDK_BUNDLE="$OTHER/j2sdk-bundle"
-    OTHER_J2RE_BUNDLE="$OTHER/j2re-bundle"
-elif [ -d "$OTHER/images/j2sdk-bundle" ]; then
-    OTHER_J2SDK_BUNDLE="$OTHER/images/j2sdk-bundle"
-    OTHER_J2RE_BUNDLE="$OTHER/images/j2re-bundle"
 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!"
-fi
-
-if [ -d "$THIS/docs" ]; then
-    THIS_DOCS="$THIS/docs"
-fi
-
-if [ -d "$OTHER/docs" ]; then
-    OTHER_DOCS="$OTHER/docs"
-fi
-
-if [ -z "$THIS_DOCS" ]; then
-    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
-
-if [ -d "$OTHER/images" ]; then
-    OTHER_SEC_DIR="$OTHER/images"
-else
-    OTHER_SEC_DIR="$OTHER/tmp"
-fi
-OTHER_SEC_BIN="$OTHER_SEC_DIR/sec-bin.zip"
-THIS_SEC_DIR="$THIS/images"
-THIS_SEC_BIN="$THIS_SEC_DIR/sec-bin.zip"
-if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
-    if [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then
-        JGSS_WINDOWS_BIN="jgss-windows-x64-bin.zip"
-    else
-        JGSS_WINDOWS_BIN="jgss-windows-i586-bin.zip"
-    fi
-    OTHER_SEC_WINDOWS_BIN="$OTHER_SEC_DIR/sec-windows-bin.zip"
-    OTHER_JGSS_WINDOWS_BIN="$OTHER_SEC_DIR/$JGSS_WINDOWS_BIN"
-    THIS_SEC_WINDOWS_BIN="$THIS_SEC_DIR/sec-windows-bin.zip"
-    THIS_JGSS_WINDOWS_BIN="$THIS_SEC_DIR/$JGSS_WINDOWS_BIN"
-fi
-
 ##########################################################################################
 # Do the work
 
@@ -1281,6 +1292,10 @@
         echo -n "Docs "
         compare_files $THIS_DOCS $OTHER_DOCS $COMPARE_ROOT/docs
     fi
+    if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
+        compare_dirs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
+        compare_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
+    fi
 fi
 
 if [ "$CMP_PERMS" = "true" ]; then
--- a/common/makefiles/Jprt.gmk	Wed Feb 13 15:38:35 2013 +0000
+++ b/common/makefiles/Jprt.gmk	Sat Mar 23 21:09:07 2013 +0000
@@ -148,7 +148,10 @@
 # JPRT targets
 
 ifndef JPRT_ARCHIVE_BUNDLE
-  JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip
+  JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/jdk-module-image.zip
+endif
+ifndef JPRT_ARCHIVE_MODULES_BUNDLE
+  JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/modules.zip
 endif
 ifndef JPRT_ARCHIVE_INSTALL_BUNDLE
     JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip
@@ -172,29 +175,32 @@
 jprt_build_generic: bridgeBuild
 
 # This target must be called in the context of a SPEC file
-jprt_bundle: $(JPRT_ARCHIVE_BUNDLE)
+jprt_bundle: $(JPRT_ARCHIVE_BUNDLE) $(JPRT_ARCHIVE_MODULES_BUNDLE)
 	@$(call CheckIfMakeAtEnd)
 
 # This target must be called in the context of a SPEC file
 $(JPRT_ARCHIVE_BUNDLE): bundles
 	$(MKDIR) -p $(@D)
 	$(RM) $@
-	$(CP) $(BUILD_OUTPUT)/bundles/j2sdk-image.zip $@
+	$(CP) $(BUILD_OUTPUT)/bundles/jdk-module-image.zip $@
 
 # This target must be called in the context of a SPEC file
-bundles: all
+$(JPRT_ARCHIVE_MODULES_BUNDLE): bundles
+	$(MKDIR) -p $(@D)
+	$(RM) $@
+	$(CP) $(BUILD_OUTPUT)/bundles/modules.zip $@
+
+# This target must be called in the context of a SPEC file
+# Bundle up the images
+bundles: all bundles-only
+bundles-only: start-make
 	@$(call TargetEnter)
 	$(MKDIR) -p $(BUILD_OUTPUT)/bundles
-ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_BITS),solaris-64)
-	$(CD) $(JDK_OVERLAY_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2sdk-image.zip .
-	$(CD) $(JRE_OVERLAY_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2re-image.zip .
-else
-	$(CD) $(JDK_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2sdk-image.zip .
-	$(CD) $(JRE_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2re-image.zip .
+	$(CD) $(MODULEIMAGES_OUTPUTDIR)/jdk-module-image && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/jdk-module-image.zip .
+	$(CD) $(MODULEIMAGES_OUTPUTDIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/modules.zip jre-base-image jigsaw-pkgs
 	if [ -d  $(BUILD_OUTPUT)/install/bundles ] ; then \
            $(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -q -r $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \
         fi
-endif
 	@$(call TargetExit)
 
 # Keep track of phony targets
--- a/common/makefiles/Main.gmk	Wed Feb 13 15:38:35 2013 +0000
+++ b/common/makefiles/Main.gmk	Sat Mar 23 21:09:07 2013 +0000
@@ -130,7 +130,19 @@
 	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk demos)
 	@$(call TargetExit)
 
-images: source-tips demos images-only
+legacy-images: source-tips demos legacy-images-only
+legacy-images-only: start-make
+	@$(call TargetEnter)
+	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk legacy-images)
+	@$(call TargetExit)
+
+post-modules: jdk demos post-modules-only
+post-modules-only: start-make
+	@$(call TargetEnter)
+	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk post-modules)
+	@$(call TargetExit)
+
+images: post-modules images-only
 images-only: start-make
 	@$(call TargetEnter)
 	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk images)
@@ -216,6 +228,10 @@
 	$(call CleanComponent,jdk)
 clean-images:
 	$(call CleanComponent,images)
+clean-post-modules:
+	$(call CleanComponent,post-modules)
+clean-legacy-images:
+	$(call CleanComponent,legacy-images)
 clean-overlay-images:
 	$(call CleanComponent,overlay-images)
 clean-bootcycle-build:
@@ -224,9 +240,9 @@
 	$(call CleanComponent,docs)
 	$(call CleanComponent,docstemp)
 
-.PHONY: langtools corba jaxp jaxws hotspot bdb jdk images overlay-images install
-.PHONY: langtools-only corba-only jaxp-only jaxws-only hotspot-only bdb-only jdk-only images-only overlay-images-only install-only
+.PHONY: langtools corba jaxp jaxws hotspot bdb jdk images overlay-images post-modules legacy-images install
+.PHONY: langtools-only corba-only jaxp-only jaxws-only hotspot-only bdb-only jdk-only images-only overlay-images-only post-modules-only legacy-images-only install-only
 .PHONY: all test clean dist-clean bootcycle-images start-make
-.PHONY: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-bdb clean-jdk clean-images clean-overlay-images clean-bootcycle-build
+.PHONY: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-bdb clean-jdk clean-images clean-overlay-images clean-post-modules clean-legacy-images clean-bootcycle-build
 
 FRC: # Force target