changeset 651:89ad2f43ecdb

Merge
author mchung
date Fri, 08 Feb 2013 23:19:43 -0800
parents 72a44d3fee6a (current diff) 5b19cef637a6 (diff)
children 61a415643ae0
files .hgtags Makefile common/autoconf/closed.version.numbers common/autoconf/version.numbers make/jprt.properties test/Makefile
diffstat 40 files changed, 2441 insertions(+), 1374 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Dec 14 16:11:33 2012 -0800
+++ b/.hgtags	Fri Feb 08 23:19:43 2013 -0800
@@ -195,3 +195,11 @@
 b772de306dc24c17f7bd1398531ddeb58723b804 jdk8-b65
 13bb8c326e7b7b0b19d78c8088033e3932e3f7ca jdk8-b66
 9a6ec97ec45c1a62d5233cefa91e8390e380e13a jdk8-b67
+cdb401a60cea6ad5ef3f498725ed1decf8dda1ea jdk8-b68
+6ee8080a6efe0639fcd00627a5e0f839bf010481 jdk8-b69
+105a25ffa4a4f0af70188d4371b4a0385009b7ce jdk8-b70
+51ad2a34342055333eb5f36e2fb514b027895708 jdk8-b71
+c1be681d80a1f1c848dc671d664fccb19e046a12 jdk8-b72
+93b9664f97eeb6f89397a8842318ebacaac9feb9 jdk8-b73
+b43aa5bd8ca5c8121336495382d35ecfa7a71536 jdk8-b74
+2a713921952cbd77a1e699626976cb6cdfe3e57e jdk8-b75
--- a/Makefile	Fri Dec 14 16:11:33 2012 -0800
+++ b/Makefile	Fri Feb 08 23:19:43 2013 -0800
@@ -26,6 +26,11 @@
 # If NEWBUILD is defined, use the new build-infra Makefiles and configure.
 #     See NewMakefile.gmk for more information.
 
+# If not specified, select what the default build is
+ifndef NEWBUILD
+  NEWBUILD=false
+endif
+
 ifeq ($(NEWBUILD),true)
 
   # The new top level Makefile
--- a/NewMakefile.gmk	Fri Dec 14 16:11:33 2012 -0800
+++ b/NewMakefile.gmk	Fri Feb 08 23:19:43 2013 -0800
@@ -23,273 +23,109 @@
 # questions.
 #
 
-# Utilities used in this Makefile
-BASENAME=basename
-CAT=cat
-CD=cd
-CMP=cmp
-CP=cp
-ECHO=echo
-MKDIR=mkdir
-PRINTF=printf
-PWD=pwd
-TAR=tar
-ifeq ($(PLATFORM),windows)
-  ZIP=zip
-else
-  # store symbolic links as the link
-  ZIP=zip -y
-endif
-# Insure we have a path that looks like it came from pwd
-#   (This is mostly for Windows sake and drive letters)
-define UnixPath # path
-$(shell (cd "$1" && $(PWD)))
-endef
-
-# Current root directory
-CURRENT_DIRECTORY := $(shell $(PWD))
-
-# Build directory root
-BUILD_DIR_ROOT = $(CURRENT_DIRECTORY)/build
-
-# All configured Makefiles to run
-ALL_MAKEFILES = $(wildcard $(BUILD_DIR_ROOT)/*-*/Makefile)
-
-# All bundles to create
-ALL_IMAGE_DIRS = $(wildcard $(BUILD_DIR_ROOT)/*-*/images/*-image)
+# This must be the first rule
+default:
 
-# Build all the standard 'all', 'images', and 'clean' targets
-all images clean: checks
-	@if [ "$(ALL_MAKEFILES)" = "" ] ; then \
-	  $(ECHO) "ERROR: No configurations to build"; exit 1; \
-	fi
-	@for bdir in $(dir $(ALL_MAKEFILES)) ; do \
-	  $(ECHO) "$(CD) $${bdir} && $(MAKE) $@" ; \
-	  $(CD) $${bdir} && $(MAKE) $@ ; \
-	done
-
-# TBD: Deploy input
-$(BUILD_DIR_ROOT)/.deploy_input:
-	@if [ "$(ALL_MAKEFILES)" = "" ] ; then \
-	  $(ECHO) "ERROR: No configurations to build"; exit 1; \
-	fi
-	@for bdir in $(dir $(ALL_MAKEFILES)) ; do \
-	  if [ deploy/make/Makefile ] ; then \
-	    echo "Attempting deploy build." ; \
-	    ( \
-	      $(RM) -r $${bdir}/deploy_input ; \
-	      $(MKDIR) -p $${bdir}/deploy_input ; \
-	      ( $(CD) $${bdir}/images && $(TAR) -cf - j2sdk-image j2re-image ) \
-	        | ( $(CD) $${bdir}/deploy_input && $(TAR) -xf - ) ; \
-	    ) ; \
-	  fi; \
-	done
-	touch $@
-
-# TBD: Deploy images
-deploy: $(BUILD_DIR_ROOT)/.deploy_input
-	@if [ "$(ALL_MAKEFILES)" = "" ] ; then \
-	  $(ECHO) "ERROR: No configurations to build"; exit 1; \
-	fi
-	@for bdir in $(dir $(ALL_MAKEFILES)) ; do \
-	  if [ deploy/make/Makefile ] ; then \
-	    echo "Attempting deploy build." ; \
-	    ( \
-	      $(CD) deploy/make && \
-	      $(MAKE) \
-	        ABS_OUTPUTDIR=$${bdir}/deploy_input \
-	        OUTPUTDIR=$${bdir}/deploy_input \
-	    ) ; \
-	  fi; \
-	done
-
-# TBD: Install bundles
-install:
+# Inclusion of this pseudo-target will cause make to execute this file
+# serially, regardless of -j. Recursively called makefiles will not be
+# affected, however. This is required for correct dependency management.
+.NOTPARALLEL:
 
-# Bundle creation
-bundles:
-	@if [ "$(ALL_IMAGE_DIRS)" = "" ] ; then \
-	  $(ECHO) "ERROR: No images to bundle"; exit 1; \
-	fi
-	@for i in $(ALL_IMAGE_DIRS) ; do \
-          $(MKDIR) -p $${i}/../../bundles && \
-          $(RM) $${i}/../../bundles/`$(BASENAME) $${i}`.zip && \
-	  $(ECHO) "$(CD) $${i} && $(ZIP) -q -r ../../bundles/`$(BASENAME) $${i}`.zip ."  && \
-	  $(CD) $${i} && $(ZIP) -q -r ../../bundles/`$(BASENAME) $${i}`.zip . ; \
-	done
-
-# Clobber all the built files
-clobber::
-	$(RM) -r $(BUILD_DIR_ROOT)
-
-# Make various checks to insure the build will be successful
-#   Possibilities:
-#     * Check that if any closed repo is provided, they all must be.
-#     * Check that all open repos exist, at least until we are ready for some
-#       kind of partial build.
-checks:
-	@$(ECHO) "No checks yet"
-
-# Keep track of user targets
-USER_TARGETS += all deploy install images clean clobber checks
-
-###########################################################################
-# To help in adoption of the new configure&&make build process, a bridge
-#   build will use the old settings to run configure and do the build.
-
-# Build with the configure bridge
-bridgeBuild: bridge2configure images
-
-# Bridge from old Makefile ALT settings to configure options
-bridge2configure: $(BUILD_DIR_ROOT)/.bridge2configureOpts
-	bash ./configure $(strip $(shell $(CAT) $<))
-
-# Create a file with configure options created from old Makefile mechanisms.
-$(BUILD_DIR_ROOT)/.bridge2configureOpts: $(BUILD_DIR_ROOT)/.bridge2configureOptsLatest
-	$(RM) $@
-	$(CP) $< $@
+# The shell code below will be executed on /usr/ccs/bin/make on Solaris, but not in GNU make.
+# /usr/ccs/bin/make lacks basically every other flow control mechanism.
+TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a requirement. Check your path. 1>&2 && exit 1
 
-# Use this file to only change when obvious things have changed
-$(BUILD_DIR_ROOT)/.bridge2configureOptsLatest: FRC
-	$(RM) $@.tmp
-	$(MKDIR) -p $(BUILD_DIR_ROOT)
-	@$(ECHO) " --with-debug-level=$(if $(DEBUG_LEVEL),$(DEBUG_LEVEL),release) " >> $@.tmp
-ifdef ARCH_DATA_MODEL
-	@$(ECHO) " --with-target-bits=$(ARCH_DATA_MODEL) " >> $@.tmp
-endif
-ifdef ALT_PARALLEL_COMPILE_JOBS
-	@$(ECHO) " --with-num-cores=$(ALT_PARALLEL_COMPILE_JOBS) " >> $@.tmp
-endif
-ifdef ALT_BOOTDIR
-	@$(ECHO) " --with-boot-jdk=$(call UnixPath,$(ALT_BOOTDIR)) " >> $@.tmp
-endif
-ifdef ALT_CUPS_HEADERS_PATH
-	@$(ECHO) " --with-cups-include=$(call UnixPath,$(ALT_CUPS_HEADERS_PATH)) " >> $@.tmp
-endif
-ifdef ALT_FREETYPE_HEADERS_PATH
-	@$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp
-endif
-	@if [ -f $@ ] ; then \
-          if ! $(CMP) $@ $@.tmp > /dev/null ; then \
-            $(CP) $@.tmp $@ ; \
-          fi ; \
-        else \
-          $(CP) $@.tmp $@ ; \
-        fi
-	$(RM) $@.tmp
-
-# Clobber all the built files
-clobber:: bridge2clobber
-bridge2clobber::
-	$(RM) $(BUILD_DIR_ROOT)/.bridge2*
-	$(RM) $(BUILD_DIR_ROOT)/.deploy_input
-
-# Keep track of phony targets
-PHONY_LIST += bridge2configure bridgeBuild bridge2clobber
-
-###########################################################################
-# Sanity checks (history target)
-#
-
-sanity: checks
-
-# Keep track of user targets
-USER_TARGETS += sanity
-
-###########################################################################
-# Javadocs
-#
-
-javadocs:
-	cd common/makefiles && $(MAKE) -f MakefileJavadoc.gmk
-
-# Keep track of user targets
-USER_TARGETS += javadocs
-
-###########################################################################
-# JPRT targets
-
-ifndef JPRT_ARCHIVE_BUNDLE
-  JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip
+# Assume we have GNU make, but check version.
+ifeq (,$(findstring 3.81,$(MAKE_VERSION)))
+    ifeq (,$(findstring 3.82,$(MAKE_VERSION)))
+        $(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.)
+    endif
 endif
 
-jprt_build_product: DEBUG_LEVEL=release
-jprt_build_product: BUILD_DIRNAME=*-release
-jprt_build_product: jprt_build_generic
+# Locate this Makefile
+ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
+    makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
+else
+    makefile_path:=$(lastword $(MAKEFILE_LIST))
+endif
+root_dir:=$(dir $(makefile_path))
 
-jprt_build_fastdebug: DEBUG_LEVEL=fastdebug
-jprt_build_fastdebug: BUILD_DIRNAME=*-fastdebug
-jprt_build_fastdebug: jprt_build_generic
+# ... and then we can include our helper functions
+include $(root_dir)/common/makefiles/MakeHelpers.gmk
 
-jprt_build_debug: DEBUG_LEVEL=slowdebug
-jprt_build_debug: BUILD_DIRNAME=*-debug
-jprt_build_debug: jprt_build_generic
-
-jprt_build_generic: $(JPRT_ARCHIVE_BUNDLE)
+$(eval $(call ParseLogLevel))
+$(eval $(call ParseConfAndSpec))
 
-$(JPRT_ARCHIVE_BUNDLE): bridgeBuild bundles
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $(BUILD_DIR_ROOT)/$(BUILD_DIRNAME)/bundles/j2sdk-image.zip $@
+# Now determine if we have zero, one or several configurations to build.
+ifeq ($(SPEC),)
+    # Since we got past ParseConfAndSpec, we must be building a global target. Do nothing.
+else
+    ifeq ($(words $(SPEC)),1)
+        # We are building a single configuration. This is the normal case. Execute the Main.gmk file.
+        include $(root_dir)/common/makefiles/Main.gmk
+    else
+        # We are building multiple configurations.
+        # First, find out the valid targets
+        # Run the makefile with an arbitraty SPEC using -p -q (quiet dry-run and dump rules) to find
+        # available PHONY targets. Use this list as valid targets to pass on to the repeated calls.
+        all_phony_targets=$(filter-out $(global_targets), $(strip $(shell \
+            $(MAKE) -p -q -f common/makefiles SPEC=$(firstword $(SPEC)) | \
+            grep ^.PHONY: | head -n 1 | cut -d " " -f 2-)))
 
-# Keep track of phony targets
-PHONY_LIST += jprt_build_product jprt_build_fastdebug jprt_build_debug \
-              jprt_build_generic
+$(all_phony_targets):
+	@$(foreach spec,$(SPEC),($(MAKE) -f NewMakefile.gmk SPEC=$(spec) $(VERBOSE) VERBOSE=$(VERBOSE) $@) &&) true
+
+    endif
+endif
 
-###########################################################################
-# Help target
+# Include this after a potential spec file has been included so that the bundles target
+# has access to the spec variables.
+include $(root_dir)/common/makefiles/Jprt.gmk
 
-HELP_FORMAT=%12s%s\n
+# Here are "global" targets, i.e. targets that can be executed without specifying a single configuration.
+# If you addd more global targets, please update the variable global_targets in MakeHelpers.
 
 help:
-	@$(PRINTF) "# JDK Makefile\n"
-	@$(PRINTF) "#\n"
-	@$(PRINTF) "# Usage: make [Target]\n"
-	@$(PRINTF) "#\n"
-	@$(PRINTF) "#   $(HELP_FORMAT)" "Target   " "Description"
-	@$(PRINTF) "#   $(HELP_FORMAT)" "------   " "-----------"
-	@for i in $(USER_TARGETS) ; do \
-	  $(MAKE) help_$${i} ; \
-	done
-	@$(PRINTF) "#\n"
+	$(info )
+	$(info OpenJDK Makefile help)
+	$(info =====================)
+	$(info )
+	$(info Common make targets)
+	$(info .  make [default]         # Compile all product in langtools, hotspot, jaxp, jaxws,)
+	$(info .                         # corba and jdk)
+	$(info .  make all               # Compile everything, all repos and images)
+	$(info .  make images            # Create complete j2sdk and j2re images)
+	$(info .  make overlay-images    # Create limited images for sparc 64 bit platforms)
+	$(info .  make bootcycle-images  # Build images twice, second time with newly build JDK)
+	$(info .  make install           # Install the generated images locally)
+	$(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 specific components)
+	$(info (Component is any of langtools, corba, jaxp, jaxws, hotspot, jdk, images or overlay-images))
+	$(info .  make <component>       # Build <component> and everything it depends on. )
+	$(info .  make <component>-only  # Build <component> only, without dependencies. This)
+	$(info .                         # is faster but can result in incorrect build results!)
+	$(info .  make clean-<component> # Remove files generated by make for <component>)
+	$(info )
+	$(info Useful make variables)
+	$(info .  make CONF=             # Build all configurations (note, assignment is empty))
+	$(info .  make CONF=<substring>  # Build the configuration(s) with a name matching)
+	$(info .                         # <substring>)
+	$(info )
+	$(info .  make LOG=<loglevel>    # Change the log level from warn to <loglevel>)
+	$(info .                         # Available log levels are:)
+	$(info .                         # 'warn' (default), 'info', 'debug' and 'trace')
+	$(info .                         # To see executed command lines, use LOG=debug)
+	$(info )
+	$(info .  make JOBS=<n>          # Run <n> parallel make jobs)
+	$(info .                         # Note that -jN does not work as expected!)
+	$(info )
+	$(info .  make test TEST=<test>  # Only run the given test or tests, e.g.)
+	$(info .                         # make test TEST="jdk_lang jdk_net")
+	$(info )
 
-help_all:
-	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
-	"Build the entire jdk but not the images"
-help_images:
-	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
-	"Create the jdk images for the builds"
-help_deploy:
-	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
-	"Create the jdk deploy images from the jdk images"
-help_install:
-	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
-	"Create the jdk install bundles from the deploy images"
-help_clean:
-	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
-	"Clean and prepare for a fresh build from scratch"
-help_clobber:
-	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
-	"Clean and also purge any hidden derived data"
-help_checks:
-	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
-	"Perform various checks to make sure we can build"
-help_sanity:
-	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
-	"Same as 'make checks'"
-help_javadocs:
-	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
-	"Build the javadocs"
-help_help:
-	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
-	"Print out the help messages"
-
-# Keep track of user targets
-USER_TARGETS += help
-
-###########################################################################
-# Phony targets
-.PHONY: $(PHONY_LIST) $(USER_TARGETS)
-
-# Force target
-FRC:
+.PHONY: help
--- a/common/autoconf/Makefile.in	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/autoconf/Makefile.in	Fri Feb 08 23:19:43 2013 -0800
@@ -24,4 +24,4 @@
 # This Makefile was generated by configure @DATE_WHEN_CONFIGURED@
 # GENERATED FILE, DO NOT EDIT
 SPEC:=@OUTPUT_ROOT@/spec.gmk
-include @SRC_ROOT@/common/makefiles/Makefile
+include @SRC_ROOT@/NewMakefile.gmk
--- a/common/autoconf/autogen.sh	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/autoconf/autogen.sh	Fri Feb 08 23:19:43 2013 -0800
@@ -26,9 +26,11 @@
 
 # Create a timestamp as seconds since epoch
 if test "x`uname -s`" = "xSunOS"; then
-  # date +%s is not available on Solaris, use this workaround
-  # from http://solarisjedi.blogspot.co.uk/2006/06/solaris-date-command-and-epoch-time.html
-  TIMESTAMP=`/usr/bin/truss /usr/bin/date 2>&1 |  nawk -F= '/^time\(\)/ {gsub(/ /,"",$2);print $2}'`
+  TIMESTAMP=`date +%s`
+  if test "x$TIMESTAMP" = "x%s"; then
+    # date +%s not available on this Solaris, use workaround from nawk(1):
+    TIMESTAMP=`nawk 'BEGIN{print srand()}'`
+  fi
 else
   TIMESTAMP=`date +%s`
 fi
--- a/common/autoconf/basics.m4	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/autoconf/basics.m4	Fri Feb 08 23:19:43 2013 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# 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
@@ -90,13 +90,25 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      AC_MSG_NOTICE([Resolving $1 (as $path) failed, using $path directly.])
+      new_path="$path"
+    fi
+    
     if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        AC_MSG_NOTICE([Resolving $1 (as $path) with 'which' failed, using $path directly.])
-        new_path="$path"
-      else
         AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
         has_space=`$ECHO "$complete" | $GREP " "`
         if test "x$has_space" != x; then
@@ -104,20 +116,19 @@
         fi
         AC_MSG_ERROR([Cannot locate the the path of $1])
       fi
-    fi
   fi
 
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    $1="$new_complete"
-    AC_MSG_NOTICE([Rewriting $1 to "$new_complete"])
-  fi
+      $1="$new_complete"
+      AC_MSG_NOTICE([Rewriting $1 to "$new_complete"])
+    fi
 ])
 
 AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS],
@@ -223,7 +234,9 @@
 BASIC_REQUIRE_PROG(CAT, cat)
 BASIC_REQUIRE_PROG(CHMOD, chmod)
 BASIC_REQUIRE_PROG(CMP, cmp)
+BASIC_REQUIRE_PROG(COMM, comm)
 BASIC_REQUIRE_PROG(CP, cp)
+BASIC_REQUIRE_PROG(CPIO, cpio)
 BASIC_REQUIRE_PROG(CUT, cut)
 BASIC_REQUIRE_PROG(DATE, date)
 BASIC_REQUIRE_PROG(DIFF, [gdiff diff])
@@ -622,6 +635,18 @@
   fi
 ])
 
+# Check that source files have basic read permissions set. This might
+# not be the case in cygwin in certain conditions.
+AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
+[
+  if test x"$OPENJDK_BUILD_OS" = xwindows; then
+    file_to_test="$SRC_ROOT/LICENSE"
+    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
+      AC_MSG_ERROR([Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin.])
+    fi
+  fi
+])
+
 AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
 [
 
@@ -631,6 +656,8 @@
   [OUTPUT_DIR_IS_LOCAL="no"])
 AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL)
 
+BASIC_CHECK_SRC_PERMS
+
 # Check if the user has any old-style ALT_ variables set.
 FOUND_ALT_VARIABLES=`env | grep ^ALT_`
 
--- a/common/autoconf/basics_windows.m4	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/autoconf/basics_windows.m4	Fri Feb 08 23:19:43 2013 -0800
@@ -175,7 +175,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -191,7 +191,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
--- a/common/autoconf/build-aux/autoconf-config.guess	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/autoconf/build-aux/autoconf-config.guess	Fri Feb 08 23:19:43 2013 -0800
@@ -1,4 +1,29 @@
 #! /bin/sh
+#
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
--- a/common/autoconf/build-aux/config.sub	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/autoconf/build-aux/config.sub	Fri Feb 08 23:19:43 2013 -0800
@@ -1,4 +1,30 @@
 #! /bin/sh
+
+#
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
--- a/common/autoconf/build-aux/pkg.m4	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/autoconf/build-aux/pkg.m4	Fri Feb 08 23:19:43 2013 -0800
@@ -1,4 +1,30 @@
 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+
+#
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
 # 
 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 #
--- a/common/autoconf/closed.version.numbers	Fri Dec 14 16:11:33 2012 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-#
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# 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.
-#
-
-LAUNCHER_NAME=java
-PRODUCT_NAME="Java(TM)"
-PRODUCT_SUFFIX="SE Runtime Environment"
-JDK_RC_PLATFORM_NAME="Platform SE"
-COMPANY_NAME="Oracle Corporation"
-
-# Might need better names for these
-MACOSX_BUNDLE_NAME_BASE="Java SE"
-MACOSX_BUNDLE_ID_BASE="com.oracle.java"
--- a/common/autoconf/compare.sh.in	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/autoconf/compare.sh.in	Fri Feb 08 23:19:43 2013 -0800
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013 Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -48,6 +48,7 @@
 JAVAP="@FIXPATH@ @BOOT_JDK@/bin/javap"
 LDD="@LDD@"
 MKDIR="@MKDIR@"
+NAWK="@NAWK@"
 NM="@NM@"
 OBJDUMP="@OBJDUMP@"
 OTOOL="@OTOOL@"
--- a/common/autoconf/configure.ac	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/autoconf/configure.ac	Fri Feb 08 23:19:43 2013 -0800
@@ -83,6 +83,9 @@
 BASIC_SETUP_PATHS
 BASIC_SETUP_LOGGING
 
+# Check if it's a pure open build or if custom sources are to be used.
+JDKOPT_SETUP_OPEN_OR_CUSTOM
+
 # These are needed to be able to create a configuration name (and thus the output directory)
 JDKOPT_SETUP_JDK_VARIANT
 JDKOPT_SETUP_JVM_VARIANTS
--- a/common/autoconf/generated-configure.sh	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/autoconf/generated-configure.sh	Fri Feb 08 23:19:43 2013 -0800
@@ -752,10 +752,7 @@
 JAVA_CHECK
 JAVAC_CHECK
 COOKED_BUILD_NUMBER
-FULL_VERSION
-RELEASE
 JDK_VERSION
-RUNTIME_NAME
 COPYRIGHT_YEAR
 MACOSX_BUNDLE_ID_BASE
 MACOSX_BUNDLE_NAME_BASE
@@ -770,6 +767,7 @@
 JDK_MICRO_VERSION
 JDK_MINOR_VERSION
 JDK_MAJOR_VERSION
+USER_RELEASE_SUFFIX
 COMPRESS_JARS
 UNLIMITED_CRYPTO
 CACERTS_FILE
@@ -777,14 +775,12 @@
 BUILD_HEADLESS
 SUPPORT_HEADFUL
 SUPPORT_HEADLESS
-SET_OPENJDK
 BDEPS_FTP
 BDEPS_UNZIP
 OS_VERSION_MICRO
 OS_VERSION_MINOR
 OS_VERSION_MAJOR
 PKG_CONFIG
-COMM
 TIME
 STAT
 HG
@@ -812,10 +808,12 @@
 JVM_VARIANT_ZEROSHARK
 JVM_VARIANT_ZERO
 JVM_VARIANT_KERNEL
+JVM_VARIANT_MINIMAL1
 JVM_VARIANT_CLIENT
 JVM_VARIANT_SERVER
 JVM_VARIANTS
 JDK_VARIANT
+SET_OPENJDK
 BUILD_LOG_WRAPPER
 BUILD_LOG_PREVIOUS
 BUILD_LOG
@@ -899,7 +897,9 @@
 DIFF
 DATE
 CUT
+CPIO
 CP
+COMM
 CMP
 CHMOD
 CAT
@@ -954,6 +954,7 @@
 with_sys_root
 with_tools_dir
 with_devkit
+enable_openjdk_only
 with_jdk_variant
 with_jvm_variants
 enable_debug
@@ -963,11 +964,13 @@
 with_builddeps_server
 with_builddeps_dir
 with_builddeps_group
-enable_openjdk_only
 enable_headful
 enable_hotspot_test_in_build
 with_cacerts_file
 enable_unlimited_crypto
+with_milestone
+with_build_number
+with_user_release_suffix
 with_boot_jdk
 with_boot_jdk_jvmargs
 with_add_source_root
@@ -1646,10 +1649,10 @@
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-openjdk-only   suppress building custom source even if present
+                          [disabled]
   --enable-debug          set the debug level to fastdebug (shorthand for
                           --with-debug-level=fastdebug) [disabled]
-  --enable-openjdk-only   supress building closed source even if present
-                          [disabled]
   --disable-headful       disable building headful support (graphical UI
                           support) [enabled]
   --enable-hotspot-test-in-build
@@ -1684,7 +1687,7 @@
                           sys-root (for cross-compiling)
   --with-jdk-variant      JDK variant to build (normal) [normal]
   --with-jvm-variants     JVM variants (separated by commas) to build (server,
-                          client, kernel, zero, zeroshark) [server]
+                          client, minimal1, kernel, zero, zeroshark) [server]
   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
                           [release]
   --with-conf-name        use this as the name of the configuration [generated
@@ -1697,6 +1700,11 @@
   --with-builddeps-group  chgrp the downloaded build dependencies to this
                           group
   --with-cacerts-file     specify alternative cacerts file
+  --with-milestone        Set milestone value for build [internal]
+  --with-build-number     Set build number value for build [b00]
+  --with-user-release-suffix
+                          Add a custom string to the version string if build
+                          number isn't set.[username_builddateb00]
   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
                           invocations of the Boot JDK, overriding the default
@@ -2919,6 +2927,32 @@
 
 
 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+
+#
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
 #
 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 #
@@ -2982,7 +3016,7 @@
 
 # Include these first...
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# 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
@@ -3079,6 +3113,10 @@
 # Argument 3: what to do otherwise (remote disk or failure)
 
 
+# Check that source files have basic read permissions set. This might
+# not be the case in cygwin in certain conditions.
+
+
 
 
 #
@@ -3393,7 +3431,7 @@
 
 
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# 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
@@ -3424,7 +3462,18 @@
 
 
 
-
+###############################################################################
+#
+# Should we build only OpenJDK even if closed sources are present?
+#
+
+
+
+
+###############################################################################
+#
+# Setup version numbers
+#
 
 
 
@@ -3674,7 +3723,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1355221914
+DATE_WHEN_GENERATED=1359376859
 
 ###############################################################################
 #
@@ -4001,6 +4050,65 @@
 
 
 
+    for ac_prog in comm
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_COMM+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $COMM in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+COMM=$ac_cv_path_COMM
+if test -n "$COMM"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
+$as_echo "$COMM" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$COMM" && break
+done
+
+
+    if test "x$COMM" = x; then
+        if test "xcomm" = x; then
+          PROG_NAME=comm
+        else
+          PROG_NAME=comm
+        fi
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+        as_fn_error $? "Cannot continue" "$LINENO" 5
+    fi
+
+
+
     for ac_prog in cp
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -4060,6 +4168,65 @@
 
 
 
+    for ac_prog in cpio
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_CPIO+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $CPIO in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+CPIO=$ac_cv_path_CPIO
+if test -n "$CPIO"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
+$as_echo "$CPIO" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$CPIO" && break
+done
+
+
+    if test "x$CPIO" = x; then
+        if test "xcpio" = x; then
+          PROG_NAME=cpio
+        else
+          PROG_NAME=cpio
+        fi
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
+$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
+        as_fn_error $? "Cannot continue" "$LINENO" 5
+    fi
+
+
+
     for ac_prog in cut
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -7346,6 +7513,53 @@
 
 
 
+# Check if it's a pure open build or if custom sources are to be used.
+
+  # Check whether --enable-openjdk-only was given.
+if test "${enable_openjdk_only+set}" = set; then :
+  enableval=$enable_openjdk_only;
+else
+  enable_openjdk_only="no"
+fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
+$as_echo_n "checking for presence of closed sources... " >&6; }
+  if test -d "$SRC_ROOT/jdk/src/closed"; then
+    CLOSED_SOURCE_PRESENT=yes
+  else
+    CLOSED_SOURCE_PRESENT=no
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
+$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
+$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
+  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
+$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
+
+  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
+    OPENJDK=true
+    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
+$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
+    fi
+  else
+    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
+      OPENJDK=true
+    else
+      OPENJDK=false
+    fi
+  fi
+
+  if test "x$OPENJDK" = "xtrue"; then
+    SET_OPENJDK="OPENJDK=true"
+  fi
+
+
+
+
 # These are needed to be able to create a configuration name (and thus the output directory)
 
 ###############################################################################
@@ -7387,6 +7601,7 @@
 # Currently we have:
 #    server: normal interpreter and a tiered C1/C2 compiler
 #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
+#    minimal1: reduced form of client with optional VM services and features stripped out
 #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
 #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
 #    zero: no machine code interpreter, no compiler
@@ -7405,16 +7620,17 @@
 fi
 
 JVM_VARIANTS=",$with_jvm_variants,"
-TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
+TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
 
 if test "x$TEST_VARIANTS" != "x,"; then
-   as_fn_error $? "The available JVM variants are: server, client, kernel, zero, zeroshark" "$LINENO" 5
+   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
 $as_echo "$with_jvm_variants" >&6; }
 
 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
+JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
@@ -7429,10 +7645,15 @@
         as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
     fi
 fi
+if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
+    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
+    fi
+fi
 
 # Replace the commas with AND for use in the build directory name.
 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
-COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
+COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
 if test "x$COUNT_VARIANTS" != "x,1"; then
     BUILDING_MULTIPLE_JVM_VARIANTS=yes
 else
@@ -7446,6 +7667,7 @@
 
 
 
+
 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
    MACOSX_UNIVERSAL="true"
 fi
@@ -7531,7 +7753,9 @@
 #####
 # Generate the legacy makefile targets for hotspot.
 # The hotspot api for selecting the build artifacts, really, needs to be improved.
-#
+# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
+# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
+# But until then ...
 HOTSPOT_TARGET=""
 
 if test "x$JVM_VARIANT_SERVER" = xtrue; then
@@ -7542,6 +7766,10 @@
     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
 fi
 
+if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
+    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
+fi
+
 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
 fi
@@ -7561,7 +7789,7 @@
 # from configure, but only server is valid anyway. Fix this
 # when hotspot makefiles are rewritten.
 if test "x$MACOSX_UNIVERSAL" = xtrue; then
-    HOTSPOT_TARGET=universal_product
+    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
 fi
 
 #####
@@ -7962,7 +8190,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -7978,7 +8206,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -8165,14 +8393,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -8182,21 +8422,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    FOUND_MAKE="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
+      FOUND_MAKE="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
-  fi
+    fi
 
         fi
       fi
@@ -8308,7 +8547,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -8324,7 +8563,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -8511,14 +8750,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -8528,21 +8779,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    FOUND_MAKE="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
+      FOUND_MAKE="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
-  fi
+    fi
 
         fi
       fi
@@ -8651,7 +8901,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -8667,7 +8917,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -8854,14 +9104,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -8871,21 +9133,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    FOUND_MAKE="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
+      FOUND_MAKE="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
-  fi
+    fi
 
         fi
       fi
@@ -8999,7 +9260,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -9015,7 +9276,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -9202,14 +9463,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -9219,21 +9492,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    FOUND_MAKE="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
+      FOUND_MAKE="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
-  fi
+    fi
 
         fi
       fi
@@ -9341,7 +9613,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -9357,7 +9629,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -9544,14 +9816,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -9561,21 +9845,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    FOUND_MAKE="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
+      FOUND_MAKE="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
-  fi
+    fi
 
         fi
       fi
@@ -10384,54 +10667,6 @@
 
 ###############################################################################
 #
-# Should we build only OpenJDK even if closed sources are present?
-#
-# Check whether --enable-openjdk-only was given.
-if test "${enable_openjdk_only+set}" = set; then :
-  enableval=$enable_openjdk_only;
-else
-  enable_openjdk_only="no"
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
-$as_echo_n "checking for presence of closed sources... " >&6; }
-if test -d "$SRC_ROOT/jdk/src/closed"; then
-    CLOSED_SOURCE_PRESENT=yes
-else
-    CLOSED_SOURCE_PRESENT=no
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
-$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is supressed (openjdk-only)" >&5
-$as_echo_n "checking if closed source is supressed (openjdk-only)... " >&6; }
-SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPRESS_CLOSED_SOURCE" >&5
-$as_echo "$SUPRESS_CLOSED_SOURCE" >&6; }
-
-if test "x$CLOSED_SOURCE_PRESENT" = xno; then
-  OPENJDK=true
-  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
-$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
-  fi
-else
-  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
-    OPENJDK=true
-  else
-    OPENJDK=false
-  fi
-fi
-
-if test "x$OPENJDK" = "xtrue"; then
-    SET_OPENJDK="OPENJDK=true"
-fi
-
-
-
-###############################################################################
-#
 # Should we build a JDK/JVM with headful support (ie a graphical ui)?
 # We always build headless support.
 #
@@ -10530,10 +10765,56 @@
 
 
 # Source the version numbers
-. $AUTOCONF_DIR/version.numbers
-if test "x$OPENJDK" = "xfalse"; then
-    . $AUTOCONF_DIR/closed.version.numbers
-fi
+. $AUTOCONF_DIR/version-numbers
+
+# Get the settings from parameters
+
+# Check whether --with-milestone was given.
+if test "${with_milestone+set}" = set; then :
+  withval=$with_milestone;
+fi
+
+if test "x$with_milestone" = xyes; then
+  as_fn_error $? "Milestone must have a value" "$LINENO" 5
+elif test "x$with_milestone" != x; then
+    MILESTONE="$with_milestone"
+else
+  MILESTONE=internal
+fi
+
+
+# Check whether --with-build-number was given.
+if test "${with_build_number+set}" = set; then :
+  withval=$with_build_number;
+fi
+
+if test "x$with_build_number" = xyes; then
+  as_fn_error $? "Build number must have a value" "$LINENO" 5
+elif test "x$with_build_number" != x; then
+  JDK_BUILD_NUMBER="$with_build_number"
+fi
+if test "x$JDK_BUILD_NUMBER" = x; then
+  JDK_BUILD_NUMBER=b00
+fi
+
+
+# Check whether --with-user-release-suffix was given.
+if test "${with_user_release_suffix+set}" = set; then :
+  withval=$with_user_release_suffix;
+fi
+
+if test "x$with_user_release_suffix" = xyes; then
+  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
+elif test "x$with_user_release_suffix" != x; then
+  USER_RELEASE_SUFFIX="$with_user_release_suffix"
+else
+  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
+  # Avoid [:alnum:] since it depends on the locale.
+  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
+  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+fi
+
+
 # Now set the JDK version, milestone, build number etc.
 
 
@@ -10552,33 +10833,12 @@
 COPYRIGHT_YEAR=`date +'%Y'`
 
 
-RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
-
-
 if test "x$JDK_UPDATE_VERSION" != x; then
-    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
-else
-    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
-fi
-
-
-if test "x$MILESTONE" != x; then
-    RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
-else
-    RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
-fi
-
-
-if test "x$JDK_BUILD_NUMBER" != x; then
-    FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
-else
-    JDK_BUILD_NUMBER=b00
-    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
-    # Avoid [:alnum:] since it depends on the locale.
-    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
-    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-    FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
-fi
+  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
+else
+  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
+fi
+
 
 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
 
@@ -16170,7 +16430,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -16186,7 +16446,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -16373,14 +16633,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -16390,21 +16662,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    VS_ENV_CMD="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
+      VS_ENV_CMD="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
-  fi
+    fi
 
 
     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
@@ -16759,7 +17030,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -16775,7 +17046,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -16962,14 +17233,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -16979,21 +17262,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    BUILD_CC="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
+      BUILD_CC="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
-  fi
+    fi
 
     for ac_prog in cl CC g++
 do
@@ -17059,7 +17341,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -17075,7 +17357,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -17262,14 +17544,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -17279,21 +17573,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    BUILD_CXX="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
+      BUILD_CXX="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
-  fi
+    fi
 
     # Extract the first word of "ld", so it can be a program name with args.
 set dummy ld; ac_word=$2
@@ -17354,7 +17647,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -17370,7 +17663,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -17557,14 +17850,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -17574,21 +17879,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    BUILD_LD="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
+      BUILD_LD="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
-  fi
+    fi
 
 fi
 
@@ -17941,7 +18245,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -17957,7 +18261,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -18144,14 +18448,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving CC (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -18161,21 +18477,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    CC="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
+      CC="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
-  fi
+    fi
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
@@ -18366,7 +18681,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -18382,7 +18697,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -18569,14 +18884,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -18586,21 +18913,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    PROPER_COMPILER_CC="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
+      PROPER_COMPILER_CC="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
-  fi
+    fi
 
     PATH="$RETRY_COMPILER_SAVED_PATH"
 
@@ -19488,7 +19814,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -19504,7 +19830,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -19691,14 +20017,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving CXX (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -19708,21 +20046,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    CXX="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
+      CXX="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
-  fi
+    fi
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
@@ -19913,7 +20250,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -19929,7 +20266,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -20116,14 +20453,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -20133,21 +20482,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    PROPER_COMPILER_CXX="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
+      PROPER_COMPILER_CXX="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
-  fi
+    fi
 
     PATH="$RETRY_COMPILER_SAVED_PATH"
 
@@ -20803,7 +21151,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -20819,7 +21167,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -21006,14 +21354,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -21023,21 +21383,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    OBJC="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
+      OBJC="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
-  fi
+    fi
 
 else
     OBJC=
@@ -21173,7 +21532,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -21189,7 +21548,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -21376,14 +21735,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving AR (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -21393,21 +21764,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    AR="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
+      AR="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
-  fi
+    fi
 
 fi
 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
@@ -21509,7 +21879,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -21525,7 +21895,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -21712,14 +22082,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -21729,21 +22111,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    WINLD="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
+      WINLD="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
-  fi
+    fi
 
     printf "Windows linker was found at $WINLD\n"
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
@@ -21835,7 +22216,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -21851,7 +22232,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -22038,14 +22419,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving MT (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -22055,21 +22448,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    MT="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
+      MT="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
-  fi
+    fi
 
     # The resource compiler
     # Extract the first word of "rc", so it can be a program name with args.
@@ -22145,7 +22537,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -22161,7 +22553,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -22348,14 +22740,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving RC (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -22365,21 +22769,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    RC="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
+      RC="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
-  fi
+    fi
 
 
     # For hotspot, we need these in Windows mixed path,
@@ -22508,7 +22911,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -22524,7 +22927,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -22711,14 +23114,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -22728,21 +23143,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    WINAR="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
+      WINAR="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
-  fi
+    fi
 
     AR="$WINAR"
     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
@@ -22803,7 +23217,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -22819,7 +23233,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -23006,14 +23420,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -23023,21 +23449,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    DUMPBIN="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
+      DUMPBIN="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
-  fi
+    fi
 
 
     COMPILER_TYPE=CL
@@ -23203,7 +23628,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -23219,7 +23644,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -23406,14 +23831,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving CPP (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -23423,21 +23860,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    CPP="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
+      CPP="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
-  fi
+    fi
 
 
 ac_ext=cpp
@@ -23592,7 +24028,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -23608,7 +24044,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -23795,14 +24231,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -23812,21 +24260,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    CXXCPP="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
+      CXXCPP="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
-  fi
+    fi
 
 
 if test "x$COMPILE_TYPE" != "xcross"; then
@@ -23910,7 +24357,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -23926,7 +24373,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -24113,14 +24560,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving AS (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -24130,21 +24589,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    AS="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
+      AS="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
-  fi
+    fi
 
 else
     AS="$CC -c"
@@ -24216,7 +24674,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -24232,7 +24690,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -24419,14 +24877,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -24436,21 +24906,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    NM="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
+      NM="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
-  fi
+    fi
 
     # Extract the first word of "strip", so it can be a program name with args.
 set dummy strip; ac_word=$2
@@ -24511,7 +24980,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -24527,7 +24996,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -24714,14 +25183,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -24731,21 +25212,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    STRIP="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
+      STRIP="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
-  fi
+    fi
 
     # Extract the first word of "mcs", so it can be a program name with args.
 set dummy mcs; ac_word=$2
@@ -24806,7 +25286,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -24822,7 +25302,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -25009,14 +25489,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving MCS (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -25026,21 +25518,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    MCS="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
+      MCS="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
-  fi
+    fi
 
 elif test "x$OPENJDK_TARGET_OS" != xwindows; then
     if test -n "$ac_tool_prefix"; then
@@ -25154,7 +25645,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -25170,7 +25661,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -25357,14 +25848,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -25374,21 +25877,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    NM="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
+      NM="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
-  fi
+    fi
 
     if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
@@ -25501,7 +26003,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -25517,7 +26019,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -25704,14 +26206,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -25721,21 +26235,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    STRIP="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
+      STRIP="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
-  fi
+    fi
 
 fi
 
@@ -25863,7 +26376,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -25879,7 +26392,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -26066,14 +26579,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -26083,21 +26608,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    OBJCOPY="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
+      OBJCOPY="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
-  fi
+    fi
 
     fi
 fi
@@ -26223,7 +26747,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -26239,7 +26763,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -26426,14 +26950,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -26443,21 +26979,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    OBJDUMP="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
+      OBJDUMP="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
-  fi
+    fi
 
 fi
 
@@ -26521,7 +27056,7 @@
   # bat and cmd files are not always considered executable in cygwin causing which
   # to not find them
   if test "x$new_path" = x \
-           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
     new_path=`$CYGPATH -u "$path"`
   fi
@@ -26537,7 +27072,7 @@
     # bat and cmd files are not always considered executable in cygwin causing which
     # to not find them
     if test "x$new_path" = x \
-             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
       new_path=`$CYGPATH -u "$path"`
     fi
@@ -26724,14 +27259,26 @@
     tmp="$complete EOL"
     arguments="${tmp#* }"
 
-    new_path=`$WHICH $path 2> /dev/null`
-    if test "x$new_path" = x; then
-      is_absolute_path=`$ECHO "$path" | $GREP ^/`
-      if test "x$is_absolute_path" != x; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&5
-$as_echo "$as_me: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&6;}
-        new_path="$path"
-      else
+    # Cannot rely on the command "which" here since it doesn't always work.
+    is_absolute_path=`$ECHO "$path" | $GREP ^/`
+    if test -z "$is_absolute_path"; then
+      # Path to executable is not absolute. Find it.
+      IFS_save="$IFS"
+      IFS=:
+      for p in $PATH; do
+        if test -f "$p/$path" && test -x "$p/$path"; then
+          new_path="$p/$path"
+          break
+        fi
+      done
+      IFS="$IFS_save"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
+$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
+      new_path="$path"
+    fi
+
+    if test "x$new_path" = x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
         has_space=`$ECHO "$complete" | $GREP " "`
@@ -26741,21 +27288,20 @@
         fi
         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
       fi
-    fi
-  fi
-
-  # Now join together the path and the arguments once again
-  if test "x$arguments" != xEOL; then
-      new_complete="$new_path ${arguments% *}"
-  else
-      new_complete="$new_path"
-  fi
+  fi
+
+      # Now join together the path and the arguments once again
+      if test "x$arguments" != xEOL; then
+        new_complete="$new_path ${arguments% *}"
+      else
+        new_complete="$new_path"
+      fi
 
   if test "x$complete" != "x$new_complete"; then
-    LIPO="$new_complete"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
+      LIPO="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
-  fi
+    fi
 
 fi
 
@@ -27764,11 +28310,14 @@
 
     # 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. Default to server for other variants.
+    # 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"
     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${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"
     fi
@@ -30643,7 +31192,7 @@
 # The name of the Service Agent jar.
 SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
-    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
+  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
 fi
 
 
@@ -31179,6 +31728,14 @@
 
 # Check for some common pitfalls
 
+  if test x"$OPENJDK_BUILD_OS" = xwindows; then
+    file_to_test="$SRC_ROOT/LICENSE"
+    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
+      as_fn_error $? "Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin." "$LINENO" 5
+    fi
+  fi
+
+
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
 $as_echo_n "checking if build directory is on local disk... " >&6; }
@@ -31209,6 +31766,8 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
 
+
+
 # Check if the user has any old-style ALT_ variables set.
 FOUND_ALT_VARIABLES=`env | grep ^ALT_`
 
--- a/common/autoconf/jdk-options.m4	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/autoconf/jdk-options.m4	Fri Feb 08 23:19:43 2013 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# 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
@@ -60,28 +60,30 @@
 # Currently we have:
 #    server: normal interpreter and a tiered C1/C2 compiler
 #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
+#    minimal1: reduced form of client with optional VM services and features stripped out
 #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
 #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
 #    zero: no machine code interpreter, no compiler
 #    zeroshark: zero interpreter and shark/llvm compiler backend
 AC_MSG_CHECKING([which variants of the JVM to build])
 AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
-	[JVM variants (separated by commas) to build (server, client, kernel, zero, zeroshark) @<:@server@:>@])])
+	[JVM variants (separated by commas) to build (server, client, minimal1, kernel, zero, zeroshark) @<:@server@:>@])])
 
 if test "x$with_jvm_variants" = x; then
      with_jvm_variants="server"
 fi
 
 JVM_VARIANTS=",$with_jvm_variants,"
-TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
+TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
 
 if test "x$TEST_VARIANTS" != "x,"; then
-   AC_MSG_ERROR([The available JVM variants are: server, client, kernel, zero, zeroshark])
+   AC_MSG_ERROR([The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark])
 fi   
 AC_MSG_RESULT([$with_jvm_variants])
 
 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'` 
+JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
@@ -96,10 +98,15 @@
         AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.])
     fi
 fi
+if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
+    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+        AC_MSG_ERROR([You cannot build a minimal JVM for a 64-bit machine.])
+    fi
+fi
 
 # Replace the commas with AND for use in the build directory name.
 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
-COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
+COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
 if test "x$COUNT_VARIANTS" != "x,1"; then
     BUILDING_MULTIPLE_JVM_VARIANTS=yes
 else
@@ -109,6 +116,7 @@
 AC_SUBST(JVM_VARIANTS)
 AC_SUBST(JVM_VARIANT_SERVER)
 AC_SUBST(JVM_VARIANT_CLIENT)
+AC_SUBST(JVM_VARIANT_MINIMAL1)
 AC_SUBST(JVM_VARIANT_KERNEL)
 AC_SUBST(JVM_VARIANT_ZERO)
 AC_SUBST(JVM_VARIANT_ZEROSHARK)
@@ -191,7 +199,9 @@
 #####
 # Generate the legacy makefile targets for hotspot.
 # The hotspot api for selecting the build artifacts, really, needs to be improved.
-#
+# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
+# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
+# But until then ...
 HOTSPOT_TARGET=""
 
 if test "x$JVM_VARIANT_SERVER" = xtrue; then
@@ -202,6 +212,10 @@
     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
 fi
 
+if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
+    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
+fi
+
 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
 fi
@@ -221,7 +235,7 @@
 # from configure, but only server is valid anyway. Fix this
 # when hotspot makefiles are rewritten.
 if test "x$MACOSX_UNIVERSAL" = xtrue; then
-    HOTSPOT_TARGET=universal_product
+    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
 fi
 
 #####
@@ -233,46 +247,50 @@
 AC_SUBST(BUILD_VARIANT_RELEASE)
 ])
 
-AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
-[
 
 ###############################################################################
 #
 # Should we build only OpenJDK even if closed sources are present?
 #
-AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only],
-    [supress building closed source even if present @<:@disabled@:>@])],,[enable_openjdk_only="no"])
+AC_DEFUN_ONCE([JDKOPT_SETUP_OPEN_OR_CUSTOM],
+[
+  AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only],
+    [suppress building custom source even if present @<:@disabled@:>@])],,[enable_openjdk_only="no"])
 
-AC_MSG_CHECKING([for presence of closed sources])
-if test -d "$SRC_ROOT/jdk/src/closed"; then
+  AC_MSG_CHECKING([for presence of closed sources])
+  if test -d "$SRC_ROOT/jdk/src/closed"; then
     CLOSED_SOURCE_PRESENT=yes
-else
+  else
     CLOSED_SOURCE_PRESENT=no
-fi
-AC_MSG_RESULT([$CLOSED_SOURCE_PRESENT])
+  fi
+  AC_MSG_RESULT([$CLOSED_SOURCE_PRESENT])
 
-AC_MSG_CHECKING([if closed source is supressed (openjdk-only)])
-SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
-AC_MSG_RESULT([$SUPRESS_CLOSED_SOURCE])
+  AC_MSG_CHECKING([if closed source is suppressed (openjdk-only)])
+  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
+  AC_MSG_RESULT([$SUPPRESS_CLOSED_SOURCE])
 
-if test "x$CLOSED_SOURCE_PRESENT" = xno; then
-  OPENJDK=true
-  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
-    AC_MSG_WARN([No closed source present, --enable-openjdk-only makes no sense])
-  fi
-else
-  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
+  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
     OPENJDK=true
+    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
+      AC_MSG_WARN([No closed source present, --enable-openjdk-only makes no sense])
+    fi
   else
-    OPENJDK=false
+    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
+      OPENJDK=true
+    else
+      OPENJDK=false
+    fi
   fi
-fi
 
-if test "x$OPENJDK" = "xtrue"; then
+  if test "x$OPENJDK" = "xtrue"; then
     SET_OPENJDK="OPENJDK=true"
-fi
+  fi
 
-AC_SUBST(SET_OPENJDK)
+  AC_SUBST(SET_OPENJDK)
+])
+
+AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
+[
 
 ###############################################################################
 #
@@ -355,13 +373,52 @@
 AC_SUBST(COMPRESS_JARS)
 ])
 
+###############################################################################
+#
+# Setup version numbers
+#
 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS],
 [
 # Source the version numbers
-. $AUTOCONF_DIR/version.numbers
-if test "x$OPENJDK" = "xfalse"; then
-    . $AUTOCONF_DIR/closed.version.numbers
+. $AUTOCONF_DIR/version-numbers
+
+# Get the settings from parameters
+AC_ARG_WITH(milestone, [AS_HELP_STRING([--with-milestone], 
+                       [Set milestone value for build @<:@internal@:>@])])
+if test "x$with_milestone" = xyes; then
+  AC_MSG_ERROR([Milestone must have a value])
+elif test "x$with_milestone" != x; then
+    MILESTONE="$with_milestone"
+fi
+if test "x$MILESTONE" = x; then
+  MILESTONE=internal
 fi
+
+AC_ARG_WITH(build-number, [AS_HELP_STRING([--with-build-number], 
+                          [Set build number value for build @<:@b00@:>@])])
+if test "x$with_build_number" = xyes; then
+  AC_MSG_ERROR([Build number must have a value])
+elif test "x$with_build_number" != x; then
+  JDK_BUILD_NUMBER="$with_build_number"
+fi
+if test "x$JDK_BUILD_NUMBER" = x; then
+  JDK_BUILD_NUMBER=b00
+fi
+
+AC_ARG_WITH(user-release-suffix, [AS_HELP_STRING([--with-user-release-suffix], 
+        [Add a custom string to the version string if build number isn't set.@<:@username_builddateb00@:>@])])
+if test "x$with_user_release_suffix" = xyes; then
+  AC_MSG_ERROR([Release suffix must have a value])
+elif test "x$with_user_release_suffix" != x; then
+  USER_RELEASE_SUFFIX="$with_user_release_suffix"
+else
+  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
+  # Avoid [:alnum:] since it depends on the locale.
+  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
+  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+fi
+AC_SUBST(USER_RELEASE_SUFFIX)
+
 # Now set the JDK version, milestone, build number etc.
 AC_SUBST(JDK_MAJOR_VERSION)
 AC_SUBST(JDK_MINOR_VERSION)
@@ -380,34 +437,13 @@
 COPYRIGHT_YEAR=`date +'%Y'`
 AC_SUBST(COPYRIGHT_YEAR)
 
-RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
-AC_SUBST(RUNTIME_NAME)
-
 if test "x$JDK_UPDATE_VERSION" != x; then
-    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
+  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
 else
-    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
+  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
 fi
 AC_SUBST(JDK_VERSION)
 
-if test "x$MILESTONE" != x; then
-    RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
-else
-    RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
-fi
-AC_SUBST(RELEASE)
-
-if test "x$JDK_BUILD_NUMBER" != x; then
-    FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
-else
-    JDK_BUILD_NUMBER=b00
-    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
-    # Avoid [:alnum:] since it depends on the locale.
-    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
-    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-    FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
-fi
-AC_SUBST(FULL_VERSION)
 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
 AC_SUBST(COOKED_BUILD_NUMBER)
 ])
@@ -420,7 +456,7 @@
 # The name of the Service Agent jar.
 SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
-    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
+  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
 fi
 AC_SUBST(SALIB_NAME)
 
--- a/common/autoconf/libraries.m4	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/autoconf/libraries.m4	Fri Feb 08 23:19:43 2013 -0800
@@ -136,6 +136,12 @@
 AC_PATH_X
 AC_PATH_XTRA
 
+# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
+# this doesn't make sense so we remove it.
+if test "x$COMPILE_TYPE" = xcross; then
+  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[[^ ]]*//g'`
+fi
+
 if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then 
     HELP_MSG_MISSING_DEPENDENCY([x11])
     AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])
--- a/common/autoconf/spec.gmk.in	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/autoconf/spec.gmk.in	Fri Feb 08 23:19:43 2013 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# 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
@@ -163,11 +163,22 @@
 
 # Different version strings generated from the above information.
 JDK_VERSION:=@JDK_VERSION@
-RUNTIME_NAME:=@RUNTIME_NAME@
-FULL_VERSION:=@FULL_VERSION@
-JRE_RELEASE_VERSION:=@FULL_VERSION@
-RELEASE:=@RELEASE@
+RUNTIME_NAME=$(PRODUCT_NAME) $(PRODUCT_SUFFIX)
 COOKED_BUILD_NUMBER:=@COOKED_BUILD_NUMBER@
+# These variables need to be generated here so that MILESTONE and
+# JDK_BUILD_NUMBER can be overridden on the make command line.
+ifeq ($(MILESTONE),)
+  RELEASE=$(JDK_VERSION)$(BUILD_VARIANT_RELEASE)
+else
+  RELEASE=$(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)
+endif
+ifeq ($(JDK_BUILD_NUMBER),b00)
+  USER_RELEASE_SUFFIX=@USER_RELEASE_SUFFIX@
+  FULL_VERSION=$(RELEASE)-$(USER_RELEASE_SUFFIX)-$(JDK_BUILD_NUMBER)
+else
+  FULL_VERSION=$(RELEASE)-$(JDK_BUILD_NUMBER)
+endif
+JRE_RELEASE_VERSION:=$(FULL_VERSION)
 
 # How to compile the code: release, fastdebug or slowdebug
 DEBUG_LEVEL:=@DEBUG_LEVEL@
@@ -185,11 +196,12 @@
 
 # These are the libjvms that we want to build.
 # The java launcher uses the default.
-# The other can be selected by specifying -client -server -kernel -zero or -zeroshark
+# The others can be selected by specifying -client -server -minimal1 -kernel -zero or -zeroshark
 # on the java launcher command line.
 JVM_VARIANTS:=@JVM_VARIANTS@
 JVM_VARIANT_SERVER:=@JVM_VARIANT_SERVER@
 JVM_VARIANT_CLIENT:=@JVM_VARIANT_CLIENT@
+JVM_VARIANT_MINIMAL1:=@JVM_VARIANT_MINIMAL1@
 JVM_VARIANT_KERNEL:=@JVM_VARIANT_KERNEL@
 JVM_VARIANT_ZERO:=@JVM_VARIANT_ZERO@
 JVM_VARIANT_ZEROSHARK:=@JVM_VARIANT_ZEROSHARK@
@@ -219,6 +231,7 @@
 HOTSPOT_OUTPUTDIR=$(BUILD_OUTPUT)/hotspot
 JDK_OUTPUTDIR=$(BUILD_OUTPUT)/jdk
 IMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images
+JCE_OUTPUTDIR=$(BUILD_OUTPUT)/jce-release
 
 LANGTOOLS_DIST=$(LANGTOOLS_OUTPUTDIR)/dist
 CORBA_DIST=$(CORBA_OUTPUTDIR)/dist
@@ -419,6 +432,8 @@
 
 NATIVE2ASCII=@FIXPATH@ $(BOOT_JDK)/bin/native2ascii
 
+JARSIGNER=@FIXPATH@ $(BOOT_JDK)/bin/jarsigner
+
 # Base flags for RC
 # Guarding this against resetting value. Legacy make files include spec multiple
 # times.
@@ -439,10 +454,13 @@
 # CD is going away, but remains to cater for legacy makefiles.
 CD:=cd
 CHMOD:=@CHMOD@
+COMM:=@COMM@
 CP:=@CP@
+CPIO:=@CPIO@
 CUT:=@CUT@
 DATE:=@DATE@
 DIFF:=@DIFF@
+DIRNAME:=@DIRNAME@
 FIND:=@FIND@
 FIND_DELETE:=@FIND_DELETE@
 ECHO:=@ECHO@
@@ -467,6 +485,7 @@
 TIME:=@TIME@
 TR:=@TR@
 TOUCH:=@TOUCH@
+UNIQ:=@UNIQ@
 WC:=@WC@
 XARGS:=@XARGS@
 ZIPEXE:=@ZIP@
@@ -599,5 +618,21 @@
 OS_VERSION_MINOR:=@OS_VERSION_MINOR@
 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_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_DIR:=$(IMAGES_OUTPUTDIR)/$(JDK_BUNDLE_SUBDIR)
+JRE_BUNDLE_DIR:=$(IMAGES_OUTPUTDIR)/$(JRE_BUNDLE_SUBDIR)
+
 # Include the custom-spec.gmk file if it exists
 -include $(dir @SPEC@)/custom-spec.gmk
--- a/common/autoconf/toolchain.m4	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/autoconf/toolchain.m4	Fri Feb 08 23:19:43 2013 -0800
@@ -954,11 +954,14 @@
 
     # 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. Default to server for other variants.
+    # 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"
     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${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"
     fi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/version-numbers	Fri Feb 08 23:19:43 2013 -0800
@@ -0,0 +1,38 @@
+#
+# 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.
+#
+
+JDK_MAJOR_VERSION=1
+JDK_MINOR_VERSION=8
+JDK_MICRO_VERSION=0
+JDK_UPDATE_VERSION=
+LAUNCHER_NAME=openjdk
+PRODUCT_NAME=OpenJDK
+PRODUCT_SUFFIX="Runtime Environment"
+JDK_RC_PLATFORM_NAME=Platform
+COMPANY_NAME=N/A
+
+# Might need better names for these
+MACOSX_BUNDLE_NAME_BASE="OpenJDK"
+MACOSX_BUNDLE_ID_BASE="net.java.openjdk"
--- a/common/autoconf/version.numbers	Fri Dec 14 16:11:33 2012 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-JDK_MAJOR_VERSION=1
-JDK_MINOR_VERSION=8
-JDK_MICRO_VERSION=0
-JDK_UPDATE_VERSION=
-JDK_BUILD_NUMBER=
-MILESTONE=internal
-LAUNCHER_NAME=openjdk
-PRODUCT_NAME=OpenJDK
-PRODUCT_SUFFIX="Runtime Environment"
-JDK_RC_PLATFORM_NAME=Platform
-COMPANY_NAME=N/A
-
-# Might need better names for these
-MACOSX_BUNDLE_NAME_BASE="OpenJDK"
-MACOSX_BUNDLE_ID_BASE="net.java.openjdk"
--- a/common/bin/compare.sh	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/bin/compare.sh	Fri Feb 08 23:19:43 2013 -0800
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013 Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -98,24 +98,30 @@
     if test "x$SUFFIX" = "xclass"; then
         # To improve performance when large diffs are found, do a rough filtering of classes
         # elibeble for these exceptions
-        if $GREP -R -e '[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}' -e thePoint -e aPoint -e setItemsPtr ${THIS_FILE} > /dev/null; then
+        if $GREP -R -e '[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}' \
+	        -e '[0-9]\{2\}/[0-9]\{2\}/[0-9]\{4\}' \
+	        -e thePoint -e aPoint -e setItemsPtr ${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
             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' \
+		     -e '/[0-9]\{2\}\/[0-9]\{2\}\/[0-9]\{4\}/d' \
  	             -e '/[<>].*Point   Lcom\/apple\/jobjc\/foundation\/NSPoint;/d' \
 	             -e '/[<>].*public com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*itemsPtr();/d' \
 	             -e '/[<>].*public void setItemsPtr(com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*);/d')
         fi
     fi
     if test "x$SUFFIX" = "xproperties"; then
-        $CAT $OTHER_FILE | $SED -e 's/\([^\\]\):/\1\\:/g' -e  's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
-            | $SED -f "$SRC_ROOT/common/makefiles/support/unicode2x.sed" \
-  	    | $SED -e '/^#/d' -e '/^$/d' \
-            -e :a -e '/\\$/N; s/\\\n//; ta' \
-  	    -e 's/^[ \t]*//;s/[ \t]*$//' \
-	    -e 's/\\=/=/' | LANG=C $SORT > $OTHER_FILE.cleaned
+        # Run through nawk to add possibly missing newline at end of file.
+        $CAT $OTHER_FILE | $NAWK '{ print }' > $OTHER_FILE.cleaned
+# Disable this exception since we aren't changing the properties cleaning method yet.
+#        $CAT $OTHER_FILE | $SED -e 's/\([^\\]\):/\1\\:/g' -e  's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
+#            | $SED -f "$SRC_ROOT/common/makefiles/support/unicode2x.sed" \
+#  	    | $SED -e '/^#/d' -e '/^$/d' \
+#            -e :a -e '/\\$/N; s/\\\n//; ta' \
+#  	    -e 's/^[ \t]*//;s/[ \t]*$//' \
+#	    -e 's/\\=/=/' | LANG=C $SORT > $OTHER_FILE.cleaned
         TMP=$(LANG=C $DIFF $OTHER_FILE.cleaned $THIS_FILE)
     fi
     if test -n "$TMP"; then
@@ -305,14 +311,17 @@
                 THIS_FILE=$WORK_DIR/$f.this
                 $MKDIR -p $(dirname $OTHER_FILE)
                 $MKDIR -p $(dirname $THIS_FILE)
+                #Note that | doesn't work on mac sed.
                 $CAT $OTHER_DIR/$f | $SED -e 's/\(-- Generated by javadoc \).*\( --\)/\1(removed)\2/' \
                                           -e 's/\(<meta name="date" content="\).*\(">\)/\1(removed)\2/' \
-                                          -e 's/\(Monday\|Tuesday\|Wednesday\|Thursday\|Friday\|Saturday\|Sunday\), [A-Z][a-z]* [0-9][0-9]*, [12][0-9]* [0-9][0-9:]* \(AM\|PM\) [A-Z][A-Z]*/(removed)/' \
+                                          -e 's/[A-Z][a-z]*, [A-Z][a-z]* [0-9][0-9]*, [12][0-9]* [0-9][0-9:]* [AMP]\{2,2\} [A-Z][A-Z]*/(removed)/' \
+                                          -e 's/[A-Z][a-z]* [A-Z][a-z]* [0-9][0-9] [0-9][0-9:]* [A-Z][A-Z]* [12][0-9]*/(removed)/' \
                                           -e 's/^\( from \).*\(\.idl\)$/\1(removed)\2/' \
                     > $OTHER_FILE
                 $CAT $THIS_DIR/$f  | $SED -e 's/\(-- Generated by javadoc \).*\( --\)/\1(removed)\2/' \
                                           -e 's/\(<meta name="date" content="\).*\(">\)/\1(removed)\2/' \
-                                          -e 's/\(Monday\|Tuesday\|Wednesday\|Thursday\|Friday\|Saturday\|Sunday\), [A-Z][a-z]* [0-9][0-9]*, [12][0-9]* [0-9][0-9:]* \(AM\|PM\) [A-Z][A-Z]*/(removed)/' \
+                                          -e 's/[A-Z][a-z]*, [A-Z][a-z]* [0-9][0-9]*, [12][0-9]* [0-9][0-9:]* [AMP]\{2,2\} [A-Z][A-Z]*/(removed)/' \
+                                          -e 's/[A-Z][a-z]* [A-Z][a-z]* [0-9][0-9] [0-9][0-9:]* [A-Z][A-Z]* [12][0-9]*/(removed)/' \
                                           -e 's/^\( from \).*\(\.idl\)$/\1(removed)\2/' \
                     > $THIS_FILE
             else
@@ -341,9 +350,15 @@
     OTHER_DIR=$2
     WORK_DIR=$3
     ZIP_FILE=$4
+    # Optionally provide different name for other zipfile
+    OTHER_ZIP_FILE=$5
 
     THIS_ZIP=$THIS_DIR/$ZIP_FILE
-    OTHER_ZIP=$OTHER_DIR/$ZIP_FILE
+    if [ -n "$OTHER_ZIP_FILE" ]; then
+        OTHER_ZIP=$OTHER_DIR/$OTHER_ZIP_FILE
+    else
+        OTHER_ZIP=$OTHER_DIR/$ZIP_FILE
+    fi
 
     THIS_SUFFIX="${THIS_ZIP##*.}"
     OTHER_SUFFIX="${OTHER_ZIP##*.}"
@@ -370,14 +385,14 @@
     (cd $OTHER_UNZIPDIR && $UNARCHIVE $OTHER_ZIP)
 
     # Find all archives inside and unzip them as well to compare the contents rather than
-    # the archives.
-    EXCEPTIONS=""
-    for pack in $($FIND $THIS_UNZIPDIR -name "*.pack" -o -name "*.pack.gz"); do
+    # the archives. pie.jar.pack.gz i app3.war is corrupt, skip it.
+    EXCEPTIONS="pie.jar.pack.gz"
+    for pack in $($FIND $THIS_UNZIPDIR \( -name "*.pack" -o -name "*.pack.gz" \) -a ! -name pie.jar.pack.gz); do
         ($UNPACK200 $pack $pack.jar)
         # Filter out the unzipped archives from the diff below.
         EXCEPTIONS="$EXCEPTIONS $pack $pack.jar"
     done
-    for pack in $($FIND $OTHER_UNZIPDIR -name "*.pack" -o -name "*.pack.gz"); do
+    for pack in $($FIND $OTHER_UNZIPDIR \( -name "*.pack" -o -name "*.pack.gz" \) -a ! -name pie.jar.pack.gz); do
         ($UNPACK200 $pack $pack.jar)
         EXCEPTIONS="$EXCEPTIONS $pack $pack.jar"
     done
@@ -953,6 +968,9 @@
     echo "[FILTER]            List filenames in the image to compare, works for jars, zips, libs and execs"
     echo "Example:"
     echo "bash ./common/bin/compareimages.sh CodePointIM.jar"
+    echo ""
+    echo "-2zips <file1> <file2> Compare two zip files only"
+    echo ""
     exit 10
 fi
 
@@ -1014,6 +1032,13 @@
         -execs)
             CMP_EXECS=true
             ;;
+        -2zips)
+            CMP_2_ZIPS=true
+            THIS_FILE=$2
+            OTHER_FILE=$3
+            shift
+            shift
+            ;;
         *)
             CMP_NAMES=false
             CMP_PERMS=false
@@ -1032,6 +1057,18 @@
     shift
 done
 
+if [ "$CMP_2_ZIPS" = "true" ]; then
+    THIS_DIR="$(dirname $THIS_FILE)"
+    THIS_DIR="$(cd "$THIS_DIR" && pwd )"
+    OTHER_DIR="$(dirname $OTHER_FILE)"
+    OTHER_DIR="$(cd "$OTHER_DIR" && pwd )"
+    THIS_FILE_NAME="$(basename $THIS_FILE)"
+    OTHER_FILE_NAME="$(basename $OTHER_FILE)"
+    echo Comparing $THIS_DIR/$THIS_FILE_NAME and $OTHER_DIR/$OTHER_FILE_NAME
+    compare_zip_file $THIS_DIR $OTHER_DIR $COMPARE_ROOT/2zips $THIS_FILE_NAME $OTHER_FILE_NAME
+    exit
+fi
+
 if [ "$CMP_NAMES" = "false" ] && [ "$CMP_TYPES" = "false" ] && [ "$CMP_PERMS" = "false" ] && [ "$CMP_GENERAL" = "false" ] && [ "$CMP_ZIPS" = "false" ] && [ "$CMP_JARS" = "false" ] && [ "$CMP_LIBS" = "false" ] && [ "$CMP_EXECS" = "false" ]; then
     CMP_NAMES=true
     CMP_PERMS=true
@@ -1073,7 +1110,11 @@
 
 
 # Figure out the layout of the this build. Which kinds of images have been produced
-if [ -d "$THIS/deploy/j2sdk-image" ]; then
+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"
@@ -1081,9 +1122,16 @@
     THIS_J2SDK="$THIS/images/j2sdk-image"
     THIS_J2RE="$THIS/images/j2re-image"
 fi
+
 if [ -d "$THIS/images/j2sdk-overlay-image" ]; then
-    THIS_J2SDK_OVERLAY="$THIS/images/j2sdk-overlay-image"
-    THIS_J2RE_OVERLAY="$THIS/images/j2re-overlay-image"
+    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
@@ -1100,7 +1148,9 @@
         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
@@ -1144,6 +1194,26 @@
     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
 
@@ -1260,6 +1330,24 @@
     if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
         compare_all_zip_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
     fi
+    if [ -n "$THIS_SEC_BIN" ] && [ -n "$OTHER_SEC_BIN" ]; then
+        if [ -n "$(echo $THIS_SEC_BIN | $FILTER)" ]; then
+            echo "sec-bin.zip..."
+            compare_zip_file $THIS_SEC_DIR $OTHER_SEC_DIR $COMPARE_ROOT/sec-bin sec-bin.zip
+        fi
+    fi
+    if [ -n "$THIS_SEC_WINDOWS_BIN" ] && [ -n "$OTHER_SEC_WINDOWS_BIN" ]; then
+        if [ -n "$(echo $THIS_SEC_WINDOWS_BIN | $FILTER)" ]; then
+            echo "sec-windows-bin.zip..."
+            compare_zip_file $THIS_SEC_DIR $OTHER_SEC_DIR $COMPARE_ROOT/sec-bin sec-windows-bin.zip
+        fi
+    fi
+    if [ -n "$THIS_JGSS_WINDOWS_BIN" ] && [ -n "$OTHER_JGSS_WINDOWS_BIN" ]; then
+        if [ -n "$(echo $THIS_JGSS_WINDOWS_BIN | $FILTER)" ]; then
+            echo "$JGSS_WINDOWS_BIN..."
+            compare_zip_file $THIS_SEC_DIR $OTHER_SEC_DIR $COMPARE_ROOT/sec-bin $JGSS_WINDOWS_BIN
+        fi
+    fi
 fi
 
 if [ "$CMP_JARS" = "true" ]; then
--- a/common/bin/compare_exceptions.sh.incl	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/bin/compare_exceptions.sh.incl	Fri Feb 08 23:19:43 2013 -0800
@@ -80,6 +80,7 @@
 ./bin/javadoc
 ./bin/javah
 ./bin/javap
+./bin/jdeps
 ./bin/jcmd
 ./bin/jconsole
 ./bin/jdb
@@ -167,6 +168,7 @@
 ./bin/javadoc
 ./bin/javah
 ./bin/javap
+./bin/jdeps
 ./bin/jcmd
 ./bin/jconsole
 ./bin/jdb
@@ -309,6 +311,7 @@
 ./bin/javadoc
 ./bin/javah
 ./bin/javap
+./bin/jdeps
 ./bin/javaws
 ./bin/jcmd
 ./bin/jconsole
@@ -449,6 +452,7 @@
 ./bin/amd64/javadoc
 ./bin/amd64/javah
 ./bin/amd64/javap
+./bin/amd64/jdeps
 ./bin/amd64/jcmd
 ./bin/amd64/jconsole
 ./bin/amd64/jdb
@@ -606,6 +610,7 @@
 ./bin/javadoc
 ./bin/javah
 ./bin/javap
+./bin/jdeps
 ./bin/javaws
 ./bin/jcmd
 ./bin/jconsole
@@ -751,6 +756,7 @@
 ./bin/sparcv9/javadoc
 ./bin/sparcv9/javah
 ./bin/sparcv9/javap
+./bin/sparcv9/jdeps
 ./bin/sparcv9/jcmd
 ./bin/sparcv9/jconsole
 ./bin/sparcv9/jdb
@@ -807,6 +813,10 @@
 
 if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
 
+ACCEPTED_JARZIP_CONTENTS="
+/bin/w2k_lsa_auth.dll
+"
+
 # Probably should add all libs here
 ACCEPTED_SMALL_SIZE_DIFF="
 ./demo/jvmti/gctest/lib/gctest.dll
@@ -815,6 +825,7 @@
 ./jre/bin/attach.dll
 ./jre/bin/java_crw_demo.dll
 ./jre/bin/jsoundds.dll
+./jre/bin/server/jvm.dll
 ./bin/appletviewer.exe
 ./bin/extcheck.exe
 ./bin/idlj.exe
@@ -826,6 +837,7 @@
 ./bin/javadoc.exe
 ./bin/javah.exe
 ./bin/javap.exe
+./bin/jdeps.exe
 ./bin/javaw.exe
 ./bin/jcmd.exe
 ./bin/jconsole.exe
@@ -875,6 +887,17 @@
 ./jre/bin/unpack200.exe
 "
 
+# jabswitch.exe is compiled and linked with incremental turned on in the old
+# build. This makes no sense, so it's turned off in the new build.
+ACCEPTED_SIZE_DIFF="
+./bin/jabswitch.exe
+./jre/bin/jabswitch.exe
+"
+ACCEPTED_DIS_DIFF="
+./bin/jabswitch.exe
+./jre/bin/jabswitch.exe
+"
+
 # On windows, there are unavoidable allignment issues making
 # a perfect disasm diff impossible. Filter out the following:
 # * Random parts of C++ symbols (this is a bit greedy, but does the trick)
@@ -910,6 +933,7 @@
 ./bin/javadoc
 ./bin/javah
 ./bin/javap
+./bin/jdeps
 ./bin/jcmd
 ./bin/jconsole
 ./bin/jdb
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/bin/hgforest.sh	Fri Feb 08 23:19:43 2013 -0800
@@ -0,0 +1,194 @@
+#!/bin/sh
+
+#
+# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# Shell script for a fast parallel forest command
+command="$1"
+pull_extra_base="$2"
+
+# Python always buffers stdout significantly, thus we will not see any output from hg clone jdk,
+# until a lot of time has passed! By passing -u to python, we get incremental updates
+# on stdout. Much nicer.
+whichhg="`which hg`"
+
+if [ "${whichhg}" = "" ] ; then
+  echo Cannot find hg!
+  exit 1
+fi
+
+if [ "" = "$command" ] ; then
+  echo No command to hg supplied!
+  exit 1
+fi
+
+has_hash_bang="`head -n 1 "${whichhg}" | cut -b 1-2`"
+python=""
+bpython=""
+
+if [ "#!" = "$has_hash_bang" ] ; then
+   python="`head -n 1 ${whichhg} | cut -b 3-`"
+   bpython="`basename "$python"`"
+fi
+
+if [ "python" = "$bpython" -a -x "$python" ] ; then
+  hg="${python} -u ${whichhg}"
+else
+  echo Cannot find python from hg launcher. Running plain hg, which probably has buffered stdout.
+  hg="hg"
+fi
+
+# Clean out the temporary directory that stores the pid files.
+tmp=/tmp/forest.$$
+rm -f -r ${tmp}
+mkdir -p ${tmp}
+
+safe_interrupt () {
+  if [ -d ${tmp} ]; then 
+    if [ "`ls ${tmp}`" != "" ]; then 
+      echo "Waiting for processes ( `cat ${tmp}/* | tr '\n' ' '`) to terminate nicely!"
+      sleep 1
+      # Pipe stderr to dev/null to silence kill, that complains when trying to kill
+      # a subprocess that has already exited.
+      kill -TERM `cat ${tmp}/* | tr '\n' ' '` 2> /dev/null
+      wait 
+      echo Interrupt complete! 
+    fi 
+  fi
+  rm -f -r ${tmp}
+  exit 1
+}
+
+nice_exit () {
+  if [ -d ${tmp} ]; then 
+    if [ "`ls ${tmp}`" != "" ]; then 
+      wait 
+    fi 
+  fi
+  rm -f -r ${tmp}
+}
+
+trap 'safe_interrupt' INT QUIT
+trap 'nice_exit' EXIT
+ 
+# Only look in specific locations for possible forests (avoids long searches)
+pull_default=""
+repos=""
+repos_extra=""
+if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then
+  subrepos="corba jaxp jaxws langtools jdk hotspot"
+  if [ -f .hg/hgrc ] ; then
+    pull_default=`hg paths default`
+    if [ "${pull_default}" = "" ] ; then
+      echo "ERROR: Need initial clone with 'hg paths default' defined"
+      exit 1
+    fi
+  fi
+  if [ "${pull_default}" = "" ] ; then
+    echo "ERROR: Need initial repository to use this script"
+    exit 1
+  fi
+  for i in ${subrepos} ; do
+    if [ ! -f ${i}/.hg/hgrc ] ; then
+      repos="${repos} ${i}"
+    fi
+  done
+  if [ "${pull_extra_base}" != "" ] ; then
+    subrepos_extra="jdk/src/closed jdk/make/closed jdk/test/closed hotspot/make/closed hotspot/src/closed hotspot/test/closed deploy install sponsors pubs"
+    pull_default_tail=`echo ${pull_default} | sed -e 's@^.*://[^/]*/\(.*\)@\1@'`
+    pull_extra="${pull_extra_base}/${pull_default_tail}"
+    for i in ${subrepos_extra} ; do
+      if [ ! -f ${i}/.hg/hgrc ] ; then
+        repos_extra="${repos_extra} ${i}"
+      fi
+    done
+  fi
+  at_a_time=2
+  # Any repos to deal with?
+  if [ "${repos}" = "" -a "${repos_extra}" = "" ] ; then
+    exit
+  fi
+else
+  hgdirs=`ls -d ./.hg ./*/.hg ./*/*/.hg ./*/*/*/.hg ./*/*/*/*/.hg 2>/dev/null`
+  # Derive repository names from the .hg directory locations
+  for i in ${hgdirs} ; do
+    repos="${repos} `echo ${i} | sed -e 's@/.hg$@@'`"
+  done
+  for i in ${repos} ; do
+    if [ -h ${i}/.hg/store/lock -o -f ${i}/.hg/store/lock ] ; then
+      locked="${i} ${locked}"
+    fi
+  done
+  at_a_time=8
+  # Any repos to deal with?
+  if [ "${repos}" = "" ] ; then
+    echo "No repositories to process."
+    exit
+  fi
+  if [ "${locked}" != "" ] ; then
+    echo "These repositories are locked: ${locked}"
+    exit
+  fi
+fi
+
+# Echo out what repositories we do a command on.
+echo "# Repositories: ${repos} ${repos_extra}"
+echo
+
+# Run the supplied command on all repos in parallel.
+n=0
+for i in ${repos} ${repos_extra} ; do
+  n=`expr ${n} '+' 1`
+  repopidfile=`echo ${i} | sed -e 's@./@@' -e 's@/@_@g'`
+  reponame=`echo ${i} | sed -e :a -e 's/^.\{1,20\}$/ &/;ta'`
+  pull_base="${pull_default}"
+  for j in $repos_extra ; do
+      if [ "$i" = "$j" ] ; then
+          pull_base="${pull_extra}"
+      fi
+  done
+  (
+    (
+      if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then
+        pull_newrepo="`echo ${pull_base}/${i} | sed -e 's@\([^:]/\)//*@\1@g'`"
+        echo ${hg} clone ${pull_newrepo} ${i}
+        ${hg} clone ${pull_newrepo} ${i} &
+      else
+        echo "cd ${i} && ${hg} $*"
+        cd ${i} && ${hg} "$@" &
+      fi 
+      echo $! > ${tmp}/${repopidfile}.pid
+    ) 2>&1 | sed -e "s@^@${reponame}:   @") &
+  
+  if [ `expr ${n} '%' ${at_a_time}` -eq 0 ] ; then
+    sleep 2
+    echo Waiting 5 secs before spawning next background command.
+    sleep 3
+  fi
+done
+# Wait for all hg commands to complete
+wait
+
+# Terminate with exit 0 all the time (hard to know when to say "failed")
+exit 0
+
--- a/common/makefiles/IdlCompilation.gmk	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/makefiles/IdlCompilation.gmk	Fri Feb 08 23:19:43 2013 -0800
@@ -87,7 +87,7 @@
 $1_SRC := $$(abspath $$($1_SRC))
 $1_BIN := $$(abspath $$($1_BIN))
 # Find all existing java files and existing class files.
-$$(shell $(MKDIR) -p $$($1_SRC) $$($1_BIN))
+$$(eval $$(call MakeDir,$$($1_BIN)))
 $1_SRCS     := $$(shell find $$($1_SRC) -name "*.idl")
 $1_BINS     := $$(shell find $$($1_BIN) -name "*.java")
 # Prepend the source/bin path to the filter expressions.
--- a/common/makefiles/JavaCompilation.gmk	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/makefiles/JavaCompilation.gmk	Fri Feb 08 23:19:43 2013 -0800
@@ -111,9 +111,9 @@
         ifeq ($$(word 20,$$($1_GREP_INCLUDE_PATTERNS)),)
             $1_GREP_INCLUDES:=| $(GREP) $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_INCLUDE_PATTERNS))
         else
-            $$(shell $(MKDIR) -p $$($1_BIN) && $(RM) $$($1_BIN)/_the.$$($1_JARNAME)_include)
-            $$(eval $$(call ListPathsSafelyNow,$1_GREP_INCLUDE_PATTERNS,\n, \
-			>> $$($1_BIN)/_the.$$($1_JARNAME)_include))
+            $1_GREP_INCLUDE_OUTPUT:=$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_include && \
+                                    $$(strip $$(call ListPathsSafely,$1_GREP_INCLUDE_PATTERNS,\n, \
+                                        >> $$($1_BIN)/_the.$$($1_JARNAME)_include))
             $1_GREP_INCLUDES:=| $(GREP) -f $$($1_BIN)/_the.$$($1_JARNAME)_include
         endif
     endif
@@ -124,9 +124,9 @@
         ifeq ($$(word 20,$$($1_GREP_EXCLUDE_PATTERNS)),)
             $1_GREP_EXCLUDES:=| $(GREP) -v $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_EXCLUDE_PATTERNS))
         else
-            $$(shell $(MKDIR) -p $$($1_BIN) && $(RM) $$($1_BIN)/_the.$$($1_JARNAME)_exclude)
-            $$(eval $$(call ListPathsSafelyNow,$1_GREP_EXCLUDE_PATTERNS,\n, \
-			>> $$($1_BIN)/_the.$$($1_JARNAME)_exclude))
+            $1_GREP_EXCLUDE_OUTPUT=$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_exclude && \
+                                    $$(strip $$(call ListPathsSafely,$1_GREP_EXCLUDE_PATTERNS,\n, \
+                                        >> $$($1_BIN)/_the.$$($1_JARNAME)_exclude))
             $1_GREP_EXCLUDES:=| $(GREP) -v -f $$($1_BIN)/_the.$$($1_JARNAME)_exclude
         endif
     endif
@@ -137,19 +137,25 @@
     else
       $1_JARINDEX = true
     endif
-    # When this macro is run in the same makefile as the java compilation, dependencies are transfered
-    # in make variables. When the macro is run in a different makefile than the java compilation, the 
-    # dependencies need to be found in the filesystem.
+    # When this macro is run in the same makefile as the java compilation, dependencies are 
+    # transfered in make variables. When the macro is run in a different makefile than the 
+    # java compilation, the dependencies need to be found in the filesystem.
     ifneq (,$2)
         $1_DEPS:=$2
     else
+        $1_DEPS:=$$(filter $$(addprefix %,$$($1_FIND_PATTERNS)),\
+                    $$(call CacheFind $$($1_SRCS)))
+        ifneq (,$$($1_GREP_INCLUDE_PATTERNS))
+            $1_DEPS:=$$(filter $$(addsuffix %,$$($1_GREP_INCLUDE_PATTERNS)),$$($1_DEPS))
+        endif
+        ifneq (,$$($1_GREP_EXCLUDE_PATTERNS))
+            $1_DEPS:=$$(filter-out $$(addsuffix %,$$($1_GREP_EXCLUDE_PATTERNS)),$$($1_DEPS))
+        endif
         # The subst of \ is needed because $ has to be escaped with \ in EXTRA_FILES for the command 
         # lines, but not here for use in make dependencies.
-        $1_DEPS:=$$(shell $(FIND) $$($1_SRCS) -type f -a \( $$($1_FIND_PATTERNS) \) \
-			  $$($1_GREP_INCLUDES) $$($1_GREP_EXCLUDES)) \
-		 $$(subst \,,$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/,$$($1_EXTRA_FILES))))
+        $1_DEPS+=$$(subst \,,$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/,$$($1_EXTRA_FILES))))
         ifeq (,$$($1_SKIP_METAINF))
-            $1_DEPS+=$$(shell $(FIND) $$(addsuffix /META-INF,$$($1_SRCS)) -type f 2> /dev/null)
+            $1_DEPS+=$$(call CacheFind $$(wildcard $$(addsuffix /META-INF,$$($1_SRCS))))
         endif
     endif
 
@@ -210,6 +216,8 @@
     # Here is the rule that creates/updates the jar file.
     $$($1_JAR) : $$($1_DEPS)
 	$(MKDIR) -p $$($1_BIN)
+	$$($1_GREP_INCLUDE_OUTPUT)
+	$$($1_GREP_EXCLUDE_OUTPUT)
 	$$(if $$($1_MANIFEST),\
 		$(SED) -e "s#@@RELEASE@@#$(RELEASE)#"           \
 		       -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $$($1_MANIFEST) > $$($1_MANIFEST_FILE) \
@@ -242,14 +250,14 @@
 define SetupZipArchive
     # param 1 is for example ZIP_MYSOURCE
     # param 2,3,4,5,6,7,8,9 are named args.
-    #    SRC,ZIP,INCLUDES,EXCLUDES,EXCLUDE_FILES,SUFFIXES,EXTRA_DEPS
+    #    SRC,ZIP,INCLUDES,INCLUDE_FILES,EXCLUDES,EXCLUDE_FILES,SUFFIXES,EXTRA_DEPS
     $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
     $(call LogSetupMacroEntry,SetupZipArchive($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
     $(if $(16),$(error Internal makefile error: Too many arguments to SetupZipArchive, please update JavaCompilation.gmk))
 
     # Find all files in the source tree.
-    $1_SUFFIX_FILTER := $$(patsubst %,-o -name $(DQUOTE)*%$(DQUOTE),$$($1_SUFFIXES))
-    $1_ALL_SRCS := $$(foreach i,$$($1_SRC), $$(shell $(FIND) $$i -type f -a ! -name "_the.*" \( -name FALSE_DUMMY  $$($1_SUFFIX_FILTER) \) ))
+    $1_ALL_SRCS := $$(call not-containing,_the.,\
+            $$(filter $$(addprefix %,$$($1_SUFFIXES)),$$(call CacheFind $$($1_SRC))))
 
     ifneq ($$($1_INCLUDES),)
         $1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
@@ -259,6 +267,12 @@
         else
             $1_ZIP_INCLUDES := $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_INCLUDES)))
         endif
+    endif
+    ifneq ($$($1_INCLUDE_FILES),)
+        $1_SRC_INCLUDES += $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
+        $1_ZIP_INCLUDES += $$(addprefix -i$(SPACE),$$($1_INCLUDE_FILES))
+    endif
+    ifneq ($$($1_SRC_INCLUDES),)
         $1_ALL_SRCS     := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_SRCS))
     endif
     ifneq ($$($1_EXCLUDES),)
@@ -376,7 +390,7 @@
     $$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupJavaCompilation $1 contains missing directory $$d)))
     $$(eval $$(call MakeDir,$$($1_BIN)))
     # Find all files in the source trees.
-    $1_ALL_SRCS := $$(filter-out $(OVR_SRCS),$$(shell $(FIND) $$($1_SRC) -type f))
+    $1_ALL_SRCS += $$(filter-out $(OVR_SRCS),$$(call CacheFind,$$($1_SRC)))
     # Extract the java files.
     ifneq ($$($1_EXCLUDE_FILES),)
         $1_EXCLUDE_FILES_PATTERN:=$$(addprefix %,$$($1_EXCLUDE_FILES))
@@ -408,8 +422,6 @@
 
     # Find all files to be copied from source to bin.
     ifneq (,$$($1_COPY))
-        # Rewrite list of patterns into a find statement.
-        $1_COPY_PATTERN:=$(FALSE_FIND_PATTERN) $$(patsubst %,$(SPACE)-o$(SPACE)-name$(SPACE)$(DQUOTE)*%$(DQUOTE),$$($1_COPY))
         # Search for all files to be copied.
         $1_ALL_COPIES := $$(filter $$(addprefix %,$$($1_COPY)),$$($1_ALL_SRCS))
         # Copy these explicitly
@@ -436,8 +448,6 @@
 
     # Find all property files to be copied and cleaned from source to bin.
     ifneq (,$$($1_CLEAN))
-        # Rewrite list of patterns into a find statement.
-        $1_CLEAN_PATTERN:=$(FALSE_FIND_PATTERN) $$(patsubst %,$(SPACE)-o$(SPACE)-name$(SPACE)$(DQUOTE)*%$(DQUOTE),$$($1_CLEAN))
         # Search for all files to be copied.
         $1_ALL_CLEANS := $$(filter $$(addprefix %,$$($1_CLEAN)),$$($1_ALL_SRCS))
         # Copy and clean must also respect filters.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/makefiles/Jprt.gmk	Fri Feb 08 23:19:43 2013 -0800
@@ -0,0 +1,209 @@
+#
+# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# This file is included by the root NewerMakefile and contains targets 
+# and utilities needed by JPRT.
+
+# Utilities used in this Makefile. Most of this makefile executes without
+# the context of a spec file from configure.
+CAT=cat
+CMP=cmp
+CP=cp
+ECHO=echo
+MKDIR=mkdir
+PRINTF=printf
+PWD=pwd
+# Insure we have a path that looks like it came from pwd
+#   (This is mostly for Windows sake and drive letters)
+define UnixPath # path
+$(shell (cd "$1" && $(PWD)))
+endef
+
+BUILD_DIR_ROOT:=$(root_dir)/build
+
+ifdef OPENJDK
+  OPEN_BUILD=true
+else
+  OPEN_BUILD := $(if $(or $(wildcard $(root_dir)/jdk/src/closed), \
+                          $(wildcard $(root_dir)/jdk/make/closed), \
+                          $(wildcard $(root_dir)/jdk/test/closed), \
+                          $(wildcard $(root_dir)/hotspot/src/closed), \
+                          $(wildcard $(root_dir)/hotspot/make/closed), \
+                          $(wildcard $(root_dir)/hotspot/test/closed)), \
+                     false,true)
+endif
+
+HOTSPOT_AVAILABLE := $(if $(wildcard $(root_dir)/hotspot),true,false)
+
+###########################################################################
+# To help in adoption of the new configure&&make build process, a bridge
+#   build will use the old settings to run configure and do the build.
+
+# Build with the configure bridge. After running configure, restart make
+# to parse the new spec file.
+BRIDGE_TARGETS := all
+bridgeBuild: bridge2configure
+	@cd $(root_dir) && $(MAKE) -f NewMakefile.gmk $(BRIDGE_TARGETS)
+
+# Bridge from old Makefile ALT settings to configure options
+bridge2configure: $(BUILD_DIR_ROOT)/.bridge2configureOpts
+	bash ./configure $(strip $(shell $(CAT) $<))
+
+# Create a file with configure options created from old Makefile mechanisms.
+$(BUILD_DIR_ROOT)/.bridge2configureOpts: $(BUILD_DIR_ROOT)/.bridge2configureOptsLatest
+	$(RM) $@
+	$(CP) $< $@
+
+# Use this file to only change when obvious things have changed
+$(BUILD_DIR_ROOT)/.bridge2configureOptsLatest: FRC
+	$(RM) $@.tmp
+	$(MKDIR) -p $(BUILD_DIR_ROOT)
+	@$(ECHO) " --with-debug-level=$(if $(DEBUG_LEVEL),$(DEBUG_LEVEL),release) " >> $@.tmp
+ifdef ARCH_DATA_MODEL
+	@$(ECHO) " --with-target-bits=$(ARCH_DATA_MODEL) " >> $@.tmp
+endif
+ifeq ($(ARCH_DATA_MODEL),32)
+	@$(ECHO) " --with-jvm-variants=client,server " >> $@.tmp
+endif
+ifdef ALT_PARALLEL_COMPILE_JOBS
+	@$(ECHO) " --with-num-cores=$(ALT_PARALLEL_COMPILE_JOBS) " >> $@.tmp
+endif
+ifdef ALT_BOOTDIR
+	@$(ECHO) " --with-boot-jdk=$(call UnixPath,$(ALT_BOOTDIR)) " >> $@.tmp
+endif
+ifdef ALT_CUPS_HEADERS_PATH
+	@$(ECHO) " --with-cups-include=$(call UnixPath,$(ALT_CUPS_HEADERS_PATH)) " >> $@.tmp
+endif
+ifdef ALT_FREETYPE_HEADERS_PATH
+	@$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp
+endif
+ifeq ($(HOTSPOT_AVAILABLE),false)
+  ifdef ALT_JDK_IMPORT_PATH
+	@$(ECHO) " --with-import-hotspot=$(call UnixPath,$(ALT_JDK_IMPORT_PATH)) " >> $@.tmp
+  endif
+endif
+ifeq ($(OPEN_BUILD),true)
+	@$(ECHO) " --enable-openjdk-only " >> $@.tmp
+else
+  # Todo: move to closed?
+  ifdef ALT_MOZILLA_HEADERS_PATH
+	@$(ECHO) " --with-mozilla-headers=$(call UnixPath,$(ALT_MOZILLA_HEADERS_PATH)) " >> $@.tmp
+  endif
+  ifdef ALT_JUNIT_DIR
+	@$(ECHO) " --with-junit-dir=$(call UnixPath,$(ALT_JUNIT_DIR)) " >> $@.tmp
+  endif
+  ifdef ANT_HOME
+	@$(ECHO) " --with-ant-home=$(call UnixPath,$(ANT_HOME)) " >> $@.tmp
+  endif
+  ifdef ALT_JAVAFX_ZIP_DIR
+	@$(ECHO) " --with-javafx-zip-dir=$(call UnixPath,$(ALT_JAVAFX_ZIP_DIR)) " >> $@.tmp
+  endif
+  ifdef ALT_WIXDIR
+	@$(ECHO) " --with-wix=$(call UnixPath,$(ALT_WIXDIR)) " >> $@.tmp
+  endif
+  ifdef ALT_CCSS_SIGNING_DIR
+	@$(ECHO) " --with-ccss-signing=$(call UnixPath,$(ALT_CCSS_SIGNING_DIR)) " >> $@.tmp
+  endif
+  ifdef ALT_SLASH_JAVA
+	@$(ECHO) " --with-java-devtools=$(call UnixPath,$(ALT_SLASH_JAVA)/devtools) " >> $@.tmp
+  endif
+  ifdef ALT_SPARKLE_FRAMEWORK_DIR
+	@$(ECHO) " --with-sparkle-framework=$(call UnixPath,$(ALT_SPARKLE_FRAMEWORK_DIR)) " >> $@.tmp
+  endif 
+endif
+	@if [ -f $@ ] ; then \
+          if ! $(CMP) $@ $@.tmp > /dev/null ; then \
+            $(CP) $@.tmp $@ ; \
+          fi ; \
+        else \
+          $(CP) $@.tmp $@ ; \
+        fi
+	$(RM) $@.tmp
+
+PHONY_LIST += bridge2configure bridgeBuild
+
+###########################################################################
+# JPRT targets
+
+ifndef JPRT_ARCHIVE_BUNDLE
+  JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip
+endif
+ifndef JPRT_ARCHIVE_INSTALL_BUNDLE
+    JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip
+endif
+
+# These targets execute in a SPEC free context, before calling bridgeBuild
+# to generate the SPEC.
+jprt_build_product: DEBUG_LEVEL=release
+jprt_build_product: BUILD_DIRNAME=*-release
+jprt_build_product: jprt_build_generic
+
+jprt_build_fastdebug: DEBUG_LEVEL=fastdebug
+jprt_build_fastdebug: BUILD_DIRNAME=*-fastdebug
+jprt_build_fastdebug: jprt_build_generic
+
+jprt_build_debug: DEBUG_LEVEL=slowdebug
+jprt_build_debug: BUILD_DIRNAME=*-debug
+jprt_build_debug: jprt_build_generic
+
+jprt_build_generic: BRIDGE_TARGETS+=jprt_bundle
+jprt_build_generic: bridgeBuild
+
+# This target must be called in the context of a SPEC file
+jprt_bundle: $(JPRT_ARCHIVE_BUNDLE)
+	@$(call CheckIfMakeAtEnd)
+
+# This target must be called in the context of a SPEC file
+$(JPRT_ARCHIVE_BUNDLE): bundles
+	$(MKDIR) -p $(@D)
+	$(RM) $@
+	$(CP) $(BUILD_OUTPUT)/bundles/j2sdk-image.zip $@
+
+# This target must be called in the context of a SPEC file
+bundles: all
+	@$(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 .
+	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
+PHONY_LIST += jprt_build_product jprt_build_fastdebug jprt_build_debug \
+              jprt_build_generic bundles jprt_bundle
+
+###########################################################################
+# Phony targets
+.PHONY: $(PHONY_LIST)
+
+# Force target
+FRC:
--- a/common/makefiles/Main.gmk	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/makefiles/Main.gmk	Fri Feb 08 23:19:43 2013 -0800
@@ -65,7 +65,15 @@
 
 ### Main targets
 
-all: jdk
+default: jdk
+	@$(call CheckIfMakeAtEnd)
+
+all: images docs
+	@$(call CheckIfMakeAtEnd)
+
+ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_BITS),solaris-64)
+  all: overlay-images
+endif
 
 start-make:
 	@$(call AtMakeStart)
@@ -126,12 +134,6 @@
 	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk overlay-images)
 	@$(call TargetExit)
 
-bundles: images bundles-only
-bundles-only: start-make
-	@$(call TargetEnter)
-	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk bundles)
-	@$(call TargetExit)
-
 install: images install-only
 install-only: start-make
 	@$(call TargetEnter)
@@ -144,6 +146,12 @@
 	@($(CD) $(SRC_ROOT)/common/makefiles/javadoc && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs)
 	@$(call TargetExit)
 
+sign-jars: jdk sign-jars-only
+sign-jars-only: start-make
+	@$(call TargetEnter)
+	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk sign-jars)
+	@$(call TargetExit)
+
 bootcycle-images:
 	@$(ECHO) Boot cycle build step 1: Building the JDK image normally
 	@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) SPEC=$(SPEC) images)
--- a/common/makefiles/MakeBase.gmk	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/makefiles/MakeBase.gmk	Fri Feb 08 23:19:43 2013 -0800
@@ -391,4 +391,46 @@
 endef
 endif
 
+# Convenience functions for working around make's limitations with $(filter ).
+containing = $(foreach v,$2,$(if $(findstring $1,$v),$v))
+not-containing = $(foreach v,$2,$(if $(findstring $1,$v),,$v))
+
+################################################################################
+# In Cygwin, finds are very costly, both because of expensive forks and because
+# of bad file system caching. Find is used extensively in $(shell) commands to
+# find source files. This makes rerunning make with no or few changes rather 
+# expensive. To speed this up, these two macros are used to cache the results
+# of simple find commands for reuse.
+# 
+# Runs a find and stores both the directories where it was run and the results.
+# This macro can be called multiple times to add to the cache. Only finds files
+# with no filters.
+#
+# Needs to be called with $(eval )
+# 
+# Param 1 - Dir to find in
+ifeq ($(OPENJDK_BUILD_OS),windows)
+define FillCacheFind
+    FIND_CACHE_DIR += $1
+    FIND_CACHE := $$(sort $$(FIND_CACHE) $$(shell $(FIND) $1 -type f -o -type l))
+endef
+else
+define FillCacheFind
+endef
+endif
+
+# Mimics find by looking in the cache if all of the directories have been cached.
+# Otherwise reverts to shell find. This is safe to call on all platforms, even if
+# cache is deactivated.
+#
+# The extra - is needed when FIND_CACHE_DIR is empty but should be harmless.
+# Param 1 - Dirs to find in
+define CacheFind
+    $(if $(filter-out $(addsuffix %,- $(FIND_CACHE_DIR)),$1),\
+        $(shell $(FIND) $1 -type f -o -type l),\
+        $(filter $(addsuffix %,$1),$(FIND_CACHE)))
+endef
+
+################################################################################
+
 endif # _MAKEBASE_GMK
--- a/common/makefiles/MakeHelpers.gmk	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/makefiles/MakeHelpers.gmk	Fri Feb 08 23:19:43 2013 -0800
@@ -50,7 +50,7 @@
 
 # Global targets are possible to run either with or without a SPEC. The prototypical
 # global target is "help". 
-global_targets=help configure
+global_targets=help jprt% bridgeBuild
 
 ##############################
 # Functions
@@ -112,7 +112,7 @@
 
 # Do not indent this function, this will add whitespace at the start which the caller won't handle
 define GetRealTarget
-$(strip $(if $(MAKECMDGOALS),$(MAKECMDGOALS),all))
+$(strip $(if $(MAKECMDGOALS),$(MAKECMDGOALS),default))
 endef
 
 # Do not indent this function, this will add whitespace at the start which the caller won't handle
@@ -126,10 +126,7 @@
     # Check if the current target is the last goal
     $(if $(filter $@,$(call LastGoal)),$(call AtMakeEnd))
     # If the target is 'foo-only', check if our goal was stated as 'foo'
-    $(if $(filter $(patsubst %-only,%,$@),$(call LastGoal)),$(call AtMakeEnd))
-    # If no goal is given, 'all' is default, but the last target executed for all is 'jdk-only'. Check for that, too.
-    # At most one of the tests can be true.
-    $(if $(subst all,,$(call LastGoal)),,$(if $(filter $@,jdk-only),$(call AtMakeEnd)))
+    $(if $(filter $@,$(call LastGoal)-only),$(call AtMakeEnd))
 endef
 
 # Hook to be called when starting to execute a top-level target
--- a/common/makefiles/Makefile	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/makefiles/Makefile	Fri Feb 08 23:19:43 2013 -0800
@@ -23,109 +23,4 @@
 # questions.
 #
 
-# This must be the first rule
-all:
-
-# Inclusion of this pseudo-target will cause make to execute this file
-# serially, regardless of -j. Recursively called makefiles will not be
-# affected, however. This is required for correct dependency management.
-.NOTPARALLEL:
-
-# The shell code below will be executed on /usr/ccs/bin/make on Solaris, but not in GNU make.
-# /usr/ccs/bin/make lacks basically every other flow control mechanism.
-TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a requirement. Check your path. 1>&2 && exit 1
-
-# Assume we have GNU make, but check version.
-ifeq (,$(findstring 3.81,$(MAKE_VERSION)))
-    ifeq (,$(findstring 3.82,$(MAKE_VERSION)))
-        $(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.)
-    endif
-endif
-
-# Locate this Makefile
-ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
-    makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
-else
-    makefile_path:=$(lastword $(MAKEFILE_LIST))
-endif
-root_dir:=$(patsubst %/common/makefiles/Makefile,%,$(makefile_path))
-
-# ... and then we can include our helper functions
-include $(dir $(makefile_path))/MakeHelpers.gmk
-
-$(eval $(call ParseLogLevel))
-$(eval $(call ParseConfAndSpec))
-
-# Now determine if we have zero, one or several configurations to build.
-ifeq ($(SPEC),)
-    # Since we got past ParseConfAndSpec, we must be building a global target. Do nothing.
-else
-    ifeq ($(words $(SPEC)),1)
-        # We are building a single configuration. This is the normal case. Execute the Main.gmk file.
-        include $(dir $(makefile_path))/Main.gmk
-    else
-        # We are building multiple configurations.
-        # First, find out the valid targets
-        # Run the makefile with an arbitraty SPEC using -p -q (quiet dry-run and dump rules) to find
-        # available PHONY targets. Use this list as valid targets to pass on to the repeated calls.
-        all_phony_targets=$(filter-out $(global_targets), $(strip $(shell \
-            $(MAKE) -p -q -f  $(makefile_path) SPEC=$(firstword $(SPEC)) | \
-            grep ^.PHONY: | head -n 1 | cut -d " " -f 2-)))
-
-$(all_phony_targets):
-	@$(foreach spec,$(SPEC),($(MAKE) -f $(makefile_path) SPEC=$(spec) $(VERBOSE) VERBOSE=$(VERBOSE) $@) &&) true
-
-    endif
-endif
-
-# Here are "global" targets, i.e. targets that can be executed without specifying a single configuration.
-# If you addd more global targets, please update the variable global_targets in MakeHelpers.
-
-help:
-	$(info )
-	$(info OpenJDK Makefile help)
-	$(info =====================)
-	$(info )
-	$(info Common make targets)
-	$(info .  make [all]             # Compile all code but do not create images)
-	$(info .  make images            # Create complete j2sdk and j2re images)
-	$(info .  make overlay-images    # Create limited images for sparc 64 bit platforms)
-	$(info .  make bootcycle-images  # Build images twice, second time with newly build JDK)
-	$(info .  make install           # Install the generated images locally)
-	$(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 specific components)
-	$(info (Component is any of langtools, corba, jaxp, jaxws, hotspot, jdk, images or overlay-images))
-	$(info .  make <component>       # Build <component> and everything it depends on. )
-	$(info .  make <component>-only  # Build <component> only, without dependencies. This)
-	$(info .                         # is faster but can result in incorrect build results!)
-	$(info .  make clean-<component> # Remove files generated by make for <component>)
-	$(info )
-	$(info Useful make variables)
-	$(info .  make CONF=             # Build all configurations (note, assignment is empty))
-	$(info .  make CONF=<substring>  # Build the configuration(s) with a name matching)
-	$(info .                         # <substring>)
-	$(info )
-	$(info .  make LOG=<loglevel>    # Change the log level from warn to <loglevel>)
-	$(info .                         # Available log levels are:)
-	$(info .                         # 'warn' (default), 'info', 'debug' and 'trace')
-	$(info .                         # To see executed command lines, use LOG=debug)
-	$(info )
-	$(info .  make JOBS=<n>          # Run <n> parallel make jobs)
-	$(info .                         # Note that -jN does not work as expected!)
-	$(info )
-	$(info .  make test TEST=<test>  # Only run the given test or tests, e.g.)
-	$(info .                         # make test TEST="jdk_lang jdk_net")
-	$(info )
-
-configure:
-	@$(SHELL) $(root_dir)/configure $(CONFIGURE_ARGS)
-	@echo ====================================================
-	@echo "Note: This is a non-recommended way of running configure."
-	@echo "Instead, run 'sh configure' in the top-level directory"
-
-.PHONY: help configure
+include ../../NewMakefile.gmk
--- a/common/makefiles/NativeCompilation.gmk	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/makefiles/NativeCompilation.gmk	Fri Feb 08 23:19:43 2013 -0800
@@ -236,7 +236,7 @@
     $$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupNativeCompilation $1 contains missing directory $$d)))
 
     # Find all files in the source trees. Sort to remove duplicates.
-    $1_ALL_SRCS := $$(sort $$(shell $(FIND) $$($1_SRC) -type f))
+    $1_ALL_SRCS := $$(sort $$(call CacheFind,$$($1_SRC)))
     # Extract the C/C++ files.
     $1_EXCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_EXCLUDE_FILES)))
     $1_INCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
--- a/common/makefiles/RMICompilation.gmk	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/makefiles/RMICompilation.gmk	Fri Feb 08 23:19:43 2013 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/common/makefiles/javadoc/CORE_PKGS.gmk	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/makefiles/javadoc/CORE_PKGS.gmk	Fri Feb 08 23:19:43 2013 -0800
@@ -127,10 +127,16 @@
   java.sql                                       \
   java.text                                      \
   java.text.spi                                  \
+  java.time                                      \
+  java.time.temporal                             \
+  java.time.calendar                             \
+  java.time.format                               \
+  java.time.zone                                 \
   java.util                                      \
   java.util.concurrent                           \
   java.util.concurrent.atomic                    \
   java.util.concurrent.locks                     \
+  java.util.function                             \
   java.util.jar                                  \
   java.util.logging                              \
   java.util.prefs                                \
--- a/common/makefiles/javadoc/Javadoc.gmk	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/makefiles/javadoc/Javadoc.gmk	Fri Feb 08 23:19:43 2013 -0800
@@ -1,4 +1,4 @@
-# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -32,8 +32,6 @@
 # Definitions for $(DOCSDIR), $(MKDIR), $(BINDIR), etc.
 #
 
-CLASSPATH_SEPARATOR = :
-
 DOCSDIR=$(OUTPUT_ROOT)/docs
 TEMPDIR=$(OUTPUT_ROOT)/docstemp
 
@@ -137,7 +135,7 @@
 # List of all possible directories for javadoc to look for sources
 #    NOTE: Quotes are required around sourcepath argument only on Windows.
 #          Otherwise, you get "No packages or classes specified." due 
-#          to $(CLASSPATH_SEPARATOR) being interpreted as an end of 
+#          to $(PATH_SEP) being interpreted as an end of 
 #          command (newline or shell ; character)
 ALL_SOURCE_DIRS = $(JDK_SHARE_CLASSES) \
                   $(JDK_IMPSRC) \
@@ -154,7 +152,7 @@
 EMPTY:=
 SPACE:= $(EMPTY) $(EMPTY)
 RELEASEDOCS_SOURCEPATH = \
-    $(subst $(SPACE),$(CLASSPATH_SEPARATOR),$(strip $(ALL_SOURCE_DIRS)))
+    $(subst $(SPACE),$(PATH_SEP),$(strip $(ALL_SOURCE_DIRS)))
 
 define prep-target
 $(MKDIR) -p $(@D)
@@ -271,6 +269,7 @@
 		-quiet					\
                 -use					\
                 -keywords				\
+		-Xdoclint:none				\
 		$(ADDITIONAL_JAVADOCFLAGS)
 
 ifdef OPENJDK
--- a/common/makefiles/javadoc/NON_CORE_PKGS.gmk	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/makefiles/javadoc/NON_CORE_PKGS.gmk	Fri Feb 08 23:19:43 2013 -0800
@@ -78,7 +78,8 @@
 
 JCONSOLE_PKGS    = com.sun.tools.jconsole
 
-TREEAPI_PKGS 	 = com.sun.source.tree \
+TREEAPI_PKGS 	 = com.sun.source.doctree \
+		   com.sun.source.tree \
 		   com.sun.source.util
 
 SMARTCARDIO_PKGS = javax.smartcardio
--- a/common/src/fixpath.c	Fri Dec 14 16:11:33 2012 -0800
+++ b/common/src/fixpath.c	Fri Feb 08 23:19:43 2013 -0800
@@ -29,6 +29,29 @@
 #include <string.h>
 #include <malloc.h>
 
+void report_error()
+{
+  LPVOID lpMsgBuf;
+  DWORD dw = GetLastError();
+
+  FormatMessage(
+      FORMAT_MESSAGE_ALLOCATE_BUFFER |
+      FORMAT_MESSAGE_FROM_SYSTEM |
+      FORMAT_MESSAGE_IGNORE_INSERTS,
+      NULL,
+      dw,
+      MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+      (LPTSTR) &lpMsgBuf,
+      0,
+      NULL);
+
+  fprintf(stderr,
+          "Could not start process!  Failed with error %d: %s\n",
+          dw, lpMsgBuf);
+
+  LocalFree(lpMsgBuf);
+}
+
 /*
  * Test if pos points to /cygdrive/_/ where _ can
  * be any character.
@@ -256,7 +279,7 @@
     DWORD exitCode;
 
     if (argc<3 || argv[1][0] != '-' || (argv[1][1] != 'c' && argv[1][1] != 'm')) {
-        fprintf(stderr, "Usage: fixpath -c|m<path@path@...> /cygdrive/c/WINDOWS/notepad.exe /cygdrive/c/x/test.txt");
+        fprintf(stderr, "Usage: fixpath -c|m<path@path@...> /cygdrive/c/WINDOWS/notepad.exe /cygdrive/c/x/test.txt\n");
         exit(0);
     }
 
@@ -308,11 +331,10 @@
                        0,
                        &si,
                        &pi);
-    if(!rc)
-    {
-      //Could not start process;
-      fprintf(stderr, "Could not start process!\n");
-      exit(-1);
+    if(!rc) {
+      // Could not start process for some reason.  Try to report why:
+      report_error();
+      exit(rc);
     }
 
     WaitForSingleObject(pi.hProcess,INFINITE);
--- a/get_source.sh	Fri Dec 14 16:11:33 2012 -0800
+++ b/get_source.sh	Fri Feb 08 23:19:43 2013 -0800
@@ -26,8 +26,8 @@
 #
 
 # Get clones of all nested repositories
-sh ./make/scripts/hgforest.sh clone $*
+sh ./common/bin/hgforest.sh clone "$@"
 
 # Update all existing repositories to the latest sources
-sh ./make/scripts/hgforest.sh pull -u
+sh ./common/bin/hgforest.sh pull -u
 
--- a/make/install-rules.gmk	Fri Dec 14 16:11:33 2012 -0800
+++ b/make/install-rules.gmk	Fri Feb 08 23:19:43 2013 -0800
@@ -96,6 +96,9 @@
 combo_build:
 	@$(ECHO) $@ installer combo build started: `$(DATE) '+%y-%m-%d %H:%M'`
 	$(CD) $(INSTALL_TOPDIR)/make/installer/bundles/windows/ishield/wrapper/wrapper.jreboth ; $(MAKE) all
+	$(CD) $(INSTALL_TOPDIR)/make/installer/bundles/windows/ishield/wrapper/wrapper.new64jre ; $(MAKE) all
+	$(CD) $(INSTALL_TOPDIR)/make/installer/bundles/windows/ishield/jre ; $(MAKE) au_combo
+	$(CD) $(INSTALL_TOPDIR)/make/installer/bundles/windows/xmlinffile ; $(MAKE) all
 
 install-clobber:
 ifeq ($(BUILD_INSTALL), true)
--- a/make/jprt.properties	Fri Dec 14 16:11:33 2012 -0800
+++ b/make/jprt.properties	Fri Feb 08 23:19:43 2013 -0800
@@ -28,6 +28,9 @@
 # Locked down to jdk8
 jprt.tools.default.release=jdk8
 
+# Unix toolkit to use for building on windows
+jprt.windows.jdk8.build.unix.toolkit=cygwin
+
 # The different build flavors we want, we override here so we just get these 2
 jprt.build.flavors=product,fastdebug
 
@@ -93,6 +96,7 @@
     ${jprt.my.test.target.set:TESTNAME=jdk_text},		\
     ${jprt.my.test.target.set:TESTNAME=jdk_tools},              \
     ${jprt.my.test.target.set:TESTNAME=jdk_jfr},                \
+    ${jprt.my.test.target.set:TESTNAME=jdk_time},               \
     ${jprt.my.test.target.set:TESTNAME=jdk_other}
 
 # All vm test targets (testset=all)
--- a/test/Makefile	Fri Dec 14 16:11:33 2012 -0800
+++ b/test/Makefile	Fri Feb 08 23:19:43 2013 -0800
@@ -64,7 +64,8 @@
 	jdk_nio \
 	jdk_security1 \
 	jdk_text  \
-	jdk_util
+	jdk_util  \
+	jdk_time
 
 # These tests are not part of the default testing list
 JDK_NONDEFAULT_TEST_LIST = \