changeset 6597:c9fd61d23dbe

Merge
author lana
date Tue, 06 Nov 2012 18:41:01 -0800
parents bff9db7ca352 6ffd64541a6c
children a1bbb8805e22
files makefiles/docs/CORE_PKGS.gmk makefiles/docs/Makefile makefiles/docs/NON_CORE_PKGS.gmk makefiles/docs/Notes.html makefiles/mapfiles/launchers/mapfile-amd64 makefiles/mapfiles/launchers/mapfile-i586 makefiles/mapfiles/libawt_headless/reorder-i586 makefiles/mapfiles/libjava/reorder-i586 makefiles/mapfiles/libjpeg/reorder-i586 makefiles/mapfiles/libnio/mapfile-bsd makefiles/mapfiles/libnio/reorder-i586 makefiles/mapfiles/libverify/reorder-i586 makefiles/mapfiles/libzip/reorder-i586 makefiles/sun/xawt/ToBin.java
diffstat 109 files changed, 7213 insertions(+), 4957 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Wed Nov 07 09:58:39 2012 +0900
+++ b/.hgtags	Tue Nov 06 18:41:01 2012 -0800
@@ -184,3 +184,4 @@
 cec8fa02f15634acd7d02d04b0b2d8c044cdbaaa jdk8-b60
 61ddb3fd000a09ab05bff1940b0ac211661e94cf jdk8-b61
 50b8b17449d200c66bfd68fb4f3a9197432c9e2b jdk8-b62
+f117a3e06f78a258074674ad17601f99bcb1ce0d jdk8-b63
--- a/make/sun/cmm/lcms/FILES_c_unix.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/make/sun/cmm/lcms/FILES_c_unix.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -30,6 +30,7 @@
     cmserr.c \
     cmsgamma.c \
     cmsgmt.c \
+    cmshalf.c \
     cmsintrp.c \
     cmsio0.c \
     cmsio1.c \
--- a/make/sun/cmm/lcms/FILES_c_windows.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/make/sun/cmm/lcms/FILES_c_windows.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -30,6 +30,7 @@
     cmserr.c \
     cmsgamma.c \
     cmsgmt.c \
+    cmshalf.c \
     cmsintrp.c \
     cmsio0.c \
     cmsio1.c \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/BuildJdk.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -0,0 +1,124 @@
+#
+# Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# This must be the first rule
+default: 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:
+
+include $(SPEC)
+include MakeBase.gmk
+include JavaCompilation.gmk
+include NativeCompilation.gmk
+
+# Setup the java compilers for the JDK build.
+include Setup.gmk
+
+# Setup the build tools.
+include Tools.gmk
+
+import: $(BUILD_TOOLS) import-only
+import-only:
+#       Import (corba jaxp jaxws langtools hotspot)
+	+$(MAKE) -f Import.gmk
+
+gensrc: import gensrc-only
+gensrc-only:
+	+$(MAKE) -f GenerateJavaSources.gmk
+#       Ok, now gensrc is fully populated.
+
+gendata: gensrc gendata-only
+gendata-only:
+	+$(MAKE) -f GenerateData.gmk
+
+classes: gendata classes-only
+classes-only:
+	+$(MAKE) -f CompileJavaClasses.gmk
+#       The classes are now built and
+#       any javah files have now been generated.
+
+libs: classes libs-only
+libs-only:
+	+$(MAKE) -f CompileNativeLibraries.gmk
+
+launchers: libs launchers-only
+launchers-only:
+#       Finally compile the launchers.
+	+$(MAKE) -f CompileLaunchers.gmk
+
+genclasses: launchers genclasses-only
+genclasses-only:
+#	Generate classes that have other sources. Needs
+#       to execute launchers.
+	+$(MAKE) -f GenerateClasses.gmk
+
+jdk: genclasses
+#       Now we have a complete jdk, which you can run.
+#       It is not yet wrapped up as an installed image.
+
+demos:
+#       The demos are compiled against this jdk.
+	+$(MAKE) -f CompileDemos.gmk
+#	Now copy the sample sources into the jdk.
+	+$(MAKE) -f CopySamples.gmk
+
+# Create the final jdk and jre images, to be wrapped up
+# into packages, or installed.
+images:
+	+$(MAKE) -f CreateJars.gmk
+	+$(MAKE) -f Images.gmk 
+
+overlay-images:
+	+$(MAKE) -f CompileLaunchers.gmk OVERLAY_IMAGES=true
+	+$(MAKE) -f Images.gmk overlay-images
+
+# Create platform specific image layouts
+bundles:
+	+$(MAKE) -f Bundles.gmk
+
+BINARIES:=$(notdir $(wildcard $(IMAGES_OUTPUTDIR)/j2sdk-image/bin/*))
+INSTALLDIR:=openjdk-$(RELEASE)
+
+# Install the jdk image, in a very crude way. Not taking into
+# account, how to install properly on macosx or windows etc.
+install:
+	echo Installing jdk image into $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
+	echo and creating $(words $(BINARIES)) links from $(INSTALL_PREFIX)/bin into the jdk.
+	$(MKDIR) -p $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
+	$(RM) -r $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/*
+	$(CP) -rp $(IMAGES_OUTPUTDIR)/j2sdk-image/* $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
+	$(MKDIR) -p $(INSTALL_PREFIX)/bin
+	$(RM) $(addprefix $(INSTALL_PREFIX)/bin/,$(BINARIES))
+	$(foreach b,$(BINARIES),$(LN) -s $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/bin/$b $(INSTALL_PREFIX)/bin/$b &&) true
+
+# The all target builds the JDK, but not the images
+all: jdk
+
+.PHONY: import gensrc gendata classes libs launchers genclasses
+.PHONY: import-only gensrc-only gendata-only classes-only libs-only launchers-only genclasses-only
+.PHONY: all jdk demos images overlay-images bundles install
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/Bundles.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -0,0 +1,141 @@
+#
+# 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.
+#
+
+include $(SPEC)
+include MakeBase.gmk
+
+default: bundles
+
+# Only macosx has bundles defined.
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+
+bundles: jre-bundle jdk-bundle
+
+
+JDK_BUNDLE_DIR := $(IMAGES_OUTPUTDIR)/j2sdk-bundle/jdk$(JDK_VERSION).jdk/Contents
+JRE_BUNDLE_DIR := $(IMAGES_OUTPUTDIR)/j2re-bundle/jre$(JDK_VERSION).jre/Contents
+
+MACOSX_SRC := $(JDK_TOPDIR)/src/macosx
+
+# All these OPENJDK checks are needed since there is no coherency between
+# these values in open and closed. Should probably be fixed.
+ifndef OPENJDK
+    BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(JDK_MINOR_VERSION)u$(JDK_UPDATE_VERSION)
+else
+    BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE)
+endif
+BUNDLE_ID_JRE := $(BUNDLE_ID).jre
+BUNDLE_ID_JDK := $(BUNDLE_ID).jdk
+
+BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_MINOR_VERSION)
+BUNDLE_NAME_JRE := $(BUNDLE_NAME)
+BUNDLE_NAME_JDK := $(BUNDLE_NAME)
+
+ifndef OPENJDK
+    BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_VERSION)
+else
+    BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) ($(JDK_VERSION))
+endif
+BUNDLE_INFO_JRE := $(BUNDLE_INFO)
+BUNDLE_INFO_JDK := $(BUNDLE_INFO)
+
+BUNDLE_PLATFORM_VERSION := $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION)
+BUNDLE_VERSION := $(JDK_VERSION)
+ifeq ($(COMPANY_NAME),N/A)
+    BUNDLE_VENDOR := UNDEFINED
+else
+    BUNDLE_VENDOR := $(COMPANY_NAME)
+endif
+
+
+JDK_FILE_LIST := $(shell $(FIND) $(IMAGES_OUTPUTDIR)/j2sdk-image ! -type d)
+JRE_FILE_LIST := $(shell $(FIND) $(IMAGES_OUTPUTDIR)/j2re-image ! -type d)
+
+JDK_TARGET_LIST := $(subst $(IMAGES_OUTPUTDIR)/j2sdk-image,$(JDK_BUNDLE_DIR)/Home,$(JDK_FILE_LIST))
+JRE_TARGET_LIST := $(subst $(IMAGES_OUTPUTDIR)/j2re-image,$(JRE_BUNDLE_DIR)/Home,$(JRE_FILE_LIST))
+
+# The old builds implementation of this did not preserve symlinks so
+# make sure they are followed and the contents copied instead.
+# To fix this, just replace copy with install-file macro.
+$(JDK_BUNDLE_DIR)/Home/%: $(IMAGES_OUTPUTDIR)/j2sdk-image/%
+	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(MKDIR) -p $(@D)
+	$(CP) -f -R -L '$<' '$@'
+
+$(JRE_BUNDLE_DIR)/Home/%: $(IMAGES_OUTPUTDIR)/j2re-image/%
+	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(MKDIR) -p $(@D)
+	$(CP) -f -R -L '$<' '$@'
+
+$(JDK_BUNDLE_DIR)/MacOS/libjli.dylib:
+	$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(MKDIR) -p $(@D)
+	$(RM) $@
+	$(LN) -s ../Home/lib/jli/libjli.dylib $@
+
+$(JRE_BUNDLE_DIR)/MacOS/libjli.dylib:
+	$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(MKDIR) -p $(@D)
+	$(RM) $@
+	$(LN) -s ../Home/lib/jli/libjli.dylib $@
+
+$(JDK_BUNDLE_DIR)/Info.plist: $(SPEC)
+	$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(MKDIR) -p $(@D)
+	$(SED)  -e "s/@@ID@@/$(BUNDLE_ID_JDK)/g" \
+		-e "s/@@NAME@@/$(BUNDLE_NAME_JDK)/g" \
+		-e "s/@@INFO@@/$(BUNDLE_INFO_JDK)/g" \
+		-e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" \
+		-e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" \
+		-e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" \
+		< $(MACOSX_SRC)/bundle/JDK-Info.plist > $@
+
+$(JRE_BUNDLE_DIR)/Info.plist: $(SPEC)
+	$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(MKDIR) -p $(@D)
+	$(SED)  -e "s/@@ID@@/$(BUNDLE_ID_JRE)/g" \
+		-e "s/@@NAME@@/$(BUNDLE_NAME_JRE)/g" \
+		-e "s/@@INFO@@/$(BUNDLE_INFO_JRE)/g" \
+		-e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" \
+		-e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" \
+		-e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" \
+		< $(MACOSX_SRC)/bundle/JRE-Info.plist > $@
+
+jdk-bundle: $(JDK_TARGET_LIST) $(JDK_BUNDLE_DIR)/MacOS/libjli.dylib \
+		$(JDK_BUNDLE_DIR)/Info.plist
+	$(SETFILE) -a B $(dir $(JDK_BUNDLE_DIR))
+
+jre-bundle: $(JRE_TARGET_LIST) $(JRE_BUNDLE_DIR)/MacOS/libjli.dylib \
+		$(JRE_BUNDLE_DIR)/Info.plist
+	$(SETFILE) -a B $(dir $(JRE_BUNDLE_DIR))
+
+else # Not macosx
+
+bundles:
+	$(ECHO) "No bundles defined for $(OPENJDK_TARGET_OS)"
+
+endif # macosx
+
+.PHONY: jdk-bundle jre-bundle bundles
--- a/makefiles/CompileDemos.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/CompileDemos.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -107,10 +107,7 @@
         $1_JARFILE := $1.jar
     endif
 
-    # Compile java classes if there are any.
-    $1_JAVA_FILES_EXIST := $$(shell $$(FIND) $$($1_MAIN_SRC) -name "*.java")
-
-    ifneq ($$($1_JAVA_FILES_EXIST),)
+    ifeq ($(findstring $1,Laffy SwingSet3),)
         $$(eval $$(call SetupJavaCompilation,BUILD_DEMO_$1,\
                 SETUP:=GENERATE_USINGJDKBYTECODE,\
                 ADD_JAVAC_FLAGS:=$3,\
@@ -264,9 +261,9 @@
 		LDFLAGS_SUFFIX_linux:=$8,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$$(RC_FLAGS) \
-			  /D "JDK_FNAME=$1.dll" \
-			  /D "JDK_INTERNAL_NAME=$1" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=$1.dll" \
+			  -D "JDK_INTERNAL_NAME=$1" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/demoobjs/jvmti/$1,\
 		OUTPUT_DIR:=$(JDK_OUTPUTDIR)/demo/jvmti/$1/lib,\
 		LIBRARY:=$1))
@@ -456,7 +453,7 @@
     $(JDK_OUTPUTDIR)/demo/_the.db.unzipped: $(DB_DEMO_ZIPFILE)
 	$(MKDIR) -p $(@D)
 	$(RM) -r $(JDK_OUTPUTDIR)/demo/db $(JDK_OUTPUTDIR)/demo/demo
-	$(CD) $(JDK_OUTPUTDIR)/demo && $(UNZIP) -o $<
+	$(CD) $(JDK_OUTPUTDIR)/demo && $(UNZIP) -q -o $<
 	$(MV) $(JDK_OUTPUTDIR)/demo/demo $(JDK_OUTPUTDIR)/demo/db
 	$(TOUCH) $@
 
--- a/makefiles/CompileJavaClasses.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/CompileJavaClasses.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -76,9 +76,14 @@
 	SolarisAclFileAttributeView.java \
 	SolarisLoginModule.java \
 	SolarisSystem.java \
+        sun/nio/ch/DevPollArrayWrapper.java \
+        sun/nio/ch/DevPollSelectorImpl.java \
+        sun/nio/ch/DevPollSelectorProvider.java \
 	sun/nio/ch/EventPortSelectorImpl.java \
 	sun/nio/ch/EventPortSelectorProvider.java \
 	sun/nio/ch/EventPortWrapper.java \
+        sun/nio/ch/SolarisAsynchronousChannelProvider.java \
+        sun/nio/ch/SolarisEventPort.java \
 	sun/tools/attach/SolarisAttachProvider.java \
 	sun/tools/attach/SolarisVirtualMachine.java
 endif
@@ -105,18 +110,27 @@
 
 ifneq ($(OPENJDK_TARGET_OS),linux)
     EXFILES+=sun/tools/attach/LinuxAttachProvider.java \
-	sun/tools/attach/LinuxVirtualMachine.java \
-	sun/nio/fs/LinuxDosFileAttributeView.java \
-	sun/nio/fs/LinuxFileStore.java \
-	sun/nio/fs/LinuxFileSystem.java \
-	sun/nio/fs/LinuxFileSystemProvider.java \
-	sun/nio/fs/LinuxNativeDispatcher.java \
-	sun/nio/fs/LinuxUserDefinedFileAttributeView.java \
-	sun/nio/fs/LinuxWatchService.java
+	     sun/tools/attach/LinuxVirtualMachine.java \
+             sun/nio/ch/EPoll.java \
+             sun/nio/ch/EPollArrayWrapper.java \
+             sun/nio/ch/EPollPort.java \
+             sun/nio/ch/EPollSelectorImpl.java \
+             sun/nio/ch/EPollSelectorProvider.java \
+             sun/nio/ch/LinuxAsynchronousChannelProvider.java \
+	     sun/nio/fs/LinuxDosFileAttributeView.java \
+	     sun/nio/fs/LinuxFileStore.java \
+	     sun/nio/fs/LinuxFileSystem.java \
+	     sun/nio/fs/LinuxFileSystemProvider.java \
+	     sun/nio/fs/LinuxNativeDispatcher.java \
+	     sun/nio/fs/LinuxUserDefinedFileAttributeView.java \
+	     sun/nio/fs/LinuxWatchService.java
 endif
 
 ifneq ($(OPENJDK_TARGET_OS),macosx)
-    EXFILES+=sun/nio/fs/BsdFileStore.java \
+    EXFILES+=sun/nio/ch/BsdAsynchronousChannelProvider.java \
+             sun/nio/ch/KQueue.java \
+             sun/nio/ch/KQueuePort.java \
+             sun/nio/fs/BsdFileStore.java \
 	     sun/nio/fs/BsdFileSystem.java \
              sun/nio/fs/BsdFileSystemProvider.java \
              sun/nio/fs/BsdNativeDispatcher.java \
@@ -147,51 +161,48 @@
 endif
 
 ifneq ($(OPENJDK_TARGET_OS), macosx)
-#
-# Not in rt.jar on solaris and linux...(windows not checked)
-#     in rt.jar on macosx ??
-EXFILES+=sun/awt/X11/ScreenFormat.java \
-         sun/awt/X11/XArc.java \
-         sun/awt/X11/XChar2b.java \
-         sun/awt/X11/XCharStruct.java \
-         sun/awt/X11/XClassHint.java \
-         sun/awt/X11/XComposeStatus.java \
-         sun/awt/X11/XExtCodes.java \
-         sun/awt/X11/XFontProp.java \
-         sun/awt/X11/XFontSetExtents.java \
-         sun/awt/X11/XFontStruct.java \
-         sun/awt/X11/XGCValues.java \
-         sun/awt/X11/XHostAddress.java \
-         sun/awt/X11/XIMCallback.java \
-         sun/awt/X11/XIMHotKeyTrigger.java \
-         sun/awt/X11/XIMHotKeyTriggers.java \
-         sun/awt/X11/XIMPreeditCaretCallbackStruct.java \
-         sun/awt/X11/XIMPreeditDrawCallbackStruct.java \
-         sun/awt/X11/XIMPreeditStateNotifyCallbackStruct.java \
-         sun/awt/X11/XIMStatusDrawCallbackStruct.java \
-         sun/awt/X11/XIMStringConversionCallbackStruct.java \
-         sun/awt/X11/XIMStringConversionText.java \
-         sun/awt/X11/XIMStyles.java \
-         sun/awt/X11/XIMText.java \
-         sun/awt/X11/XIMValuesList.java \
-         sun/awt/X11/XImage.java \
-         sun/awt/X11/XKeyboardControl.java \
-         sun/awt/X11/XKeyboardState.java \
-         sun/awt/X11/XOMCharSetList.java \
-         sun/awt/X11/XOMFontInfo.java \
-         sun/awt/X11/XOMOrientation.java \
-         sun/awt/X11/XPoint.java \
-         sun/awt/X11/XRectangle.java \
-         sun/awt/X11/XSegment.java \
-         sun/awt/X11/XStandardColormap.java \
-         sun/awt/X11/XTextItem.java \
-         sun/awt/X11/XTextItem16.java \
-         sun/awt/X11/XTextProperty.java \
-         sun/awt/X11/XTimeCoord.java \
-         sun/awt/X11/XWindowChanges.java \
-         sun/awt/X11/XdbeSwapInfo.java \
-         sun/awt/X11/XmbTextItem.java \
-         sun/awt/X11/XwcTextItem.java
+    EXFILES+=sun/awt/X11/ScreenFormat.java \
+             sun/awt/X11/XArc.java \
+             sun/awt/X11/XChar2b.java \
+             sun/awt/X11/XCharStruct.java \
+             sun/awt/X11/XClassHint.java \
+             sun/awt/X11/XComposeStatus.java \
+             sun/awt/X11/XExtCodes.java \
+             sun/awt/X11/XFontProp.java \
+             sun/awt/X11/XFontSetExtents.java \
+             sun/awt/X11/XFontStruct.java \
+             sun/awt/X11/XGCValues.java \
+             sun/awt/X11/XHostAddress.java \
+             sun/awt/X11/XIMCallback.java \
+             sun/awt/X11/XIMHotKeyTrigger.java \
+             sun/awt/X11/XIMHotKeyTriggers.java \
+             sun/awt/X11/XIMPreeditCaretCallbackStruct.java \
+             sun/awt/X11/XIMPreeditDrawCallbackStruct.java \
+             sun/awt/X11/XIMPreeditStateNotifyCallbackStruct.java \
+             sun/awt/X11/XIMStatusDrawCallbackStruct.java \
+             sun/awt/X11/XIMStringConversionCallbackStruct.java \
+             sun/awt/X11/XIMStringConversionText.java \
+             sun/awt/X11/XIMStyles.java \
+             sun/awt/X11/XIMText.java \
+             sun/awt/X11/XIMValuesList.java \
+             sun/awt/X11/XImage.java \
+             sun/awt/X11/XKeyboardControl.java \
+             sun/awt/X11/XKeyboardState.java \
+             sun/awt/X11/XOMCharSetList.java \
+             sun/awt/X11/XOMFontInfo.java \
+             sun/awt/X11/XOMOrientation.java \
+             sun/awt/X11/XPoint.java \
+             sun/awt/X11/XRectangle.java \
+             sun/awt/X11/XSegment.java \
+             sun/awt/X11/XStandardColormap.java \
+             sun/awt/X11/XTextItem.java \
+             sun/awt/X11/XTextItem16.java \
+             sun/awt/X11/XTextProperty.java \
+             sun/awt/X11/XTimeCoord.java \
+             sun/awt/X11/XWindowChanges.java \
+             sun/awt/X11/XdbeSwapInfo.java \
+             sun/awt/X11/XmbTextItem.java \
+             sun/awt/X11/XwcTextItem.java
 endif
 
 # Exclude another implicitly not included file.
@@ -229,31 +240,24 @@
     EXFILES+=sun/net/www/protocol/http/ntlm/NTLMAuthSequence.java
 endif
 
-ifdef DISABLE_NIMBUS
-    # TODO: need to check when it happens
-    # Exclude nimus if disabled
-    EXCLUDES+=	javax/swing/plaf/nimbus \
-		com/sun/java/swing/plaf/nimbus
-else
-#
-# These are never put into rt.jar
-#
-EXFILES+=  javax/swing/plaf/nimbus/InternalFrameTitlePanePainter.java \
-           javax/swing/plaf/nimbus/OptionPaneMessageAreaPainter.java \
-           javax/swing/plaf/nimbus/ScrollBarPainter.java \
-           javax/swing/plaf/nimbus/SliderPainter.java \
-           javax/swing/plaf/nimbus/SpinnerPainter.java \
-           javax/swing/plaf/nimbus/SplitPanePainter.java \
-           javax/swing/plaf/nimbus/TabbedPanePainter.java
-endif
+# Exclude nimbus files from rt.jar
+EXFILES+=javax/swing/plaf/nimbus/InternalFrameTitlePanePainter.java \
+				 javax/swing/plaf/nimbus/OptionPaneMessageAreaPainter.java \
+				 javax/swing/plaf/nimbus/ScrollBarPainter.java \
+				 javax/swing/plaf/nimbus/SliderPainter.java \
+				 javax/swing/plaf/nimbus/SpinnerPainter.java \
+				 javax/swing/plaf/nimbus/SplitPanePainter.java \
+				 javax/swing/plaf/nimbus/TabbedPanePainter.java
 
 # Acquire a list of files that should be copied straight over to the classes.
 include CopyIntoClasses.gmk
 # Now we have COPY_PATTERNS, COPY_FILES and COPY_EXTRA
 
 ifndef OPENJDK
-    CLOSED_SRC_DIRS:=$(JDK_TOPDIR)/src/closed/share/classes \
-		     $(JDK_TOPDIR)/src/closed/$(OPENJDK_TARGET_OS_API_DIR)/classes
+    CLOSED_SRC_DIRS:=$(JDK_TOPDIR)/src/closed/share/classes
+    ifneq ($(OPENJDK_TARGET_OS_API_DIR),windows)
+      CLOSED_SRC_DIRS += $(JDK_TOPDIR)/src/closed/$(OPENJDK_TARGET_OS_API_DIR)/classes
+    endif
 endif
 
 MACOSX_SRC_DIRS :=
@@ -294,7 +298,6 @@
 		     $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes \
 		     $(MACOSX_SRC_DIRS) \
 		     $(JDK_OUTPUTDIR)/gensrc \
-		     $(JDK_OUTPUTDIR)/gensrc_swing/javax/swing/beaninfo \
 		     $(CLOSED_SRC_DIRS),\
 		INCLUDES:=$(JDK_USER_DEFINED_FILTER),\
 		EXCLUDES:=$(EXCLUDES),\
@@ -327,7 +330,7 @@
 
 # Set prereqs to the java files since make doesn't know about the class files. Add BUILD_JDK
 # as an order only dependency to avoid race with the java compilation.
-$(JDK_OUTPUTDIR)/classes/_the.jdk.base.headers: $(JDK_BASE_HEADER_JAVA_FILES) | $(BUILD_JDK)
+$(JDK_OUTPUTDIR)/gensrc_headers/_the.jdk.base.headers: $(JDK_BASE_HEADER_JAVA_FILES) | $(BUILD_JDK)
 	$(ECHO) Generating headers for jdk base classes
 	$(JAVAH) -bootclasspath $(JDK_OUTPUTDIR)/classes -d $(JDK_OUTPUTDIR)/gensrc_headers \
 		$(JDK_BASE_HEADER_CLASSES)
@@ -417,6 +420,6 @@
 
 # copy with -a to preserve timestamps so dependencies down the line aren't messed up
 all: $(BUILD_JDK) $(JARS) $(COPY_EXTRA) $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin \
-	$(JDK_OUTPUTDIR)/classes/_the.jdk.base.headers
+	$(JDK_OUTPUTDIR)/gensrc_headers/_the.jdk.base.headers
 
 .PHONY: all
--- a/makefiles/CompileLaunchers.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/CompileLaunchers.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -1,557 +1,591 @@
-#
-# 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.
-#
-
-defalt: all
-
-include $(SPEC)
-include MakeBase.gmk
-include NativeCompilation.gmk
-
-# Setup the java compilers for the JDK build.
-include Setup.gmk
-
-# Build tools
-include Tools.gmk
-
-BUILD_LAUNCHERS=
-
-# When building a legacy overlay image (on solaris 64 bit), the launchers 
-# need to be built with a different rpath and a different output dir.
-ifeq ($(OVERLAY_IMAGES),true)
-    ORIGIN_ROOT:=/../..
-    OUTPUT_SUBDIR:=$(OPENJDK_TARGET_CPU_ISADIR)
-else
-    ORIGIN_ROOT:=/..
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-    ORIGIN_ARG:=$(call SET_EXECUTABLE_ORIGIN)
-else
-    ORIGIN_ARG:=$(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli) \
-                $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli)
-endif
-
-#
-# Applications expect to be able to link against libjawt without invoking
-# System.loadLibrary("jawt") first. This was the behaviour described in the
-# devloper documentation of JAWT and what worked with OpenJDK6.
-#
-ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris),)
-    ORIGIN_ARG+=$(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR)) \
-                $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)) 
-endif
-
-define SetupLauncher
-    # TODO: Fix mapfile on solaris. Won't work with ld as linker.
-    # Parameter 1 is the name of the launcher (java,javac,jar...)
-    # Parameter 2 is extra CFLAGS
-    # Parameter 3 is extra LDFLAGS
-    # Parameter 4 is extra LDFLAGS_SUFFIX_posix
-    # Parameter 5 is extra LDFLAGS_SUFFIX_windows
-    # Parameter 6 is optional Windows JLI library (full path)
-    # Parameter 7 is optional Windows resource (RC) flags
-    # Parameter 8 is optional Windows version resource file (.rc)
-    # Parameter 9  is different output dir
-    # Parameter 10 if set, link statically with c runtime on windows.
-    # Parameter 11 if set, override plist file on macosx.
-
-    $1_WINDOWS_JLI_LIB:=$(JDK_OUTPUTDIR)/objs/libjli/jli.lib
-    ifneq ($6,)
-        $1_WINDOWS_JLI_LIB:=$6
-    endif
-    $1_VERSION_INFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc
-    ifneq ($8,)
-        $1_VERSION_INFO_RESOURCE:=$8
-    endif
-
-    $1_LDFLAGS := $3
-    $1_LDFLAGS_SUFFIX :=
-    ifeq ($(OPENJDK_TARGET_OS), macosx)
-        $1_PLIST_FILE:=Info-cmdline.plist
-        ifneq ($(11),)
-            $1_PLIST_FILE:=$(11)
-        endif
-
-        $1_LDFLAGS += -Wl,-all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
-                      -framework Cocoa -framework Security -framework ApplicationServices \
-                      -sectcreate __TEXT __info_plist $(JDK_TOPDIR)/src/macosx/lib/$$($1_PLIST_FILE)
-        $1_LDFLAGS_SUFFIX += -pthread
-    endif
-
-    ifeq ($(USE_EXTERNAL_LIBZ), true)
-        $1_LDFLAGS_SUFFIX += -lz
-    endif
-
-    $1_OUTPUT_DIR_ARG:=$9
-    ifeq (,$$($1_OUTPUT_DIR_ARG))
-        $1_OUTPUT_DIR_ARG:=$(JDK_OUTPUTDIR)/bin
-    endif
-
-    # TODO: maybe it's better to move this if-statement out of this function
-    ifeq ($1,java)
-        $1_OPTIMIZATION_ARG:=HIGH
-	$1_LDFLAGS_solaris:=-R$(OPENWIN_HOME)/lib$(OPENJDK_TARGET_CPU_ISADIR)
-    else
-        $1_OPTIMIZATION_ARG:=LOW
-    endif
-
-    $1_CFLAGS:=$(CFLAGS_JDKEXE)
-    ifeq ($(10),true)
-        $1_CFLAGS:=$(filter-out -MD,$(CFLAGS_JDKEXE))
-    endif
-
-    $(call SetupNativeCompilation,BUILD_LAUNCHER_$1,\
-	SRC:=$(JDK_TOPDIR)/src/share/bin,\
-	INCLUDE_FILES:=main.c,\
-	LANG:=C,\
-	OPTIMIZATION:=$$($1_OPTIMIZATION_ARG), \
-	CFLAGS:=$$($1_CFLAGS) \
-		-I$(JDK_TOPDIR)/src/share/bin \
-		-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin \
-		-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS)/bin \
-                -DFULL_VERSION='"$(FULL_VERSION)"' \
-                -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
-                -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \
-		-DLIBARCHNAME='"$(OPENJDK_TARGET_CPU_LEGACY)"' \
-		-DLAUNCHER_NAME='"$(LAUNCHER_NAME)"' \
-		-DPROGNAME='"$1"' $(DPACKAGEPATH) \
-		$2,\
-	CFLAGS_linux:=-fPIC,\
-        CFLAGS_solaris:=-KPIC -DHAVE_GETHRTIME,\
-	LDFLAGS:=$(LDFLAGS_JDKEXE) \
-                 $(ORIGIN_ARG) \
-		 $$($1_LDFLAGS),\
-	LDFLAGS_macosx:=$(call SET_SHARED_LIBRARY_NAME,$1),\
-	LDFLAGS_linux:=-lpthread \
-                       $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)),\
-	LDFLAGS_solaris:=$$($1_LDFLAGS_solaris) \
-                       $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)),\
-	MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU), \
-        LDFLAGS_SUFFIX:=$(LDFLAGS_JDKEXE_SUFFIX) $$($1_LDFLAGS_SUFFIX),\
-	LDFLAGS_SUFFIX_posix:=$4,\
-	LDFLAGS_SUFFIX_windows:=$$($1_WINDOWS_JLI_LIB) \
-			       $(JDK_OUTPUTDIR)/objs/libjava/java.lib advapi32.lib $5,\
-	LDFLAGS_SUFFIX_linux:=-L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli $(LIBDL) -lc, \
-	LDFLAGS_SUFFIX_solaris:=-L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli -lthread $(LIBDL) -lc, \
-	OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/$1_objs$(OUTPUT_SUBDIR),\
-	OUTPUT_DIR:=$$($1_OUTPUT_DIR_ARG)$(OUTPUT_SUBDIR),\
-	PROGRAM:=$1,\
-	DEBUG_SYMBOLS:=true,\
-	VERSIONINFO_RESOURCE:=$$($1_VERSION_INFO_RESOURCE),\
-	RC_FLAGS:=$(RC_FLAGS)\
-		  /D "JDK_FNAME=$1$(EXE_SUFFIX)" \
-		  /D "JDK_INTERNAL_NAME=$1" \
-		  /D "JDK_FTYPE=0x1L" \
-		  $7,\
-	MANIFEST:=$(JDK_TOPDIR)/src/windows/resource/java.manifest)
-
-    BUILD_LAUNCHERS += $$(BUILD_LAUNCHER_$1)
-
-    ifeq ($(OPENJDK_TARGET_OS),macosx)
-        $$(BUILD_LAUNCHER_$1) : $(JDK_OUTPUTDIR)/objs/libjli_static.a
-    endif
-
-    ifeq ($(OPENJDK_TARGET_OS),windows)
-        $$(BUILD_LAUNCHER_$1) : $(JDK_OUTPUTDIR)/objs/libjava/java.lib \
-				$$($1_WINDOWS_JLI_LIB)
-    endif    	 
-endef
-
-##########################################################################################
-
-XLIBS:=$(X_LIBS) -lX11
-ifeq ($(OPENJDK_TARGET_OS),macosx)
-    DPACKAGEPATH:=-DPACKAGE_PATH='"$(PACKAGE_PATH)"'
-    XLIBS:=
-endif
-
-ifdef OPENJDK
-    JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/windows/resource/icons"
-else
-    JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/closed/windows/native/sun/windows"
-endif
-
-# On windows, the debuginfo files get the same name as for java.dll. Build
-# into another dir and copy selectively so debuginfo for java.dll isn't
-# overwritten.
-$(eval $(call SetupLauncher,java,\
-    -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib,\
-    $(JDK_OUTPUTDIR)/objs/jli_static.lib,$(JAVA_RC_FLAGS),\
-    $(JDK_TOPDIR)/src/windows/resource/java.rc,$(JDK_OUTPUTDIR)/objs/java_objs,true))
-
-$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java)
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $(JDK_OUTPUTDIR)/objs/java_objs$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX) $@
-
-BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX)
-
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    $(eval $(call SetupLauncher,javaw,\
-        -DJAVAW -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib,\
-        $(JDK_OUTPUTDIR)/objs/jli_static.lib,$(JAVA_RC_FLAGS),\
-        $(JDK_TOPDIR)/src/windows/resource/java.rc,,true))
-endif
-
-
-ifndef BUILD_HEADLESS_ONLY
-$(eval $(call SetupLauncher,appletviewer,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.applet.Main"$(COMMA) }',,\
-    $(XLIBS)))
-endif
-
-$(eval $(call SetupLauncher,extcheck,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.extcheck.Main"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,idlj,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.corba.se.idl.toJavaPortable.Compile"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,jar,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jar.Main"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,jarsigner,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.jarsigner.Main"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,javac,\
-    -DEXPAND_CLASSPATH_WILDCARDS \
-    -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javac.Main"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,javadoc,\
-    -DEXPAND_CLASSPATH_WILDCARDS \
-    -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javadoc.Main"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,javah,\
-    -DEXPAND_CLASSPATH_WILDCARDS \
-    -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javah.Main"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,javap,\
-    -DEXPAND_CLASSPATH_WILDCARDS \
-    -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javap.Main"$(COMMA) }'))
-
-BUILD_LAUNCHER_jconsole_CFLAGS_windows:=-DJAVAW
-BUILD_LAUNCHER_jconsole_LDFLAGS_windows:=user32.lib
-
-$(eval $(call SetupLauncher,jconsole,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "-J-Djconsole.showOutputViewer"$(COMMA) "sun.tools.jconsole.JConsole"$(COMMA) }' \
-    -DAPP_CLASSPATH='{ "/lib/jconsole.jar"$(COMMA) "/lib/tools.jar"$(COMMA) "/classes" }'))
-
-$(eval $(call SetupLauncher,jdb,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.example.debug.tty.TTY"$(COMMA) }' \
-    -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }'))
-
-$(eval $(call SetupLauncher,jhat,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.hat.Main"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,jinfo,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
-		   "-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
-		   "-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
-		   "sun.tools.jinfo.JInfo"$(COMMA) }' \
-    -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
-    ,,,,,,,,,Info-privileged.plist))
-
-$(eval $(call SetupLauncher,jmap,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
-		   "-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
-		   "-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
-		   "sun.tools.jmap.JMap"$(COMMA) }' \
-    -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
-    ,,,,,,,,,Info-privileged.plist))
-
-$(eval $(call SetupLauncher,jps,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jps.Jps"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,jrunscript,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.script.shell.Main"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,jsadebugd,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.jvm.hotspot.jdi.SADebugServer"$(COMMA) }' \
-    -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
-    ,,,,,,,,,Info-privileged.plist))
-
-$(eval $(call SetupLauncher,jstack,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
-		   "-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
-		   "-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
-		   "sun.tools.jstack.JStack"$(COMMA) }' \
-    -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
-    ,,,,,,,,,Info-privileged.plist))
-
-$(eval $(call SetupLauncher,jstat,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jstat.Jstat"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,jstatd,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jstatd.Jstatd"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,keytool,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.keytool.Main"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,native2ascii,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.native2ascii.Main"$(COMMA) }'))
-
-ifndef BUILD_HEADLESS_ONLY
-$(eval $(call SetupLauncher,policytool,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.policytool.PolicyTool"$(COMMA) }',,\
-    $(XLIBS)))
-endif
-
-$(eval $(call SetupLauncher,rmic,\
-    -DEXPAND_CLASSPATH_WILDCARDS \
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.rmic.Main"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,schemagen,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.jxc.SchemaGenerator"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,serialver,\
-    -DEXPAND_CLASSPATH_WILDCARDS \
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.serialver.SerialVer"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,xjc,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.xjc.Driver"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,wsgen,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.ws.WsGen"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,wsimport,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.ws.WsImport"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,orbd,\
-    -DJAVA_ARGS='{ 	"-J-ms8m"$(COMMA) \
-			"-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \
-			"-J-Dcom.sun.CORBA.activation.Port=1049"$(COMMA) \
-			"-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \
-			"com.sun.corba.se.impl.activation.ORBD"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,servertool,\
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.corba.se.impl.activation.ServerTool"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,tnameserv,\
-    -DJAVA_ARGS='{ 	"-J-ms8m"$(COMMA) \
-			"-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \
-			"-J-Djava.util.logging.LoggingPermission=contol"$(COMMA) \
-			"-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \
-			"com.sun.corba.se.impl.naming.cosnaming.TransientNameServer"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,pack200,\
-    -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "com.sun.java.util.jar.pack.Driver"$(COMMA) "--pack" }'))
-
-$(eval $(call SetupLauncher,rmid,\
-    -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.rmi.server.Activation"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,rmiregistry,\
-    -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.rmi.registry.RegistryImpl"$(COMMA) }'))
-
-$(eval $(call SetupLauncher,jcmd,\
-    -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.tools.jcmd.JCmd"$(COMMA) }'))
-
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    $(eval $(call SetupLauncher,kinit,\
-        -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Kinit"$(COMMA) }'))
-
-    $(eval $(call SetupLauncher,klist,\
-        -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Klist"$(COMMA) }'))
-
-    $(eval $(call SetupLauncher,ktab,\
-        -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Ktab"$(COMMA) }'))
-endif
-
-##########################################################################################
-# The order of the object files on the link command line affects the size of the resulting
-# binary (at least on linux) which causes the size to differ between old and new build.
-ifeq ($(USE_EXTERNAL_LIBZ), true)
-UNPACKEXE_CFLAGS := -DSYSTEM_ZLIB
-UNPACKEXE_ZIPOBJS := -lz
-else
-UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
-UNPACKEXE_ZIPOBJS := 	$(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \
-		     	$(JDK_OUTPUTDIR)/objs/libzip/deflate$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/trees$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/zadler32$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/compress$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/zutil$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/inflate$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/infback$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/inftrees$(OBJ_SUFFIX) \
-			$(JDK_OUTPUTDIR)/objs/libzip/inffast$(OBJ_SUFFIX)
-
-endif
-
-ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
-    UNPACKEXE_CFLAGS += -xregs=no%appl
-endif
-
-UNPACKEXE_LANG:=C
-ifeq ($(OPENJDK_TARGET_OS),solaris)
-    UNPACKEXE_LANG:=C++
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE,\
-                SRC:=$(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack,\
-		EXCLUDE_FILES:=jni.cpp,\
-		LANG:=$(UNPACKEXE_LANG),\
-		OPTIMIZATION := LOW, \
-		CFLAGS:=$(UNPACKEXE_CFLAGS) $(CXXFLAGS_JDKEXE)\
-                        -DFULL, \
-		CFLAGS_release:=-DPRODUCT,\
-		CFLAGS_linux:=-fPIC,\
-		CFLAGS_solaris := -KPIC, \
-		CFLAGS_macosx := -fPIC, \
-		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libunpack/mapfile-vers-unpack200, \
-		LDFLAGS:=$(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
-			 $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN) \
-			 $(UNPACKEXE_ZIPOBJS),\
-		LDFLAGS_linux:=-lc,\
-		LDFLAGS_SUFFIX:=$(LIBCXX),\
-		LDFLAGS_SUFFIX_solaris:=-lc,\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR),\
-		OUTPUT_DIR:=$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR),\
-		PROGRAM:=unpack200,\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=unpack200.exe" \
-			  /D "JDK_INTERNAL_NAME=unpack200" \
-			  /D "JDK_FTYPE=0x1L",\
-		MANIFEST:=$(JDK_TOPDIR)/src/windows/resource/unpack200_proto.exe.manifest))
-
-ifneq ($(USE_EXTERNAL_LIBZ), true)
-
-$(BUILD_UNPACKEXE) : $(UNPACKEXE_ZIPOBJS)
-
-endif
-
-BUILD_LAUNCHERS += $(BUILD_UNPACKEXE)
-
-##########################################################################################
-
-
-BUILD_JEXEC := 
-BUILD_JEXEC_SRC :=
-BUILD_JEXEC_INC :=
-BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
-
-#
-# UNHANDLED:
-# - COMPILE_APPROACH = normal
-#
-
-#
-# jdk/make/java/Makefile
-#
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-	ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
-		BUILD_JEXEC := 1
-	endif
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), linux)
-	BUILD_JEXEC := 1
-endif # OPENJDK_TARGET_OS
-
-#
-# jdk/make/java/jexec/Makefile
-#
-ifeq ($(BUILD_JEXEC), 1)
-
-	ifeq ($(OPENJDK_TARGET_OS),windows)
-	else ifeq ($(OPENJDK_TARGET_OS),macosx)
-		BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/macosx/bin
-	else
-		BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/solaris/bin
-	endif
-
-	ifeq ($(OPENJDK_TARGET_OS), linux)
-                BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib
-		BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/share/bin
-	endif
-endif
-
-#
-# Note that the two Makefile's seems to contradict each other,
-#   and that src/macosx/bin/jexec.c seems unused
-#
-ifneq ($(BUILD_JEXEC_SRC),)
-        $(eval $(call SetupNativeCompilation,BUILD_JEXEC,\
-		SRC:=$(BUILD_JEXEC_SRC),\
-		INCLUDE_FILES:=jexec.c,\
-		LANG:=C,\
-		OPTIMIZATION := LOW, \
-		CFLAGS:=$(CFLAGS_JDKEXE)\
-                        $(BUILD_JEXEC_INC), \
-		CFLAGS_linux:=-fPIC,\
-		CFLAGS_solaris:=-KPIC,\
-		LDFLAGS:=$(LDFLAGS_JDKEXE) \
-			 $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/jexec_obj,\
-		OUTPUT_DIR:=$(BUILD_JEXEC_DST_DIR),\
-		PROGRAM:=jexec))
-
-	BUILD_LAUNCHERS += $(BUILD_JEXEC)
-endif
-
-##########################################################################################
-
-#
-# The java-rmi.cgi script in bin/ only gets delivered in certain situations
-#
-JAVA_RMI_CGI:=$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java-rmi.cgi
-ifeq ($(OPENJDK_TARGET_OS), linux)
-  BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
-endif
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-  ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
-    BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
-  endif
-endif
-
-# TODO: 
-# On windows java-rmi.cgi shouldn't be bundled since Java 1.2, but has been built all
-# this time anyway. Since jdk6, it has been built from the wrong source and resulted
-# in a copy of the standard java launcher named "java-rmi.exe" ending up in the final
-# images bin dir. This weird behavior is mimicked here in the converted makefiles for
-# now. Should probably just be deleted.
-# http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6512052
-ifeq ($(OPENJDK_TARGET_OS),windows)
-    $(eval $(call SetupLauncher,java-rmi,\
-        -DEXPAND_CLASSPATH_WILDCARDS,\
-        $(call SET_SHARED_LIBRARY_MAPFILE,$(JDK_TOPDIR)/makefiles/java/main/java/mapfile-$(OPENJDK_TARGET_CPU))))
-else
-    $(JAVA_RMI_CGI): $(JDK_TOPDIR)/src/solaris/bin/java-rmi.cgi.sh
-	$(MKDIR) -p $(@D)
-	$(CP) $< $@
-	$(CHMOD) a+x $@
-endif
-
-##########################################################################################
-
-$(BUILD_LAUNCHERS) : $(JDK_TOPDIR)/makefiles/CompileLaunchers.gmk
-
-all: $(BUILD_LAUNCHERS)
-
-.PHONY: all
+#
+# 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.
+#
+
+defalt: all
+
+include $(SPEC)
+include MakeBase.gmk
+include NativeCompilation.gmk
+
+# Setup the java compilers for the JDK build.
+include Setup.gmk
+
+# Build tools
+include Tools.gmk
+
+BUILD_LAUNCHERS=
+
+# When building a legacy overlay image (on solaris 64 bit), the launchers 
+# need to be built with a different rpath and a different output dir.
+ifeq ($(OVERLAY_IMAGES),true)
+    ORIGIN_ROOT:=/../..
+    OUTPUT_SUBDIR:=$(OPENJDK_TARGET_CPU_ISADIR)
+else
+    ORIGIN_ROOT:=/..
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+    ORIGIN_ARG:=$(call SET_EXECUTABLE_ORIGIN)
+else
+    ORIGIN_ARG:=$(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli) \
+                $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli)
+endif
+
+#
+# Applications expect to be able to link against libjawt without invoking
+# System.loadLibrary("jawt") first. This was the behaviour described in the
+# devloper documentation of JAWT and what worked with OpenJDK6.
+#
+ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris),)
+    ORIGIN_ARG+=$(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR)) \
+                $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)) 
+endif
+
+define SetupLauncher
+    # TODO: Fix mapfile on solaris. Won't work with ld as linker.
+    # Parameter 1 is the name of the launcher (java,javac,jar...)
+    # Parameter 2 is extra CFLAGS
+    # Parameter 3 is extra LDFLAGS
+    # Parameter 4 is extra LDFLAGS_SUFFIX_posix
+    # Parameter 5 is extra LDFLAGS_SUFFIX_windows
+    # Parameter 6 is optional Windows JLI library (full path)
+    # Parameter 7 is optional Windows resource (RC) flags
+    # Parameter 8 is optional Windows version resource file (.rc)
+    # Parameter 9  is different output dir
+    # Parameter 10 if set, link statically with c runtime on windows.
+    # Parameter 11 if set, override plist file on macosx.
+
+    $1_WINDOWS_JLI_LIB:=$(JDK_OUTPUTDIR)/objs/libjli/jli.lib
+    ifneq ($6,)
+        $1_WINDOWS_JLI_LIB:=$6
+    endif
+    $1_VERSION_INFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc
+    ifneq ($8,)
+        $1_VERSION_INFO_RESOURCE:=$8
+    endif
+
+    $1_LDFLAGS := $3
+    $1_LDFLAGS_SUFFIX :=
+    ifeq ($(OPENJDK_TARGET_OS), macosx)
+        $1_PLIST_FILE:=Info-cmdline.plist
+        ifneq ($(11),)
+            $1_PLIST_FILE:=$(11)
+        endif
+
+        $1_LDFLAGS += -Wl,-all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
+                      -framework Cocoa -framework Security -framework ApplicationServices \
+                      -sectcreate __TEXT __info_plist $(JDK_TOPDIR)/src/macosx/lib/$$($1_PLIST_FILE)
+        $1_LDFLAGS_SUFFIX += -pthread
+    endif
+
+    ifeq ($(USE_EXTERNAL_LIBZ), true)
+        $1_LDFLAGS_SUFFIX += -lz
+    endif
+
+    $1_OUTPUT_DIR_ARG:=$9
+    ifeq (,$$($1_OUTPUT_DIR_ARG))
+        $1_OUTPUT_DIR_ARG:=$(JDK_OUTPUTDIR)/bin
+    endif
+
+    # TODO: maybe it's better to move this if-statement out of this function
+    ifeq ($1,java)
+        $1_OPTIMIZATION_ARG:=HIGH
+	$1_LDFLAGS_solaris:=-R$(OPENWIN_HOME)/lib$(OPENJDK_TARGET_CPU_ISADIR)
+    else
+        $1_OPTIMIZATION_ARG:=LOW
+    endif
+
+    $1_CFLAGS:=$(CFLAGS_JDKEXE)
+    ifeq ($(10),true)
+        $1_CFLAGS:=$(filter-out -MD,$(CFLAGS_JDKEXE))
+    endif
+
+    ifneq ($(wildcard $(JDK_TOPDIR)/makefiles/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)),)
+        $1_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)
+    else
+        $1_MAPFILE:=
+    endif
+
+    $(call SetupNativeCompilation,BUILD_LAUNCHER_$1,\
+	SRC:=$(JDK_TOPDIR)/src/share/bin,\
+	INCLUDE_FILES:=main.c,\
+	LANG:=C,\
+	OPTIMIZATION:=$$($1_OPTIMIZATION_ARG), \
+	CFLAGS:=$$($1_CFLAGS) \
+		-I$(JDK_TOPDIR)/src/share/bin \
+		-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin \
+		-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS)/bin \
+                -DFULL_VERSION='"$(FULL_VERSION)"' \
+                -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
+                -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \
+		-DLIBARCHNAME='"$(OPENJDK_TARGET_CPU_LEGACY)"' \
+		-DLAUNCHER_NAME='"$(LAUNCHER_NAME)"' \
+		-DPROGNAME='"$1"' $(DPACKAGEPATH) \
+		$2,\
+	CFLAGS_linux:=-fPIC,\
+        CFLAGS_solaris:=-KPIC -DHAVE_GETHRTIME,\
+	LDFLAGS:=$(LDFLAGS_JDKEXE) \
+                 $(ORIGIN_ARG) \
+		 $$($1_LDFLAGS),\
+	LDFLAGS_macosx:=$(call SET_SHARED_LIBRARY_NAME,$1),\
+	LDFLAGS_linux:=-lpthread \
+                       $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)),\
+	LDFLAGS_solaris:=$$($1_LDFLAGS_solaris) \
+                       $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)),\
+	MAPFILE := $$($1_MAPFILE), \
+        LDFLAGS_SUFFIX:=$(LDFLAGS_JDKEXE_SUFFIX) $$($1_LDFLAGS_SUFFIX),\
+	LDFLAGS_SUFFIX_posix:=$4,\
+	LDFLAGS_SUFFIX_windows:=$$($1_WINDOWS_JLI_LIB) \
+			       $(JDK_OUTPUTDIR)/objs/libjava/java.lib advapi32.lib $5,\
+	LDFLAGS_SUFFIX_linux:=-L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli $(LIBDL) -lc, \
+	LDFLAGS_SUFFIX_solaris:=-L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli -lthread $(LIBDL) -lc, \
+	OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/$1_objs$(OUTPUT_SUBDIR),\
+	OUTPUT_DIR:=$$($1_OUTPUT_DIR_ARG)$(OUTPUT_SUBDIR),\
+	PROGRAM:=$1,\
+	DEBUG_SYMBOLS:=true,\
+	VERSIONINFO_RESOURCE:=$$($1_VERSION_INFO_RESOURCE),\
+	RC_FLAGS:=$(RC_FLAGS)\
+		  -D "JDK_FNAME=$1$(EXE_SUFFIX)" \
+		  -D "JDK_INTERNAL_NAME=$1" \
+		  -D "JDK_FTYPE=0x1L" \
+		  $7,\
+	MANIFEST:=$(JDK_TOPDIR)/src/windows/resource/java.manifest)
+
+    BUILD_LAUNCHERS += $$(BUILD_LAUNCHER_$1)
+
+    ifeq ($(OPENJDK_TARGET_OS),macosx)
+        $$(BUILD_LAUNCHER_$1) : $(JDK_OUTPUTDIR)/objs/libjli_static.a
+    endif
+
+    ifeq ($(OPENJDK_TARGET_OS),windows)
+        $$(BUILD_LAUNCHER_$1) : $(JDK_OUTPUTDIR)/objs/libjava/java.lib \
+				$$($1_WINDOWS_JLI_LIB)
+    endif    	 
+endef
+
+##########################################################################################
+
+XLIBS:=$(X_LIBS) -lX11
+ifeq ($(OPENJDK_TARGET_OS),macosx)
+    DPACKAGEPATH:=-DPACKAGE_PATH='"$(PACKAGE_PATH)"'
+    XLIBS:=
+endif
+
+ifdef OPENJDK
+    JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/windows/resource/icons"
+else
+    JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/closed/windows/native/sun/windows"
+endif
+
+# On windows, the debuginfo files get the same name as for java.dll. Build
+# into another dir and copy selectively so debuginfo for java.dll isn't
+# overwritten.
+$(eval $(call SetupLauncher,java,\
+    -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib,\
+    $(JDK_OUTPUTDIR)/objs/jli_static.lib,$(JAVA_RC_FLAGS),\
+    $(JDK_TOPDIR)/src/windows/resource/java.rc,$(JDK_OUTPUTDIR)/objs/java_objs,true))
+
+$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java)
+	$(MKDIR) -p $(@D)
+	$(RM) $@
+	$(CP) $(JDK_OUTPUTDIR)/objs/java_objs$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX) $@
+
+BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX)
+
+ifeq ($(OPENJDK_TARGET_OS),windows)
+    $(eval $(call SetupLauncher,javaw,\
+        -DJAVAW -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib,\
+        $(JDK_OUTPUTDIR)/objs/jli_static.lib,$(JAVA_RC_FLAGS),\
+        $(JDK_TOPDIR)/src/windows/resource/java.rc,,true))
+endif
+
+
+ifndef BUILD_HEADLESS_ONLY
+$(eval $(call SetupLauncher,appletviewer,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.applet.Main"$(COMMA) }',,\
+    $(XLIBS)))
+endif
+
+$(eval $(call SetupLauncher,extcheck,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.extcheck.Main"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,idlj,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.corba.se.idl.toJavaPortable.Compile"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,jar,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jar.Main"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,jarsigner,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.jarSigner.Main"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,javac,\
+    -DEXPAND_CLASSPATH_WILDCARDS \
+    -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javac.Main"$(COMMA) }'))
+
+ifeq ($(ENABLE_SJAVAC),yes)
+$(eval $(call SetupLauncher,sjavac,\
+    -DEXPAND_CLASSPATH_WILDCARDS \
+    -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.sjavac.Main"$(COMMA) }'))
+endif
+
+$(eval $(call SetupLauncher,javadoc,\
+    -DEXPAND_CLASSPATH_WILDCARDS \
+    -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javadoc.Main"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,javah,\
+    -DEXPAND_CLASSPATH_WILDCARDS \
+    -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javah.Main"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,javap,\
+    -DEXPAND_CLASSPATH_WILDCARDS \
+    -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javap.Main"$(COMMA) }'))
+
+BUILD_LAUNCHER_jconsole_CFLAGS_windows:=-DJAVAW
+BUILD_LAUNCHER_jconsole_LDFLAGS_windows:=user32.lib
+
+$(eval $(call SetupLauncher,jconsole,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "-J-Djconsole.showOutputViewer"$(COMMA) "sun.tools.jconsole.JConsole"$(COMMA) }' \
+    -DAPP_CLASSPATH='{ "/lib/jconsole.jar"$(COMMA) "/lib/tools.jar"$(COMMA) "/classes" }'))
+
+$(eval $(call SetupLauncher,jdb,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.example.debug.tty.TTY"$(COMMA) }' \
+    -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }'))
+
+$(eval $(call SetupLauncher,jhat,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.hat.Main"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,jinfo,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
+		   "-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
+		   "-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
+		   "sun.tools.jinfo.JInfo"$(COMMA) }' \
+    -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
+    ,,,,,,,,,Info-privileged.plist))
+
+$(eval $(call SetupLauncher,jmap,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
+		   "-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
+		   "-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
+		   "sun.tools.jmap.JMap"$(COMMA) }' \
+    -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
+    ,,,,,,,,,Info-privileged.plist))
+
+$(eval $(call SetupLauncher,jps,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jps.Jps"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,jrunscript,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.script.shell.Main"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,jsadebugd,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.jvm.hotspot.jdi.SADebugServer"$(COMMA) }' \
+    -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
+    ,,,,,,,,,Info-privileged.plist))
+
+$(eval $(call SetupLauncher,jstack,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
+		   "-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
+		   "-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
+		   "sun.tools.jstack.JStack"$(COMMA) }' \
+    -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
+    ,,,,,,,,,Info-privileged.plist))
+
+$(eval $(call SetupLauncher,jstat,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jstat.Jstat"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,jstatd,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jstatd.Jstatd"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,keytool,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.keytool.Main"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,native2ascii,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.native2ascii.Main"$(COMMA) }'))
+
+ifndef BUILD_HEADLESS_ONLY
+$(eval $(call SetupLauncher,policytool,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.policytool.PolicyTool"$(COMMA) }',,\
+    $(XLIBS)))
+endif
+
+$(eval $(call SetupLauncher,rmic,\
+    -DEXPAND_CLASSPATH_WILDCARDS \
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.rmic.Main"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,schemagen,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.jxc.SchemaGenerator"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,serialver,\
+    -DEXPAND_CLASSPATH_WILDCARDS \
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.serialver.SerialVer"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,xjc,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.xjc.Driver"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,wsgen,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.ws.WsGen"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,wsimport,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.ws.WsImport"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,orbd,\
+    -DJAVA_ARGS='{ 	"-J-ms8m"$(COMMA) \
+			"-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \
+			"-J-Dcom.sun.CORBA.activation.Port=1049"$(COMMA) \
+			"-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \
+			"com.sun.corba.se.impl.activation.ORBD"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,servertool,\
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.corba.se.impl.activation.ServerTool"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,tnameserv,\
+    -DJAVA_ARGS='{ 	"-J-ms8m"$(COMMA) \
+			"-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \
+			"-J-Djava.util.logging.LoggingPermission=contol"$(COMMA) \
+			"-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \
+			"com.sun.corba.se.impl.naming.cosnaming.TransientNameServer"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,pack200,\
+    -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "com.sun.java.util.jar.pack.Driver"$(COMMA) "--pack" }'))
+
+$(eval $(call SetupLauncher,rmid,\
+    -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.rmi.server.Activation"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,rmiregistry,\
+    -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.rmi.registry.RegistryImpl"$(COMMA) }'))
+
+$(eval $(call SetupLauncher,jcmd,\
+    -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.tools.jcmd.JCmd"$(COMMA) }'))
+
+ifeq ($(OPENJDK_TARGET_OS),windows)
+    $(eval $(call SetupLauncher,kinit,\
+        -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Kinit"$(COMMA) }'))
+
+    $(eval $(call SetupLauncher,klist,\
+        -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Klist"$(COMMA) }'))
+
+    $(eval $(call SetupLauncher,ktab,\
+        -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Ktab"$(COMMA) }'))
+endif
+
+##########################################################################################
+# The order of the object files on the link command line affects the size of the resulting
+# binary (at least on linux) which causes the size to differ between old and new build.
+ifeq ($(USE_EXTERNAL_LIBZ), true)
+UNPACKEXE_CFLAGS := -DSYSTEM_ZLIB
+UNPACKEXE_ZIPOBJS := -lz
+else
+UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
+UNPACKEXE_ZIPOBJS := 	$(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \
+		     	$(JDK_OUTPUTDIR)/objs/libzip/deflate$(OBJ_SUFFIX) \
+			$(JDK_OUTPUTDIR)/objs/libzip/trees$(OBJ_SUFFIX) \
+			$(JDK_OUTPUTDIR)/objs/libzip/zadler32$(OBJ_SUFFIX) \
+			$(JDK_OUTPUTDIR)/objs/libzip/compress$(OBJ_SUFFIX) \
+			$(JDK_OUTPUTDIR)/objs/libzip/zutil$(OBJ_SUFFIX) \
+			$(JDK_OUTPUTDIR)/objs/libzip/inflate$(OBJ_SUFFIX) \
+			$(JDK_OUTPUTDIR)/objs/libzip/infback$(OBJ_SUFFIX) \
+			$(JDK_OUTPUTDIR)/objs/libzip/inftrees$(OBJ_SUFFIX) \
+			$(JDK_OUTPUTDIR)/objs/libzip/inffast$(OBJ_SUFFIX)
+
+endif
+
+ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
+    UNPACKEXE_CFLAGS += -xregs=no%appl
+    UNPACKEXE_LDFLAGS_solaris += -xmemalign=4s
+endif
+
+UNPACKEXE_LANG:=C
+ifeq ($(OPENJDK_TARGET_OS),solaris)
+    UNPACKEXE_LANG:=C++
+endif
+# On windows, unpack200 is linked completely differently to all other
+# executables, using the compiler with the compiler arguments.
+# It's also linked incrementally, producing a .ilk file that needs to 
+# be kept away.
+ifeq ($(OPENJDK_TARGET_OS),windows)
+    BUILD_UNPACKEXE_LDEXE:=$(CC)
+    EXE_OUT_OPTION_save:=$(EXE_OUT_OPTION)
+    EXE_OUT_OPTION:=-Fe
+endif
+$(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE,\
+                SRC:=$(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack,\
+		EXCLUDE_FILES:=jni.cpp,\
+		LANG:=$(UNPACKEXE_LANG),\
+		OPTIMIZATION:=LOW, \
+		CFLAGS:=$(UNPACKEXE_CFLAGS) $(CXXFLAGS_JDKEXE)\
+                        -DFULL, \
+		CFLAGS_release:=-DPRODUCT,\
+		CFLAGS_linux:=-fPIC,\
+		CFLAGS_solaris:=-KPIC, \
+		CFLAGS_macosx:=-fPIC, \
+		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libunpack/mapfile-vers-unpack200,\
+		LDFLAGS:=$(UNPACKEXE_ZIPOBJS),\
+		LDFLAGS_windows:=$(CXXFLAGS_JDKEXE),\
+		LDFLAGS_posix:=$(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
+			 $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)) \
+			 $(call SET_SHARED_LIBRARY_ORIGIN),\
+		LDFLAGS_linux:=-lc,\
+		LDFLAGS_solaris:=$(UNPACKEXE_LDFLAGS_solaris) -lc,\
+		LDFLAGS_SUFFIX:=$(LIBCXX),\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR),\
+		OUTPUT_DIR:=$(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR),\
+		PROGRAM:=unpack200,\
+		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
+		RC_FLAGS:=$(RC_FLAGS)\
+			  -D "JDK_FNAME=unpack200.exe" \
+			  -D "JDK_INTERNAL_NAME=unpack200" \
+			  -D "JDK_FTYPE=0x1L",\
+		MANIFEST:=$(JDK_TOPDIR)/src/windows/resource/unpack200_proto.exe.manifest))
+
+ifeq ($(OPENJDK_TARGET_OS),windows)
+    EXE_OUT_OPTION:=$(EXE_OUT_OPTION_save)
+endif
+
+ifneq ($(USE_EXTERNAL_LIBZ), true)
+
+$(BUILD_UNPACKEXE) : $(UNPACKEXE_ZIPOBJS)
+
+endif
+
+# Build into object dir and copy executable afterwards to avoid .ilk file in
+# image. The real fix would be clean up linking of unpack200 using 
+# -link -incremental:no
+# like all other launchers.
+$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(EXE_SUFFIX): $(BUILD_UNPACKEXE)
+	$(MKDIR) -p $(@D)
+	$(CP) '$<' '$@'
+
+BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(EXE_SUFFIX)
+
+##########################################################################################
+
+
+BUILD_JEXEC := 
+BUILD_JEXEC_SRC :=
+BUILD_JEXEC_INC :=
+BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
+
+#
+# UNHANDLED:
+# - COMPILE_APPROACH = normal
+#
+
+#
+# jdk/make/java/Makefile
+#
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+	ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
+		BUILD_JEXEC := 1
+	endif
+endif
+
+ifeq ($(OPENJDK_TARGET_OS), linux)
+	BUILD_JEXEC := 1
+endif # OPENJDK_TARGET_OS
+
+#
+# jdk/make/java/jexec/Makefile
+#
+ifeq ($(BUILD_JEXEC), 1)
+
+	ifeq ($(OPENJDK_TARGET_OS),windows)
+	else ifeq ($(OPENJDK_TARGET_OS),macosx)
+		BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/macosx/bin
+	else
+		BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/solaris/bin
+	endif
+
+	ifeq ($(OPENJDK_TARGET_OS), linux)
+                BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib
+		BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/share/bin
+	endif
+endif
+
+#
+# Note that the two Makefile's seems to contradict each other,
+#   and that src/macosx/bin/jexec.c seems unused
+#
+ifneq ($(BUILD_JEXEC_SRC),)
+        $(eval $(call SetupNativeCompilation,BUILD_JEXEC,\
+		SRC:=$(BUILD_JEXEC_SRC),\
+		INCLUDE_FILES:=jexec.c,\
+		LANG:=C,\
+		OPTIMIZATION := LOW, \
+		CFLAGS:=$(CFLAGS_JDKEXE)\
+                        $(BUILD_JEXEC_INC), \
+		CFLAGS_linux:=-fPIC,\
+		CFLAGS_solaris:=-KPIC,\
+		LDFLAGS:=$(LDFLAGS_JDKEXE) \
+			 $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/jexec_obj,\
+		OUTPUT_DIR:=$(BUILD_JEXEC_DST_DIR),\
+		PROGRAM:=jexec))
+
+	BUILD_LAUNCHERS += $(BUILD_JEXEC)
+endif
+
+##########################################################################################
+
+#
+# The java-rmi.cgi script in bin/ only gets delivered in certain situations
+#
+JAVA_RMI_CGI:=$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java-rmi.cgi
+ifeq ($(OPENJDK_TARGET_OS), linux)
+  BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
+endif
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+  ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
+    BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
+  endif
+endif
+
+# TODO: 
+# On windows java-rmi.cgi shouldn't be bundled since Java 1.2, but has been built all
+# this time anyway. Since jdk6, it has been built from the wrong source and resulted
+# in a (almost) copy of the standard java launcher named "java-rmi.exe" ending up in 
+# the final images bin dir. This weird behavior is mimicked here in the converted 
+# makefiles for now. Should probably just be deleted.
+# http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6512052
+ifeq ($(OPENJDK_TARGET_OS),windows)
+    $(eval $(call SetupLauncher,java-rmi,,\
+        $(call SET_SHARED_LIBRARY_MAPFILE,$(JDK_TOPDIR)/makefiles/java/main/java/mapfile-$(OPENJDK_TARGET_CPU))))
+else
+    $(JAVA_RMI_CGI): $(JDK_TOPDIR)/src/solaris/bin/java-rmi.cgi.sh
+	$(MKDIR) -p $(@D)
+	$(CP) $< $@
+	$(CHMOD) a+x $@
+endif
+
+##########################################################################################
+
+$(BUILD_LAUNCHERS) : $(JDK_TOPDIR)/makefiles/CompileLaunchers.gmk
+
+all: $(BUILD_LAUNCHERS)
+
+.PHONY: all
--- a/makefiles/CompileNativeLibraries.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/CompileNativeLibraries.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -146,9 +146,9 @@
 		LDFLAGS_SUFFIX_windows:=jvm.lib,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS) \
-			  /D "JDK_FNAME=verify.dll" \
-			  /D "JDK_INTERNAL_NAME=verify" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=verify.dll" \
+			  -D "JDK_INTERNAL_NAME=verify" \
+			  -D "JDK_FTYPE=0x2L",\
 		REORDER:=$(BUILD_LIBVERIFY_REORDER),\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libverify,\
 		DEBUG_SYMBOLS:=true))
@@ -171,15 +171,19 @@
 		$(JDK_TOPDIR)/src/share/native/java/util \
 		$(JDK_TOPDIR)/src/share/native/java/util/concurrent/atomic \
 		$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/common \
-		$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/util \
-		$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/provider \
-		$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/io
+		$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/util
+
 ifneq ($(OPENJDK_TARGET_OS),macosx)
     LIBJAVA_SRC_DIRS+=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/util/locale/provider
 else
     LIBJAVA_SRC_DIRS+=$(JDK_TOPDIR)/src/macosx/native/sun/util/locale/provider
 endif
 
+ifeq ($(OPENJDK_TARGET_OS),windows)
+    LIBJAVA_SRC_DIRS+=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/provider \
+		$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/io
+endif
+
 LIBJAVA_CFLAGS:=$(foreach dir,$(LIBJAVA_SRC_DIRS),-I$(dir)) \
 		  -I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include \
                   -DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"'
@@ -235,21 +239,21 @@
 		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjava/mapfile-vers, \
 		LDFLAGS:=$(LDFLAGS_JDKLIB) \
 			 $(call SET_SHARED_LIBRARY_ORIGIN), \
-		LDFLAGS_windows:=-export:winFileHandleOpen -export:handleLseek \
-				 $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) jvm.lib \
-				 shell32.lib delayimp.lib /DELAYLOAD:shell32.dll \
-				 advapi32.lib,\
 		LDFLAGS_SUFFIX_posix:=-ljvm -lverify, \
 		LDFLAGS_SUFFIX_solaris:=-lnsl -lsocket -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc,\
 		LDFLAGS_SUFFIX_linux:=$(LIBDL) $(BUILD_LIBFDLIBM),\
 		LDFLAGS_SUFFIX_macosx:=-L$(JDK_OUTPUTDIR)/objs/ -lfdlibm \
                                          -framework CoreFoundation \
                                          -framework Security -framework SystemConfiguration, \
+		LDFLAGS_SUFFIX_windows:=-export:winFileHandleOpen -export:handleLseek \
+					jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \
+					shell32.lib delayimp.lib -DELAYLOAD:shell32.dll \
+					advapi32.lib,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=java.dll" \
-			  /D "JDK_INTERNAL_NAME=java" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=java.dll" \
+			  -D "JDK_INTERNAL_NAME=java" \
+			  -D "JDK_FTYPE=0x2L",\
 		REORDER:=$(LIBJAVA_REORDER), \
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjava,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
@@ -298,9 +302,9 @@
 				$(LDFLAGS_JDKLIB_SUFFIX),\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=mlib_image.dll" \
-			  /D "JDK_INTERNAL_NAME=mlib_image" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=mlib_image.dll" \
+			  -D "JDK_INTERNAL_NAME=mlib_image" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libmlib_image,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
@@ -422,10 +426,12 @@
                       $(CFLAGS_JDKLIB), \
 		MAPFILE:=$(BUILD_LIBMLIB_IMAGE_MAPFILE), \
 		LDFLAGS:=$(LDFLAGS_JDKLIB) \
-                         $(BUILD_LIBMLIB_LDLIBS) \
+                         $(BUILD_LIBMLIB_LDLIBS) -ljava -ljvm \
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libmlib_image_v))
 
+$(BUILD_LIBMLIB_IMAGE_V): $(BUILD_LIBJAVA)
+
 BUILD_LIBRARIES += $(BUILD_LIBMLIB_IMAGE_V)
 
 endif
@@ -438,7 +444,6 @@
 	$(JDK_TOPDIR)/src/share/native/sun/awt/image \
 	$(JDK_TOPDIR)/src/share/native/sun/awt/image/gif \
 	$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
-	$(JDK_TOPDIR)/src/share/native/sun/awt/shell \
 	$(JDK_TOPDIR)/src/share/native/sun/awt/medialib \
 	$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
 	$(JDK_TOPDIR)/src/share/native/sun/awt/utility \
@@ -449,12 +454,17 @@
 	$(JDK_TOPDIR)/src/share/native/sun/awt/image \
 	$(JDK_TOPDIR)/src/share/native/sun/java2d/opengl \
 	$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/opengl \
-	$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/x11 \
-	$(JDK_TOPDIR)/src/share/native/sun/font \
+	$(JDK_TOPDIR)/src/share/native/sun/font
+
+ifeq ($(OPENJDK_TARGET_OS),windows)
+    LIBAWT_DIRS+=\
 	$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows \
 	$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/windows \
 	$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/d3d
-
+else
+    LIBAWT_DIRS+=\
+	$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/x11
+endif
 
 LIBAWT_CFLAGS:=-D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES \
 	$(X_CFLAGS) \
@@ -649,7 +659,21 @@
 			DllUtil.cpp \
 			initIDs.cpp \
 			MouseInfo.cpp \
-			rect.c
+			rect.c \
+			OGLBlitLoops.c \
+			OGLBufImgOps.c \
+		        OGLContext.c \
+		        OGLFuncs.c \
+		        OGLMaskBlit.c \
+		        OGLMaskFill.c \
+		        OGLPaints.c \
+		        OGLRenderQueue.c \
+		        OGLRenderer.c \
+		        OGLSurfaceData.c \
+		        OGLTextRenderer.c \
+		        OGLVertexCache.c \
+		        WGLGraphicsConfig.c \
+		        WGLSurfaceData.c
 	LIBAWT_LANG:=C++
 	LIBAWT_CFLAGS += -EHsc -DUNICODE -D_UNICODE
 	ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
@@ -684,15 +708,6 @@
 		ASFLAGS:=$(LIBAWT_ASFLAGS),\
 		MAPFILE:=$(LIBAWT_MAPFILE), \
 		LDFLAGS:=$(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_windows:=advapi32.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
-				 imm32.lib ole32.lib uuid.lib shell32.lib \
-				 comdlg32.lib winmm.lib comctl32.lib \
-				 shlwapi.lib delayimp.lib $(WIN_JAVA_LIB) jvm.lib \
-				 /DELAYLOAD:user32.dll /DELAYLOAD:gdi32.dll \
-				 /DELAYLOAD:shell32.dll /DELAYLOAD:winmm.dll \
-				 /DELAYLOAD:winspool.drv /DELAYLOAD:imm32.dll \
-				 /DELAYLOAD:ole32.dll /DELAYLOAD:comdlg32.dll \
-				 /DELAYLOAD:comctl32.dll /DELAYLOAD:shlwapi.dll,\
 		LDFLAGS_solaris:=-R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR),\
 		LDFLAGS_SUFFIX_linux:=-ljvm $(LIBM) $(LIBDL) -ljava,\
 		LDFLAGS_SUFFIX_solaris:=-ljvm $(LIBM) $(LIBDL) -ljava,\
@@ -705,11 +720,20 @@
 				       -framework ApplicationServices \
 				       -framework AudioToolbox \
 				       -ljava,\
+		LDFLAGS_SUFFIX_windows:=kernel32.lib user32.lib gdi32.lib winspool.lib \
+					imm32.lib ole32.lib uuid.lib shell32.lib \
+					comdlg32.lib winmm.lib comctl32.lib shlwapi.lib \
+					delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib \
+					-DELAYLOAD:user32.dll -DELAYLOAD:gdi32.dll \
+					-DELAYLOAD:shell32.dll -DELAYLOAD:winmm.dll \
+					-DELAYLOAD:winspool.drv -DELAYLOAD:imm32.dll \
+					-DELAYLOAD:ole32.dll -DELAYLOAD:comdlg32.dll \
+					-DELAYLOAD:comctl32.dll -DELAYLOAD:shlwapi.dll,\
 		VERSIONINFO_RESOURCE:=$(LIBAWT_VERSIONINFO_RESOURCE),\
 		RC_FLAGS:=$(RC_FLAGS) $(LIBAWT_RC_FLAGS) \
-			  /D "JDK_FNAME=awt.dll" \
-			  /D "JDK_INTERNAL_NAME=awt" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=awt.dll" \
+			  -D "JDK_INTERNAL_NAME=awt" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libawt,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
@@ -863,9 +887,9 @@
 		LDFLAGS_SUFFIX:=$(LIBAWT_XAWT_LDFLAGS_SUFFIX),\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=xawt.dll" \
-			  /D "JDK_INTERNAL_NAME=xawt" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=xawt.dll" \
+			  -D "JDK_INTERNAL_NAME=xawt" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libawt_xawt))
 
 $(BUILD_LIBAWT_XAWT) : $(BUILD_LIBJAVA)
@@ -946,9 +970,9 @@
 		LDFLAGS_SUFFIX_macosx:=$(LIBZ) -ljava -ljvm,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=zip.dll" \
-			  /D "JDK_INTERNAL_NAME=zip" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=zip.dll" \
+			  -D "JDK_INTERNAL_NAME=zip" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libzip,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
@@ -971,15 +995,15 @@
 		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libunpack/mapfile-vers, \
 		LDFLAGS:=$(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_windows:=-map:$(JDK_OUTPUTDIR)/objs/unpack.map /debug \
+		LDFLAGS_windows:=-map:$(JDK_OUTPUTDIR)/objs/unpack.map -debug \
 				jvm.lib $(WIN_JAVA_LIB),\
 		LDFLAGS_SUFFIX_posix:=-ljvm $(LIBCXX) -ljava -lc,\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libunpack,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=unpack.dll" \
-			  /D "JDK_INTERNAL_NAME=unpack" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=unpack.dll" \
+			  -D "JDK_INTERNAL_NAME=unpack" \
+			  -D "JDK_FTYPE=0x2L",\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
 $(BUILD_LIBUNPACK) : $(BUILD_LIBJAVA)
@@ -1020,14 +1044,14 @@
 		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libattach/mapfile-$(OPENJDK_TARGET_OS), \
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS) \
-			  /D "JDK_FNAME=attach.dll" \
-			  /D "JDK_INTERNAL_NAME=attach" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=attach.dll" \
+			  -D "JDK_INTERNAL_NAME=attach" \
+			  -D "JDK_FTYPE=0x2L",\
 		LDFLAGS:=$(LDFLAGS_JDKLIB) \
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
 		LDFLAGS_solaris:=-ldoor,\
-		LDFLAGS_windows:=psapi.lib advapi32.lib $(WIN_JAVA_LIB) jvm.lib,\
 		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
+		LDFLAGS_SUFFIX_windows:=$(WIN_JAVA_LIB) advapi32.lib psapi.lib,\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libattach,\
 		DEBUG_SYMBOLS:=true))
 
@@ -1058,9 +1082,9 @@
 		LDFLAGS_SUFFIX_windows:=$(LDFLAGS_JDKLIB_SUFFIX) -export:jdwpTransport_OnLoad ws2_32.lib,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=dt_socket.dll" \
-			  /D "JDK_INTERNAL_NAME=dt_socket" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=dt_socket.dll" \
+			  -D "JDK_INTERNAL_NAME=dt_socket" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libdt_socket,\
 		DEBUG_SYMBOLS:=true))
 
@@ -1090,9 +1114,9 @@
 		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=dt_shmem.dll" \
-			  /D "JDK_INTERNAL_NAME=dt_shmem" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=dt_shmem.dll" \
+			  -D "JDK_INTERNAL_NAME=dt_shmem" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libdt_shmem,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
@@ -1125,9 +1149,9 @@
 		LDFLAGS_SUFFIX:=,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=jdwp.dll" \
-			  /D "JDK_INTERNAL_NAME=jdwp" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=jdwp.dll" \
+			  -D "JDK_INTERNAL_NAME=jdwp" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjdwp,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
@@ -1166,9 +1190,9 @@
 		EXCLUDE_FILES:=$(LIBJAAS_EXCLUDE_FILES),\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS) \
-			  /D "JDK_FNAME=$(LIBJAAS_NAME).dll" \
-			  /D "JDK_INTERNAL_NAME=$(LIBJAAS_NAME)" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=$(LIBJAAS_NAME).dll" \
+			  -D "JDK_INTERNAL_NAME=$(LIBJAAS_NAME)" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjaas,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
@@ -1196,9 +1220,9 @@
 		LDFLAGS_SUFFIX:=,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=jsdt.dll" \
-			  /D "JDK_INTERNAL_NAME=jsdt" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=jsdt.dll" \
+			  -D "JDK_INTERNAL_NAME=jsdt" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjsdt, \
                 DEBUG_SYMBOLS:=true))
 
@@ -1240,10 +1264,11 @@
 		LDFLAGS_SUFFIX_linux:=-lm -lawt -ljava -ljvm,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=lcms.dll" \
-			  /D "JDK_INTERNAL_NAME=lcms" \
-			  /D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/liblcms))
+			  -D "JDK_FNAME=lcms.dll" \
+			  -D "JDK_INTERNAL_NAME=lcms" \
+			  -D "JDK_FTYPE=0x2L",\
+		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/liblcms,\
+		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
     BUILD_LIBRARIES += $(BUILD_LIBLCMS)
 
@@ -1299,9 +1324,9 @@
 		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=jpeg.dll" \
-			  /D "JDK_INTERNAL_NAME=jpeg" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=jpeg.dll" \
+			  -D "JDK_INTERNAL_NAME=jpeg" \
+			  -D "JDK_FTYPE=0x2L",\
 		REORDER:=$(BUILD_LIBJPEG_REORDER),\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjpeg,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
@@ -1313,7 +1338,7 @@
 ##########################################################################################
 
 ifndef OPENJDK
-    FONT_HEADERS:=-I$(CLOSED_SRC)/share/native/$(PKGDIR)/t2k
+    FONT_HEADERS:=-I$(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k
     BUILD_LIBFONTMANAGER_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libfontmanager/mapfile-vers
     LIBFONTMANAGER_EXCLUDE_FILES += freetypeScaler.c
 else
@@ -1368,16 +1393,18 @@
 		MAPFILE:=$(BUILD_LIBFONTMANAGER_MAPFILE), \
 		LDFLAGS:=$(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_windows:=advapi32.lib user32.lib gdi32.lib $(WIN_AWT_LIB) $(WIN_JAVA_LIB),\
 		LDFLAGS_SUFFIX:=$(BUILD_LIBFONTMANAGER_FONTLIB),\
 		LDFLAGS_SUFFIX_linux:=-lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc,\
 		LDFLAGS_SUFFIX_solaris:=-lawt -lawt_xawt -lc $(LIBM) $(LIBCXX) -ljava -ljvm,\
-		LDFLAGS_SUFFIX_macosx:=-lawt $(LIBM) $(LIBCXX) -undefined dynamic_lookup -ljava -ljvm,\
+		LDFLAGS_SUFFIX_macosx:=-lawt $(LIBM) $(LIBCXX) -undefined dynamic_lookup \
+				       -ljava -ljvm,\
+		LDFLAGS_SUFFIX_windows:=$(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \
+					$(WIN_AWT_LIB),\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=fontmanager.dll" \
-			  /D "JDK_INTERNAL_NAME=fontmanager" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=fontmanager.dll" \
+			  -D "JDK_INTERNAL_NAME=fontmanager" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libfontmanager,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
@@ -1432,9 +1459,9 @@
 		LDFLAGS_SUFFIX_solaris:=-lawt -lawt_xawt,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=t2k.dll" \
-			  /D "JDK_INTERNAL_NAME=t2k" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=t2k.dll" \
+			  -D "JDK_INTERNAL_NAME=t2k" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libt2k,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
@@ -1469,9 +1496,9 @@
 		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=jawt.dll" \
-			  /D "JDK_INTERNAL_NAME=jawt" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=jawt.dll" \
+			  -D "JDK_INTERNAL_NAME=jawt" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjawt,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
@@ -1603,9 +1630,9 @@
 		LDFLAGS_SUFFIX_linux:=$(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL),\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=instrument.dll" \
-			  /D "JDK_INTERNAL_NAME=instrument" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=instrument.dll" \
+			  -D "JDK_INTERNAL_NAME=instrument" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(LIBINSTRUMENT_DIR),\
 		DEBUG_SYMBOLS:=true))
 
@@ -1664,14 +1691,14 @@
 		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libmanagement/mapfile-vers, \
 		LDFLAGS:=$(LDFLAGS_JDKLIB) \
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
-		LDFLAGS_windows:=$(WIN_JAVA_LIB) jvm.lib advapi32.lib psapi.lib,\
 		LDFLAGS_solaris:=-lkstat,\
 		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
+		LDFLAGS_SUFFIX_windows:=jvm.lib psapi.lib $(WIN_JAVA_LIB) advapi32.lib,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=management.dll" \
-			  /D "JDK_INTERNAL_NAME=management" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=management.dll" \
+			  -D "JDK_INTERNAL_NAME=management" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libmanagement,\
 		DEBUG_SYMBOLS:=true))
 
@@ -1720,9 +1747,9 @@
 		LDFLAGS_SUFFIX:=$(BUILD_LIBHPROF_LDFLAGS),\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=hprof.dll" \
-			  /D "JDK_INTERNAL_NAME=hprof" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=hprof.dll" \
+			  -D "JDK_INTERNAL_NAME=hprof" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libhprof_jvmti,\
 		DEBUG_SYMBOLS:=true))
 
@@ -1743,9 +1770,9 @@
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=java_crw_demo.dll" \
-			  /D "JDK_INTERNAL_NAME=java_crw_demo" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=java_crw_demo.dll" \
+			  -D "JDK_INTERNAL_NAME=java_crw_demo" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjava_crw_demo,\
 		DEBUG_SYMBOLS:=true))
 
@@ -1769,9 +1796,9 @@
 		LDFLAGS_SUFFIX_windows:=-export:nptInitialize -export:nptTerminate,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=npt.dll" \
-			  /D "JDK_INTERNAL_NAME=npt" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=npt.dll" \
+			  -D "JDK_INTERNAL_NAME=npt" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libnpt,\
 		DEBUG_SYMBOLS:=true))
 
@@ -1782,10 +1809,14 @@
 LIBNET_SRC_DIRS:=$(JDK_TOPDIR)/src/share/native/java/net \
                    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/net \
                    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/dns \
-                   $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/www/protocol/http/ntlm \
-                   $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/sdp \
                    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/spi
 
+ifeq ($(OPENJDK_TARGET_OS),windows)
+    LIBNET_SRC_DIRS+=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/www/protocol/http/ntlm
+else
+    LIBNET_SRC_DIRS+=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/sdp
+endif
+
 LIBNET_CFLAGS:=$(foreach dir,$(LIBNET_SRC_DIRS),-I$(dir))
 
 LIBNET_EXCLUDE_FILES:=
@@ -1820,14 +1851,14 @@
 		LDFLAGS_SUFFIX_macosx:=-ljvm -ljava,\
 		LDFLAGS_SUFFIX_solaris:=-ljvm -ljava -lnsl -lsocket $(LIBDL) ,\
 		LDFLAGS_SUFFIX_linux:=$(LIBDL) -ljvm -lpthread -ljava,\
-		LDFLAGS_SUFFIX_windows:=ws2_32.lib $(JVMLIB) secur32.lib iphlpapi.lib \
-					  delayimp.lib $(WIN_JAVA_LIB) jvm.lib advapi32.lib \
-                                          /DELAYLOAD:secur32.dll /DELAYLOAD:iphlpapi.dll, \
+		LDFLAGS_SUFFIX_windows:=ws2_32.lib jvm.lib secur32.lib iphlpapi.lib \
+					delayimp.lib $(WIN_JAVA_LIB) advapi32.lib \
+					-DELAYLOAD:secur32.dll -DELAYLOAD:iphlpapi.dll, \
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=net.dll" \
-			  /D "JDK_INTERNAL_NAME=net" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=net.dll" \
+			  -D "JDK_INTERNAL_NAME=net" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libnet,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
@@ -1836,7 +1867,7 @@
 BUILD_LIBRARIES += $(BUILD_LIBNET)
 
 $(JDK_OUTPUTDIR)/lib/net.properties: $(JDK_TOPDIR)/src/share/lib/net.properties
-	$(ECHO) Copying $(@F)
+	$(ECHO) $(LOG_INFO) Copying $(@F)
 	$(MKDIR) -p $(@D)
 	$(CP) $< $@
 
@@ -1844,7 +1875,7 @@
 
 ifeq ($(OPENJDK_TARGET_OS), solaris)
 $(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template : $(JDK_TOPDIR)/src/${OPENJDK_TARGET_OS_API_DIR}/lib/sdp/sdp.conf.template
-	$(ECHO) Copying $(@F)
+	$(ECHO) $(LOG_INFO) Copying $(@F)
 	$(MKDIR) -p $(@D)
 	$(CP) $< $@
 
@@ -1956,18 +1987,18 @@
 		LDFLAGS_SUFFIX_linux:=-ljava -lnet -lpthread $(LIBDL),\
 		LDFLAGS_SUFFIX_solaris:=-ljvm -lsocket -lposix4 $(LIBDL) \
 				        -lsendfile -ljava -lnet -lc,\
-		LDFLAGS_SUFFIX_windows:=$(LDFLAGS_JDKLIB_SUFFIX) \
-                                        $(WIN_JAVA_LIB) $(JDK_OUTPUTDIR)/objs/libnet/net.lib \
-					advapi32.lib jvm.lib ws2_32.lib\
+		LDFLAGS_SUFFIX_windows:=jvm.lib ws2_32.lib $(WIN_JAVA_LIB) \
+					$(JDK_OUTPUTDIR)/objs/libnet/net.lib \
                                         $(JDK_OUTPUTDIR)/objs/libjava/io_util.obj \
-		                        $(JDK_OUTPUTDIR)/objs/libjava/FileDescriptor_md.obj ,\
+		                        $(JDK_OUTPUTDIR)/objs/libjava/FileDescriptor_md.obj \
+					advapi32.lib,\
 		LDFLAGS_SUFFIX_macosx:=-ljava -lnet -pthread -framework CoreFoundation,\
 		LDFLAGS_SUFFIX:=,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=nio.dll" \
-			  /D "JDK_INTERNAL_NAME=nio" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=nio.dll" \
+			  -D "JDK_INTERNAL_NAME=nio" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libnio,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
@@ -2127,9 +2158,9 @@
 			user32.lib,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS) \
-			  /D "JDK_FNAME=jli.dll" \
-			  /D "JDK_INTERNAL_NAME=jli" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=jli.dll" \
+			  -D "JDK_INTERNAL_NAME=jli" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjli,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
@@ -2176,6 +2207,7 @@
 
 ##########################################################################################
 
+ifndef OPENJDK
 ifeq ($(ENABLE_JFR), true)
 
 $(eval $(call SetupNativeCompilation,BUILD_LIBJFR,\
@@ -2191,15 +2223,16 @@
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=jfr.dll" \
-			  /D "JDK_INTERNAL_NAME=jfr" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=jfr.dll" \
+			  -D "JDK_INTERNAL_NAME=jfr" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjfr,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
 BUILD_LIBRARIES += $(BUILD_LIBJFR)
 
 endif
+endif
 
 ##########################################################################################
 
@@ -2241,9 +2274,9 @@
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms/cmm.rc,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms/cmm.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=kcms.dll" \
-			  /D "JDK_INTERNAL_NAME=kcms" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=kcms.dll" \
+			  -D "JDK_INTERNAL_NAME=kcms" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libkcms,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
@@ -2523,7 +2556,7 @@
 else ifneq ($(OPENJDK_TARGET_OS), windows)
 	LIBSPLASHSCREEN_LDFLAGS_SUFFIX += -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -lX11 -lXext $(LIBM) -lpthread
 else # OPENJDK_TARGET_OS
-	LIBSPLASHSCREEN_LDFLAGS_SUFFIX += kernel32.lib user32.lib gdi32.lib delayimp.lib /DELAYLOAD:user32.dll
+	LIBSPLASHSCREEN_LDFLAGS_SUFFIX += kernel32.lib user32.lib gdi32.lib delayimp.lib -DELAYLOAD:user32.dll
 endif # OPENJDK_TARGET_OS
 
 $(eval $(call SetupNativeCompilation,LIBSPLASHSCREEN,\
@@ -2540,9 +2573,9 @@
 		LDFLAGS_SUFFIX:=$(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ),\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=splashscreen.dll" \
-			  /D "JDK_INTERNAL_NAME=splashscreen" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=splashscreen.dll" \
+			  -D "JDK_INTERNAL_NAME=splashscreen" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libsplashscreen,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
@@ -2582,9 +2615,9 @@
 		LDFLAGS_SUFFIX_posix:=-lm,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=dcpr.dll" \
-			  /D "JDK_INTERNAL_NAME=dcpr" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=dcpr.dll" \
+			  -D "JDK_INTERNAL_NAME=dcpr" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libdcpr,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
@@ -2615,9 +2648,9 @@
 		LDFLAGS_SUFFIX_windows:=winscard.lib,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=j2pcsc.dll" \
-			  /D "JDK_INTERNAL_NAME=j2pcsc" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=j2pcsc.dll" \
+			  -D "JDK_INTERNAL_NAME=j2pcsc" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libj2pcsc,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
@@ -2652,10 +2685,9 @@
      BUILD_LIBKRB5_NAME:=w2k_lsa_auth
      BUILD_LIBKRB5_FILES:=NativeCreds.c WindowsDirectory.c
      BUILD_LIBKRB5_SRC:=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/krb5
-     BUILD_LIBKRB5_LIBS:=Secur32.lib netapi32.lib \
-	kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib \
-	advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib \
-	odbccp32.lib wsock32.lib
+     BUILD_LIBKRB5_LIBS:=advapi32.lib Secur32.lib netapi32.lib kernel32.lib user32.lib \
+			 gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib \
+			 ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib
 else ifeq ($(OPENJDK_TARGET_OS), macosx)
      BUILD_LIBKRB5_NAME:=osxkrb5
      BUILD_LIBKRB5_FILES:=nativeccache.c
@@ -2679,9 +2711,9 @@
 		LDFLAGS_SUFFIX:=$(BUILD_LIBKRB5_LIBS) ,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=$(BUILD_LIBKRB5_NAME).dll" \
-			  /D "JDK_INTERNAL_NAME=$(BUILD_LIBKRB5_NAME)" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=$(BUILD_LIBKRB5_NAME).dll" \
+			  -D "JDK_INTERNAL_NAME=$(BUILD_LIBKRB5_NAME)" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libkrb5,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
@@ -2695,22 +2727,20 @@
 $(eval $(call SetupNativeCompilation,BUILD_LIBSUNMSCAPI,\
 		LIBRARY:=sunmscapi,\
                 OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(JDK_TOPDIR)/src/share/native/sun/security/mscapi \
-		     $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/mscapi,\
+		SRC:=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/mscapi,\
 		INCLUDE_FILES:=security.cpp, \
 		LANG:=C++,\
 		OPTIMIZATION:=LOW, \
 		CFLAGS:=$(CFLAGS_JDKLIB) \
-		        -I$(JDK_TOPDIR)/src/share/native/sun/security/mscapi \
                         -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/mscapi ,\
 		LDFLAGS:=$(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
 		LDFLAGS_SUFFIX:=Crypt32.Lib advapi32.lib,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=sunmscapi.dll" \
-			  /D "JDK_INTERNAL_NAME=sunmscapi" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=sunmscapi.dll" \
+			  -D "JDK_INTERNAL_NAME=sunmscapi" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libsunmscapi,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
@@ -2739,9 +2769,9 @@
 		LDFLAGS_SUFFIX_posix:=$(LIBDL), \
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=j2pkcs11.dll" \
-			  /D "JDK_INTERNAL_NAME=j2pkcs11" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=j2pkcs11.dll" \
+			  -D "JDK_INTERNAL_NAME=j2pkcs11" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libj2pkcs11,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
@@ -2788,9 +2818,9 @@
                 LDFLAGS_SUFFIX_solaris:=-lc ,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=sunec.dll" \
-			  /D "JDK_INTERNAL_NAME=sunec" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=sunec.dll" \
+			  -D "JDK_INTERNAL_NAME=sunec" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libsunec,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
@@ -2928,13 +2958,13 @@
 				-framework CoreServices -framework AudioUnit $(LIBCXX) \
 				-framework CoreMIDI -framework AudioToolbox,\
 		LDFLAGS_windows:=$(WIN_JAVA_LIB) advapi32.lib winmm.lib,\
-		LDFLAGS_SUFFIX:=-ljava -ljvm,\
+		LDFLAGS_SUFFIX_posix:=-ljava -ljvm,\
 		LDFLAGS_SUFFIX_solaris:=-lc ,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=jsound.dll" \
-			  /D "JDK_INTERNAL_NAME=jsound" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=jsound.dll" \
+			  -D "JDK_INTERNAL_NAME=jsound" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjsound,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
@@ -2999,9 +3029,9 @@
 		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) dsound.lib winmm.lib user32.lib ole32.lib,\
 		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
 		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=jsoundds.dll" \
-			  /D "JDK_INTERNAL_NAME=jsoundds" \
-			  /D "JDK_FTYPE=0x2L",\
+			  -D "JDK_FNAME=jsoundds.dll" \
+			  -D "JDK_INTERNAL_NAME=jsoundds" \
+			  -D "JDK_FTYPE=0x2L",\
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjsoundds,\
 		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
 
@@ -3091,6 +3121,7 @@
 		OPTIMIZATION:=LOW, \
 		CFLAGS:=$(CFLAGS_JDKLIB) \
 			-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
+			-I$(JDK_OUTPUTDIR)/gensrc/sun/osxapp \
                         -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
                         -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks,\
 		LDFLAGS:=$(LDFLAGS_JDKLIB)\
@@ -3263,6 +3294,8 @@
 		INCLUDE_FILES:=$(LIBAWT_LWAWT_FILES),\
 		OPTIMIZATION:=LOW, \
 		CFLAGS:=$(CFLAGS_JDKLIB) \
+                        $(X_CFLAGS) \
+                        $(X_LIBS) \
                         $(foreach dir,$(LIBAWT_LWAWT_DIRS),-I$(dir)) \
                         -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
                         -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
--- a/makefiles/CopyFiles.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/CopyFiles.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -263,16 +263,16 @@
 
 ##########################################################################################
 
-# Copy msvcr100.dll on windows
+# Copy msvcrXX.dll on windows
 
 ifeq ($(OPENJDK_TARGET_OS),windows)
-    MSVCRNN_TARGET := $(JDK_OUTPUTDIR)/bin/$(notdir $(MSVCRNN_DLL))
-    $(MSVCRNN_TARGET): $(MSVCRNN_DLL)
+    MSVCR_TARGET := $(JDK_OUTPUTDIR)/bin/$(notdir $(MSVCR_DLL))
+    $(MSVCR_TARGET): $(MSVCR_DLL)
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(CP) $< $@
 
-    COPY_FILES += $(MSVCRNN_TARGET)
+    COPY_FILES += $(MSVCR_TARGET)
 endif
 
 ##########################################################################################
@@ -553,7 +553,7 @@
 $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNWafb.so: $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNWffb.so
 	$(MKDIR) -p $(@D)
 	$(RM) $@
-	$(LN) -s $< $@
+	$(LN) -s $(<F) $@
 
 COPY_FILES += $(DGALIBS)
 
--- a/makefiles/CopyIntoClasses.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/CopyIntoClasses.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -143,13 +143,11 @@
 endif
 # END: Swing plaf resources
 
-# The exception handling of swing beaninfo
-# These resources violates the convention of having code and resources together under
-# $(JDK_TOPDIR)/src/.../classes directories 
 SWING_BEANINFO_RESOURCES_SRC_DIR = $(JDK_TOPDIR)/make/tools/swing-beans/beaninfo/images
 SWING_BEANINFO_RESOURCES_SRC = $(wildcard $(SWING_BEANINFO_RESOURCES_SRC_DIR)/*.gif)
-OUT_BEANINFO_RESOURCES = $(addprefix $(JDK_OUTPUTDIR)/classes/javax/swing/beaninfo/images/,\
-	$(shell $(PRINTF) "$(SWING_BEANINFO_RESOURCES_SRC)\n" | $(SED) -e 's|/[^ ]*/beaninfo/images/||g'))
+OUT_BEANINFO_RESOURCES = $(patsubst $(SWING_BEANINFO_RESOURCES_SRC_DIR)%,\
+				    $(JDK_OUTPUTDIR)/classes/javax/swing/beaninfo/images/%,\
+				    $(SWING_BEANINFO_RESOURCES_SRC))
 
 COPY_EXTRA += $(OUT_BEANINFO_RESOURCES)
 # END: Swing beaninfo resources
@@ -222,7 +220,7 @@
 # Eval the newly created rules to incorporate them into the make tree.
 define addto_meta-inf_services
 $1
-	echo Installing META-INF/services/$$(@F) 
+	echo $(LOG_INFO) Installing META-INF/services/$$(@F) 
 	$(CAT) $$< | $(SED) -e "s/^#\[$(OPENJDK_TARGET_OS)\]//" > $$@
 endef
 $(foreach i,$(META-INF_RULES_SERVICES),$(eval $(call addto_meta-inf_services,$i)))
--- a/makefiles/CreateJars.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/CreateJars.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -42,35 +42,30 @@
 
 JARS:=
 
+$(eval $(call MakeDir,$(IMAGES_OUTPUTDIR)/lib))
+
 ##########################################################################################
 
-JCONSOLE_JAR_DEPS := \
-  $(shell $(FIND) $(JDK_OUTPUTDIR)/classes/sun/tools/jconsole/ -name "_the.package") \
-  $(shell $(FIND) $(JDK_OUTPUTDIR)/classes/com/sun/tools/jconsole/ -name "_the.package")
-
-$(eval $(call SetupArchive,BUILD_JCONSOLE_JAR,$(JCONSOLE_JAR_DEPS),\
+$(eval $(call SetupArchive,BUILD_JCONSOLE_JAR,,\
 		SRCS:=$(JDK_OUTPUTDIR)/classes,\
 		SUFFIXES:=.class .gif .png .properties,\
 		INCLUDES:=sun/tools/jconsole com/sun/tools/jconsole,\
 		JARMAIN:=sun.tools.jconsole.JConsole,\
-		JAR:=$(JDK_OUTPUTDIR)/lib/jconsole.jar,\
+		JAR:=$(IMAGES_OUTPUTDIR)/lib/jconsole.jar,\
 		SKIP_METAINF:=true))
 
-JARS+=$(JDK_OUTPUTDIR)/lib/jconsole.jar
+JARS+=$(IMAGES_OUTPUTDIR)/lib/jconsole.jar
 
 ##########################################################################################
 
-DNS_JAR_DEPS := \
-  $(shell $(FIND) $(JDK_OUTPUTDIR)/classes/sun/net/spi/nameservice/dns/ -name "_the.package") \
-
-$(eval $(call SetupArchive,BUILD_DNS_JAR,$(DNS_JAR_DEPS),\
+$(eval $(call SetupArchive,BUILD_DNS_JAR,,\
 		SRCS:=$(JDK_OUTPUTDIR)/classes,\
 		INCLUDES:=sun/net/spi/nameservice/dns,\
 		EXTRA_FILES:=META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor,\
-		JAR:=$(JDK_OUTPUTDIR)/lib/ext/dnsns.jar,\
+		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/dnsns.jar,\
 		SKIP_METAINF:=true))
 
-JARS+=$(JDK_OUTPUTDIR)/lib/ext/dnsns.jar
+JARS+=$(IMAGES_OUTPUTDIR)/lib/ext/dnsns.jar
 
 ##########################################################################################
 
@@ -119,10 +114,10 @@
 		SUFFIXES:=.class _dict _th,\
 		INCLUDES:=$(LOCALEDATA_INCLUDES),\
 		EXCLUDES:=sun/text/resources/th/BreakIteratorRules_th.class,\
-		JAR:=$(JDK_OUTPUTDIR)/lib/ext/localedata.jar,\
+		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/localedata.jar,\
 		SKIP_METAINF:=true))
 
-JARS+=$(JDK_OUTPUTDIR)/lib/ext/localedata.jar
+JARS+=$(IMAGES_OUTPUTDIR)/lib/ext/localedata.jar
 
 ##########################################################################################
 # rt.jar and resources.jar are being built in the same way as in the old build. They require
@@ -285,22 +280,14 @@
 ifeq ($(OPENJDK_TARGET_OS), macosx)
         RT_JAR_EXCLUDES += com/sun/nio/sctp \
                            sun/nio/ch/sctp \
-                           sun/nio/ch/DevPollArrayWrapper\$$$$Updator.class \
-                           sun/nio/ch/DevPollArrayWrapper.class \
-                           sun/nio/ch/DevPollSelectorImpl.class \
-                           sun/nio/ch/DevPollSelectorProvider.class \
-                           sun/nio/ch/EPollArrayWrapper\$$$$Updator.class \
-                           sun/nio/ch/EPollArrayWrapper.class \
-                           sun/nio/ch/EPollSelectorImpl.class \
-                           sun/nio/ch/EPollSelectorProvider.class
 endif
 
 # Find all files in the classes dir to use as dependencies. This could be more fine granular.
 ALL_FILES_IN_CLASSES := $(shell $(FIND) $(JDK_OUTPUTDIR)/classes -type f \
 			| $(GREP) -v -e '/_the\.*' -e '^_the\.*' -e 'javac_state')
 
-RT_JAR_MANIFEST_FILE := $(JDK_OUTPUTDIR)/lib/_the.rt.jar_manifest
-RESOURCE_JAR_MANIFEST_FILE := $(JDK_OUTPUTDIR)/lib/_the.resources.jar_manifest
+RT_JAR_MANIFEST_FILE := $(IMAGES_OUTPUTDIR)/lib/_the.rt.jar_manifest
+RESOURCE_JAR_MANIFEST_FILE := $(IMAGES_OUTPUTDIR)/lib/_the.resources.jar_manifest
 
 $(RT_JAR_MANIFEST_FILE): $(MAINMANIFEST) $(BEANMANIFEST)
 	$(MKDIR) -p $(@D)
@@ -320,40 +307,40 @@
 	       $(MAINMANIFEST) >> $@.tmp
 	$(MV) $@.tmp $@
 
-$(JDK_OUTPUTDIR)/lib/_the.jars.exclude: $(MAKEFILE)
+$(IMAGES_OUTPUTDIR)/lib/_the.jars.exclude: $(MAKEFILE)
 	$(MKDIR) -p $(@D)
 	$(RM) $@ $@.tmp
 	$(call ListPathsSafely,RT_JAR_EXCLUDES,\n, >> $@.tmp)
 	$(MV) $@.tmp $@
 
-$(JDK_OUTPUTDIR)/lib/classlist : $(JDK_TOPDIR)/make/tools/sharing/classlist.$(OPENJDK_TARGET_OS) \
+$(IMAGES_OUTPUTDIR)/lib/classlist : $(JDK_TOPDIR)/make/tools/sharing/classlist.$(OPENJDK_TARGET_OS) \
   $(MAKEFILE)
 	$(MKDIR) -p $(@D)
 	$(RM) $@ $@.tmp
 	$(TOOL_ADDJSUM) $< $@.tmp
 	$(MV) $@.tmp $@
 
-$(JDK_OUTPUTDIR)/lib/_the.jars.contents: $(BUILD_TOOLS) $(JDK_OUTPUTDIR)/lib/_the.jars.exclude \
-					 $(ALL_FILES_IN_CLASSES) $(JDK_OUTPUTDIR)/lib/classlist
+$(IMAGES_OUTPUTDIR)/lib/_the.jars.contents: $(BUILD_TOOLS) $(IMAGES_OUTPUTDIR)/lib/_the.jars.exclude \
+					 $(ALL_FILES_IN_CLASSES) $(IMAGES_OUTPUTDIR)/lib/classlist
 	$(MKDIR) -p $(@D)
 	$(RM) $@ $@.tmp
 	($(CD) $(JDK_OUTPUTDIR)/classes && \
 	    $(TOOL_JARREORDER) \
-		-o  $@.tmp $(JDK_OUTPUTDIR)/lib/classlist $(JDK_OUTPUTDIR)/lib/_the.jars.exclude . )
+		-o  $@.tmp $(IMAGES_OUTPUTDIR)/lib/classlist $(IMAGES_OUTPUTDIR)/lib/_the.jars.exclude . )
 	$(MV) $@.tmp $@
 
-$(JDK_OUTPUTDIR)/lib/_the.rt.jar.contents: $(JDK_OUTPUTDIR)/lib/_the.jars.contents
+$(IMAGES_OUTPUTDIR)/lib/_the.rt.jar.contents: $(IMAGES_OUTPUTDIR)/lib/_the.jars.contents
 	$(MKDIR) -p $(@D)
 	$(RM) $@ $@.tmp
-	$(GREP) -e '\.class$$' $(JDK_OUTPUTDIR)/lib/_the.jars.contents > $@.tmp
+	$(GREP) -e '\.class$$' $(IMAGES_OUTPUTDIR)/lib/_the.jars.contents > $@.tmp
 	$(MV) $@.tmp $@
 
-$(JDK_OUTPUTDIR)/lib/_the.resources.jar.contents: $(JDK_OUTPUTDIR)/lib/_the.jars.contents
+$(IMAGES_OUTPUTDIR)/lib/_the.resources.jar.contents: $(IMAGES_OUTPUTDIR)/lib/_the.jars.contents
 	$(MKDIR) -p $(@D)
 	$(RM) $@ $@.tmp
 	$(GREP) -v -e '\.class$$' \
 	    -e '/_the\.*' -e '^_the\.*' -e '\\_the\.*' -e 'javac_state' \
-	    $(JDK_OUTPUTDIR)/lib/_the.jars.contents > $@.tmp
+	    $(IMAGES_OUTPUTDIR)/lib/_the.jars.contents > $@.tmp
 	$(MV) $@.tmp $@
 
 RT_JAR_CREATE_OPTIONS := c0fm
@@ -361,31 +348,29 @@
     RT_JAR_CREATE_OPTIONS := cfm
 endif
 
-$(JDK_OUTPUTDIR)/lib/rt.jar: $(JDK_OUTPUTDIR)/lib/_the.rt.jar.contents $(RT_JAR_MANIFEST_FILE)
+$(IMAGES_OUTPUTDIR)/lib/rt.jar: $(IMAGES_OUTPUTDIR)/lib/_the.rt.jar.contents $(RT_JAR_MANIFEST_FILE)
 	$(ECHO) Creating rt.jar
 	$(MKDIR) -p $(@D)
 	$(RM) $@ $@.tmp
 	$(CD) $(JDK_OUTPUTDIR)/classes && \
 	    $(JAR) $(RT_JAR_CREATE_OPTIONS) $@.tmp $(RT_JAR_MANIFEST_FILE) \
-	        @$(JDK_OUTPUTDIR)/lib/_the.rt.jar.contents
+	        @$(IMAGES_OUTPUTDIR)/lib/_the.rt.jar.contents
 	$(MV) $@.tmp $@
 
-$(JDK_OUTPUTDIR)/lib/resources.jar: $(JDK_OUTPUTDIR)/lib/_the.resources.jar.contents \
+$(IMAGES_OUTPUTDIR)/lib/resources.jar: $(IMAGES_OUTPUTDIR)/lib/_the.resources.jar.contents \
 				    $(RESOURCE_JAR_MANIFEST_FILE)
 	$(ECHO) Creating resources.jar
 	$(MKDIR) -p $(@D)
 	$(RM) $@ $@.tmp
 	$(CD) $(JDK_OUTPUTDIR)/classes && \
 	    $(JAR) $(RT_JAR_CREATE_OPTIONS) $@.tmp $(RESOURCE_JAR_MANIFEST_FILE) \
-	        @$(JDK_OUTPUTDIR)/lib/_the.resources.jar.contents
+	        @$(IMAGES_OUTPUTDIR)/lib/_the.resources.jar.contents
 	$(MV) $@.tmp $@
 
-JARS+=$(JDK_OUTPUTDIR)/lib/rt.jar $(JDK_OUTPUTDIR)/lib/resources.jar
+JARS+=$(IMAGES_OUTPUTDIR)/lib/rt.jar $(IMAGES_OUTPUTDIR)/lib/resources.jar
 
 ##########################################################################################
 
-CHARSETS_JAR_DEPS :=
-
 ifneq ($(OPENJDK_TARGET_OS), windows)
     CHARSETS_EXTRA_FILES:=sun/awt/motif/X11GBK.class \
                           sun/awt/motif/X11GB2312\$$$$Decoder.class \
@@ -397,32 +382,34 @@
                           sun/awt/motif/X11KSC5601.class
 endif
 
-$(eval $(call SetupArchive,BUILD_CHARSETS_JAR,$(CHARSETS_JAR_DEPS),\
+$(eval $(call SetupArchive,BUILD_CHARSETS_JAR,,\
 		SRCS:=$(JDK_OUTPUTDIR)/classes, \
 		SUFFIXES:=.class .dat,\
 		INCLUDES:=sun/nio/cs/ext,\
 		EXTRA_FILES := sun/awt/HKSCS.class \
 			       $(CHARSETS_EXTRA_FILES) \
                                META-INF/services/java.nio.charset.spi.CharsetProvider, \
-		JAR:=$(JDK_OUTPUTDIR)/lib/charsets.jar, \
+		JAR:=$(IMAGES_OUTPUTDIR)/lib/charsets.jar, \
 		SKIP_METAINF := true, \
                 CHECK_COMPRESS_JAR:=true))
 
-JARS+=$(JDK_OUTPUTDIR)/lib/charsets.jar
+JARS+=$(IMAGES_OUTPUTDIR)/lib/charsets.jar
 
 ##########################################################################################
 
+ifndef OPENJDK
 ifeq ($(ENABLE_JFR), true)
     $(eval $(call SetupArchive,BUILD_JFR_JAR,,\
 		SRCS:=$(JDK_OUTPUTDIR)/classes,\
 		INCLUDES:=com/oracle/jrockit/jfr \
 			  oracle/jrockit/jfr,\
-		JAR:=$(JDK_OUTPUTDIR)/lib/jfr.jar,\
+		JAR:=$(IMAGES_OUTPUTDIR)/lib/jfr.jar,\
 		SKIP_METAINF:=true,\
 		MANIFEST:=$(MAINMANIFEST), \
                 CHECK_COMPRESS_JAR:=true))
 
-    JARS+=$(JDK_OUTPUTDIR)/lib/jfr.jar
+    JARS+=$(IMAGES_OUTPUTDIR)/lib/jfr.jar
+endif
 endif
 
 ##########################################################################################
@@ -433,30 +420,30 @@
 			  sun/security/rsa/SunRsaSign.class \
 			  sun/security/ssl \
 			  com/sun/net/ssl/internal/ssl,\
-		JAR:=$(JDK_OUTPUTDIR)/lib/jsse.jar,\
+		JAR:=$(IMAGES_OUTPUTDIR)/lib/jsse.jar,\
 		SKIP_METAINF:=true,\
 		MANIFEST:=$(MAINMANIFEST), \
                 CHECK_COMPRESS_JAR:=true))
 
-JARS+=$(JDK_OUTPUTDIR)/lib/jsse.jar
+JARS+=$(IMAGES_OUTPUTDIR)/lib/jsse.jar
 
 ##########################################################################################
 
-SUNPKCS11_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunpkcs11.jar
+SUNPKCS11_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunpkcs11.jar
 
 ifndef OPENJDK
 
     SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar
 
     $(SUNPKCS11_JAR_DST) : $(SUNPKCS11_JAR_SRC)
-	@$(ECHO) "\n>>>Installing prebuilt SunPKCS11 provider..."
+	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunPKCS11 provider..."
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(CP) $< $@
 
 else
 
-    $(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR,$(SUNPKCS11_JAR_DEPS),\
+    $(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR,,\
 	SRCS:=$(JDK_OUTPUTDIR)/classes, \
 	SUFFIXES:=.class,\
 	INCLUDES:=sun/security/pkcs11,\
@@ -469,14 +456,14 @@
 
 ##########################################################################################
 
-SUNEC_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunec.jar
+SUNEC_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunec.jar
 
 ifndef OPENJDK
 
 SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar
 
 $(SUNEC_JAR_DST) : $(SUNEC_JAR_SRC)
-	@$(ECHO) "\n>>>Installing prebuilt SunEC provider..."
+	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunEC provider..."
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(CP) $< $@
@@ -502,26 +489,26 @@
 		INCLUDES:=javax/swing sun/swing,\
 		EXCLUDES:=javax/swing/plaf,\
 		EXTRA_FILES:=javax/swing/SwingBeanInfoBase.class sun/swing/BeanInfoUtils.class,\
-		JAR:=$(JDK_OUTPUTDIR)/lib/dt.jar,\
+		JAR:=$(IMAGES_OUTPUTDIR)/lib/dt.jar,\
 		SKIP_METAINF:=true))
 
-JARS+=$(JDK_OUTPUTDIR)/lib/dt.jar
+JARS+=$(IMAGES_OUTPUTDIR)/lib/dt.jar
 
 ##########################################################################################
 
-SUNJCE_PROVIDER_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunjce_provider.jar
+SUNJCE_PROVIDER_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunjce_provider.jar
 
 ifndef OPENJDK
     SUNJCE_PROVIDER_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/sunjce_provider.jar
 
     $(SUNJCE_PROVIDER_JAR_DST) : $(SUNJCE_PROVIDER_JAR_SRC)
-	@$(ECHO) "\n>>>Installing prebuilt SunJCE provider..."
+	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunJCE provider..."
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(CP) $< $@
 else
 
-    $(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR,$(SUNJCE_PROVIDER_JAR_DEPS),\
+    $(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR,,\
 		SRCS:=$(JDK_OUTPUTDIR)/classes, \
 		SUFFIXES:=.class,\
 		INCLUDES:= com/sun/crypto/provider,\
@@ -533,21 +520,21 @@
 
 JARS += $(SUNJCE_PROVIDER_JAR_DST)
 
-JCE_JAR_DST := $(JDK_OUTPUTDIR)/lib/jce.jar
+JCE_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/jce.jar
 
 ifndef OPENJDK
 
 JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
 
 $(JCE_JAR_DST) : $(JCE_JAR_SRC)
-	@$(ECHO) "\n>>>Installing prebuilt jce.jar..."
+	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt jce.jar..."
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(CP) $< $@
 
 else
 
-$(eval $(call SetupArchive,BUILD_JCE_JAR,$(JCE_JAR_DEPS),\
+$(eval $(call SetupArchive,BUILD_JCE_JAR,,\
 		SRCS:=$(JDK_OUTPUTDIR)/classes, \
 		SUFFIXES:=.class,\
 		INCLUDES:= javax/crypto sun/security/internal,\
@@ -567,9 +554,12 @@
 # TODO fix so that SetupArchive does not write files into SRCS
 #   then we don't need this extra copying
 #
-US_EXPORT_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/US_export_policy.jar
+# NOTE:  We currently do not place restrictions on our limited export
+# policy.  This was not a typo.
+#
+US_EXPORT_POLICY_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/security/US_export_policy.jar
 US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
-US_EXPORT_POLICY_JAR_TMP := $(JDK_OUTPUTDIR)/US_export_policy_jar.tmp
+US_EXPORT_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/US_export_policy_jar.tmp
 
 $(US_EXPORT_POLICY_JAR_TMP)/% : $(US_EXPORT_POLICY_JAR_SRC_DIR)/%
 	$(MKDIR) -p $(@D)
@@ -598,11 +588,19 @@
 # TODO fix so that SetupArchive does not write files into SRCS
 #   then we don't need this extra copying
 #
-LOCAL_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/local_policy.jar
-LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/limited
-LOCAL_POLICY_JAR_TMP := $(JDK_OUTPUTDIR)/local_policy_jar.tmp
+LOCAL_POLICY_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/security/local_policy.jar
+LOCAL_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/local_policy_jar.tmp
 
-LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/exempt_local.policy $(LOCAL_POLICY_JAR_TMP)/default_local.policy
+ifeq ($(UNLIMITED_CRYPTO), true)
+    LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
+    LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/default_local.policy
+    LOCAL_POLICY_JAR_ATTR := Crypto-Strength: unlimited
+else
+    LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/limited
+    LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/exempt_local.policy \
+			 $(LOCAL_POLICY_JAR_TMP)/default_local.policy
+    LOCAL_POLICY_JAR_ATTR := Crypto-Strength: limited
+endif
 
 $(LOCAL_POLICY_JAR_TMP)/% : $(LOCAL_POLICY_JAR_SRC_DIR)/%
 	$(MKDIR) -p $(@D)
@@ -613,7 +611,7 @@
 		SRCS:=$(LOCAL_POLICY_JAR_TMP),\
 		SUFFIXES:= .policy,\
 		JAR:=$(LOCAL_POLICY_JAR_DST), \
-		EXTRA_MANIFEST_ATTR := Crypto-Strength: limited, \
+		EXTRA_MANIFEST_ATTR := $(LOCAL_POLICY_JAR_ATTR), \
 		SKIP_METAINF := true))
 
 JARS += $(LOCAL_POLICY_JAR_DST)
@@ -624,26 +622,24 @@
 
 ifeq ($(OPENJDK_TARGET_OS),windows)
 
-SUNMSCAPI_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunmscapi.jar
+SUNMSCAPI_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunmscapi.jar
 
 ifndef OPENJDK
 SUNMSCAPI_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/mscapi/sunmscapi.jar
 
 $(SUNMSCAPI_JAR_DST) : $(SUNMSCAPI_JAR_SRC)
-	@$(ECHO) "\n>>>Installing prebuilt SunMSCAPI provider..."
+	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunMSCAPI provider..."
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(CP) $< $@
 
 else
 
-$(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR,$(SUNMSCAPI_JAR_DEPS),\
+$(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR,,\
 		SRCS:=$(JDK_OUTPUTDIR)/classes, \
 		SUFFIXES:=.class,\
 		INCLUDES:= sun/security/mscapi,\
 		JAR:=$(SUNMSCAPI_JAR_DST), \
-		MANIFEST:=$(JDK_TOPDIR)/make/tools/manifest.mf, \
-		EXTRA_MANIFEST_ATTR:=Extension-Name: javax.crypto\nImplementation-Vendor-Id: com.sun, \
 		SKIP_METAINF:=true))
 endif
 
@@ -656,11 +652,11 @@
 ifeq ($(OPENJDK_TARGET_OS),solaris)
 ifndef OPENJDK
 
-UCRYPTO_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/ucrypto.jar
+UCRYPTO_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/ucrypto.jar
 UCRYPTO_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ucrypto/ucrypto.jar
 
 $(UCRYPTO_JAR_DST) : $(UCRYPTO_JAR_SRC)
-	@$(ECHO) "\n>>>Installing prebuilt OracleUcrypto provider..."
+	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt OracleUcrypto provider..."
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(CP) $< $@
@@ -675,9 +671,9 @@
 # Get the CLDRVERSION
 include GensrcCLDR.gmk
 
-CLDRDATA_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/cldrdata.jar
+CLDRDATA_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/cldrdata.jar
 
-$(eval $(call SetupArchive,BUILD_CLDRDATA_JAR,$(CLDRDATA_DEPS),\
+$(eval $(call SetupArchive,BUILD_CLDRDATA_JAR,,\
 		SRCS:=$(JDK_OUTPUTDIR)/classes,\
 		SUFFIXES:=.class,\
 		INCLUDES:=sun/text/resources/cldr \
@@ -750,21 +746,25 @@
 	sun/tools/jinfo         \
 	sun/tools/jmap
 
-$(eval $(call SetupArchive,BUILD_TOOLS_JAR,$(TOOLS_JAR_DEPS),\
+# The sjavac tools is not ready for public consumption.
+TOOLS_JAR_EXCLUDES=com/sun/tools/sjavac
+
+$(eval $(call SetupArchive,BUILD_TOOLS_JAR,,\
 		SRCS:=$(JDK_OUTPUTDIR)/classes,\
 		SUFFIXES:=.class .prp .gif .properties .xml .css .xsd .js .html .txt .java \
 			  Tool aliasmap options,\
 		INCLUDES:=$(TOOLS_JAR_INCLUDES),\
+		EXCLUDES:=$(TOOLS_JAR_EXCLUDES),\
 		EXTRA_FILES:=META-INF/services/com.sun.jdi.connect.Connector \
 			     META-INF/services/com.sun.jdi.connect.spi.TransportService \
 			     META-INF/services/com.sun.tools.attach.spi.AttachProvider \
 			     META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
 			     META-INF/services/com.sun.tools.internal.xjc.Plugin,\
-		JAR:=$(JDK_OUTPUTDIR)/lib/tools.jar,\
+		JAR:=$(IMAGES_OUTPUTDIR)/lib/tools.jar,\
 		SKIP_METAINF:=true, \
                 CHECK_COMPRESS_JAR:=true))
 
-JARS+=$(JDK_OUTPUTDIR)/lib/tools.jar
+JARS+=$(IMAGES_OUTPUTDIR)/lib/tools.jar
 
 ##########################################################################################
 
@@ -796,7 +796,7 @@
                         com.oracle.net \
                         com.oracle.nio
 
-$(IMAGES_OUTPUTDIR)/symbols/_the.symbols: $(JDK_OUTPUTDIR)/lib/rt.jar
+$(IMAGES_OUTPUTDIR)/symbols/_the.symbols: $(IMAGES_OUTPUTDIR)/lib/rt.jar
 	$(RM) -r $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
 	$(MKDIR) -p $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
 	$(JAVA) \
@@ -804,19 +804,19 @@
 		$(JAVAC_JARS) \
 	    -XDprocess.packages -proc:only \
 	    -processor com.sun.tools.javac.sym.CreateSymbols \
-	    -Acom.sun.tools.javac.sym.Jar=$(JDK_OUTPUTDIR)/lib/rt.jar \
+	    -Acom.sun.tools.javac.sym.Jar=$(IMAGES_OUTPUTDIR)/lib/rt.jar \
 	    -Acom.sun.tools.javac.sym.Dest=$(IMAGES_OUTPUTDIR)/symbols/META-INF/sym/rt.jar \
 	    $(CORE_PKGS) $(NON_CORE_PKGS) $(EXCLUDE_PROPWARN_PKGS) $(EXPORTED_PRIVATE_PKGS)
 	$(TOUCH) $@
 
-MAKE_SURE_DIR_EXISTS_DUMMY := $(shell $(MKDIR) -p $(IMAGES_OUTPUTDIR)/symbols)
+$(shell $(MKDIR) -p $(IMAGES_OUTPUTDIR)/symbols)
 $(eval $(call SetupArchive,BUILD_CT_SYM,$(IMAGES_OUTPUTDIR)/symbols/_the.symbols,\
 		SRCS:=$(IMAGES_OUTPUTDIR)/symbols,\
 		INCLUDES:=META-INF/sym,\
-		JAR:=$(JDK_OUTPUTDIR)/lib/ct.sym, \
+		JAR:=$(IMAGES_OUTPUTDIR)/lib/ct.sym, \
 		CHECK_COMPRESS_JAR:=true))
 
-JARS+=$(JDK_OUTPUTDIR)/lib/ct.sym
+JARS+=$(IMAGES_OUTPUTDIR)/lib/ct.sym
 
 ##########################################################################################
 
@@ -896,11 +896,12 @@
 
 $(IMAGES_OUTPUTDIR)/src.zip: $(LAUNCHER_ZIP_SRC)
 
-# This dir needs to exsist before macro is evaluated to avoid warning from find.
-MAKE_SURE_DIR_EXISTS_DUMMY := $(shell $(MKDIR) -p $(IMAGES_OUTPUTDIR)/src)
+# This dir needs to exist before macro is evaluated to avoid warning from find.
+$(eval $(call MakeDir,$(IMAGES_OUTPUTDIR)/src))
 $(eval $(call SetupZipArchive,BUILD_SRC_ZIP,\
 		SRC:=$(SRC_ZIP_SRCS) $(IMAGES_OUTPUTDIR)/src,\
 		INCLUDES:=$(SRC_ZIP_INCLUDES) launcher,\
+		EXCLUDES:=javax/swing/beaninfo,\
 		SUFFIXES:=.java .c .h,\
 		ZIP:=$(IMAGES_OUTPUTDIR)/src.zip,\
 		EXTRA_DEPS:=$(LAUNCHER_ZIP_SRC)))
--- a/makefiles/GendataBreakIterator.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/GendataBreakIterator.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -75,7 +75,7 @@
 $(BIFILES): $(DATA_PKG_DIR)/_the.bifiles
 $(DATA_PKG_DIR)/_the.bifiles: JAVA_FLAGS += -Xbootclasspath/p:$(BREAK_ITERATOR_CLASSES)
 $(DATA_PKG_DIR)/_the.bifiles: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKITERATOR)
-	$(ECHO) "Generating BreakIteratorData"
+	$(ECHO) $(LOG_INFO) "Generating BreakIteratorData"
 	$(MKDIR) -p  $(DATA_PKG_DIR)
 	$(RM) $(BIFILES)
 	$(TOOL_GENERATEBREAKITERATORDATA) \
@@ -86,7 +86,7 @@
 $(BIFILES_TH): $(DATA_PKG_DIR)/_the.bifiles_th
 $(DATA_PKG_DIR)/_the.bifiles_th: JAVA_FLAGS += -Xbootclasspath/p:$(BREAK_ITERATOR_CLASSES)
 $(DATA_PKG_DIR)/_the.bifiles_th: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKITERATOR)
-	$(ECHO) "Generating BreakIteratorData_th"
+	$(ECHO) $(LOG_INFO) "Generating BreakIteratorData_th"
 	$(MKDIR) -p  $(DATA_PKG_DIR)/th
 	$(RM) $(BIFILES_TH)
 	$(TOOL_GENERATEBREAKITERATORDATA) \
--- a/makefiles/GendataFontConfig.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/GendataFontConfig.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -75,7 +75,6 @@
 	$(RM) $@
 	$(MKDIR) -p $(@D)
 	$(CP) $< $@
-	$(CHMOD) 644 $@
 
 $(GENDATA_FONT_CONFIG_DST)/%.bfc : \
     $(GENDATA_FONT_CONFIG_SRC_DIR)/$(GENDATA_FONT_CONFIG_SRC_PREFIX)%.properties
--- a/makefiles/GendataHtml32dtd.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/GendataHtml32dtd.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -30,6 +30,6 @@
 	$(ECHO) "Generating HTML DTD file"
 	$(MKDIR) -p $(@D)
 	$(RM) $@
-	($(TOOL_DTDBUILDER) html32 > $@) || exit 1
+	($(TOOL_DTDBUILDER) $(LOG_INFO) html32 > $@) || exit 1
 
-GENDATA_HTML32DTD += $(HTML32DTD)
\ No newline at end of file
+GENDATA_HTML32DTD += $(HTML32DTD)
--- a/makefiles/GenerateClasses.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/GenerateClasses.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -32,13 +32,13 @@
 # To ensure the latest stub generator files are picked up from corba repo
 # when available, we need to run with latest rmic version available. 
 ifneq ($(COMPILE_TYPE),cross)
-    RMIC := $(UNCYGDRIVE) $(JDK_OUTPUTDIR)/bin/rmic
+    RMIC := $(FIXPATH) $(JDK_OUTPUTDIR)/bin/rmic
 endif  
 
 CLASSES_DIR := $(JDK_OUTPUTDIR)/classes
 # NOTE: If the smart javac dependency management is reintroduced, these classes risk 
 # interfering with the dependency checking. In that case they will need to be kept separate.
-STUB_CLASSES_DIR := $(JDK_OUTPUTDIR)/rmicclasses
+STUB_CLASSES_DIR := $(JDK_OUTPUTDIR)/classes
 RMIC_GENSRC_DIR := $(JDK_OUTPUTDIR)/gendocsrc_rmic
 
 GENCLASSES :=
@@ -91,8 +91,10 @@
 
 ##########################################################################################
 
-all: $(GENCLASSES)
+$(RMIC_GENSRC_DIR)/_the.classes.removed: $(GENCLASSES)
 	$(FIND) $(RMIC_GENSRC_DIR) -name "*.class" $(FIND_DELETE)
-	$(CP) -rp $(STUB_CLASSES_DIR)/* $(CLASSES_DIR)
+	$(TOUCH) $@
+
+all: $(RMIC_GENSRC_DIR)/_the.classes.removed $(GENCLASSES)
 
 .PHONY: all
--- a/makefiles/GenerateJavaSources.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/GenerateJavaSources.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -67,7 +67,11 @@
 
 ifneq ($(OPENJDK_TARGET_OS),windows)
 include GensrcIcons.gmk
-GENSRC += $(GENSRC_ICONS)
+GENSRC += $(GENSRC_X11_ICONS)
+
+ifeq ($(OPENJDK_TARGET_OS),macosx)
+GENSRC += $(GENSRC_OSX_ICONS)
+endif
 
 include GensrcX11Wrappers.gmk
 GENSRC += $(GENSRC_X11WRAPPERS)
@@ -77,9 +81,7 @@
 GENSRC += $(GENSRC_CLDR)
 
 include GensrcSwing.gmk
-ifndef DISABLE_NIMBUS
-  GENSRC += $(GENSRC_SWING_NIMBUS)
-endif
+GENSRC += $(GENSRC_SWING_BEANINFO) $(GENSRC_SWING_NIMBUS)
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
      include GensrcJObjC.gmk
@@ -88,34 +90,7 @@
 
 $(GENSRC) : $(BUILD_TOOLS)
 
-# The exception handling of swing beaninfo
-# gensrc_swing/javax/swing/beaninfo/* have not be in src.zip
-all: $(GENSRC) $(GENSRC_SWING_BEANINFO)
-	$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc
-	(cd $(JDK_OUTPUTDIR) && \
-		$(CHMOD) -R u+rw gensrc && \
-		$(CP) -rp gensrc_characterdata/* gensrc && \
-		$(CP) -rp gensrc_properties/* gensrc && \
-		$(CP) -rp gensrc_localedatametainfo/* gensrc && \
-		$(CP) -rp gensrc_jdwp/* gensrc && \
-		$(CP) -rp gensrc_misc/* gensrc && \
-		$(CP) -rp gensrc_charsetmapping/* gensrc && \
-		$(CP) -rp gensrc_charsetcoder/* gensrc && \
-		$(CP) -rp gensrc_exceptions/* gensrc && \
-		$(CP) -rp gensrc_buffer/* gensrc && \
-		$(CP) -rp gensrc_cldr/* gensrc)
-	if [ -d  $(JDK_OUTPUTDIR)/gensrc_swing/javax/swing/plaf ] ; then \
-		(cd $(JDK_OUTPUTDIR) && \
-		$(MKDIR) -p gensrc/javax/swing/plaf && \
-		$(CP) -rp gensrc_swing/javax/swing/plaf/* gensrc/javax/swing/plaf) \
-	fi
-	if [ -d $(JDK_OUTPUTDIR)/gensrc_jobjc ] ; then \
-		(cd $(JDK_OUTPUTDIR) && cp -rp gensrc_jobjc/src/* gensrc) \
-	fi
-ifneq ($(OPENJDK_TARGET_OS),windows)
-	(cd $(JDK_OUTPUTDIR) && \
-		$(CP) -rp gensrc_icons/* gensrc && \
-		$(CP) -rp gensrc_x11wrappers/classes/* gensrc)
-endif
+all: $(GENSRC)
+
 
 .PHONY: all
--- a/makefiles/GensrcBuffer.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/GensrcBuffer.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -25,14 +25,14 @@
 
 GENSRC_BUFFER :=
 
-GENSRC_BUFFER_TMP := $(JDK_OUTPUTDIR)/gensrc_buffer
-GENSRC_BUFFER_DST := $(JDK_OUTPUTDIR)/gensrc_buffer/java/nio
+GENSRC_BUFFER_TMP := $(JDK_OUTPUTDIR)/gensrc
+GENSRC_BUFFER_DST := $(JDK_OUTPUTDIR)/gensrc/java/nio
 
 GENSRC_BUFFER_SRC := $(JDK_TOPDIR)/src/share/classes/java/nio
 
 ###
 
-$(GENSRC_BUFFER_DST)/_the.dir :
+$(GENSRC_BUFFER_DST)/_the.buffer.dir :
 	$(ECHO) "Generating buffer classes"
 	$(MKDIR) -p $(@D)
 	$(TOUCH) $@
@@ -198,7 +198,9 @@
 	$(if $(12),$1_$(strip $(12)))
 	$(if $(13),$1_$(strip $(13)))
 	$(if $(14),$1_$(strip $(14)))
-	$(if $(15),$(error Internal makefile error: Too many arguments to SetupGenBuffer, please update GensrcBuffer.gmk))
+	$(foreach i,3 4 5 6 7 8 9 10 11 12 13 14 15,$(if $($i),$1_$(strip $($i)))$(NEWLINE))
+	$(call LogSetupMacroEntry,SetupGenBuffer($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 SetupGenBuffer, please update GensrcBuffer.gmk))
 
 	$(call fixRw,$1,$$($1_RW))
 	$(call typesAndBits,$1,$$($1_type),$$($1_BO))
@@ -225,7 +227,7 @@
 		$(call genBinOps,$1_double,double,$$($1_BO),$$($1_RW),eight,seven)
 	endif
 
-$$($1_DST) : $$($1_DEP) $(GENSRC_BUFFER_DST)/_the.dir
+$$($1_DST) : $$($1_DEP) $(GENSRC_BUFFER_DST)/_the.buffer.dir
 	$(TOOL_SPP) < $$($1_SRC) > $$($1_OUT).tmp \
 		-K$$($1_type) \
 		-K$$($1_category) \
--- a/makefiles/GensrcCLDR.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/GensrcCLDR.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -26,7 +26,7 @@
 CLDRVERSION := 21.0.1
 CLDRSRCDIR := $(JDK_TOPDIR)/src/share/classes/sun/util/cldr/resources/$(subst .,_,$(CLDRVERSION))
 
-GENSRC_DIR := $(JDK_OUTPUTDIR)/gensrc_cldr
+GENSRC_DIR := $(JDK_OUTPUTDIR)/gensrc
 
 CLDR_METAINFO_FILE := $(GENSRC_DIR)/sun/util/cldr/CLDRLocaleDataMetaInfo.java
 
--- a/makefiles/GensrcCharacterData.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/GensrcCharacterData.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -24,7 +24,7 @@
 #
 
 #
-# Rules to create $(JDK_OUTPUTDIR)/gensrc_characterdata/sun/lang/CharacterData*.java 
+# Rules to create $(JDK_OUTPUTDIR)/gensrc/sun/lang/CharacterData*.java 
 #
 
 GENSRC_CHARACTERDATA:=
@@ -33,18 +33,18 @@
 UNICODEDATA   = $(JDK_TOPDIR)/make/tools/UnicodeData
 
 define SetupCharacterData
-    $(JDK_OUTPUTDIR)/gensrc_characterdata/java/lang/$1.java : $(CHARACTERDATA)/$1.java.template $(BUILD_TOOLS)
+    $(JDK_OUTPUTDIR)/gensrc/java/lang/$1.java : $(CHARACTERDATA)/$1.java.template $(BUILD_TOOLS)
 	$(MKDIR) -p $$(@D)
-	$(ECHO) Generating $1.java
+	$(ECHO) $(LOG_INFO) Generating $1.java
 	$(TOOL_GENERATECHARACTER) $2 \
 		-template $(CHARACTERDATA)/$1.java.template \
 		-spec $(UNICODEDATA)/UnicodeData.txt \
 		-specialcasing $(UNICODEDATA)/SpecialCasing.txt \
 		-proplist $(UNICODEDATA)/PropList.txt \
-		-o $(JDK_OUTPUTDIR)/gensrc_characterdata/java/lang/$1.java -string \
+		-o $(JDK_OUTPUTDIR)/gensrc/java/lang/$1.java -string \
 		-usecharforbyte $3
 
-    GENSRC_CHARACTERDATA += $(JDK_OUTPUTDIR)/gensrc_characterdata/java/lang/$1.java
+    GENSRC_CHARACTERDATA += $(JDK_OUTPUTDIR)/gensrc/java/lang/$1.java
 endef
 
 $(eval $(call SetupCharacterData,CharacterDataLatin1,,-latin1 8))
@@ -54,12 +54,12 @@
 $(eval $(call SetupCharacterData,CharacterData0E,-plane 14,11 4 1))
 
 # Copy two Java files that need no preprocessing.
-$(JDK_OUTPUTDIR)/gensrc_characterdata/java/lang/%.java : $(CHARACTERDATA)/%.java.template
+$(JDK_OUTPUTDIR)/gensrc/java/lang/%.java : $(CHARACTERDATA)/%.java.template
 	$(MKDIR) -p $(@D)
-	$(ECHO) Generating $(@F)
+	$(ECHO) $(LOG_INFO) Generating $(@F)
 	$(CP) -f $< $@
 
-GENSRC_CHARACTERDATA += $(JDK_OUTPUTDIR)/gensrc_characterdata/java/lang/CharacterDataUndefined.java \
-                       $(JDK_OUTPUTDIR)/gensrc_characterdata/java/lang/CharacterDataPrivateUse.java
+GENSRC_CHARACTERDATA += $(JDK_OUTPUTDIR)/gensrc/java/lang/CharacterDataUndefined.java \
+                       $(JDK_OUTPUTDIR)/gensrc/java/lang/CharacterDataPrivateUse.java
 
 $(GENSRC_CHARACTERDATA) : $(BUILD_TOOLS)
--- a/makefiles/GensrcCharsetCoder.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/GensrcCharsetCoder.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -25,8 +25,8 @@
 
 GENSRC_CHARSETCODER :=
 
-GENSRC_CHARSETCODER_TMP := $(JDK_OUTPUTDIR)/gensrc_charsetcoder
-GENSRC_CHARSETCODER_DST := $(JDK_OUTPUTDIR)/gensrc_charsetcoder/java/nio/charset
+GENSRC_CHARSETCODER_TMP := $(JDK_OUTPUTDIR)/gensrc
+GENSRC_CHARSETCODER_DST := $(JDK_OUTPUTDIR)/gensrc/java/nio/charset
 
 GENSRC_CHARSETCODER_SRC := $(JDK_TOPDIR)/src/share/classes/java/nio
 
--- a/makefiles/GensrcCharsetMapping.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/GensrcCharsetMapping.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -25,8 +25,8 @@
 
 GENSRC_CHARSETMAPPING:=
 
-GENSRC_TMP := $(JDK_OUTPUTDIR)/gensrc_charsetmapping
-GENSRC_DST := $(JDK_OUTPUTDIR)/gensrc_charsetmapping/sun/nio/cs
+GENSRC_TMP := $(JDK_OUTPUTDIR)/gensrc
+GENSRC_DST := $(JDK_OUTPUTDIR)/gensrc/sun/nio/cs
 
 GENSRC_SRC := $(JDK_TOPDIR)/make/tools/CharsetMapping
 GENSRC_JAVA_SRC := $(JDK_TOPDIR)/make/tools/src/build/tools/charsetmapping
@@ -35,17 +35,17 @@
 
 ###
 
-$(GENSRC_TMP)/_the.dir :
+$(GENSRC_TMP)/_the.charsetmapping.dir :
 	$(ECHO) Generating charsetmapping classes
 	$(MKDIR) -p $(GENSRC_DST)/ext
 	$(TOUCH) $@
 
 ###
 
-GENSRC_SB := $(GENSRC_TMP)/gensrc_the.charsetmapping.sbcs
+GENSRC_SB := $(GENSRC_TMP)/_the.charsetmapping.sbcs
 
-$(GENSRC_SB) : $(GENSRC_SRC)/sbcs $(GENSRC_TEMPLATES) $(GENSRC_TMP)/_the.dir
-	$(TOOL_CHARSETMAPPING) $(GENSRC_SRC) $(GENSRC_DST) sbcs
+$(GENSRC_SB) : $(GENSRC_SRC)/sbcs $(GENSRC_TEMPLATES) $(GENSRC_TMP)/_the.charsetmapping.dir
+	$(TOOL_CHARSETMAPPING) $(LOG_INFO) $(GENSRC_SRC) $(GENSRC_DST) sbcs
 	$(TOUCH) $@
 
 GENSRC_CHARSETMAPPING += $(GENSRC_SB)
@@ -53,28 +53,28 @@
 ###
 
 $(GENSRC_DST)/ext/sjis0213.dat : $(GENSRC_SRC)/sjis0213.map $(GENSRC_SB)
-	$(TOOL_CHARSETMAPPING) $< $@ sjis0213
+	$(TOOL_CHARSETMAPPING) $(LOG_INFO) $< $@ sjis0213
 
 GENSRC_CHARSETMAPPING += $(GENSRC_DST)/ext/sjis0213.dat
 
 ###
 
 $(GENSRC_DST)/ext/EUC_TWMapping.java : $(GENSRC_JAVA_SRC)/EUC_TW.java $(GENSRC_SB)
-	$(TOOL_CHARSETMAPPING) $(GENSRC_SRC) $(GENSRC_DST)/ext euctw $(GENSRC_JAVA_SRC)/EUC_TW.java
+	$(TOOL_CHARSETMAPPING) $(LOG_INFO) $(GENSRC_SRC) $(GENSRC_DST)/ext euctw $(GENSRC_JAVA_SRC)/EUC_TW.java
 
 GENSRC_CHARSETMAPPING += $(GENSRC_DST)/ext/EUC_TWMapping.java
 
 ###
 
 $(GENSRC_DST)/ext/HKSCSMapping.java : $(GENSRC_JAVA_SRC)/HKSCS.java $(GENSRC_SB)
-	$(TOOL_CHARSETMAPPING) $(GENSRC_SRC) $(GENSRC_DST)/ext hkscs $(GENSRC_JAVA_SRC)/HKSCS.java
+	$(TOOL_CHARSETMAPPING) $(LOG_INFO) $(GENSRC_SRC) $(GENSRC_DST)/ext hkscs $(GENSRC_JAVA_SRC)/HKSCS.java
 
 GENSRC_CHARSETMAPPING += $(GENSRC_DST)/ext/HKSCSMapping.java
 
 ###
 
 $(GENSRC_TMP)/gensrc_the.charsetmapping.extsbcs : $(GENSRC_SRC)/extsbcs $(GENSRC_TEMPLATES) $(GENSRC_SB)
-	$(TOOL_CHARSETMAPPING) $(GENSRC_SRC) $(GENSRC_DST)/ext extsbcs
+	$(TOOL_CHARSETMAPPING) $(GENSRC_SRC) $(LOG_INFO) $(GENSRC_DST)/ext extsbcs
 	$(TOUCH) $@
 
 GENSRC_CHARSETMAPPING += $(GENSRC_TMP)/gensrc_the.charsetmapping.extsbcs
@@ -82,7 +82,7 @@
 ###
 
 $(GENSRC_TMP)/gensrc_the.charsetmapping.dbcs : $(GENSRC_SRC)/dbcs $(GENSRC_TEMPLATES) $(GENSRC_SB)
-	$(TOOL_CHARSETMAPPING) $(GENSRC_SRC) $(GENSRC_DST)/ext dbcs
+	$(TOOL_CHARSETMAPPING) $(GENSRC_SRC) $(LOG_INFO) $(GENSRC_DST)/ext dbcs
 	$(TOUCH) $@
 
 GENSRC_CHARSETMAPPING += $(GENSRC_TMP)/gensrc_the.charsetmapping.dbcs
@@ -93,12 +93,12 @@
 
 $(GENSRC_DST)/StandardCharsets.java : $(JDK_TOPDIR)/src/share/classes/sun/nio/cs/standard-charsets \
                                       $(GENSRC_CHARSET_PROVIDER_CMD) \
-                                      $(GENSRC_TMP)/_the.dir
+                                      $(GENSRC_TMP)/_the.charsetmapping.dir
 
 	NAWK="$(NAWK)" TEMPDIR="$(GENSRC_TMP)" SH="$(SH)" \
 	  HASHER="$(TOOL_HASHER)" \
           SCRIPTS="$(JDK_TOPDIR)/makefiles/scripts" \
-	  $(SH) -e $(GENSRC_CHARSET_PROVIDER_CMD) $< $(@D)
+	  $(SH) -e $(GENSRC_CHARSET_PROVIDER_CMD) $(LOG_INFO) $< $(@D)
 
 GENSRC_CHARSETMAPPING += $(GENSRC_DST)/StandardCharsets.java
 
--- a/makefiles/GensrcExceptions.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/GensrcExceptions.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -25,8 +25,8 @@
 
 GENSRC_EXCEPTIONS :=
 
-GENSRC_EXCEPTIONS_TMP := $(JDK_OUTPUTDIR)/gensrc_exceptions
-GENSRC_EXCEPTIONS_DST := $(JDK_OUTPUTDIR)/gensrc_exceptions/java/nio
+GENSRC_EXCEPTIONS_TMP := $(JDK_OUTPUTDIR)/gensrc
+GENSRC_EXCEPTIONS_DST := $(JDK_OUTPUTDIR)/gensrc/java/nio
 
 GENSRC_EXCEPTIONS_SRC := $(JDK_TOPDIR)/src/share/classes/java/nio
 GENSRC_EXCEPTIONS_CMD := $(JDK_TOPDIR)/makefiles/scripts/genExceptions.sh
@@ -35,7 +35,7 @@
 
 ###
 
-$(GENSRC_EXCEPTIONS_DST)/_the.dir :
+$(GENSRC_EXCEPTIONS_DST)/_the.exceptions.dir :
 	$(ECHO) "Generating exceptions classes"
 	$(MKDIR) -p $(@D)
 	$(TOUCH) $@
@@ -45,9 +45,9 @@
 
 $(GENSRC_EXCEPTIONS_DST)/_the.% : $(GENSRC_EXCEPTIONS_SRC)/%/exceptions \
                                   $(GENSRC_EXCEPTIONS_CMD) \
-                                  $(GENSRC_EXCEPTIONS_DST)/_the.dir
+                                  $(GENSRC_EXCEPTIONS_DST)/_the.exceptions.dir
 	$(MKDIR) -p $(@D)/$*
-	SCRIPTS="$(JDK_TOPDIR)/makefiles/scripts" NAWK="$(NAWK)" SH="$(SH)" $(SH) $(GENSRC_EXCEPTIONS_CMD) $< $(@D)/$*
+	SCRIPTS="$(JDK_TOPDIR)/makefiles/scripts" NAWK="$(NAWK)" SH="$(SH)" $(SH) $(GENSRC_EXCEPTIONS_CMD) $< $(@D)/$* $(LOG_INFO) 
 	$(TOUCH) $@
 
 GENSRC_EXCEPTIONS += $(foreach D,$(GENSRC_EXCEPTIONS_SRC_DIRS),$(GENSRC_EXCEPTIONS_DST)/_the.$(D))
--- a/makefiles/GensrcIcons.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/GensrcIcons.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -23,84 +23,105 @@
 # questions.
 #
 
-GENSRC_ICONS :=
-GENSRC_ICONS_SRC :=
-GENSRC_ICONS_TMP := $(JDK_OUTPUTDIR)/gensrc_icons
-GENSRC_ICONS_DST := $(GENSRC_ICONS_TMP)/sun/awt/X11
+GENSRC_X11_ICONS :=
+GENSRC_X11_ICONS_SRC :=
+GENSRC_X11_ICONS_TMP := $(JDK_OUTPUTDIR)/gensrc
+GENSRC_X11_ICONS_DST := $(GENSRC_X11_ICONS_TMP)/sun/awt/X11
 
 ifdef OPENJDK
-	ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)
+  X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)
 else
-	ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/closed/solaris
+  X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/closed/solaris
 endif
 
-GENSRC_ICONS_SRC += \
-    $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon16.png \
-    $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon24.png \
-    $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon32.png \
-    $(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon48.png
+GENSRC_X11_ICONS_SRC += \
+    $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon16.png \
+    $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon24.png \
+    $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon32.png \
+    $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon48.png
 
 
-ICONPATH := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes/sun/awt/X11
+X11_ICONPATH := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes/sun/awt/X11
 
-GENSRC_ICONS_SRC += \
-   $(ICONPATH)/security-icon-bw16.png \
-   $(ICONPATH)/security-icon-interim16.png \
-   $(ICONPATH)/security-icon-yellow16.png \
-   $(ICONPATH)/security-icon-bw24.png \
-   $(ICONPATH)/security-icon-interim24.png \
-   $(ICONPATH)/security-icon-yellow24.png \
-   $(ICONPATH)/security-icon-bw32.png \
-   $(ICONPATH)/security-icon-interim32.png \
-   $(ICONPATH)/security-icon-yellow32.png \
-   $(ICONPATH)/security-icon-bw48.png \
-   $(ICONPATH)/security-icon-interim48.png \
-   $(ICONPATH)/security-icon-yellow48.png
+GENSRC_X11_ICONS_SRC += \
+   $(X11_ICONPATH)/security-icon-bw16.png \
+   $(X11_ICONPATH)/security-icon-interim16.png \
+   $(X11_ICONPATH)/security-icon-yellow16.png \
+   $(X11_ICONPATH)/security-icon-bw24.png \
+   $(X11_ICONPATH)/security-icon-interim24.png \
+   $(X11_ICONPATH)/security-icon-yellow24.png \
+   $(X11_ICONPATH)/security-icon-bw32.png \
+   $(X11_ICONPATH)/security-icon-interim32.png \
+   $(X11_ICONPATH)/security-icon-yellow32.png \
+   $(X11_ICONPATH)/security-icon-bw48.png \
+   $(X11_ICONPATH)/security-icon-interim48.png \
+   $(X11_ICONPATH)/security-icon-yellow48.png
 
-GENSRC_ICONS_FILES := $(notdir $(GENSRC_ICONS_SRC))
+GENSRC_X11_ICONS_FILES := $(notdir $(GENSRC_X11_ICONS_SRC))
 
-GENSRC_ICONS_SHORT_NAME = $(subst .,_,$(subst -,_,$(1)))
-GENSRC_ICONS_DST_NAME = XAWTIcon$(2)_$(subst .,_,$(subst -,_,$(1)))
+GENSRC_X11_ICONS_SHORT_NAME = $(subst .,_,$(subst -,_,$(1)))
+GENSRC_X11_ICONS_DST_NAME = XAWTIcon$(2)_$(subst .,_,$(subst -,_,$(1)))
 
 ###
 
-$(GENSRC_ICONS_TMP)/_the.dir :
+$(GENSRC_X11_ICONS_TMP)/_the.icons.dir :
 	$(ECHO) Generating icon classes
-	$(MKDIR) -p $(GENSRC_ICONS_DST)
+	$(MKDIR) -p $(GENSRC_X11_ICONS_DST)
 	$(TOUCH) $@
 
 ###
 
-define SetupGensrcIcon
+define SetupGensrcX11Icon
         # param 1 is for src-file
         # param 2 is for src-dir
-	$1_SHORTNAME := $(call GENSRC_ICONS_SHORT_NAME,$1)
-	$1_NAME32 := $(call GENSRC_ICONS_DST_NAME,$1,32)
-	$1_TARGET32 := $(GENSRC_ICONS_DST)/$$($1_NAME32).java
-	$1_NAME64 := $(call GENSRC_ICONS_DST_NAME,$1,64)
-	$1_TARGET64 := $(GENSRC_ICONS_DST)/$$($1_NAME64).java
+	$1_SHORTNAME := $(call GENSRC_X11_ICONS_SHORT_NAME,$1)
+	$1_NAME32 := $(call GENSRC_X11_ICONS_DST_NAME,$1,32)
+	$1_TARGET32 := $(GENSRC_X11_ICONS_DST)/$$($1_NAME32).java
+	$1_NAME64 := $(call GENSRC_X11_ICONS_DST_NAME,$1,64)
+	$1_TARGET64 := $(GENSRC_X11_ICONS_DST)/$$($1_NAME64).java
 
-$$($1_TARGET32) : $2/$1 $(GENSRC_ICONS_TMP)/_the.dir
+$$($1_TARGET32) : $2/$1 $(GENSRC_X11_ICONS_TMP)/_the.icons.dir
 	$(RM) $$@ $$@.tmp
 	$(ECHO) "package sun.awt.X11;" > $$@.tmp
 	$(ECHO) "public class $$($1_NAME32) {" >> $$@.tmp
 	$(ECHO) "public static int[] $$($1_SHORTNAME) = { " >> $$@.tmp
-	$(CAT) $$< | $(TOOL_TOBIN) >> $$@.tmp
+	$(CAT) $$< | $(TOOL_X11_TOBIN) >> $$@.tmp
 	$(ECHO) "}; }" >> $$@.tmp
 	$(MV) $$@.tmp $$@
 
-GENSRC_ICONS += $$($1_TARGET32)
+GENSRC_X11_ICONS += $$($1_TARGET32)
 
-$$($1_TARGET64) : $2/$1 $(GENSRC_ICONS_TMP)/_the.dir
+$$($1_TARGET64) : $2/$1 $(GENSRC_X11_ICONS_TMP)/_the.icons.dir
 	$(RM) $$@ $$@.tmp
 	$(ECHO) "package sun.awt.X11;" > $$@.tmp
 	$(ECHO) "public class $$($1_NAME64) {" >> $$@.tmp
 	$(ECHO) "public static long[] $$($1_SHORTNAME) = { " >> $$@.tmp
-	$(CAT) $$< | $(TOOL_TOBIN) >> $$@.tmp
+	$(CAT) $$< | $(TOOL_X11_TOBIN) >> $$@.tmp
 	$(ECHO) "}; }" >> $$@.tmp
 	$(MV) $$@.tmp $$@
 
-GENSRC_ICONS += $$($1_TARGET64)
+GENSRC_X11_ICONS += $$($1_TARGET64)
 endef
 
-$(foreach I,$(GENSRC_ICONS_SRC), $(eval $(call SetupGensrcIcon,$(notdir $(I)),$(dir $(I)))))
+$(foreach I,$(GENSRC_X11_ICONS_SRC), $(eval $(call SetupGensrcX11Icon,$(notdir $(I)),$(dir $(I)))))
+
+###
+
+ifeq ($(OPENJDK_TARGET_OS),macosx)
+
+  GENSRC_OSX_ICONS      = $(GENSRC_OSX_ICONS_DST)/AWTIconData.h
+  GENSRC_OSX_ICONS_SRC  =
+  GENSRC_OSX_ICONS_TMP  = $(JDK_OUTPUTDIR)/gensrc
+  GENSRC_OSX_ICONS_DST  = $(GENSRC_OSX_ICONS_TMP)/sun/osxapp
+  
+$(GENSRC_OSX_ICONS_DST)/AWTIconData.h: \
+    $(JDK_TOPDIR)/src/macosx/native/sun/osxapp/resource/icons/JavaApp.icns 
+	$(RM) $@ $@.tmp
+	$(MKDIR) -p $(dir $@)
+	$(ECHO) "static unsigned char sAWTIconData[] = { " >> $@.tmp
+	$(CAT) $< | $(TOOL_OSX_TOBIN) >> $@.tmp
+	$(ECHO) "};" >> $@.tmp
+	$(MV) $@.tmp $@
+
+endif
+
--- a/makefiles/GensrcJDWP.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/GensrcJDWP.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -28,20 +28,19 @@
 
 $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h : $(JDK_TOPDIR)/makefiles/jpda/jdwp/jdwp.spec
 
-$(JDK_OUTPUTDIR)/gensrc_jdwp/com/sun/tools/jdi/JDWP.java : $(JDK_TOPDIR)/makefiles/jpda/jdwp/jdwp.spec
+$(JDK_OUTPUTDIR)/gensrc/com/sun/tools/jdi/JDWP.java : $(JDK_TOPDIR)/makefiles/jpda/jdwp/jdwp.spec
 	$(MKDIR) -p $(@D)
 	$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_jdwp_headers
 	$(RM) $@ $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h
-	$(ECHO) Creating JDWP.java and JDWPCommands.h from jdwp.spec
+	$(ECHO) $(LOG_INFO) Creating JDWP.java and JDWPCommands.h from jdwp.spec
 	$(TOOL_JDWPGEN) $< -jdi $@ -include $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h
 
 $(JDK_OUTPUTDIR)/gensrc_jdwp_doc/jdwp-protocol.html : $(JDK_TOPDIR)/makefiles/jpda/jdwp/jdwp.spec
 	$(MKDIR) -p $(@D)
 	$(RM) $@
-	$(ECHO) Creating $(@F) from jdwp.spec
+	$(ECHO) $(LOG_INFO) Creating $(@F) from jdwp.spec
 	$(TOOL_JDWPGEN) $< -doc $@
 
-GENSRC_JDWP:=	$(JDK_OUTPUTDIR)/gensrc_jdwp/com/sun/tools/jdi/JDWP.java \
+GENSRC_JDWP:=	$(JDK_OUTPUTDIR)/gensrc/com/sun/tools/jdi/JDWP.java \
 		$(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h \
 		$(JDK_OUTPUTDIR)/gensrc_jdwp_doc/jdwp-protocol.html
-
--- a/makefiles/GensrcJObjC.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/GensrcJObjC.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -64,7 +64,7 @@
 if [ -f $(FRAMEWORKS_DIR)/$1.framework/Resources/BridgeSupport/$(@F) ]; then \
     $(CP) $(FRAMEWORKS_DIR)/$1.framework/Resources/BridgeSupport/$(@F) $@.tmp ;\
 else \
-    $(GBM) -F complete --framework $1 -o $@.tmp ; \
+    $(GBM) $(LOG_INFO) -F complete --framework $1 -o $@.tmp ; \
 fi
 $(MV) $@.tmp $@
 endef
@@ -88,8 +88,9 @@
 #     classpath that ends with "JObjC.jar", and emit the new bootclasspath.
 #
 $(JOBJC_TMP)/_the.generator_bootclasspath : $(BUILD_JOBJC_PRIMITIVE_CODER)
+	$(ECHO) Generating jobjc framework bridge
 	$(RM) $@
-	$(JAVA) -cp $(JOBJC_TMP)/bin com.apple.internal.jobjc.generator.BootClassPathMinus JObjC.jar > $@.tmp
+	$(JAVA) $(LOG_INFO) -cp $(JOBJC_TMP)/bin com.apple.internal.jobjc.generator.BootClassPathMinus JObjC.jar > $@.tmp
 	$(MV) $@.tmp $@
 
 #
@@ -101,8 +102,14 @@
 #
 $(JOBJC_TMP)/_the.generator : $(JOBJC_TMP)/_the.generator_bootclasspath | $(BRIDGESUPPORT)
 	$(RM) $@
-	$(JAVA) -d64 -Xbootclasspath:`$(CAT) $(JOBJC_TMP)/_the.generator_bootclasspath` -cp $(JOBJC_TMP)/bin -ea com.apple.internal.jobjc.generator.Generator dst=$(JOBJC_DST) frameworks=$(JOBJC_TMP)/bridge
+	$(JAVA) $(LOG_INFO) -d64 -Xbootclasspath:`$(CAT) $(JOBJC_TMP)/_the.generator_bootclasspath` -cp $(JOBJC_TMP)/bin -ea com.apple.internal.jobjc.generator.Generator dst=$(JOBJC_DST) frameworks=$(JOBJC_TMP)/bridge
 	$(TOUCH) $@
 
-GENSRC_JOBJC += $(JOBJC_TMP)/_the.generator
+# The generator delets all files in the target dir so it has to work in its
+# own dir and have the files copied over to gensrc aftewards.
+$(JDK_OUTPUTDIR)/gensrc/_the.jobjc.files : $(JOBJC_TMP)/_the.generator
+	$(MKDIR) -p $(@D)
+	$(CP) -rp $(JOBJC_DST)/* $(@D)
+	$(TOUCH) $@
 
+GENSRC_JOBJC += $(JDK_OUTPUTDIR)/gensrc/_the.jobjc.files
--- a/makefiles/GensrcLocaleDataMetaInfo.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/GensrcLocaleDataMetaInfo.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -40,14 +40,14 @@
 LOCALE_RESOURCES:=$(sort $(subst .properties,,$(subst .java,,$(notdir $(LOCALE_FILES)))))
 
 # Include the list of resources found during the previous compile.
--include $(JDK_OUTPUTDIR)/gensrc_localedatametainfo/_the.locale_resources
+-include $(JDK_OUTPUTDIR)/gensrc/_the.locale_resources
 
 MISSING_RESOURCES:=$(filter-out $(LOCALE_RESOURCES),$(PREV_LOCALE_RESOURCES))
 NEW_RESOURCES:=$(filter-out $(PREV_LOCALE_RESOURCES),$(LOCALE_RESOURCES))
 
 ifneq (,$(MISSING_RESOURCES)$(NEW_RESOURCES))
     # There is a difference in the number of supported resources. Trigger a regeneration.
-    $(shell $(RM) $(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/locale/provider/LocaleDataMetaInfo.java)
+    $(shell $(RM) $(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java)
 endif
 
 # The US locales
@@ -93,18 +93,18 @@
 SED_ARGS+= -e 's/$(HASH)AvailableLocales_USLocales$(HASH)/$(sort $(ALL_US_LOCALES))/g'
 SED_ARGS+= -e 's/$(HASH)AvailableLocales_NonUSLocales$(HASH)/$(sort $(ALL_NON_US_LOCALES))/g'
 
-$(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/locale/provider/LocaleDataMetaInfo.java: \
+$(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java: \
 		$(JDK_TOPDIR)/src/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
 	$(MKDIR) -p $(@D)
 	$(ECHO) Creating sun/util/LocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources.
-	$(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" > $(JDK_OUTPUTDIR)/gensrc_localedatametainfo/_the.locale_resources
+	$(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" > $(JDK_OUTPUTDIR)/gensrc/_the.locale_resources
 	$(SED) $(SED_ARGS) $< > $@
 
-GENSRC_LOCALEDATAMETAINFO:=$(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/locale/provider/LocaleDataMetaInfo.java
+GENSRC_LOCALEDATAMETAINFO:=$(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java
 
 ###
 
-GENSRC_CRBC_DST := $(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/CoreResourceBundleControl.java
+GENSRC_CRBC_DST := $(JDK_OUTPUTDIR)/gensrc/sun/util/CoreResourceBundleControl.java
 GENSRC_CRBC_CMD := $(JDK_TOPDIR)/makefiles/scripts/localelist.sh
 
 JRE_NONEXIST_LOCALES := en en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR sv_SE zh
--- a/makefiles/GensrcMisc.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/GensrcMisc.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -28,11 +28,11 @@
 # string and the runtime name into the Version.java file.
 # To be printed by java -version
 
-$(JDK_OUTPUTDIR)/gensrc_misc/sun/misc/Version.java: \
+$(JDK_OUTPUTDIR)/gensrc/sun/misc/Version.java: \
 	$(JDK_TOPDIR)/src/share/classes/sun/misc/Version.java.template
 	$(MKDIR) -p $(@D)
 	$(RM) $@ $@.tmp
-	$(ECHO) Generating sun/misc/Version.java
+	$(ECHO) $(LOG_INFO) Generating sun/misc/Version.java
 	$(SED) -e 's/@@launcher_name@@/$(LAUNCHER_NAME)/g' \
 	       -e 's/@@java_version@@/$(RELEASE)/g' \
 	       -e 's/@@java_runtime_version@@/$(FULL_VERSION)/g' \
@@ -40,20 +40,20 @@
             $< > $@.tmp
 	$(MV) $@.tmp $@
 
-GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_misc/sun/misc/Version.java
+GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/sun/misc/Version.java
 
 ##########################################################################################
 # Version file for jconsole
 
-$(JDK_OUTPUTDIR)/gensrc_misc/sun/tools/jconsole/Version.java: \
+$(JDK_OUTPUTDIR)/gensrc/sun/tools/jconsole/Version.java: \
                 $(JDK_TOPDIR)/src/share/classes/sun/tools/jconsole/Version.java.template
 	$(MKDIR) -p $(@D)
 	$(RM) $@ $@.tmp
-	$(ECHO) Generating sun/tools/jconsole/Version.java
+	$(ECHO) $(LOG_INFO) Generating sun/tools/jconsole/Version.java
 	$(SED) -e 's/@@jconsole_version@@/$(FULL_VERSION)/g' $< > $@.tmp
 	$(MV) $@.tmp $@
 
-GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_misc/sun/tools/jconsole/Version.java
+GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/sun/tools/jconsole/Version.java
 
 ##########################################################################################
 
@@ -65,23 +65,23 @@
     # UNIXProcess.java is different for solaris and linux. We need to copy
     # the correct UNIXProcess.java over to $(JDK_OUTPUTDIR)/gensrc/java/lang/.
 
-    $(JDK_OUTPUTDIR)/gensrc_misc/java/lang/UNIXProcess.java : \
+    $(JDK_OUTPUTDIR)/gensrc/java/lang/UNIXProcess.java : \
               $(JDK_TOPDIR)/src/solaris/classes/java/lang/UNIXProcess.java.$(UPSUFFIX)
 	$(MKDIR) -p $(@D)
-	$(ECHO) Copying UNIXProcess.java.$(OPENJDK_TARGET_OS) to java/lang/UNIXProcess.java
+	$(ECHO) $(LOG_INFO) Copying UNIXProcess.java.$(OPENJDK_TARGET_OS) to java/lang/UNIXProcess.java
 	$(CP) $< $@
 	$(CHMOD) u+rw $@
 
-    GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_misc/java/lang/UNIXProcess.java
+    GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/java/lang/UNIXProcess.java
 endif
 
 ##########################################################################################
 
-GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/ch/SocketOptionRegistry.java
+GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/sun/nio/ch/SocketOptionRegistry.java
 
 GENSRC_SOR_SRC := $(JDK_TOPDIR)/src/share/native/sun/nio/ch
 GENSRC_SOR_SRC_FILE := genSocketOptionRegistry.c
-GENSRC_SOR_BIN := $(JDK_OUTPUTDIR)/gensrc_misc/genSocketOptionRegistry
+GENSRC_SOR_BIN := $(JDK_OUTPUTDIR)/gensrc/genSocketOptionRegistry
 
 SOR_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOR_SRC)/$(GENSRC_SOR_SRC_FILE) | \
 	$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }') 
@@ -100,15 +100,15 @@
   HAS_SOCKET_OPTION_REGISTRY:=true
 endif
 
-ifneq ($(HAS_SOCKET_OTION_REGISTRY),true)
-$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/ch/SocketOptionRegistry.java : $(BUILD_GENSRC_SOR_EXE)
+ifneq ($(HAS_SOCKET_OPTION_REGISTRY),true)
+$(JDK_OUTPUTDIR)/gensrc/sun/nio/ch/SocketOptionRegistry.java : $(BUILD_GENSRC_SOR_EXE)
 	$(MKDIR) -p $(@D)
 	$(RM) $@ $@.tmp
 	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(SOR_COPYRIGHT_YEARS)" > $@.tmp
 	$(BUILD_GENSRC_SOR_EXE) >> $@.tmp
 	$(MV) $@.tmp $@
 else
-$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/ch/SocketOptionRegistry.java : $(JDK_TOPDIR)/src/closed/solaris/classes/sun/nio/ch/SocketOptionRegistry-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java
+$(JDK_OUTPUTDIR)/gensrc/sun/nio/ch/SocketOptionRegistry.java : $(JDK_TOPDIR)/src/closed/solaris/classes/sun/nio/ch/SocketOptionRegistry-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(CP) $< $@
@@ -118,11 +118,11 @@
 
 ifneq ($(OPENJDK_TARGET_OS),windows)
 
-GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/UnixConstants.java
+GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/sun/nio/fs/UnixConstants.java
 
 GENSRC_UC_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/fs
 GENSRC_UC_SRC_FILE := genUnixConstants.c
-GENSRC_UC_BIN := $(JDK_OUTPUTDIR)/gensrc_misc/genUnixConstants
+GENSRC_UC_BIN := $(JDK_OUTPUTDIR)/gensrc/genUnixConstants
 
 UC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_UC_SRC)/$(GENSRC_UC_SRC_FILE) | \
 	$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }') 
@@ -133,6 +133,7 @@
 		LANG:=C,\
 		CC:=$(BUILD_CC),\
 		LDEXE:=$(BUILD_CC),\
+		CFLAGS:=$(filter -D%,$(CFLAGS_JDKEXE)),\
 		OBJECT_DIR:=$(GENSRC_UC_BIN),\
                 OUTPUT_DIR:=$(GENSRC_UC_BIN),\
 		PROGRAM:=genUnixConstants))
@@ -142,14 +143,14 @@
 endif
 
 ifneq ($(HAS_UNIX_CONSTANTS),true)
-$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/UnixConstants.java : $(BUILD_GENSRC_UC_EXE)
+$(JDK_OUTPUTDIR)/gensrc/sun/nio/fs/UnixConstants.java : $(BUILD_GENSRC_UC_EXE)
 	$(MKDIR) -p $(@D)
 	$(RM) $@ $@.tmp
 	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(UC_COPYRIGHT_YEARS)" > $@.tmp
 	$(BUILD_GENSRC_UC_EXE) >> $@.tmp
 	$(MV) $@.tmp $@
 else
-$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/UnixConstants.java : $(JDK_TOPDIR)/src/closed/solaris/classes/sun/nio/fs/UnixConstants-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java
+$(JDK_OUTPUTDIR)/gensrc/sun/nio/fs/UnixConstants.java : $(JDK_TOPDIR)/src/closed/solaris/classes/sun/nio/fs/UnixConstants-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(CP) $< $@
@@ -161,11 +162,11 @@
 
 ifeq ($(OPENJDK_TARGET_OS),solaris)
 
-GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/SolarisConstants.java
+GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/sun/nio/fs/SolarisConstants.java
 
 GENSRC_SOL_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/fs
 GENSRC_SOL_SRC_FILE := genSolarisConstants.c
-GENSRC_SOL_BIN := $(JDK_OUTPUTDIR)/gensrc_misc/genSolarisConstants
+GENSRC_SOL_BIN := $(JDK_OUTPUTDIR)/gensrc/genSolarisConstants
 
 SOL_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOL_SRC)/$(GENSRC_SOL_SRC_FILE) | \
 	$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }') 
@@ -180,7 +181,7 @@
 		OUTPUT_DIR:=$(GENSRC_SOL_BIN),\
 		PROGRAM:=genSolarisConstants))
 
-$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/SolarisConstants.java : $(BUILD_GENSRC_SOL_EXE)
+$(JDK_OUTPUTDIR)/gensrc/sun/nio/fs/SolarisConstants.java : $(BUILD_GENSRC_SOL_EXE)
 	$(MKDIR) -p $(@D)
 	$(RM) $@ $@.tmp
 	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(SOL_COPYRIGHT_YEARS)" > $@.tmp
--- a/makefiles/GensrcProperties.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/GensrcProperties.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -57,13 +57,13 @@
   ALL_COMPILED_PROPSOURCES+=$2
 
   # Generate the list of to be created java files.
-  ALL_COMPILED_PROPJAVAS+=$$(patsubst %,$(JDK_OUTPUTDIR)/gensrc_properties/%.java,$$($1_PROPPATHS))
+  ALL_COMPILED_PROPJAVAS+=$$(patsubst %,$(JDK_OUTPUTDIR)/gensrc/%.java,$$($1_PROPPATHS))
 
   # Now generate a sequence of "-compile ...CurrencyNames_sv.properties ...CurrencyNames_sv.java ListResourceBundle"
   # suitable to be fed into the CompileProperties command.
   COMPILE_PROPCMDLINE+=$$(subst _SPACE_,$(SPACE),$$(join $$(addprefix -compile_SPACE_,$2), \
 		$$(addsuffix _SPACE_$(strip $3),\
-                    $$(addprefix _SPACE_$(JDK_OUTPUTDIR)/gensrc_properties/,\
+                    $$(addprefix _SPACE_$(JDK_OUTPUTDIR)/gensrc/,\
                         $$(addsuffix .java,$$($1_PROPPATHS))))))
 endef
 
@@ -303,13 +303,12 @@
 		sun.util.resources.LocaleNamesBundle))
 
 # Now setup the rule for the generation of the resource bundles.
-$(JDK_OUTPUTDIR)/gensrc_properties/_the.compiled_properties : $(ALL_COMPILED_PROPSOURCES) $(BUILD_TOOLS)
-	$(RM) -r $(JDK_OUTPUTDIR)/gensrc_properties/*
+$(JDK_OUTPUTDIR)/gensrc/_the.compiled_properties : $(ALL_COMPILED_PROPSOURCES) $(BUILD_TOOLS)
 #	Generate all output directories in advance since the build tool does not do that...
 	$(MKDIR) -p $(sort $(dir $(ALL_COMPILED_PROPJAVAS)))
 	$(ECHO) Compiling $(words $(ALL_COMPILED_PROPSOURCES)) properties into resource bundles
-	$(call ListPathsSafely,COMPILE_PROPCMDLINE,\n, >> $(JDK_OUTPUTDIR)/gensrc_properties/_the.cmdline)
-	$(TOOL_COMPILEPROPERTIES) -quiet @$(JDK_OUTPUTDIR)/gensrc_properties/_the.cmdline
+	$(call ListPathsSafely,COMPILE_PROPCMDLINE,\n, >> $(JDK_OUTPUTDIR)/gensrc/_the.cmdline)
+	$(TOOL_COMPILEPROPERTIES) -quiet @$(JDK_OUTPUTDIR)/gensrc/_the.cmdline
 	$(TOUCH) $@
 
 # Now setup the rule for the generation of the cleaned properties.
@@ -323,13 +322,13 @@
 	$(TOOL_STRIPPROPERTIES) @$(JDK_OUTPUTDIR)/classes/_the.cleaned_properties.cmdline
 	$(TOUCH) $@
 
-$(ALL_COMPILED_PROPJAVAS) : $(JDK_OUTPUTDIR)/gensrc_properties/_the.compiled_properties
+$(ALL_COMPILED_PROPJAVAS) : $(JDK_OUTPUTDIR)/gensrc/_the.compiled_properties
 
 $(ALL_CLEANED_PROPOUTPUT) : $(JDK_OUTPUTDIR)/classes/_the.cleaned_properties
 
 
 # Some zh_HK resources are just copied of zh_TW
-$(JDK_OUTPUTDIR)/gensrc_properties/%_zh_HK.java: $(JDK_TOPDIR)/src/share/classes/%_zh_TW.java
+$(JDK_OUTPUTDIR)/gensrc/%_zh_HK.java: $(JDK_TOPDIR)/src/share/classes/%_zh_TW.java
 	$(MKDIR) -p $(@D)
 	$(CAT) $< | $(SED) -e '/class/s/_zh_TW/_zh_HK/' > $@
 
@@ -338,7 +337,7 @@
 		sun/security/util/AuthResources_zh_HK.java \
                 sun/security/util/Resources_zh_HK.java
 
-ZH_HK_JAVA_FILES:=$(addprefix $(JDK_OUTPUTDIR)/gensrc_properties/,$(ZH_HK_JAVA))
+ZH_HK_JAVA_FILES:=$(addprefix $(JDK_OUTPUTDIR)/gensrc/,$(ZH_HK_JAVA))
 
 
 GENSRC_PROPERTIES:=$(ALL_COMPILED_PROPJAVAS) $(ALL_CLEANED_PROPOUTPUT) $(ZH_HK_JAVA_FILES)
--- a/makefiles/GensrcSwing.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/GensrcSwing.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -27,25 +27,25 @@
 # Generate java files for javax.swing.plaf package
 # 
 NIMBUS_PACKAGE = javax.swing.plaf
-NIMBUS_GENSRC_DIR = $(JDK_OUTPUTDIR)/gensrc_swing/javax/swing/plaf/nimbus
+NIMBUS_GENSRC_DIR = $(JDK_OUTPUTDIR)/gensrc/javax/swing/plaf/nimbus
 NIMBUS_SKIN_FILE = $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/skin.laf
 
-$(JDK_OUTPUTDIR)/gensrc_swing/_the.generated_nimbus: $(NIMBUS_SKIN_FILE) $(BUILD_TOOLS)
+$(JDK_OUTPUTDIR)/gensrc/_the.generated_nimbus: $(NIMBUS_SKIN_FILE) $(BUILD_TOOLS)
 	$(MKDIR) -p $(@D)
-	$(ECHO) "Generating Nimbus source files:"
-	$(TOOL_GENERATENIMBUS) \
-	    -skinFile $(NIMBUS_SKIN_FILE) -buildDir $(JDK_OUTPUTDIR)/gensrc_swing \
+	$(ECHO) "Generating Nimbus source files"
+	$(TOOL_GENERATENIMBUS) $(LOG_INFO) \
+	    -skinFile $(NIMBUS_SKIN_FILE) -buildDir $(JDK_OUTPUTDIR)/gensrc \
 	    -packagePrefix $(NIMBUS_PACKAGE).nimbus -lafName Nimbus
-	$(ECHO) "Finished generating Nimbus source files"
+	$(ECHO) $(LOG_INFO) "Finished generating Nimbus source files"
 	$(TOUCH) $@
 
-GENSRC_SWING_NIMBUS := $(JDK_OUTPUTDIR)/gensrc_swing/_the.generated_nimbus
+GENSRC_SWING_NIMBUS := $(JDK_OUTPUTDIR)/gensrc/_the.generated_nimbus
 
 #
 # Generate beaninfo java files
 #
 
-BEAN_GENSRC_DIR = $(JDK_OUTPUTDIR)/gensrc_swing/javax/swing/beaninfo
+BEAN_GENSRC_DIR = $(JDK_OUTPUTDIR)/gensrc/javax/swing/beaninfo
 DOCLETSRC_DIR = $(JDK_TOPDIR)/make/tools/swing-beans
 
 # javax.swing package
@@ -69,9 +69,11 @@
 # Dummy variable so far, in the old build system it was false by default
 SWINGBEAN_DEBUG_FLAG = false
 # GenDocletBeanInfo is compiled in Tools.gmk and picks up from $(JDK_OUTPUTDIR)/btclasses
-$(JDK_OUTPUTDIR)/gensrc_swing/_the.generated_beaninfo: $(BEANS_SRC) $(BEAN_GENSRC_DIR)/SwingBeanInfoBase.java $(BEAN_GENSRC_DIR)/BeanInfoUtils.java $(BUILD_TOOLS)
+$(JDK_OUTPUTDIR)/gensrc/_the.generated_beaninfo: $(BEANS_SRC) $(BEAN_GENSRC_DIR)/SwingBeanInfoBase.java $(BEAN_GENSRC_DIR)/BeanInfoUtils.java $(BUILD_TOOLS)
+	$(ECHO) Generating beaninfo
 	$(JAVA) -Djava.awt.headless=true -jar $(JAVADOC_JARS) -doclet GenDocletBeanInfo -x $(SWINGBEAN_DEBUG_FLAG) -d $(BEAN_GENSRC_DIR) -t $(DOCLETSRC_DIR)/SwingBeanInfo.template -docletpath $(JDK_OUTPUTDIR)/btclasses \
-	    -classpath $(JDK_OUTPUTDIR)/btclasses $(BEANS_SRC)
+	-XDignore.symbol.file=true \
+	-classpath $(JDK_OUTPUTDIR)/btclasses $(BEANS_SRC) $(LOG_INFO)
 	$(TOUCH) $@
 
 # This file is the part of dt.jar
@@ -88,4 +90,4 @@
 	$(MKDIR) -p $(@D)
 	$(CP) $< $@
 
-GENSRC_SWING_BEANINFO = $(JDK_OUTPUTDIR)/gensrc_swing/_the.generated_beaninfo
+GENSRC_SWING_BEANINFO = $(JDK_OUTPUTDIR)/gensrc/_the.generated_beaninfo
--- a/makefiles/GensrcX11Wrappers.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/GensrcX11Wrappers.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -33,6 +33,7 @@
 
 GENSRC_X11WRAPPERS :=
 GENSRC_X11WRAPPERS_TMP := $(JDK_OUTPUTDIR)/gensrc_x11wrappers
+GENSRC_X11WRAPPERS_DST := $(JDK_OUTPUTDIR)/gensrc
 
 GENSRC_SIZER_SRC := $(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator
 
@@ -45,8 +46,8 @@
 GENSRC_SIZES := sizes.32 sizes.64
 endif
 else
-ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), solaris-x86)
-# As a special case, solaris on x86 (32-bit) also generates the 64-bit version
+ifeq ($(OPENJDK_TARGET_OS), solaris)
+# As a special case, solaris 32-bit also generates the 64-bit version
 GENSRC_SIZES := sizes.32 sizes.64
 endif
 endif
@@ -54,6 +55,7 @@
 ##########################################################################################
 
 $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.c : $(GENSRC_SIZER_SRC)/xlibtypes.txt
+	$(ECHO) "Generating X11 wrapper ($*-bit version)"
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(TOOL_WRAPPERGENERATOR) $(@D) $< "sizer" $*
@@ -62,6 +64,8 @@
 	$(MKDIR) -p $(@D)
 	$(RM) $@ $@.tmp
 	(cd $(@D) && $(BUILD_CC) -m$* -o $@.tmp $< \
+              $(X_CFLAGS) \
+              $(X_LIBS) \
               -I$(JDK_OUTPUTDIR)/include \
               -I$(JDK_TOPDIR)/src/share/javavm/export \
               -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/javavm/export \
@@ -88,10 +92,9 @@
 	$(CP) $< $@
 endif
 
-$(GENSRC_X11WRAPPERS_TMP)/classes/_the.classes : $(foreach S,$(GENSRC_SIZES),$(GENSRC_X11WRAPPERS_TMP)/sizer/$(S))
+$(GENSRC_X11WRAPPERS_DST)/_the.generated.x11 : $(foreach S,$(GENSRC_SIZES),$(GENSRC_X11WRAPPERS_TMP)/sizer/$(S))
 	$(RM) $@
 	$(MKDIR) -p $(@D)/sun/awt/X11
-	$(RM) $(@D)/sun/awt/X11/*
 	$(TOOL_WRAPPERGENERATOR) $(@D)/sun/awt/X11 $(GENSRC_SIZER_SRC)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes
 ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), solaris-x86_64)
   # On solaris-x86_64, as a safety measure, compare the generated file with the checked-in version 
@@ -100,4 +103,4 @@
 endif
 	$(TOUCH) $@
 
-GENSRC_X11WRAPPERS += $(GENSRC_X11WRAPPERS_TMP)/classes/_the.classes
+GENSRC_X11WRAPPERS += $(GENSRC_X11WRAPPERS_DST)/_the.generated.x11
--- a/makefiles/Images.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/Images.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -42,35 +42,31 @@
 -include $(CUSTOM_MAKE_DIR)/Images.gmk
 
 
-ifeq ($(OPENJDK_TARGET_OS),solaris)
-# On Solaris, if the target is a symlink and exists, cp won't overwrite.
-define install-file
-	$(MKDIR) -p $(@D)
-	$(RM) '$@'
-	$(CP) -f -r -P '$<' '$(@D)'
-endef
-else ifeq ($(OPENJDK_TARGET_OS),macosx)
-define install-file
-	$(MKDIR) -p $(@D)
-	$(CP) -fpRP '$<' '$@'
-endef
-else
-define install-file
-	$(MKDIR) -p $(@D)
-	$(CP) -fP '$<' '$@'
-endef
-endif
-
 # Processing license files from source area to image area
 # These will be modified to have the platform specific EOL chars.
 define process-doc-file
-	$(ECHO) Processing $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(ECHO) $(LOG_INFO) Processing $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(SED) 's/$$//g' $< > $@
 	$(CHMOD) 444 $@
 endef
 
+define AddFileToCopy
+  # Param 1 - src root dir
+  # Param 2 - dest root dir
+  # Param 3 - src file
+  # Param 4 - variable to add targets to
+
+  # Remove src dir root from src file
+  $2_$3_FILE := $$(patsubst $1/%,%,$3)
+
+  $2/$$($2_$3_FILE): $3
+	$(ECHO) $(LOG_INFO) Copying $$(patsubst $(OUTPUT_ROOT)/%,%,$$@)
+	$$(install-file)
+
+  $4 += $2/$$($2_$3_FILE)
+endef
 
 JDK_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2sdk-image
 JRE_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2re-image
@@ -93,31 +89,6 @@
 ################################################################################
 # /bin dir
 
-$(JRE_IMAGE_DIR)/bin/%: $(JDK_OUTPUTDIR)/bin/%
-	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(install-file)
-
-$(JDK_IMAGE_DIR)/bin/%: $(JDK_OUTPUTDIR)/bin/%
-	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(install-file)
-
-$(JDK_IMAGE_DIR)/jre/bin/%: $(JDK_OUTPUTDIR)/bin/%
-	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(install-file)
-
-# Overaly image targets
-$(JRE_OVERLAY_IMAGE_DIR)/bin/%: $(JDK_OUTPUTDIR)/bin/%
-	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(install-file)
-
-$(JDK_OVERLAY_IMAGE_DIR)/bin/%: $(JDK_OUTPUTDIR)/bin/%
-	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(install-file)
-
-$(JDK_OVERLAY_IMAGE_DIR)/jre/bin/%: $(JDK_OUTPUTDIR)/bin/%
-	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(install-file)
-
 NOT_JRE_BIN_FILES := \
 	appletviewer$(EXE_SUFFIX) \
 	extcheck$(EXE_SUFFIX) \
@@ -154,7 +125,7 @@
 WINDOWS_JDK_BIN_FILES = \
 	$(EXE_SUFFIX) \
 	$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \
-	$(notdir $(MSVCRNN_DLL))
+	$(notdir $(MSVCR_DLL))
 
 WINDOWS_JDKJRE_BIN_FILES := \
 	$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) \
@@ -163,6 +134,9 @@
 # Find all files in bin dir
 ALL_BIN_LIST := $(shell $(FIND) $(JDK_OUTPUTDIR)/bin -type f)
 
+# Prevent sjavac from entering the images.
+ALL_BIN_LIST := $(filter-out %/sjavac,$(ALL_BIN_LIST))
+
 # For unknown reason the debuginfo files for executables are not put into images
 # e.g filter them out
 ifneq ($(OPENJDK_TARGET_OS),windows)
@@ -176,60 +150,42 @@
     ALL_BIN_LIST := $(filter-out $(ALL_BIN_DEBUG_FILTER),$(ALL_BIN_LIST))
 endif
 
+JDKJRE_BIN_LIST := $(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES)), $(ALL_BIN_LIST))
+JRE_BIN_LIST := $(filter-out $(addprefix %,$(WINDOWS_JDKJRE_BIN_FILES)), $(JDKJRE_BIN_LIST))
+
 ifeq ($(OPENJDK_TARGET_OS),windows)
     JDK_BIN_LIST := $(filter $(addprefix %,$(WINDOWS_JDK_BIN_FILES)), $(ALL_BIN_LIST))
+    # On windows x86, the server jvm is filtered out from the j2re image. This could possibly 
+    # be handled by profiles in the future. If no client jvm is built, leave server in.
+    ifeq ($(OPENJDK_TARGET_CPU),x86)
+        ifeq ($(JVM_VARIANT_CLIENT),true)
+            JRE_BIN_LIST := $(filter-out $(JDK_OUTPUTDIR)/bin/server/%,$(JRE_BIN_LIST))
+	endif
+    endif
 else
     JDK_BIN_LIST := $(ALL_BIN_LIST)
 endif
-JDKJRE_BIN_LIST := $(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES)), $(ALL_BIN_LIST))
-JRE_BIN_LIST := $(filter-out $(addprefix %,$(WINDOWS_JDKJRE_BIN_FILES)), $(JDKJRE_BIN_LIST))
 
 ifneq ($(OPENJDK_TARGET_CPU_ISADIR),)
     OVERLAY_FILTER := $(JDK_OUTPUTDIR)/bin$(OPENJDK_TARGET_CPU_ISADIR)%
 endif
 
-JRE_BIN_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JRE_IMAGE_DIR)/%, \
-			$(filter-out $(OVERLAY_FILTER),$(JRE_BIN_LIST)))
-JDK_BIN_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JDK_IMAGE_DIR)/%, \
-			$(filter-out $(OVERLAY_FILTER),$(JDK_BIN_LIST)))
-JDKJRE_BIN_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JDK_IMAGE_DIR)/jre/%, \
-			$(filter-out $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)))
+$(foreach f,$(filter-out $(OVERLAY_FILTER),$(JRE_BIN_LIST)),\
+    $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_BIN_TARGETS)))
+$(foreach f,$(filter-out $(OVERLAY_FILTER),$(JDK_BIN_LIST)),\
+    $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_BIN_TARGETS)))
+$(foreach f,$(filter-out $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)),\
+    $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_BIN_TARGETS)))
 
-JRE_OVERLAY_BIN_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JRE_OVERLAY_IMAGE_DIR)/%, \
-				$(filter $(OVERLAY_FILTER),$(JRE_BIN_LIST)))
-JDK_OVERLAY_BIN_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JDK_OVERLAY_IMAGE_DIR)/%, \
-				$(filter $(OVERLAY_FILTER),$(JDK_BIN_LIST)))
-JDKJRE_OVERLAY_BIN_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JDK_OVERLAY_IMAGE_DIR)/jre/%, \
-				$(filter $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)))
+$(foreach f,$(filter $(OVERLAY_FILTER),$(JRE_BIN_LIST)),\
+    $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_OVERLAY_IMAGE_DIR),$f,JRE_BIN_TARGETS)))
+$(foreach f,$(filter $(OVERLAY_FILTER),$(JDK_BIN_LIST)),\
+    $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR),$f,JDK_BIN_TARGETS)))
+$(foreach f,$(filter $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)),\
+    $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR)/jre,$f,JDKJRE_BIN_TARGETS)))
 
 ################################################################################
 # /lib dir
-
-$(JRE_IMAGE_DIR)/lib/%: $(JDK_OUTPUTDIR)/lib/%
-	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(install-file)
-
-$(JDK_IMAGE_DIR)/lib/%: $(JDK_OUTPUTDIR)/lib/%
-	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(install-file)
-
-$(JDK_IMAGE_DIR)/jre/lib/%: $(JDK_OUTPUTDIR)/lib/%
-	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(install-file)
-
-# Overlay image targets
-$(JRE_OVERLAY_IMAGE_DIR)/lib/%: $(JDK_OUTPUTDIR)/lib/%
-	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(install-file)
-
-$(JDK_OVERLAY_IMAGE_DIR)/lib/%: $(JDK_OUTPUTDIR)/lib/%
-	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(install-file)
-
-$(JDK_OVERLAY_IMAGE_DIR)/jre/lib/%: $(JDK_OUTPUTDIR)/lib/%
-	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(install-file)
-
 ifneq ($(OPENJDK_TARGET_OS), macosx)
     JDKJRE_LIB_FILES := \
 	$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) \
@@ -254,52 +210,80 @@
     JDK_LIB_FILES += jexec
 endif
 
-ALL_LIB_LIST := $(shell $(FIND) $(JDK_OUTPUTDIR)/lib \( -type f -o -type l \) -a ! \( -name "_the*" -o -name "javac_state " \) )
-JRE_LIB_LIST := $(filter-out $(addprefix %,$(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)),$(ALL_LIB_LIST))
-JDKJRE_LIB_LIST := $(filter-out $(addprefix %,$(NOT_JRE_LIB_FILES)),$(ALL_LIB_LIST))
-JDK_LIB_LIST := $(filter $(addprefix %,$(JDK_LIB_FILES)),$(ALL_LIB_LIST))
+# Find all files to copy from $(JDK_OUTPUTDIR)/lib
+ALL_JDKOUT_LIB_LIST := $(shell $(FIND) $(JDK_OUTPUTDIR)/lib \( -type f -o -type l \) -a ! \
+                       \( -name "_the*" -o -name "javac_state " \) )
+# Find all files to copy from $(IMAGES_OUTPUTDIR)/lib
+# This might not exist if building overlay-images
+ifneq ($(wildcard $(IMAGES_OUTPUTDIR)/lib),)
+    ALL_IMAGES_LIB_LIST := $(shell $(FIND) $(IMAGES_OUTPUTDIR)/lib \( -type f -o -type l \) -a ! \
+                       \( -name "_the*" -o -name "javac_state " \) )
+endif
 
-JRE_LIB_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JRE_IMAGE_DIR)/%,$(JRE_LIB_LIST))
-JDK_LIB_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JDK_IMAGE_DIR)/%,$(JDK_LIB_LIST))
-JDKJRE_LIB_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JDK_IMAGE_DIR)/jre/%,$(JDKJRE_LIB_LIST))
+# Filter files to copy for each destination
+JRE_JDKOUT_LIB_LIST := $(filter-out $(addprefix %,$(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)),\
+                       $(ALL_JDKOUT_LIB_LIST))
+JDKJRE_JDKOUT_LIB_LIST := $(filter-out $(addprefix %,$(NOT_JRE_LIB_FILES)),$(ALL_JDKOUT_LIB_LIST))
+JDK_JDKOUT_LIB_LIST := $(filter $(addprefix %,$(JDK_LIB_FILES)),$(ALL_JDKOUT_LIB_LIST))
 
-JRE_OVERLAY_LIB_TARGETS := $(subst $(JRE_IMAGE_DIR),$(JRE_OVERLAY_IMAGE_DIR),\
-				$(filter $(JRE_IMAGE_DIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JRE_LIB_TARGETS)))
-JDK_OVERLAY_LIB_TARGETS := $(subst $(JDK_IMAGE_DIR),$(JDK_OVERLAY_IMAGE_DIR),\
-				$(filter $(JDK_IMAGE_DIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JDK_LIB_TARGETS)))
-JDKJRE_OVERLAY_LIB_TARGETS := $(subst $(JDK_IMAGE_DIR),$(JDK_OVERLAY_IMAGE_DIR),\
-				$(filter $(JDK_IMAGE_DIR)/jre/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JDKJRE_LIB_TARGETS)))
+JRE_IMAGES_LIB_LIST := $(filter-out $(addprefix %,$(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)),\
+                       $(ALL_IMAGES_LIB_LIST))
+JDKJRE_IMAGES_LIB_LIST := $(filter-out $(addprefix %,$(NOT_JRE_LIB_FILES)),$(ALL_IMAGES_LIB_LIST))
+JDK_IMAGES_LIB_LIST := $(filter $(addprefix %,$(JDK_LIB_FILES)),$(ALL_IMAGES_LIB_LIST))
+
+# Iterate over files to copy to create rules for each one
+$(foreach f,$(JRE_JDKOUT_LIB_LIST),\
+    $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_LIB_TARGETS)))
+$(foreach f,$(JDK_JDKOUT_LIB_LIST),\
+    $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_LIB_TARGETS)))
+$(foreach f,$(JDKJRE_JDKOUT_LIB_LIST),\
+    $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_LIB_TARGETS)))
+
+$(foreach f,$(JRE_IMAGES_LIB_LIST),\
+    $(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_LIB_TARGETS)))
+$(foreach f,$(JDK_IMAGES_LIB_LIST),\
+    $(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_LIB_TARGETS)))
+$(foreach f,$(JDKJRE_IMAGES_LIB_LIST),\
+    $(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_LIB_TARGETS)))
+
+$(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JRE_JDKOUT_LIB_LIST)),\
+    $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_OVERLAY_IMAGE_DIR),$f,JRE_OVERLAY_LIB_TARGETS)))
+$(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JDK_JDKOUT_LIB_LIST)),\
+    $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR),$f,JDK_OVERLAY_LIB_TARGETS)))
+$(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JDKJRE_JDKOUT_LIB_LIST)),\
+    $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR)/jre,$f,JDKJRE_OVERLAY_LIB_TARGETS)))
 
 # CTE plugin security change require new empty directory lib/applet
 $(JRE_IMAGE_DIR)/lib/applet: 
-	$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $@
 
 $(JDK_IMAGE_DIR)/jre/lib/applet: 
-	$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $@
 
 # In the old build, JObjC.jar is not part of the meta-index
 $(JRE_IMAGE_DIR)/lib/meta-index: $(JRE_LIB_TARGETS)
-	$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index `$(LS) *.jar | $(SED) 's/JObjC\.jar//g'`
 
 $(JDK_IMAGE_DIR)/jre/lib/meta-index: $(JDKJRE_LIB_TARGETS)
-	$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index `$(LS) *.jar | $(SED) 's/JObjC\.jar//g'`
 
 $(JRE_IMAGE_DIR)/lib/ext/meta-index: $(JRE_LIB_TARGETS)
-	$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar
 
 $(JDK_IMAGE_DIR)/jre/lib/ext/meta-index: $(JDKJRE_LIB_TARGETS)
-	$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar
 
 ################################################################################
 # /man dir
-
-JRE_MAN_PAGES := \
+# Avoid evaluating this whole section on windows for speed and stability
+ifneq ($(OPENJDK_TARGET_OS),windows)
+    JRE_MAN_PAGES := \
 	java.1		\
 	keytool.1	\
 	orbd.1          \
@@ -311,11 +295,11 @@
 	tnameserv.1     \
 	unpack200.1
 
-ifndef OPENJDK
-  JRE_MAN_PAGES += javaws.1
-endif
+    ifndef OPENJDK
+        JRE_MAN_PAGES += javaws.1
+    endif
 
-JDK_MAN_PAGES =            \
+    JDK_MAN_PAGES =        \
 	$(JRE_MAN_PAGES)   \
 	appletviewer.1     \
 	extcheck.1         \
@@ -346,186 +330,176 @@
         wsimport.1         \
         xjc.1
 
-ifndef OPENJDK
-  JDK_MAN_PAGES += jvisualvm.1
-endif
+    ifndef OPENJDK
+        JDK_MAN_PAGES += jvisualvm.1
+    endif
 
-ifeq ($(OPENJDK_TARGET_OS), linux)
-    MAN_SRC_DIR:=$(JDK_TOPDIR)/src/linux/doc
-    MAN1_SUBDIR:=man
-endif
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-    MAN_SRC_DIR:=$(JDK_TOPDIR)/src/solaris/doc
-    MAN1_SUBDIR:=sun/man/man1
-endif
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-    MAN_SRC_DIR:=$(JDK_TOPDIR)/src/bsd/doc
-    MAN1_SUBDIR:=man
-    JDK_MAN_PAGES := $(filter-out jcmd.1, $(JDK_MAN_PAGES))
-    JDK_MAN_PAGES := $(filter-out jvisualvm.1, $(JDK_MAN_PAGES))
-endif
+    ifeq ($(OPENJDK_TARGET_OS), linux)
+        MAN_SRC_DIR:=$(JDK_TOPDIR)/src/linux/doc
+        MAN1_SUBDIR:=man
+    endif
+    ifeq ($(OPENJDK_TARGET_OS), solaris)
+        MAN_SRC_DIR:=$(JDK_TOPDIR)/src/solaris/doc
+        MAN1_SUBDIR:=sun/man/man1
+    endif
+    ifeq ($(OPENJDK_TARGET_OS), macosx)
+        MAN_SRC_DIR:=$(JDK_TOPDIR)/src/bsd/doc
+        MAN1_SUBDIR:=man
+        JDK_MAN_PAGES := $(filter-out jcmd.1, $(JDK_MAN_PAGES))
+        JDK_MAN_PAGES := $(filter-out jvisualvm.1, $(JDK_MAN_PAGES))
+    endif
 
 
-$(JRE_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/%
-	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+    $(JRE_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/%
+	$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(install-file)
 
-$(JDK_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/%
-	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+    $(JDK_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/%
+	$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(install-file)
 
-$(JRE_IMAGE_DIR)/man/man1/%: $(JDK_OUTPUTDIR)/impdoc/$(MAN1_SUBDIR)/%
-	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+    $(JRE_IMAGE_DIR)/man/man1/%: $(JDK_OUTPUTDIR)/impdoc/$(MAN1_SUBDIR)/%
+	$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(install-file)
 
-$(JDK_IMAGE_DIR)/man/man1/%: $(JDK_OUTPUTDIR)/impdoc/$(MAN1_SUBDIR)/%
-	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+    $(JDK_IMAGE_DIR)/man/man1/%: $(JDK_OUTPUTDIR)/impdoc/$(MAN1_SUBDIR)/%
+	$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(install-file)
 
-define install-ja-manpage
+    define install-ja-manpage
 	$(MKDIR) -p $(@D)
 	$(CAT) $< \
 		| $(NATIVE2ASCII) -encoding eucJP \
 		| $(SED) 's/@@VERSION@@/$(THIS_JDK_VERSION)/g' \
 		| $(NATIVE2ASCII) -reverse -encoding $1 \
 		> $@
-endef
+    endef
 
-$(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
-	$(ECHO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+    $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
+	$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(call install-ja-manpage,UTF-8)
 
-$(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
-	$(ECHO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+    $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
+	$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(call install-ja-manpage,UTF-8)
 
-$(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
-	$(ECHO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+    $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
+	$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(call install-ja-manpage,PCK)
 
-$(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
-	$(ECHO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+    $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
+	$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(call install-ja-manpage,PCK)
 
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-    $(JRE_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
-	$(ECHO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(install-file)
+    ifeq ($(OPENJDK_TARGET_OS), solaris)
+        $(JRE_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
+		$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+		$(install-file)
 
-    $(JDK_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
-	$(ECHO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(install-file)
-endif
+        $(JDK_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
+		$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+		$(install-file)
+    endif
 
-# Old build creates empty man page for this, mimicing behaviour.
-$(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/jcmd.1 $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/jcmd.1 $(JDK_IMAGE_DIR)/man/ja/man1/jcmd.1:
-	$(ECHO) Creating dummy $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+    # Old build creates empty man page for this, mimicing behaviour.
+    $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/jcmd.1 $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/jcmd.1 $(JDK_IMAGE_DIR)/man/ja/man1/jcmd.1:
+	$(ECHO) $(LOG_INFO) Creating dummy $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $(@D)
 	$(TOUCH) $@
 
-ifeq ($(OPENJDK_TARGET_OS), linux)
-    $(JRE_IMAGE_DIR)/man/ja:
-	$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
+    ifeq ($(OPENJDK_TARGET_OS), linux)
+        $(JRE_IMAGE_DIR)/man/ja:
+		$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+		$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
 
-    $(JDK_IMAGE_DIR)/man/ja:
-	$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
-endif
+        $(JDK_IMAGE_DIR)/man/ja:
+		$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+		$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
+    endif
 
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-    $(JRE_IMAGE_DIR)/man/ja:
-	$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
+    ifeq ($(OPENJDK_TARGET_OS), macosx)
+        $(JRE_IMAGE_DIR)/man/ja:
+		$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+		$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
 
-    $(JDK_IMAGE_DIR)/man/ja:
-	$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
-endif
+        $(JDK_IMAGE_DIR)/man/ja:
+		$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+		$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
+    endif
 
-ifeq ($(OPENJDK_TARGET_OS), linux)
-    JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/,$(JRE_MAN_PAGES)) \
-			 $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JRE_MAN_PAGES)) \
-			 $(JRE_IMAGE_DIR)/man/ja
+    ifeq ($(OPENJDK_TARGET_OS), linux)
+        JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/,$(JRE_MAN_PAGES)) \
+                             $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JRE_MAN_PAGES)) \
+                             $(JRE_IMAGE_DIR)/man/ja
 
-    JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/,$(JDK_MAN_PAGES)) \
-			 $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JDK_MAN_PAGES)) \
-			 $(JDK_IMAGE_DIR)/man/ja
-endif
+        JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/,$(JDK_MAN_PAGES)) \
+                             $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JDK_MAN_PAGES)) \
+                             $(JDK_IMAGE_DIR)/man/ja
+    endif
 
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-    JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/,$(JRE_MAN_PAGES)) \
-			 $(addprefix $(JRE_IMAGE_DIR)/man/ja/man1/,$(JRE_MAN_PAGES)) \
-			 $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JRE_MAN_PAGES)) \
-			 $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/,$(JRE_MAN_PAGES))
+    ifeq ($(OPENJDK_TARGET_OS), solaris)
+        JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/,$(JRE_MAN_PAGES)) \
+                             $(addprefix $(JRE_IMAGE_DIR)/man/ja/man1/,$(JRE_MAN_PAGES)) \
+                             $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JRE_MAN_PAGES)) \
+                             $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/,$(JRE_MAN_PAGES))
 
-    JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/,$(JDK_MAN_PAGES)) \
-			 $(addprefix $(JDK_IMAGE_DIR)/man/ja/man1/,$(JDK_MAN_PAGES)) \
-			 $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JDK_MAN_PAGES)) \
-			 $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/,$(JDK_MAN_PAGES))
-endif
+        JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/,$(JDK_MAN_PAGES)) \
+                             $(addprefix $(JDK_IMAGE_DIR)/man/ja/man1/,$(JDK_MAN_PAGES)) \
+                             $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JDK_MAN_PAGES)) \
+                             $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/,$(JDK_MAN_PAGES))
+    endif
 
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-    JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/,$(JRE_MAN_PAGES)) \
-			 $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JRE_MAN_PAGES)) \
-			 $(JRE_IMAGE_DIR)/man/ja
+    ifeq ($(OPENJDK_TARGET_OS), macosx)
+        JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/,$(JRE_MAN_PAGES)) \
+                             $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JRE_MAN_PAGES)) \
+                             $(JRE_IMAGE_DIR)/man/ja
 
-    JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/,$(JDK_MAN_PAGES)) \
-			 $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JDK_MAN_PAGES)) \
-			 $(JDK_IMAGE_DIR)/man/ja
-endif
+        JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/,$(JDK_MAN_PAGES)) \
+                             $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JDK_MAN_PAGES)) \
+                             $(JDK_IMAGE_DIR)/man/ja
+    endif
+
+endif # Windows
 
 ################################################################################
 # /demo dir
 
-ifndef NO_DEMOS
 # FIXME: demo/applets/GraphLayout/GraphPanel$2.class is sometimes not copied.
 
 #   The db demo contains an empty dir that needs to be copied. The other 
 #   directories will always trigger the rule for recompile since 
 #   _the.list_of_packages files are touched.
-    $(JDK_IMAGE_DIR)/demo/%: $(JDK_OUTPUTDIR)/demo/%
+$(JDK_IMAGE_DIR)/demo/%: $(JDK_OUTPUTDIR)/demo/%
 	if [ ! -d "$@" ]; then \
-	  $(ECHO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'; \
+	  $(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'; \
 	  $(MKDIR) -p $(@D); \
 	  if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) '$<' '$@'; fi \
 	fi
 
 #   Find all files including directories
-    JDK_DEMO_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/demo/%,$(JDK_IMAGE_DIR)/demo/%,\
+JDK_DEMO_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/demo/%,$(JDK_IMAGE_DIR)/demo/%,\
 			$(shell $(FIND) $(JDK_OUTPUTDIR)/demo ! \( -name "_the*" -o -name "javac_state" \) ))
 
 
 
-    # Param 1 is source file
-    define CreateOverlayDemoRule
-        $1_TARGET:=$$(subst $(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR),\
+# Param 1 is source file
+define CreateOverlayDemoRule
+    $1_TARGET:=$$(subst $(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR),\
 			$$(dir $1)$(OPENJDK_TARGET_CPU_ISADIR)/$$(notdir $1))
-        $$($1_TARGET): $1
-		$(ECHO) Copying '$$(patsubst $(OUTPUT_ROOT)/%,%,$$@)'
-		$(MKDIR) -p $$(@D)
-		$(RM) $$@
-		$(CP) -f '$$<' '$$@'
+    $$($1_TARGET): $1
+		$(ECHO) $(LOG_INFO) Copying '$$(patsubst $(OUTPUT_ROOT)/%,%,$$@)'
+		$$(call install-file)
 
-        JDK_OVERLAY_DEMO_TARGETS += $$($1_TARGET)
-    endef
-    JDK_OVERLAY_DEMO_SOURCES := $(shell $(FIND) $(JDK_OUTPUTDIR)/demo -name "*$(SHARED_LIBRARY_SUFFIX)")
-    $(foreach lib,$(JDK_OVERLAY_DEMO_SOURCES),$(eval $(call CreateOverlayDemoRule,$(lib))))
-
-endif
+    JDK_OVERLAY_DEMO_TARGETS += $$($1_TARGET)
+endef
+JDK_OVERLAY_DEMO_SOURCES := $(shell $(FIND) $(JDK_OUTPUTDIR)/demo -name "*$(SHARED_LIBRARY_SUFFIX)")
+$(foreach lib,$(JDK_OVERLAY_DEMO_SOURCES),$(eval $(call CreateOverlayDemoRule,$(lib))))
 
 ################################################################################
 # /sample dir
 
-ifndef NO_SAMPLES
-    $(JDK_IMAGE_DIR)/sample/%: $(JDK_OUTPUTDIR)/sample/%
-	$(ECHO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'
-	$(install-file)
-
-    JDK_SAMPLE_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/sample/%,$(JDK_IMAGE_DIR)/sample/%,\
-			$(shell $(FIND) $(JDK_OUTPUTDIR)/sample -type f))
-
-endif
+$(foreach f,$(shell $(FIND) $(JDK_OUTPUTDIR)/sample -type f),\
+    $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_SAMPLE_TARGETS)))
 
 ################################################################################
 # /db dir
@@ -534,14 +508,13 @@
     $(IMAGES_OUTPUTDIR)/_unzip/%.unzipped: $(JDK_TOPDIR)/src/closed/share/db/%
 	$(ECHO) Unzipping $(patsubst $(SRC_ROOT)/%,%,$<)
 	$(MKDIR) -p $(JDK_IMAGE_DIR)/db
-	cd $(JDK_IMAGE_DIR)/db && $(UNZIP) -o $< -x index.html 2> /dev/null
+	cd $(JDK_IMAGE_DIR)/db && $(UNZIP) -q -o $< -x index.html 2> /dev/null
 	$(MKDIR) -p $(@D)
 	$(TOUCH) $@
 
     $(JDK_IMAGE_DIR)/db/README-JDK.html: $(JDK_TOPDIR)/src/closed/share/db/README-JDK.html
-	$(ECHO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'
+	$(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'
 	$(install-file)
-	$(CHMOD) 644 $(@)
 
     JDK_DB_TARGETS := $(patsubst $(JDK_TOPDIR)/src/closed/share/db/%,$(IMAGES_OUTPUTDIR)/_unzip/%.unzipped,\
 			$(shell $(FIND) $(JDK_TOPDIR)/src/closed/share/db -name "*.zip" ! -name "*demo*")) \
@@ -552,12 +525,8 @@
 ################################################################################
 # /include dir
 
-$(JDK_IMAGE_DIR)/include/%: $(JDK_OUTPUTDIR)/include/%
-	$(ECHO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'
-	$(install-file)
-
-    JDK_INCLUDE_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/include/%,$(JDK_IMAGE_DIR)/include/%,\
-			$(shell $(FIND) $(JDK_OUTPUTDIR)/include -type f))
+$(foreach f,$(shell $(FIND) $(JDK_OUTPUTDIR)/include -type f),\
+    $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_INCLUDE_TARGETS)))
 
 ################################################################################
 # doc files
@@ -575,12 +544,7 @@
     else
         JRE_DOC_FILES += README
     endif
-    ifndef NO_DEMOS
-        JDK_DOC_FILES += demo/DEMOS_LICENSE
-    endif
-    ifndef NO_SAMPLES
-        JDK_DOC_FILES += sample/SAMPLES_LICENSE
-    endif
+    JDK_DOC_FILES += demo/DEMOS_LICENSE sample/SAMPLES_LICENSE
     JRE_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/share/doc/jre
     JDK_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/share/doc/jdk
 endif
@@ -636,23 +600,23 @@
   fi)
 
 $(JRE_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips
-	$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(call create-info-file)
 
 $(JDK_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips
-	$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(call create-info-file)
 
 $(JRE_OVERLAY_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips
-	$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(call create-info-file)
 
 $(JDK_OVERLAY_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips
-	$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(call create-info-file)
 
 $(JDK_IMAGE_DIR)/src.zip: $(IMAGES_OUTPUTDIR)/src.zip
-	$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(install-file)
 
 ################################################################################
@@ -661,7 +625,7 @@
 ifneq ($(POST_STRIP_CMD),)
     ifeq ($(OPENJDK_TARGET_OS), windows)
         EXEC_LIST_BIN:=$(shell $(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*.exe \
-		-o -name \*.dll | $(EGREP) -v -i "$(MSVCRNN_DLL)")
+		-o -name \*.dll | $(EGREP) -v -i "$(MSVCR_DLL)")
     else
         # Find all executables in JDK_OUTPUTDIR since they exist when this makefile is parsed
         EXEC_LIST_BIN:=$(shell $(FILE) `$(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*$(EXE_SUFFIX)` \
@@ -672,6 +636,8 @@
             EXEC_LIST_LIB:=$(shell $(FIND) $(JDK_OUTPUTDIR)/lib -type f -name \*$(SHARED_LIBRARY_SUFFIX))
 	endif
     endif
+    # Filter out sjavac
+    EXEC_LIST_BIN:=$(filter-out %sjavac$(EXE_SUFFIX),$(EXEC_LIST_BIN))
 
     # Filter out the overlay specific bin files
     EXEC_LIST:=$(filter-out $(OVERLAY_FILTER),$(EXEC_LIST_BIN)) $(EXEC_LIST_LIB)
@@ -708,7 +674,7 @@
     endef
 
     define strip-file
-	$(ECHO) Stripping $(patsubst $(OUTPUT_ROOT)/%,%,$<)
+	$(ECHO) Stripping $(LOG_INFO) $(patsubst $(OUTPUT_ROOT)/%,%,$<)
 	$(CHMOD) u+w $<
 	$(POST_STRIP_CMD) $<
 	$(call mcs-file)
--- a/makefiles/Import.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/Import.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -125,7 +125,7 @@
         $1_DST_FILES := $$(patsubst $2/%,$3/%,$$($1_SRC_FILES))
         IMPORT_TARGET_FILES += $$($1_DST_FILES)
 $3/% : $2/%
-	$(ECHO) Copying $$(@F)
+	$(ECHO) $(LOG_INFO) Copying $$(@F)
 	$(do-install-file)
 endef
 
@@ -234,19 +234,14 @@
 
 IMPORT_TARGET_FILES += \
             $(JDK_OUTPUTDIR)/lib/security/US_export_policy.jar \
-            $(JDK_OUTPUTDIR)/lib/security/local_policy.jar \
-            $(JDK_OUTPUTDIR)/lib/jce.jar
-
-$(JDK_OUTPUTDIR)/lib/jce.jar : $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
-	$(ECHO) Copying $(@F)
-	$(install-file)
+            $(JDK_OUTPUTDIR)/lib/security/local_policy.jar
 
 $(JDK_OUTPUTDIR)/lib/security/local_policy.jar: $(JDK_TOPDIR)/make/closed/tools/crypto/jce/local_policy.jar
-	$(ECHO) Copying $(@F)
+	$(ECHO) $(LOG_INFO) Copying $(@F)
 	$(install-file)
 
 $(JDK_OUTPUTDIR)/lib/security/US_export_policy.jar: $(JDK_TOPDIR)/make/closed/tools/crypto/jce/US_export_policy.jar
-	$(ECHO) Copying $(@F)
+	$(ECHO) $(LOG_INFO) Copying $(@F)
 	$(install-file)
 
 endif # OPENJDK
--- a/makefiles/Makefile	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/Makefile	Tue Nov 06 18:41:01 2012 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
+# 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
@@ -23,102 +23,27 @@
 # questions.
 #
 
-# This must be the first rule
-default: all
+# Locate this Makefile
+ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
+    makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
+else
+    makefile_path:=$(lastword $(MAKEFILE_LIST))
+endif
+repo_dir:=$(patsubst %/makefiles/Makefile,%,$(makefile_path))
 
-# 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:
+# What is the name of this subsystem (langtools, corba, etc)?
+subsystem_name:=$(notdir $(repo_dir))
 
-include $(SPEC)
-include MakeBase.gmk
-include JavaCompilation.gmk
-include NativeCompilation.gmk
-
-# Setup the java compilers for the JDK build.
-include Setup.gmk
-
-# Setup the build tools.
-include Tools.gmk
-
-import: $(BUILD_TOOLS) import-only
-import-only:
-#       Import (corba jaxp jaxws langtools hotspot)
-	+$(MAKE) -f Import.gmk
-
-gensrc: import gensrc-only
-gensrc-only:
-	+$(MAKE) -f GenerateJavaSources.gmk
-#       Ok, now gensrc is fully populated.
-
-gendata: gensrc gendata-only
-gendata-only:
-	+$(MAKE) -f GenerateData.gmk
-
-classes: gendata classes-only
-classes-only:
-	+$(MAKE) -f CompileJavaClasses.gmk
-#       The classes are now built and
-#       any javah files have now been generated.
-
-libs: classes libs-only
-libs-only:
-	+$(MAKE) -f CompileNativeLibraries.gmk
-
-launchers: libs launchers-only
-launchers-only:
-#       Finally compile the launchers.
-	+$(MAKE) -f CompileLaunchers.gmk
-
-genclasses: launchers genclasses-only
-genclasses-only:
-#	Generate classes that have other sources. Needs
-#       to execute launchers.
-	+$(MAKE) -f GenerateClasses.gmk
-
-demos: genclasses demos-only
-demos-only:
-#       Now we have a complete jdk, which you can run.
-#       It is not yet wrapped up as an installed image.
-#       The demos are compiled against this jdk.
-ifndef NO_DEMOS
-	+$(MAKE) -f CompileDemos.gmk
+# Try to locate top-level makefile
+top_level_makefile:=$(repo_dir)/../common/makefiles/Makefile
+ifneq ($(wildcard $(top_level_makefile)),)
+  $(info Will run $(subsystem_name) target on top-level Makefile)
+  $(info WARNING: This is a non-recommended way of building!)
+  $(info ===================================================)
+else
+  $(info Cannot locate top-level Makefile. Is this repo not checked out as part of a complete forest?)
+  $(error Build from top-level Makefile instead)
 endif
 
-samples: demos samples-only
-samples-only:
-#	Now copy the sample sources into the jdk.
-ifndef NO_SAMPLES
-	+$(MAKE) -f CopySamples.gmk
-endif
-
-# The all target builds the JDK, but not the images
-all: import gensrc gendata classes libs launchers genclasses demos samples
-
-.PHONY: all images install overlay-images import-only gensrc-only gendata-only classes-only 
-.PHONY: libs-only launchers-only genclasses-only demos-only samples-only
-
-# Create the final jdk and jre images, to be wrapped up
-# into packages, or installed.
-images:
-	+$(MAKE) -f CreateJars.gmk
-	+$(MAKE) -f Images.gmk 
-
-overlay-images:
-	+$(MAKE) -f CompileLaunchers.gmk OVERLAY_IMAGES=true
-	+$(MAKE) -f Images.gmk overlay-images
-
-BINARIES:=$(shell if test -d $(IMAGES_OUTPUTDIR)/j2sdk-image/bin; then cd $(IMAGES_OUTPUTDIR)/j2sdk-image/bin && $(LS) ; fi)
-INSTALLDIR:=openjdk-$(RELEASE)
-
-# Install the jdk image, in a very crude way. Not taking into
-# account, how to install properly on macosx or windows etc.
-install: images
-	echo Installing jdk image into $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
-	echo and creating $(words $(BINARIES)) links from $(INSTALL_PREFIX)/bin into the jdk.
-	$(MKDIR) -p $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
-	$(RM) -r $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/*
-	$(CP) -rp $(IMAGES_OUTPUTDIR)/j2sdk-image/* $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
-	$(RM) $(addprefix $(INSTALL_PREFIX)/bin/,$(BINARIES))
-	$(foreach b,$(BINARIES),$(LN) -s $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/bin/$b $(INSTALL_PREFIX)/bin/$b &&) true
+all:
+	@$(MAKE) -f $(top_level_makefile) $(subsystem_name)
--- a/makefiles/Tools.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/Tools.gmk	Tue Nov 06 18:41:01 2012 -0800
@@ -29,14 +29,13 @@
                 SETUP:=GENERATE_OLDBYTECODE,\
 		SRC:=$(JDK_TOPDIR)/make/tools/src \
                      $(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator \
-                     $(JDK_TOPDIR)/makefiles/sun/xawt \
+                     $(JDK_TOPDIR)/makefiles/sun/awt/X11 \
+                     $(JDK_TOPDIR)/makefiles/sun/osxapp \
                      $(JDK_TOPDIR)/make/tools/swing-beans,\
 		BIN:=$(JDK_OUTPUTDIR)/btclasses))
 
 endif
 
-ifndef DISABLE_NIMBUS
-
 $(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/%.template : \
 	$(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/%.template
 	$(MKDIR) -p $(@D)
@@ -44,9 +43,6 @@
 
 BUILD_TOOLS += $(foreach i,$(wildcard $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/*.template),$(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/$(notdir $i))
 
-endif
-
-
 # Add a checksum ("jsum") to the end of a text file. Prevents trivial tampering with class lists.
 TOOL_ADDJSUM=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
 	build.tools.addjsum.AddJsum
@@ -121,9 +117,12 @@
 TOOL_WRAPPERGENERATOR=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
 	WrapperGenerator
 
-TOOL_TOBIN=$(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
+TOOL_X11_TOBIN=$(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
 	sun.awt.X11.ToBin
 
+TOOL_OSX_TOBIN=$(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
+	sun.osxapp.ToBin
+
 TOOL_CLDRCONVERTER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
 	build.tools.cldrconverter.CLDRConverter
 
--- a/makefiles/docs/CORE_PKGS.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,293 +0,0 @@
-#
-# Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# EXCLUDE_PKGS is the list of packages to exclude from the
-# Java API Specification.  Do not add these to CORE_PKGS.
-# The concatenation of EXCLUDE_PKGS and CORE_PKGS
-# should make up the list of all packages under the
-# src/shared/classes directory of the JDK source tree.
-#
-EXCLUDE_PKGS =             \
-  java.awt.peer            \
-  java.awt.dnd.peer        \
-  sun.*                    \
-  com.sun.*                \
-  org.apache.*             \
-  org.jcp.*		   \
-  org.w3c.dom.css          \
-  org.w3c.dom.html         \
-  org.w3c.dom.stylesheets  \
-  org.w3c.dom.traversal    \
-  org.w3c.dom.ranges       \
-  org.w3c.dom.views        \
-  org.omg.stub.javax.management.remote.rmi
-
-#
-# ACTIVE_JSR_PKGS are packages that are part of an active JSR process--
-# one that is doing its own review. These packages are not included when
-# creating diff pages for the platform's JCP process.
-# 
-#       (see /java/pubs/apisrc/jdk/6.0/beta/make/docs/active_jsr_pkgs)
-# Note:
-# This is a list of regular expressions. So foo.* matches "foo" and "foo.bar".
-#
-ACTIVE_JSR_PKGS= \
-  java.lang.invoke \
-  java.sql  \
-  javax.activation  \
-  javax.annotation.*  \
-  javax.jws.*  \
-  javax.lang.*  \
-  javax.management.*  \
-  javax.script  \
-  javax.sql.*  \
-  javax.tools.*  \
-  javax.xml.*  \
-  org.w3c.*  \
-  org.xml.sax
-
-#
-# CORE_PKGS is the list of packages that form the
-# Java API Specification.
-#
-### ***IMPORTANT NOTE***
-### There is also a "REGEXP" variable in the docs/makefile that
-### determines which table the packages go in on the main page.
-### Currently, there is only table ("Platform Packages") and
-### everything goes in it, so REGEXP is "*". But if that policy
-### changes, packages added will need to be reflected in  that
-### list of wildcard expressions, as well.
-###
-CORE_PKGS =                                      \
-  java.applet                                    \
-  java.awt                                       \
-  java.awt.color                                 \
-  java.awt.datatransfer                          \
-  java.awt.dnd                                   \
-  java.awt.event                                 \
-  java.awt.font                                  \
-  java.awt.geom                                  \
-  java.awt.im                                    \
-  java.awt.im.spi                                \
-  java.awt.image                                 \
-  java.awt.image.renderable                      \
-  java.awt.print                                 \
-  java.beans                                     \
-  java.beans.beancontext                         \
-  java.io                                        \
-  java.lang                                      \
-  java.lang.annotation                           \
-  java.lang.instrument                           \
-  java.lang.invoke                               \
-  java.lang.management                           \
-  java.lang.ref                                  \
-  java.lang.reflect                              \
-  java.math                                      \
-  java.net                                       \
-  java.nio                                       \
-  java.nio.channels                              \
-  java.nio.channels.spi                          \
-  java.nio.charset                               \
-  java.nio.charset.spi                           \
-  java.nio.file					 \
-  java.nio.file.attribute			 \
-  java.nio.file.spi				 \
-  java.rmi                                       \
-  java.rmi.activation                            \
-  java.rmi.dgc                                   \
-  java.rmi.registry                              \
-  java.rmi.server                                \
-  java.security                                  \
-  java.security.acl                              \
-  java.security.cert                             \
-  java.security.interfaces                       \
-  java.security.spec                             \
-  java.sql                                       \
-  java.text                                      \
-  java.text.spi                                  \
-  java.util                                      \
-  java.util.concurrent                           \
-  java.util.concurrent.atomic                    \
-  java.util.concurrent.locks                     \
-  java.util.jar                                  \
-  java.util.logging                              \
-  java.util.prefs                                \
-  java.util.regex                                \
-  java.util.spi                                  \
-  java.util.zip                                  \
-  javax.accessibility                            \
-  javax.activation                               \
-  javax.activity                                 \
-  javax.annotation                               \
-  javax.annotation.processing                    \
-  javax.crypto                                   \
-  javax.crypto.interfaces                        \
-  javax.crypto.spec                              \
-  javax.imageio                                  \
-  javax.imageio.event                            \
-  javax.imageio.metadata                         \
-  javax.imageio.plugins.jpeg                     \
-  javax.imageio.plugins.bmp                      \
-  javax.imageio.spi                              \
-  javax.imageio.stream                           \
-  javax.jws                                      \
-  javax.jws.soap                                 \
-  javax.lang.model                               \
-  javax.lang.model.element                       \
-  javax.lang.model.type                          \
-  javax.lang.model.util                          \
-  javax.management                               \
-  javax.management.loading                       \
-  javax.management.monitor                       \
-  javax.management.relation                      \
-  javax.management.openmbean                     \
-  javax.management.timer                         \
-  javax.management.modelmbean                    \
-  javax.management.remote                        \
-  javax.management.remote.rmi                    \
-  javax.naming                                   \
-  javax.naming.directory                         \
-  javax.naming.event                             \
-  javax.naming.ldap                              \
-  javax.naming.spi                               \
-  javax.net                                      \
-  javax.net.ssl                                  \
-  javax.print                                    \
-  javax.print.attribute                          \
-  javax.print.attribute.standard                 \
-  javax.print.event                              \
-  javax.rmi                                      \
-  javax.rmi.CORBA                                \
-  javax.rmi.ssl                                  \
-  javax.script                                   \
-  javax.security.auth                            \
-  javax.security.auth.callback                   \
-  javax.security.auth.kerberos                   \
-  javax.security.auth.login                      \
-  javax.security.auth.spi                        \
-  javax.security.auth.x500                       \
-  javax.security.cert                            \
-  javax.security.sasl                            \
-  javax.sound.sampled                            \
-  javax.sound.sampled.spi                        \
-  javax.sound.midi                               \
-  javax.sound.midi.spi                           \
-  javax.sql                                      \
-  javax.sql.rowset                               \
-  javax.sql.rowset.serial                        \
-  javax.sql.rowset.spi                           \
-  javax.swing                                    \
-  javax.swing.border                             \
-  javax.swing.colorchooser                       \
-  javax.swing.filechooser                        \
-  javax.swing.event                              \
-  javax.swing.table                              \
-  javax.swing.text                               \
-  javax.swing.text.html                          \
-  javax.swing.text.html.parser                   \
-  javax.swing.text.rtf                           \
-  javax.swing.tree                               \
-  javax.swing.undo                               \
-  javax.swing.plaf                               \
-  javax.swing.plaf.basic                         \
-  javax.swing.plaf.metal                         \
-  javax.swing.plaf.multi                         \
-  javax.swing.plaf.nimbus                        \
-  javax.swing.plaf.synth                         \
-  javax.tools                                    \
-  javax.tools.annotation                         \
-  javax.transaction                              \
-  javax.transaction.xa                           \
-  javax.xml.parsers                              \
-  javax.xml.bind                                 \
-  javax.xml.bind.annotation                      \
-  javax.xml.bind.annotation.adapters             \
-  javax.xml.bind.attachment                      \
-  javax.xml.bind.helpers                         \
-  javax.xml.bind.util                            \
-  javax.xml.soap                                 \
-  javax.xml.ws                                   \
-  javax.xml.ws.handler                           \
-  javax.xml.ws.handler.soap                      \
-  javax.xml.ws.http                              \
-  javax.xml.ws.soap                              \
-  javax.xml.ws.spi                               \
-  javax.xml.ws.spi.http                          \
-  javax.xml.ws.wsaddressing                      \
-  javax.xml.transform                            \
-  javax.xml.transform.sax                        \
-  javax.xml.transform.dom                        \
-  javax.xml.transform.stax                       \
-  javax.xml.transform.stream                     \
-  javax.xml                                      \
-  javax.xml.crypto				 \
-  javax.xml.crypto.dom				 \
-  javax.xml.crypto.dsig				 \
-  javax.xml.crypto.dsig.dom			 \
-  javax.xml.crypto.dsig.keyinfo			 \
-  javax.xml.crypto.dsig.spec			 \
-  javax.xml.datatype                             \
-  javax.xml.validation                           \
-  javax.xml.namespace                            \
-  javax.xml.xpath                                \
-  javax.xml.stream                               \
-  javax.xml.stream.events                        \
-  javax.xml.stream.util                          \
-  org.ietf.jgss                                  \
-  org.omg.CORBA                                  \
-  org.omg.CORBA.DynAnyPackage                    \
-  org.omg.CORBA.ORBPackage                       \
-  org.omg.CORBA.TypeCodePackage                  \
-  org.omg.stub.java.rmi                          \
-  org.omg.CORBA.portable                         \
-  org.omg.CORBA_2_3                              \
-  org.omg.CORBA_2_3.portable                     \
-  org.omg.CosNaming                              \
-  org.omg.CosNaming.NamingContextExtPackage      \
-  org.omg.CosNaming.NamingContextPackage         \
-  org.omg.SendingContext                         \
-  org.omg.PortableServer                         \
-  org.omg.PortableServer.CurrentPackage          \
-  org.omg.PortableServer.POAPackage              \
-  org.omg.PortableServer.POAManagerPackage       \
-  org.omg.PortableServer.ServantLocatorPackage   \
-  org.omg.PortableServer.portable                \
-  org.omg.PortableInterceptor                    \
-  org.omg.PortableInterceptor.ORBInitInfoPackage \
-  org.omg.Messaging                              \
-  org.omg.IOP                                    \
-  org.omg.IOP.CodecFactoryPackage                \
-  org.omg.IOP.CodecPackage                       \
-  org.omg.Dynamic                                \
-  org.omg.DynamicAny                             \
-  org.omg.DynamicAny.DynAnyPackage               \
-  org.omg.DynamicAny.DynAnyFactoryPackage        \
-  org.w3c.dom                                    \
-  org.w3c.dom.events                             \
-  org.w3c.dom.bootstrap                          \
-  org.w3c.dom.ls                                 \
-  org.xml.sax                                    \
-  org.xml.sax.ext                                \
-  org.xml.sax.helpers
--- a/makefiles/docs/Makefile	Wed Nov 07 09:58:39 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1174 +0,0 @@
-# Copyright (c) 1997, 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.
-#
-
-#
-# Definitions for $(DOCSDIR), $(MKDIR), $(BINDIR), etc.
-#
-BUILDDIR=..
-PRODUCT=docs
-include $(BUILDDIR)/common/Defs.gmk
-
-# Get CopyrightLine macro and other shared variables
-include $(BUILDDIR)/common/shared/Defs-javadoc.gmk
-
-# Url to root of documents
-DOCSDIR_URL = {@docroot}/$(GET2DOCSDIR)
-
-# Url to copyright html file
-COPYRIGHT_URL-7 = $(DOCSDIR_URL)/legal/cpyr.html
-COPYRIGHT_URL = $(COPYRIGHT_URL-$(JDK_MINOR_VERSION))
-
-# Url to bug filing site
-BUG_SUBMIT_URL = http://bugreport.sun.com/bugreport/
-
-# Common line for how to submit a bug or rfe
-BUG_SUBMIT_LINE = <a href="$(BUG_SUBMIT_URL)">Submit a bug or feature</a>
-
-# Url to devdocs page
-#   Was: http://java.sun.com/javase/6/webnotes/devdocs-vs-specs.html
-DEV_DOCS_URL-5 = http://java.sun.com/j2se/1.5.0/docs/index.html
-DEV_DOCS_URL-6 = http://download.oracle.com/javase/6/docs/index.html
-DEV_DOCS_URL-7 = http://download.oracle.com/javase/7/docs/index.html
-DEV_DOCS_URL = $(DEV_DOCS_URL-$(JDK_MINOR_VERSION))
-DOCS_BASE_URL = http://download.oracle.com/javase/7/docs
-
-# Url to Java Language Spec
-#JLS3_URL = http://java.sun.com/docs/books/jls/
-
-# Common Java trademark line
-JAVA_TRADEMARK_LINE = Java is a trademark or registered trademark of \
-$(FULL_COMPANY_NAME) in the US and other countries.
-
-#
-# Definitions for imported components
-#
-include $(BUILDDIR)/common/internal/ImportComponents.gmk
-
-# We override whatever the max VM memory setting is here.
-#    NOTE: javadoc will not complete without these larger settings.
-#    WARNING: This could cause thrashing on low memory machines.
-ifeq ($(ARCH_DATA_MODEL),64)
-  MAX_VM_MEMORY = 1024
-else ifeq ($(ARCH),universal)
-  MAX_VM_MEMORY = 1024
-else
-  MAX_VM_MEMORY = 612
-endif
-
-# 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 
-#          command (newline or shell ; character)
-ALL_SOURCE_DIRS = $(SHARE_SRC)/classes \
-                  $(IMPORTSRCDIR) \
-                  $(GENSRCDIR) \
-                  $(SHARE_SRC)/../solaris/classes \
-	          $(SHARE_SRC)/../windows/classes \
-		  $(SHARE_SRC)/doc/stub
-
-# List of directories that actually exist
-ALL_EXISTING_SOURCE_DIRS := $(wildcard $(ALL_SOURCE_DIRS))
-
-# List with classpath separator between them
-EMPTY:=
-SPACE:= $(EMPTY) $(EMPTY)
-RELEASEDOCS_SOURCEPATH = \
-    $(subst $(SPACE),$(CLASSPATH_SEPARATOR),$(strip $(ALL_SOURCE_DIRS)))
-
-# Prep for javadoc creation, assumes $@ is an index.html file
-define prep-javadoc
-@if [ -f "$@" -a "$?" != "" ] ; then \
-  $(ECHO) "# Dependencies have changed: $?"; \
-fi
-$(RM) -r $(@D)
-$(MKDIR) -p $(@D)
-endef
-
-# A cache of the directories in ALL_SOURCE_DIRS
-DIRECTORY_CACHE = $(DOCSTMPDIR)/directory.cache
-
-# Given a list of packages, return a list of files or dirs to be dependent on
-#   (Currently only returning a list of directories)
-define PackageDependencies # packages
-$(shell							\
-  if [ "$1" != "" -a -f $(DIRECTORY_CACHE) ] ; then	\
-    for p in $1 ; do 					\
-      pd=`$(ECHO) $${p} | $(SED) -e 's@[.]@/@g'`;	\
-      $(CAT) $(DIRECTORY_CACHE) | $(GREP) "/$${pd}/" ; 	\
-    done; 						\
-  fi							\
-)
-endef
-
-# Given a list of packages, add packages that exist to $@, print summary
-define PackageFilter # packages
-@if [ "$1" != "" ] ; then 				\
-  for p in $1 ; do 					\
-    pd=`$(ECHO) $${p} | $(SED) -e 's@[.]@/@g'`; 	\
-    found="false"; 					\
-    for cp in $(ALL_SOURCE_DIRS) ; do 			\
-      if [ -d $${cp}/$${pd} ] ; then 			\
-        $(ECHO) "$${p}" >> $@; 				\
-	found="true";					\
-	break; 						\
-      fi; 						\
-    done; 						\
-    if [ "$${found}" = "false" ] ; then 		\
-      $(ECHO) "WARNING: Package not found: $${p}"; 	\
-    fi; 						\
-  done; 						\
-fi
-endef
-
-# Print out a summary of the javadoc command about to be run
-define JavadocSummary # optionsfile packagesfile
-@$(ECHO) "# Summary for $@";\
- $(ECHO) "# Options (`$(BASENAME) $1`):"; $(SED) -e 's@^@#   @' $1; \
- $(ECHO) "# Packages (`$(BASENAME) $2`):";$(SED) -e 's@^@#   @' $2
-endef
-
-#
-# Temporary directory for javadoc creation
-#
-DOCSTMPDIR = $(TEMPDIR)/doctmp
-
-#
-# Different api directories created from root directory
-#
-COREAPI_DOCSDIR   = $(DOCSDIR)/api
-JDK_API_DOCSDIR   = $(DOCSDIR)/jdk/api
-JRE_API_DOCSDIR   = $(DOCSDIR)/jre/api
-PLATFORM_DOCSDIR  = $(DOCSDIR)/platform
-
-# The non-core api javadocs need to be able to access the root of the core
-#   api directory, so for jdk/api or jre/api to get to the core api/
-#   directory we would use this:
-JDKJRE2COREAPI    = ../../api
-
-# Common bottom argument
-define CommonBottom # year
-<font size="-1"><br> $(call CopyrightLine,,$1,)</font>
-endef
-
-# Common trademark bottom argument (Not sure why this is used sometimes)
-define CommonTrademarkBottom # year
-<font size="-1">\
-$(BUG_SUBMIT_LINE)<br>$(JAVA_TRADEMARK_LINE)<br>\
-$(call CopyrightLine,,$1,$(COMPANY_ADDRESS))\
-</font>
-endef
-
-# Common echo of option
-define OptionOnly # opt
-$(PRINTF) "%s\n" "$1"
-endef
-define OptionPair # opt arg
-$(PRINTF) "%s '%s'\n" "$1" '$2'
-endef
-define OptionTrip # opt arg arg
-$(PRINTF) "%s '%s' '%s'\n" "$1" '$2' '$3'
-endef
-
-# Core api bottom argument (with special sauce)
-COREAPI_BOTTOM = <font size="-1"> $(BUG_SUBMIT_LINE)\
-<br>For further API reference and developer documentation, \
-see <a href="$(DEV_DOCS_URL)" target="_blank">Java SE Documentation</a>. \
-That documentation contains more detailed, developer-targeted descriptions, \
-with conceptual overviews, definitions of terms, workarounds, \
-and working code examples.<br>\
-$(call CopyrightLine,$(COPYRIGHT_URL),$(FIRST_COPYRIGHT_YEAR),)\
-</font>
-
-# Common javadoc options used by all
-COMMON_JAVADOCFLAGS =					\
-                $(NO_PROPRIETARY_API_WARNINGS)          \
-		-quiet					\
-                -use					\
-                -keywords				\
-		$(ADDITIONAL_JAVADOCFLAGS)
-
-ifdef OPENJDK
-  ADDITIONAL_JAVADOCFLAGS =				\
-                -Xdocrootparent $(DOCS_BASE_URL)
-else
-  ADDITIONAL_JAVADOCFLAGS =
-endif
-
-# Draft used for non-fcs documents
-JDK_IS_FCS = false
-DRAFT_HEADER =
-ifeq ($(JDK_MINOR_VERSION),5)
-  JDK_IS_FCS = true
-endif
-ifeq ($(JDK_MINOR_VERSION),6)
-  JDK_IS_FCS = true
-endif
-ifeq ($(JDK_MINOR_VERSION),7)
-  JDK_IS_FCS = true
-endif
-ifeq ($(JDK_IS_FCS),false)
-  ifneq ($(MILESTONE), fcs)
-    DRAFT_HEADER = <br><strong>DRAFT&nbsp;$(MILESTONE)-$(BUILD_NUMBER)</strong>
-    DRAFT_BOTTOM = <br><strong>DRAFT&nbsp;$(MILESTONE)-$(BUILD_NUMBER)</strong>
-    DRAFT_WINTITLE = $(BUILD_NUMBER)
-    # Early access top text (not used in FCS releases)
-    COREAPI_TOP_EARLYACCESS = \
-<div style="background-color: \#EEEEEE"> \
-<div style="padding: 6px; margin-top: 2px; margin-bottom: 6px; \
-margin-left: 6px; margin-right: 6px; text-align: justify; \
-font-size: 80%; font-family: Helvetica, Arial, sans-serif; \
-font-weight: normal;"> \
-Please note that the specifications and other information \
-contained herein are not final and are subject to change. \
-The information is being made available to you solely for purpose of \
-evaluation. \
-</div> </div>
-  endif
-endif
-
-#################################################################
-
-#
-# CORE_PKGS environment variable has been moved to the following file
-#
-include CORE_PKGS.gmk
-
-#
-# Load environment variables for API package names that are not part of
-# the Java SE platform
-#
-include NON_CORE_PKGS.gmk
-
-#################################################################
-
-#
-# Default target is same as docs target, create core api and all others it can
-#
-
-all: docs
-docs: coredocs otherdocs
-
-#################################################################
-# Production Targets -- USE THESE TARGETS WHEN:
-#    a) You're generating docs outside of release engineering's
-#       standard control build.
-#    b) The docs will be pushed to the web and/or included in
-#       the downloaded doc bundle.
-#
-# See:  Notes.html#releaseTargets
-# Note: Spaces precede ifdef/ifndef indents. Tabs precede target commands (!)
-#
-
-sanitycheckcoredocs:
-	@$(ECHO) ""
-	@$(ECHO) "Building core api docs with these values:"
-	@$(ECHO) "    BUILD_NUMBER = $(BUILD_NUMBER)"
-	@$(ECHO) "    MILESTONE = $(MILESTONE)"
-	@$(ECHO) ""
-  ifeq ($(BUILD_NUMBER), b00)
-	@$(ECHO) "ERROR: Build number must be defined"
-	@$(ECHO) "MILESTONE is set to $(MILESTONE)"
-	@$(ECHO) ""
-	exit 1
-  endif
-
-#############################################################
-#
-# coredocs
-#
-COREAPI_DOCTITLE  = Java$(TRADEMARK) Platform, Standard Edition \
-$(JDK_MINOR_VERSION)<br>API Specification
-COREAPI_WINDOWTITLE  = Java Platform SE $(JDK_MINOR_VERSION)
-COREAPI_HEADER = \
-<strong>Java$(TRADEMARK)&nbsp;Platform<br>Standard&nbsp;Ed.&nbsp;$(JDK_MINOR_VERSION)</strong>
-
-# Java language specification cite
-TAG_JLS = jls:a:See <cite> \
-The Java&trade; Language Specification</cite>:
-
-# Overview file for core apis
-COREAPI_OVERVIEW = $(SHARE_SRC)/classes/overview-core.html
-
-# The index.html, options, and packages files
-COREAPI_INDEX_FILE    = $(COREAPI_DOCSDIR)/index.html
-COREAPI_OPTIONS_FILE  = $(DOCSTMPDIR)/coredocs.options
-COREAPI_PACKAGES_FILE = $(DOCSTMPDIR)/coredocs.packages
-
-coredocs: $(COREAPI_INDEX_FILE)
-
-# Set relative location to core api document root
-$(COREAPI_INDEX_FILE): GET2DOCSDIR=..
-
-# Run javadoc if the index file is out of date or missing
-$(COREAPI_INDEX_FILE): $(COREAPI_OPTIONS_FILE) $(COREAPI_PACKAGES_FILE)
-	$(prep-javadoc)
-	$(call JavadocSummary,$(COREAPI_OPTIONS_FILE),$(COREAPI_PACKAGES_FILE))
-	$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
-	  @$(COREAPI_OPTIONS_FILE) @$(COREAPI_PACKAGES_FILE)
-
-# Create file with javadoc options in it
-$(COREAPI_OPTIONS_FILE): $(COREAPI_OVERVIEW)
-	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ISO-8859-1)			; \
-	  $(call OptionPair,-tag,beaninfo:X)				; \
-	  $(call OptionPair,-tag,revised:X)				; \
-	  $(call OptionPair,-tag,since.unbundled:X)			; \
-	  $(call OptionPair,-tag,spec:X)				; \
-	  $(call OptionPair,-tag,specdefault:X)				; \
-	  $(call OptionPair,-tag,Note:X)				; \
-	  $(call OptionPair,-tag,ToDo:X)				; \
-          $(call OptionPair,-tag,$(TAG_JLS)) 				; \
-	  $(call OptionOnly,-splitIndex)				; \
-	  $(call OptionPair,-overview,$(COREAPI_OVERVIEW))		; \
-	  $(call OptionPair,-doctitle,$(COREAPI_DOCTITLE))		; \
-	  $(call OptionPair,-windowtitle,$(COREAPI_WINDOWTITLE) $(DRAFT_WINTITLE)) ;\
-	  $(call OptionPair,-header,$(COREAPI_HEADER)$(DRAFT_HEADER))	; \
-	  $(call OptionPair,-bottom,$(COREAPI_BOTTOM)$(DRAFT_BOTTOM))	; \
-        ) >> $@
-ifdef COREAPI_TOP_EARLYACCESS
-	@$(call OptionPair,-top,$(COREAPI_TOP_EARLYACCESS)) >> $@
-endif
-
-# Create a file with the package names in it
-$(COREAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(CORE_PKGS))
-	$(prep-target)
-	$(call PackageFilter,$(CORE_PKGS))
-
-#############################################################
-#
-# docletapidocs
-#
-
-# Part of langtools
-ifdef LANGTOOLS_DIST
-  ALL_OTHER_TARGETS += docletapidocs
-endif
-
-DOCLETAPI_DOCDIR       := $(JDK_API_DOCSDIR)/javadoc/doclet
-DOCLETAPI2COREAPI      := ../../$(JDKJRE2COREAPI)
-DOCLETAPI_DOCTITLE     := Doclet API
-DOCLETAPI_WINDOWTITLE  := Doclet API
-DOCLETAPI_HEADER       := <strong>Doclet API</strong>
-DOCLETAPI_BOTTOM       := $(call CommonTrademarkBottom,$(DOCLETAPI_FIRST_COPYRIGHT_YEAR))
-DOCLETAPI_GROUPNAME    := Packages
-DOCLETAPI_REGEXP       := com.sun.javadoc
-# DOCLETAPI_PKGS is located in NON_CORE_PKGS.gmk
-
-# The index.html, options, and packages files
-DOCLETAPI_INDEX_FILE    = $(DOCLETAPI_DOCDIR)/index.html
-DOCLETAPI_OPTIONS_FILE  = $(DOCSTMPDIR)/docletapi.options
-DOCLETAPI_PACKAGES_FILE = $(DOCSTMPDIR)/docletapi.packages
-
-docletapidocs: $(DOCLETAPI_INDEX_FILE)
-
-# Set relative location to core api document root
-$(DOCLETAPI_INDEX_FILE): GET2DOCSDIR=$(DOCLETAPI2COREAPI)/..
-
-# Run javadoc if the index file is out of date or missing
-$(DOCLETAPI_INDEX_FILE): $(DOCLETAPI_OPTIONS_FILE) $(DOCLETAPI_PACKAGES_FILE)
-	$(prep-javadoc)
-	$(call JavadocSummary,$(DOCLETAPI_OPTIONS_FILE),$(DOCLETAPI_PACKAGES_FILE))
-	$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
-	  @$(DOCLETAPI_OPTIONS_FILE) @$(DOCLETAPI_PACKAGES_FILE)
-
-# Create file with javadoc options in it
-$(DOCLETAPI_OPTIONS_FILE):
-	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionOnly,-breakiterator)				; \
-	  $(call OptionPair,-doctitle,$(DOCLETAPI_DOCTITLE))		; \
-	  $(call OptionPair,-windowtitle,$(DOCLETAPI_WINDOWTITLE) $(DRAFT_WINTITLE));\
-	  $(call OptionPair,-header,$(DOCLETAPI_HEADER)$(DRAFT_HEADER))	; \
-	  $(call OptionPair,-bottom,$(DOCLETAPI_BOTTOM)$(DRAFT_BOTTOM))	; \
-	  $(call OptionTrip,-group,$(DOCLETAPI_GROUPNAME),$(DOCLETAPI_REGEXP)); \
-	  $(call OptionTrip,-linkoffline,$(DOCLETAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
-
-# Create a file with the package names in it
-$(DOCLETAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(DOCLETAPI_PKGS))
-	$(prep-target)
-	$(call PackageFilter,$(DOCLETAPI_PKGS))
-
-#############################################################
-#
-# tagletapidocs
-#
-
-# Part of langtools
-ifdef LANGTOOLS_DIST
-  ALL_OTHER_TARGETS += tagletapidocs
-endif
-
-TAGLETAPI_DOCDIR   := $(JDK_API_DOCSDIR)/javadoc/taglet
-TAGLETAPI2COREAPI  := ../../$(JDKJRE2COREAPI)
-TAGLETAPI_BOTTOM   := $(call CommonTrademarkBottom,$(TAGLETAPI_FIRST_COPYRIGHT_YEAR))
-# TAGLETAPI_FILE is located in NON_CORE_PKGS.gmk
-
-# Temporary directory (special generation rules)
-TAGLETAPI_TEMPDIR       = $(DOCSTMPDIR)/taglets_temp
-
-# The index.html, options, and packages files
-TAGLETAPI_INDEX_FILE    = $(TAGLETAPI_DOCDIR)/index.html
-TAGLETAPI_OPTIONS_FILE  = $(DOCSTMPDIR)/tagletapi.options
-TAGLETAPI_PACKAGES_FILE = $(DOCSTMPDIR)/tagletapi.packages
-
-tagletapidocs: $(TAGLETAPI_INDEX_FILE)
-
-# Set relative location to core api document root
-$(TAGLETAPI_INDEX_FILE): GET2DOCSDIR=$(TAGLETAPI2COREAPI)/..
-
-# Run javadoc if the index file is out of date or missing
-$(TAGLETAPI_INDEX_FILE): $(TAGLETAPI_OPTIONS_FILE) $(TAGLETAPI_PACKAGES_FILE)
-	$(prep-javadoc)
-	$(RM) -r $(TAGLETAPI_TEMPDIR)
-	$(MKDIR) -p $(TAGLETAPI_TEMPDIR)
-	$(call JavadocSummary,$(TAGLETAPI_OPTIONS_FILE),$(TAGLETAPI_PACKAGES_FILE))
-	$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(TAGLETAPI_TEMPDIR) \
-	  @$(TAGLETAPI_OPTIONS_FILE) @$(TAGLETAPI_PACKAGES_FILE)
-	cp -r $(TAGLETAPI_TEMPDIR)/com $(@D)
-	cp $(TAGLETAPI_TEMPDIR)/stylesheet.css $(@D)
-	$(RM) -r $(TAGLETAPI_TEMPDIR)
-
-# Create file with javadoc options in it
-$(TAGLETAPI_OPTIONS_FILE):
-	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionOnly,-nonavbar)					; \
-	  $(call OptionOnly,-noindex)					; \
-	  $(call OptionPair,-bottom,$(TAGLETAPI_BOTTOM)$(DRAFT_BOTTOM))	; \
-	  $(call OptionTrip,-linkoffline,$(TAGLETAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
-
-# Create a file with the package names in it
-$(TAGLETAPI_PACKAGES_FILE): $(IMPORTSRCDIR)/$(TAGLETAPI_FILE)
-	$(prep-target)
-	@($(ECHO) "$(IMPORTSRCDIR)/$(TAGLETAPI_FILE)" ) > $@
-
-#############################################################
-#
-# domapidocs
-#
-
-ALL_OTHER_TARGETS += domapidocs
-
-DOMAPI_DOCDIR       := $(JRE_API_DOCSDIR)/plugin/dom
-DOMAPI2COREAPI      := ../../$(JDKJRE2COREAPI)
-DOMAPI_DOCTITLE     := Common DOM API
-DOMAPI_WINDOWTITLE  := Common DOM API
-DOMAPI_HEADER       := <strong>Common DOM API</strong>
-DOMAPI_BOTTOM       := $(call CommonTrademarkBottom,$(DOMAPI_FIRST_COPYRIGHT_YEAR))
-DOMAPI_GROUPNAME    := Packages
-DOMAPI_REGEXP       := com.sun.java.browser.dom:org.w3c.dom*
-# DOMAPI_PKGS is located in NON_CORE_PKGS.gmk
-
-# The index.html, options, and packages files
-DOMAPI_INDEX_FILE    = $(DOMAPI_DOCDIR)/index.html
-DOMAPI_OPTIONS_FILE  = $(DOCSTMPDIR)/domapi.options
-DOMAPI_PACKAGES_FILE = $(DOCSTMPDIR)/domapi.packages
-
-domapidocs: $(DOMAPI_INDEX_FILE)
-
-# Set relative location to core api document root
-$(DOMAPI_INDEX_FILE): GET2DOCSDIR=$(DOMAPI2COREAPI)/..
-
-# Run javadoc if the index file is out of date or missing
-$(DOMAPI_INDEX_FILE): $(DOMAPI_OPTIONS_FILE) $(DOMAPI_PACKAGES_FILE)
-	$(prep-javadoc)
-	$(call JavadocSummary,$(DOMAPI_OPTIONS_FILE),$(DOMAPI_PACKAGES_FILE))
-	$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
-	  @$(DOMAPI_OPTIONS_FILE) @$(DOMAPI_PACKAGES_FILE)
-
-# Create file with javadoc options in it
-$(DOMAPI_OPTIONS_FILE):
-	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionOnly,-splitIndex)				; \
-	  $(call OptionPair,-doctitle,$(DOMAPI_DOCTITLE))		; \
-	  $(call OptionPair,-windowtitle,$(DOMAPI_WINDOWTITLE) $(DRAFT_WINTITLE));\
-	  $(call OptionPair,-header,$(DOMAPI_HEADER)$(DRAFT_HEADER))	; \
-	  $(call OptionPair,-bottom,$(DOMAPI_BOTTOM)$(DRAFT_BOTTOM))	; \
-	  $(call OptionTrip,-group,$(DOMAPI_GROUPNAME),$(DOMAPI_REGEXP)); \
-	  $(call OptionTrip,-linkoffline,$(DOMAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
-
-# Create a file with the package names in it
-$(DOMAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(DOMAPI_PKGS))
-	$(prep-target)
-	$(call PackageFilter,$(DOMAPI_PKGS))
-
-#############################################################
-#
-# jpdadocs
-#
-
-ALL_OTHER_TARGETS += jpdadocs
-
-jpdadocs: jdidocs jdwpdocs jvmtidocs
-
-#############################################################
-#
-# jdidocs
-#
-
-ALL_OTHER_TARGETS += jdidocs
-
-JDI_DOCDIR      := $(JDK_API_DOCSDIR)/jpda/jdi
-JDI2COREAPI     := ../../$(JDKJRE2COREAPI)
-JDI_DOCTITLE    := Java$(TRADEMARK) Debug Interface
-JDI_WINDOWTITLE := Java Debug Interface
-JDI_HEADER      := <strong>Java Debug Interface</strong>
-JDI_BOTTOM      := $(call CommonBottom,$(JDI_FIRST_COPYRIGHT_YEAR))
-JDI_OVERVIEW    := $(SHARE_SRC)/classes/jdi-overview.html
-# JDI_PKGS is located in NON_CORE_PKGS.gmk
-
-# The index.html, options, and packages files
-JDI_INDEX_FILE    = $(JDI_DOCDIR)/index.html
-JDI_OPTIONS_FILE  = $(DOCSTMPDIR)/jdi.options
-JDI_PACKAGES_FILE = $(DOCSTMPDIR)/jdi.packages
-
-jdidocs: $(JDI_INDEX_FILE)
-
-# Set relative location to core api document root
-$(JDI_INDEX_FILE): GET2DOCSDIR=$(JDI2COREAPI)/..
-
-# Run javadoc if the index file is out of date or missing
-$(JDI_INDEX_FILE): $(JDI_OPTIONS_FILE) $(JDI_PACKAGES_FILE)
-	$(prep-javadoc)
-	$(call JavadocSummary,$(JDI_OPTIONS_FILE),$(JDI_PACKAGES_FILE))
-	$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
-	  @$(JDI_OPTIONS_FILE) @$(JDI_PACKAGES_FILE)
-
-# Create file with javadoc options in it
-$(JDI_OPTIONS_FILE): $(JDI_OVERVIEW)
-	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionPair,-overview,$(JDI_OVERVIEW))			; \
-	  $(call OptionPair,-doctitle,$(JDI_DOCTITLE))			; \
-	  $(call OptionPair,-windowtitle,$(JDI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
-	  $(call OptionPair,-header,$(JDI_HEADER)$(DRAFT_HEADER))	; \
-	  $(call OptionPair,-bottom,$(JDI_BOTTOM)$(DRAFT_BOTTOM))	; \
-	  $(call OptionTrip,-linkoffline,$(JDI2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
-
-# Create a file with the package names in it
-$(JDI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JDI_PKGS))
-	$(prep-target)
-	$(call PackageFilter,$(JDI_PKGS))
-
-#############################################################
-#
-# jdwpdocs
-#
-
-ALL_OTHER_TARGETS += jdwpdocs
-
-JDWP_DOCDIR     = $(PLATFORM_DOCSDIR)/jpda/jdwp
-JDWP_SPEC       = $(BUILDDIR)/jpda/jdwp/jdwp.spec
-
-jdwpdocs: $(JDWP_DOCDIR)/jdwp-protocol.html
-$(JDWP_DOCDIR)/jdwp-protocol.html: $(BUILD_TOOLS) $(JDWP_SPEC)
-	$(prep-javadoc)
-	$(TOOL_JDWPGEN) $(JDWP_SPEC) -doc $@
-
-#############################################################
-#
-# jvmtidocs
-#
-
-ALL_OTHER_TARGETS += jvmtidocs
-
-JVMTI_DOCDIR      = $(PLATFORM_DOCSDIR)/jvmti
-JVMTI_HTML        = $(HOTSPOT_DOCS_IMPORT_PATH)/platform/jvmti/jvmti.html
-
-jvmtidocs:  $(JVMTI_DOCDIR)/jvmti.html
-$(JVMTI_DOCDIR)/jvmti.html:
-	@$(prep-javadoc)
-	@if [ -f $(JVMTI_HTML) ] ; then		                           \
-	  $(ECHO) "$(CP) $(JVMTI_HTML) $@";                 	           \
-	  $(CP) $(JVMTI_HTML) $@; 	                 	           \
-	else 						                   \
-	  $(ECHO) "WARNING: Generated file does not exist: $(JVMTI_HTML)"; \
-	fi
-
-#############################################################
-#
-# jaasdocs
-#
-
-ALL_OTHER_TARGETS += jaasdocs
-
-JAAS_DOCDIR	 := $(JRE_API_DOCSDIR)/security/jaas/spec
-JAAS2COREAPI     := ../../../$(JDKJRE2COREAPI)
-JAAS_DOCTITLE    := Java$(TRADEMARK) Authentication and Authorization Service
-JAAS_WINDOWTITLE := Java Authentication and Authorization Service
-JAAS_HEADER      := <strong>Java Authentication and Authorization Service</strong>
-JAAS_BOTTOM      := $(call CommonBottom,$(JAAS_FIRST_COPYRIGHT_YEAR))
-# JAAS_PKGS is located in NON_CORE_PKGS.gmk
-JAAS_OVERVIEW    := $(SHARE_SRC)/classes/com/sun/security/auth/jaas-overview.html
-
-# The index.html, options, and packages files
-JAAS_INDEX_FILE    = $(JAAS_DOCDIR)/index.html
-JAAS_OPTIONS_FILE  = $(DOCSTMPDIR)/jaas.options
-JAAS_PACKAGES_FILE = $(DOCSTMPDIR)/jaas.packages
-
-jaasdocs: $(JAAS_INDEX_FILE)
-
-# Set relative location to core api document root
-$(JAAS_INDEX_FILE): GET2DOCSDIR=$(JAAS2COREAPI)/..
-
-# Run javadoc if the index file is out of date or missing
-$(JAAS_INDEX_FILE): $(JAAS_OPTIONS_FILE) $(JAAS_PACKAGES_FILE)
-	$(prep-javadoc)
-	$(call JavadocSummary,$(JAAS_OPTIONS_FILE),$(JAAS_PACKAGES_FILE))
-	$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
-	  @$(JAAS_OPTIONS_FILE) @$(JAAS_PACKAGES_FILE)
-
-# Create file with javadoc options in it
-$(JAAS_OPTIONS_FILE): $(JAAS_OVERVIEW)
-	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionPair,-overview,$(JAAS_OVERVIEW))			; \
-	  $(call OptionPair,-doctitle,$(JAAS_DOCTITLE))			; \
-	  $(call OptionPair,-windowtitle,$(JAAS_WINDOWTITLE) $(DRAFT_WINTITLE)); \
-	  $(call OptionPair,-header,$(JAAS_HEADER)$(DRAFT_HEADER))	; \
-	  $(call OptionPair,-bottom,$(JAAS_BOTTOM)$(DRAFT_BOTTOM))	; \
-	  $(call OptionTrip,-linkoffline,$(JAAS2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
-
-# Create a file with the package names in it
-$(JAAS_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JAAS_PKGS))
-	$(prep-target)
-	$(call PackageFilter,$(JAAS_PKGS))
-
-#############################################################
-#
-# jgssdocs
-#
-
-ALL_OTHER_TARGETS += jgssdocs
-
-JGSS_DOCDIR	 := $(JRE_API_DOCSDIR)/security/jgss/spec
-JGSS2COREAPI     := ../../../$(JDKJRE2COREAPI)
-JGSS_DOCTITLE    := Java$(TRADEMARK) GSS-API Utilities
-JGSS_WINDOWTITLE := Java GSS-API Utilities
-JGSS_HEADER      := <strong>Java GSS-API Utilities</strong>
-JGSS_BOTTOM      := $(call CommonBottom,$(JGSS_FIRST_COPYRIGHT_YEAR))
-JGSS_OVERVIEW    := $(SHARE_SRC)/classes/com/sun/security/jgss/jgss-overview.html
-# JGSS_PKGS is located in NON_CORE_PKGS.gmk
-
-# The index.html, options, and packages files
-JGSS_INDEX_FILE    = $(JGSS_DOCDIR)/index.html
-JGSS_OPTIONS_FILE  = $(DOCSTMPDIR)/jgss.options
-JGSS_PACKAGES_FILE = $(DOCSTMPDIR)/jgss.packages
-
-jgssdocs: $(JGSS_INDEX_FILE)
-
-# Set relative location to core api document root
-$(JGSS_INDEX_FILE): GET2DOCSDIR=$(JGSS2COREAPI)/..
-
-# Run javadoc if the index file is out of date or missing
-$(JGSS_INDEX_FILE): $(JGSS_OPTIONS_FILE) $(JGSS_PACKAGES_FILE)
-	$(prep-javadoc)
-	$(call JavadocSummary,$(JGSS_OPTIONS_FILE),$(JGSS_PACKAGES_FILE))
-	$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
-	  @$(JGSS_OPTIONS_FILE) @$(JGSS_PACKAGES_FILE)
-
-# Create file with javadoc options in it
-$(JGSS_OPTIONS_FILE): $(JGSS_OVERVIEW)
-	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionOnly,-nodeprecatedlist)				; \
-	  $(call OptionPair,-overview,$(JGSS_OVERVIEW))			; \
-	  $(call OptionPair,-doctitle,$(JGSS_DOCTITLE))			; \
-	  $(call OptionPair,-windowtitle,$(JGSS_WINDOWTITLE) $(DRAFT_WINTITLE)); \
-	  $(call OptionPair,-header,$(JGSS_HEADER)$(DRAFT_HEADER))	; \
-	  $(call OptionPair,-bottom,$(JGSS_BOTTOM)$(DRAFT_BOTTOM))	; \
-	  $(call OptionTrip,-linkoffline,$(JGSS2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
-
-# Create a file with the package names in it
-$(JGSS_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JGSS_PKGS))
-	$(prep-target)
-	$(call PackageFilter,$(JGSS_PKGS))
-
-#############################################################
-#
-# smartcardiodocs
-#
-
-ALL_OTHER_TARGETS += smartcardiodocs
-
-SMARTCARDIO_DOCDIR	:= $(JRE_API_DOCSDIR)/security/smartcardio/spec
-SMARTCARDIO2COREAPI     := ../../../$(JDKJRE2COREAPI)
-SMARTCARDIO_DOCTITLE    := Java$(TRADEMARK) Smart Card I/O
-SMARTCARDIO_WINDOWTITLE := Java Smart Card I/O
-SMARTCARDIO_HEADER      := <strong>Java Smart Card I/O</strong>
-SMARTCARDIO_BOTTOM      := $(call CommonBottom,$(SMARTCARDIO_FIRST_COPYRIGHT_YEAR))
-# SMARTCARDIO_PKGS is located in NON_CORE_PKGS.gmk
-
-# The index.html, options, and packages files
-SMARTCARDIO_INDEX_FILE    = $(SMARTCARDIO_DOCDIR)/index.html
-SMARTCARDIO_OPTIONS_FILE  = $(DOCSTMPDIR)/smartcardio.options
-SMARTCARDIO_PACKAGES_FILE = $(DOCSTMPDIR)/smartcardio.packages
-
-smartcardiodocs: $(SMARTCARDIO_INDEX_FILE)
-
-# Set relative location to core api document root
-$(SMARTCARDIO_INDEX_FILE): GET2DOCSDIR=$(SMARTCARDIO2COREAPI)/..
-
-# Run javadoc if the index file is out of date or missing
-$(SMARTCARDIO_INDEX_FILE): $(SMARTCARDIO_OPTIONS_FILE) $(SMARTCARDIO_PACKAGES_FILE)
-	$(prep-javadoc)
-	$(call JavadocSummary,$(SMARTCARDIO_OPTIONS_FILE),$(SMARTCARDIO_PACKAGES_FILE))
-	$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
-	  @$(SMARTCARDIO_OPTIONS_FILE) @$(SMARTCARDIO_PACKAGES_FILE)
-
-# Create file with javadoc options in it
-$(SMARTCARDIO_OPTIONS_FILE):
-	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionOnly,-nodeprecatedlist)				; \
-	  $(call OptionPair,-doctitle,$(SMARTCARDIO_DOCTITLE))		; \
-	  $(call OptionPair,-windowtitle,$(SMARTCARDIO_WINDOWTITLE) $(DRAFT_WINTITLE));\
-	  $(call OptionPair,-header,$(SMARTCARDIO_HEADER)$(DRAFT_HEADER)); \
-	  $(call OptionPair,-bottom,$(SMARTCARDIO_BOTTOM)$(DRAFT_BOTTOM)); \
-	  $(call OptionTrip,-linkoffline,$(SMARTCARDIO2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
-
-# Create a file with the package names in it
-$(SMARTCARDIO_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(SMARTCARDIO_PKGS))
-	$(prep-target)
-	$(call PackageFilter,$(SMARTCARDIO_PKGS))
-
-#############################################################
-#
-# httpserverdocs
-#
-
-ALL_OTHER_TARGETS += httpserverdocs
-
-HTTPSERVER_DOCDIR      := $(JRE_API_DOCSDIR)/net/httpserver/spec
-HTTPSERVER2COREAPI     := ../../../$(JDKJRE2COREAPI)
-HTTPSERVER_DOCTITLE    := Java$(TRADEMARK) HTTP Server
-HTTPSERVER_WINDOWTITLE := Java HTTP Server
-HTTPSERVER_HEADER      := <strong>Java HTTP Server</strong>
-HTTPSERVER_BOTTOM      := $(call CommonBottom,$(HTTPSERVER_FIRST_COPYRIGHT_YEAR))
-# HTTPSERVER_PKGS is located in NON_CORE_PKGS.gmk
-
-HTTPSERVER_INDEX_HTML    = $(HTTPSERVER_DOCDIR)/index.html
-HTTPSERVER_OPTIONS_FILE  = $(DOCSTMPDIR)/httpserver.options
-HTTPSERVER_PACKAGES_FILE = $(DOCSTMPDIR)/httpserver.packages
-
-httpserverdocs: $(HTTPSERVER_INDEX_HTML)
-
-# Set relative location to core api document root
-$(HTTPSERVER_INDEX_HTML): GET2DOCSDIR=$(HTTPSERVER2COREAPI)/..
-
-# Run javadoc if the index file is out of date or missing
-$(HTTPSERVER_INDEX_HTML): $(HTTPSERVER_OPTIONS_FILE) $(HTTPSERVER_PACKAGES_FILE)
-	$(prep-javadoc)
-	$(call JavadocSummary,$(HTTPSERVER_OPTIONS_FILE),$(HTTPSERVER_PACKAGES_FILE))
-	$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
-	  @$(HTTPSERVER_OPTIONS_FILE) @$(HTTPSERVER_PACKAGES_FILE)
-
-# Create file with javadoc options in it
-$(HTTPSERVER_OPTIONS_FILE):
-	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionOnly,-nodeprecatedlist)				; \
-	  $(call OptionPair,-doctitle,$(HTTPSERVER_DOCTITLE))		; \
-	  $(call OptionPair,-windowtitle,$(HTTPSERVER_WINDOWTITLE) $(DRAFT_WINTITLE));\
-	  $(call OptionPair,-header,$(HTTPSERVER_HEADER)$(DRAFT_HEADER)); \
-	  $(call OptionPair,-bottom,$(HTTPSERVER_BOTTOM)$(DRAFT_BOTTOM)); \
-	  $(call OptionTrip,-linkoffline,$(HTTPSERVER2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
-
-# Create a file with the package names in it
-$(HTTPSERVER_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(HTTPSERVER_PKGS))
-	$(prep-target)
-	$(call PackageFilter,$(HTTPSERVER_PKGS))
-
-#############################################################
-#
-# mgmtdocs
-#
-
-ALL_OTHER_TARGETS += mgmtdocs
-
-MGMT_DOCDIR	 := $(JRE_API_DOCSDIR)/management/extension
-MGMT2COREAPI     := ../../$(JDKJRE2COREAPI)
-JVM_MIB_NAME     := JVM-MANAGEMENT-MIB.mib
-JVM_MIB_SRC      := $(CLOSED_SRC)/share/classes/sun/management/snmp/$(JVM_MIB_NAME)
-MGMT_DOCTITLE    := Monitoring and Management Interface for the Java$(TRADEMARK) Platform
-MGMT_WINDOWTITLE := Monitoring and Management Interface for the Java Platform
-MGMT_HEADER      := <strong>Monitoring and Management Interface for the Java Platform</strong>
-MGMT_BOTTOM      := $(call CommonBottom,$(MGMT_FIRST_COPYRIGHT_YEAR))
-MGMT_OVERVIEW    := $(SHARE_SRC)/classes/com/sun/management/mgmt-overview.html
-# MGMT_PKGS is located in NON_CORE_PKGS.gmk
-
-# The index.html, options, and packages files
-MGMT_INDEX_FILE    = $(MGMT_DOCDIR)/index.html
-MGMT_OPTIONS_FILE  = $(DOCSTMPDIR)/mgmt.options
-MGMT_PACKAGES_FILE = $(DOCSTMPDIR)/mgmt.packages
-
-mgmtdocs: $(MGMT_INDEX_FILE)
-
-# Set relative location to core api document root
-$(MGMT_INDEX_FILE): GET2DOCSDIR=$(MGMT2COREAPI)/..
-
-# Run javadoc if the index file is out of date or missing
-$(MGMT_INDEX_FILE): $(MGMT_OPTIONS_FILE) $(MGMT_PACKAGES_FILE)
-	$(prep-javadoc)
-	@if [ -f $(JVM_MIB_SRC) ] ; then 				\
-	  $(ECHO) "$(CP) $(JVM_MIB_SRC) $(@D)/.."; 			\
-	  $(CP) $(JVM_MIB_SRC) $(@D)/.. ; 				\
-	else 								\
-	  $(ECHO) "WARNING: File $(JVM_MIB_NAME) not available."; 	\
-	fi
-	$(call JavadocSummary,$(MGMT_OPTIONS_FILE),$(MGMT_PACKAGES_FILE))
-	$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
-	  @$(MGMT_OPTIONS_FILE) @$(MGMT_PACKAGES_FILE)
-
-# Create file with javadoc options in it
-$(MGMT_OPTIONS_FILE): $(MGMT_OVERVIEW)
-	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionOnly,-nodeprecatedlist)				; \
-	  $(call OptionPair,-overview,$(MGMT_OVERVIEW))			; \
-	  $(call OptionPair,-doctitle,$(MGMT_DOCTITLE))			; \
-	  $(call OptionPair,-windowtitle,$(MGMT_WINDOWTITLE) $(DRAFT_WINTITLE)); \
-	  $(call OptionPair,-header,$(MGMT_HEADER)$(DRAFT_HEADER))	; \
-	  $(call OptionPair,-bottom,$(MGMT_BOTTOM)$(DRAFT_BOTTOM))	; \
-	  $(call OptionTrip,-linkoffline,$(MGMT2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
-
-# Create a file with the package names in it
-$(MGMT_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(MGMT_PKGS))
-	$(prep-target)
-	$(call PackageFilter,$(MGMT_PKGS))
-
-#############################################################
-#
-# attachdocs
-#
-
-ALL_OTHER_TARGETS += attachdocs
-
-ATTACH_DOCDIR      := $(JDK_API_DOCSDIR)/attach/spec
-ATTACH2COREAPI     := ../../$(JDKJRE2COREAPI)
-ATTACH_DOCTITLE    := Attach API
-ATTACH_WINDOWTITLE := Attach API
-ATTACH_HEADER      := <strong>Attach API</strong>
-ATTACH_BOTTOM      := $(call CommonBottom,$(ATTACH_FIRST_COPYRIGHT_YEAR))
-# ATTACH_PKGS is located in NON_CORE_PKGS.gmk
-
-ATTACH_INDEX_HTML    = $(ATTACH_DOCDIR)/index.html
-ATTACH_OPTIONS_FILE  = $(DOCSTMPDIR)/attach.options
-ATTACH_PACKAGES_FILE = $(DOCSTMPDIR)/attach.packages
-
-attachdocs: $(ATTACH_INDEX_HTML)
-
-# Set relative location to core api document root
-$(ATTACH_INDEX_HTML): GET2DOCSDIR=$(ATTACH2COREAPI)/..
-
-# Run javadoc if the index file is out of date or missing
-$(ATTACH_INDEX_HTML): $(ATTACH_OPTIONS_FILE) $(ATTACH_PACKAGES_FILE)
-	$(prep-javadoc)
-	$(call JavadocSummary,$(ATTACH_OPTIONS_FILE),$(ATTACH_PACKAGES_FILE))
-	$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
-	  @$(ATTACH_OPTIONS_FILE) @$(ATTACH_PACKAGES_FILE)
-
-# Create file with javadoc options in it
-$(ATTACH_OPTIONS_FILE):
-	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionOnly,-nodeprecatedlist)				; \
-	  $(call OptionPair,-doctitle,$(ATTACH_DOCTITLE))		; \
-	  $(call OptionPair,-windowtitle,$(ATTACH_WINDOWTITLE) $(DRAFT_WINTITLE));\
-	  $(call OptionPair,-header,$(ATTACH_HEADER)$(DRAFT_HEADER))	; \
-	  $(call OptionPair,-bottom,$(ATTACH_BOTTOM)$(DRAFT_BOTTOM))	; \
-	  $(call OptionTrip,-linkoffline,$(ATTACH2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
-
-# Create a file with the package names in it
-$(ATTACH_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(ATTACH_PKGS))
-	$(prep-target)
-	$(call PackageFilter,$(ATTACH_PKGS))
-
-#############################################################
-#
-# jconsoledocs
-#
-
-ALL_OTHER_TARGETS += jconsoledocs
-
-JCONSOLE_DOCDIR      := $(JDK_API_DOCSDIR)/jconsole/spec
-JCONSOLE2COREAPI     := ../../$(JDKJRE2COREAPI)
-JCONSOLE_DOCTITLE    := JConsole API
-JCONSOLE_WINDOWTITLE := JConsole API
-JCONSOLE_HEADER      := <strong>JConsole API</strong>
-JCONSOLE_BOTTOM      := $(call CommonBottom,$(JCONSOLE_FIRST_COPYRIGHT_YEAR))
-# JCONSOLE_PKGS is located in NON_CORE_PKGS.gmk
-
-JCONSOLE_INDEX_HTML    = $(JCONSOLE_DOCDIR)/index.html
-JCONSOLE_OPTIONS_FILE  = $(DOCSTMPDIR)/jconsole.options
-JCONSOLE_PACKAGES_FILE = $(DOCSTMPDIR)/jconsole.packages
-
-jconsoledocs: $(JCONSOLE_INDEX_HTML)
-
-# Set relative location to core api document root
-$(JCONSOLE_INDEX_HTML): GET2DOCSDIR=$(JCONSOLE2COREAPI)/..
-
-# Run javadoc if the index file is out of date or missing
-$(JCONSOLE_INDEX_HTML): $(JCONSOLE_OPTIONS_FILE) $(JCONSOLE_PACKAGES_FILE)
-	$(prep-javadoc)
-	$(call JavadocSummary,$(JCONSOLE_OPTIONS_FILE),$(JCONSOLE_PACKAGES_FILE))
-	$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
-	  @$(JCONSOLE_OPTIONS_FILE) @$(JCONSOLE_PACKAGES_FILE)
-
-# Create file with javadoc options in it
-$(JCONSOLE_OPTIONS_FILE):
-	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionOnly,-nodeprecatedlist)				; \
-	  $(call OptionPair,-doctitle,$(JCONSOLE_DOCTITLE))		; \
-	  $(call OptionPair,-windowtitle,$(JCONSOLE_WINDOWTITLE) $(DRAFT_WINTITLE));\
-	  $(call OptionPair,-header,$(JCONSOLE_HEADER)$(DRAFT_HEADER))	; \
-	  $(call OptionPair,-bottom,$(JCONSOLE_BOTTOM)$(DRAFT_BOTTOM))	; \
-	  $(call OptionTrip,-linkoffline,$(JCONSOLE2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
-
-# Create a file with the package names in it
-$(JCONSOLE_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JCONSOLE_PKGS))
-	$(prep-target)
-	$(call PackageFilter,$(JCONSOLE_PKGS))
-
-#############################################################
-#
-# treeapidocs
-#
-
-# Part of langtools
-ifdef LANGTOOLS_DIST
-  ALL_OTHER_TARGETS += treeapidocs
-endif
-
-TREEAPI_DOCDIR       := $(JDK_API_DOCSDIR)/javac/tree
-TREEAPI2COREAPI      := ../../$(JDKJRE2COREAPI)
-TREEAPI_DOCTITLE     := Compiler Tree API
-TREEAPI_WINDOWTITLE  := Compiler Tree API
-TREEAPI_HEADER       := <strong>Compiler Tree API</strong>
-TREEAPI_BOTTOM       := $(call CommonBottom,$(TREEAPI_FIRST_COPYRIGHT_YEAR))
-TREEAPI_GROUPNAME    := Packages
-TREEAPI_REGEXP       := com.sun.source.*
-# TREEAPI_PKGS is located in NON_CORE_PKGS.gmk
-
-TREEAPI_INDEX_HTML    = $(TREEAPI_DOCDIR)/index.html
-TREEAPI_OPTIONS_FILE  = $(DOCSTMPDIR)/treeapi.options
-TREEAPI_PACKAGES_FILE = $(DOCSTMPDIR)/treeapi.packages
-
-treeapidocs: $(TREEAPI_INDEX_HTML)
-
-# Set relative location to core api document root
-$(TREEAPI_INDEX_HTML): GET2DOCSDIR=$(TREEAPI2COREAPI)/..
-
-# Run javadoc if the index file is out of date or missing
-$(TREEAPI_INDEX_HTML): $(TREEAPI_OPTIONS_FILE) $(TREEAPI_PACKAGES_FILE)
-	$(prep-javadoc)
-	$(call JavadocSummary,$(TREEAPI_OPTIONS_FILE),$(TREEAPI_PACKAGES_FILE))
-	$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
-	  @$(TREEAPI_OPTIONS_FILE) @$(TREEAPI_PACKAGES_FILE)
-
-# Create file with javadoc options in it
-$(TREEAPI_OPTIONS_FILE):
-	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionPair,-doctitle,$(TREEAPI_DOCTITLE))		; \
-	  $(call OptionPair,-windowtitle,$(TREEAPI_WINDOWTITLE) $(DRAFT_WINTITLE));\
-	  $(call OptionPair,-header,$(TREEAPI_HEADER)$(DRAFT_HEADER))	; \
-          $(call OptionPair,-tag,$(TAG_JLS)) 				; \
-	  $(call OptionPair,-bottom,$(TREEAPI_BOTTOM)$(DRAFT_BOTTOM))	; \
-	  $(call OptionTrip,-group,$(TREEAPI_GROUPNAME),$(TREEAPI_REGEXP)); \
-	  $(call OptionTrip,-linkoffline,$(TREEAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
-
-# Create a file with the package names in it
-$(TREEAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(TREEAPI_PKGS))
-	$(prep-target)
-	$(call PackageFilter,$(TREEAPI_PKGS))
-
-#############################################################
-#
-# sctpdocs
-#
-
-ALL_OTHER_TARGETS += sctpdocs
-
-SCTPAPI_DOCDIR      := $(JRE_API_DOCSDIR)/nio/sctp/spec
-SCTPAPI2COREAPI     := ../../../$(JDKJRE2COREAPI)
-SCTPAPI_DOCTITLE    := SCTP API
-SCTPAPI_WINDOWTITLE := SCTP API
-SCTPAPI_HEADER      := <strong>SCTP API</strong>
-SCTPAPI_BOTTOM      := $(call CommonBottom,$(SCTPAPI_FIRST_COPYRIGHT_YEAR))
-# SCTPAPI_PKGS is located in NON_CORE_PKGS.gmk
-
-SCTPAPI_INDEX_HTML    = $(SCTPAPI_DOCDIR)/index.html
-SCTPAPI_OPTIONS_FILE  = $(DOCSTMPDIR)/sctp.options
-SCTPAPI_PACKAGES_FILE = $(DOCSTMPDIR)/sctp.packages
-
-sctpdocs: $(SCTPAPI_INDEX_HTML)
-
-# Set relative location to core api document root
-$(SCTSCTSCTP: GET2DOCSDIR=$(SCTPAPI2COREAPI)/..
-
-# Run javadoc if the index file is out of date or missing
-$(SCTPAPI_INDEX_HTML): $(SCTPAPI_OPTIONS_FILE) $(SCTPAPI_PACKAGES_FILE)
-	$(prep-javadoc)
-	$(call JavadocSummary,$(SCTPAPI_OPTIONS_FILE),$(SCTPAPI_PACKAGES_FILE))
-	$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
-	  @$(SCTPAPI_OPTIONS_FILE) @$(SCTPAPI_PACKAGES_FILE)
-
-# Create file with javadoc options in it
-$(SCTPAPI_OPTIONS_FILE):
-	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS))			; \
-	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH))	; \
-	  $(call OptionPair,-encoding,ascii)				; \
-	  $(call OptionOnly,-nodeprecatedlist)				; \
-	  $(call OptionPair,-doctitle,$(SCTPAPI_DOCTITLE))		; \
-	  $(call OptionPair,-windowtitle,$(SCTPAPI_WINDOWTITLE) $(DRAFT_WINTITLE));\
-	  $(call OptionPair,-header,$(SCTPAPI_HEADER)$(DRAFT_HEADER))	; \
-	  $(call OptionPair,-bottom,$(SCTPAPI_BOTTOM)$(DRAFT_BOTTOM))	; \
-	  $(call OptionTrip,-linkoffline,$(SCTPAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
-        ) >> $@
-
-# Create a file with the package names in it
-$(SCTPAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(SCTPAPI_PKGS))
-	$(prep-target)
-	$(call PackageFilter,$(SCTPAPI_PKGS))
-
-#############################################################
-#
-# Get a cache of all the directories
-
-$(DIRECTORY_CACHE): $(ALL_EXISTING_SOURCE_DIRS)
-	$(prep-target)
-	@for cp in $(ALL_EXISTING_SOURCE_DIRS) ; do 	\
-	  $(ECHO) "$(FIND) $${cp} -type f >> $@"; 	\
-	  $(FIND) $${cp} -type f >> $@; 		\
-	done
-
-#############################################################
-#release version of core packages ########
-# Maximize performance and ensure that build number & milestone are set.
-
-rel-coredocs: sanitycheckcoredocs
-	$(MAKE) coredocs
-
-rel-docs: rel-coredocs $(ALL_OTHER_TARGETS)
-#
-# end of production targets
-
-otherdocs: $(ALL_OTHER_TARGETS)
-
-clean:
-	$(RM) -r $(DOCSDIR) $(DOCSTMPDIR)
-
-#############################################################
-# DEBUG TARGET
-# List the values defined in the makefile hierarchy, to make sure everything
-# is set properly, and to help identify values we can use instead of making new ones.
-# (Most of them come from common/shared/Defs.gmk)
-#
-#  Notes:
-#    * BUILD_NUMBER defaults to b00 if not set on command line with BUILD_NUMBER=<value>
-#    * MILESTONE defaults to internal unless set to beta, rc, or fcs on command line
-#
-
-echovalues:
-	@$(ECHO) ""
-	@$(ECHO) --------------Imports---------------------------
-	@$(ECHO) "IMPORT_PACKAGES = $(IMPORT_PACKAGES)"
-	@$(ECHO) "IMPORT_PACKAGE_FILTER = $(IMPORT_PACKAGE_FILTER)"
-	@$(ECHO) --------------Imports---------------------------
-	@$(ECHO) ""
-	@$(ECHO) --------------Shared---------------------------
-	@$(ECHO) BUILD_NUMBER = $(BUILD_NUMBER)
-	@$(ECHO) FULL_VERSION = $(FULL_VERSION)
-	@$(ECHO) JDK_VERSION = $(JDK_VERSION)
-	@$(ECHO) JDK_MAJOR_VERSION = $(JDK_MAJOR_VERSION)
-	@$(ECHO) JDK_MINOR_VERSION = $(JDK_MINOR_VERSION)
-	@$(ECHO) JDK_MICRO_VERSION = $(JDK_MICRO_VERSION)
-	@$(ECHO) JDK_UPDATE_VERSION = $(JDK_UPDATE_VERSION)
-	@$(ECHO) JDK_MKTG_VERSION = $(JDK_MKTG_VERSION)
-	@$(ECHO) JDK_UNDERSCORE_VERSION = $(JDK_UNDERSCORE_VERSION)
-	@$(ECHO) JDK_MKTG_UNDERSCORE_VERSION = $(JDK_MKTG_UNDERSCORE_VERSION)
-	@$(ECHO) MARKETING_NUMBER = $(MARKETING_NUMBER)
-	@$(ECHO) MARKET_NAME = $(MARKET_NAME)
-	@$(ECHO) MILESTONE = $(MILESTONE)
-	@$(ECHO) RELEASE = $(RELEASE)
-	@$(ECHO) USER_RELEASE_SUFFIX = $(USER_RELEASE_SUFFIX)
-	@$(ECHO) --------------Shared---------------------------
-	@$(ECHO) ""
-	@$(ECHO) --------------common/Defs---------------------------
-	@$(ECHO) "RELEASEDOCS_SOURCEPATH"
-	@$(ECHO) "   SHARE_SRC/classes: $(SHARE_SRC)/classes"
-	@$(ECHO) "   PLATFORM_SRC/classes: $(PLATFORM_SRC)/classes"
-	@$(ECHO) "   GENSRCDIR: $(GENSRCDIR)"
-	@$(ECHO) "   SHARE_SRC/doc/stub: $(SHARE_SRC)/doc/stub"
-	@$(ECHO) "   IMPORTSRCDIR: $(IMPORTSRCDIR)"
-	@$(ECHO) --------------common/Defs---------------------------
-	@$(ECHO) ""
-
-#############################################################
-.PHONY: all docs coredocs rel-docs echovalues otherdocs rel-coredocs \
-        sanitycheckcoredocs $(ALL_OTHER_TARGETS)
-
--- a/makefiles/docs/NON_CORE_PKGS.gmk	Wed Nov 07 09:58:39 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-#
-# Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# This file contains the package names of all the "non-core" 
-# API published in the Java 2 SDK documentation.  "Non-core" means
-# it includes all published API outside of the JDK API specification.
-#
-# These environment variables are used by javadoc in 
-# make/docs/Makefile and are referenced by the localization
-# team when determining which APIs to extract javadoc
-# comments from.
-
-DOMAPI_PKGS      = com.sun.java.browser.dom   \
-                   org.w3c.dom                \
-                   org.w3c.dom.bootstrap      \
-                   org.w3c.dom.ls             \
-                   org.w3c.dom.ranges         \
-                   org.w3c.dom.traversal      \
-                   org.w3c.dom.html           \
-                   org.w3c.dom.stylesheets    \
-                   org.w3c.dom.css            \
-                   org.w3c.dom.events         \
-                   org.w3c.dom.views
-
-JDI_PKGS         = com.sun.jdi                \
-                   com.sun.jdi.event          \
-                   com.sun.jdi.request        \
-                   com.sun.jdi.connect        \
-                   com.sun.jdi.connect.spi
-
-MGMT_PKGS        = com.sun.management
-
-JAAS_PKGS        = com.sun.security.auth          \
-                   com.sun.security.auth.callback \
-                   com.sun.security.auth.login    \
-                   com.sun.security.auth.module
-
-JGSS_PKGS        = com.sun.security.jgss
-
-OLD_JSSE_PKGS    = com.sun.net.ssl
-
-HTTPSERVER_PKGS  = com.sun.net.httpserver       \
-                   com.sun.net.httpserver.spi 
-
-NIO_PKGS         = com.sun.nio.file
-
-DOCLETAPI_PKGS   = com.sun.javadoc
-
-TAGLETAPI_FILE   = com/sun/tools/doclets/Taglet.java
-
-ATTACH_PKGS      = com.sun.tools.attach         \
-                   com.sun.tools.attach.spi
-
-JCONSOLE_PKGS    = com.sun.tools.jconsole
-
-TREEAPI_PKGS 	 = com.sun.source.tree \
-		   com.sun.source.util
-
-SMARTCARDIO_PKGS = javax.smartcardio
-
-SCTPAPI_PKGS     = com.sun.nio.sctp
-
-ifeq ($(PLATFORM), macosx)
-APPLE_EXT_PKGS   = com.apple.concurrent   \
-                   com.apple.eawt         \
-                   com.apple.eawt.event   \
-                   com.apple.eio
-endif
-
-# non-core packages in rt.jar
-NON_CORE_PKGS    = $(DOMAPI_PKGS) \
-                   $(MGMT_PKGS) \
-                   $(JAAS_PKGS) \
-                   $(JGSS_PKGS) \
-                   $(NIO_PKGS) \
-                   $(OLD_JSSE_PKGS) \
-                   $(HTTPSERVER_PKGS) \
-                   $(SMARTCARDIO_PKGS) \
-                   $(SCTPAPI_PKGS) \
-                   $(APPLE_EXT_PKGS)
-
--- a/makefiles/docs/Notes.html	Wed Nov 07 09:58:39 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<title>Doc Process Notes</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-</head>
-
-<body>
-<h3><a name="REGEXP"></a><br>
-REGEXP</h3>
-<p> REGEXP is a list of wildcard patterns that determines which packages listed 
-  in CORE_PKGS.gmk go into which summary-table on the main API index page. It 
-  was motivated by the need to divide the world into &quot;core packages&quot; 
-  (java.*) and &quot;extension packages&quot; (javax.*). In time, the distinction 
-  went away. The whole table is now called &quot;Platform Packages&quot;--which 
-  eliminated the need for this list of regular expressions. But it lingered on, 
-  accreting all of the packages in the JVM, one by one. I pruned it back to &quot;*&quot;, 
-  so it now covers every package in the Java platform API docs. If some separation 
-  is needed in the future, it can grow back into a colon-separated list, starting 
-  with this, which is in all respects equivalent to &quot;*&quot; at this point 
-  in time:</p>
-<blockquote> 
-  <pre>REGEXP = &quot;java.*:javax.*:org.ietf*:org.omg.</pre>
-</blockquote>
-<h3><a name="releaseTargets"></a><br>
-  Release Targets</h3>
-<p> (Thanks to Kelly O'Hair for this info.)</p>
-<p> The <tt>rel-coredocs</tt> and <tt>rel-docs</tt> targets were added by Eric 
-  Armstrong. <tt>rel-coredocs</tt> assumes the kind of large, 32-bit machine used 
-  in the javapubs group's docs-release process. It specifies memory settings accordingly 
-  to maximize performance.</p>
-<p> The performance settings, like the sanity check, are most important for the 
-  core docs--the platform APIs. Running javadoc on those APIs takes a significant 
-  amount of time and memory. Setting the initial heap size as large as possible 
-  is important to prevent thrashing as the heap grows. Setting the maximum as 
-  large as necessary is also important to keep the job from failing.</p>
-<blockquote>
-  <p> <tt>-J-Xmx512</tt> sets a maximum of 512, which became necessary in 6.0<br>
-    <tt>-J-Xms256</tt> sets starting size to 256 (default is 8)</p>
-</blockquote>
-<p> <tt>rel-coredocs</tt> also includes a sanity check to help ensure that <tt>BUILD_NUMBER</tt> 
-  and <tt>MILESTONE</tt> are specified properly when docs are built outside of 
-  the normal release engineering process, with the intention of releasing them 
-  on the web or in a downloaded docs bundle. (When invoked in release engineering's 
-  control build, the values are always set properly. But when the targets are 
-  run by themselves, they default to b00 and &quot;internal&quot;--which silently 
-  sabotage the result of a build that can take many hours to complete.</p>
-</body>
-</html>
--- a/makefiles/mapfiles/launchers/mapfile-amd64	Wed Nov 07 09:58:39 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 2004, 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.
-#
-#
-# Specify what global symbols we export.  Note that we're not really
-# interested in declaring a version, simply scoping the file is sufficient.
-#
-
-SUNWprivate_1.1 {
-	global:
-		main;		# Provides basic adb symbol offsets
-		environ;	# Public symbols and required by Java run time
-		_environ;
-		__environ_lock;
-
-	local:
-		*;
-};
--- a/makefiles/mapfiles/launchers/mapfile-i586	Wed Nov 07 09:58:39 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-#
-# Copyright (c) 2004, 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.
-#
-#
-# Specify what global symbols we export.  Note that we're not really
-# interested in declaring a version, simply scoping the file is sufficient.
-#
-
-SUNWprivate_1.1 {
-	global:
-		main;		# Provides basic adb symbol offsets
-		environ;	# Public symbols and required by Java run time
-		_environ;
-		__environ_lock;
-		___Argv;	# The following are private, but as they are
-		_start;		# exported from ctr1/crtn, the clever hacker
-		_init;		# might know about them.  However note, that
-		_fini;		# their use is strictly not supported.
-		_lib_version;
-#		_mcount;
-		__fsr;
-		__fsr_init_value;
-		__longdouble_used;
-
-	local:
-		*;
-};
--- a/makefiles/mapfiles/libawt_headless/reorder-i586	Wed Nov 07 09:58:39 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-# Temporary file for headless
--- a/makefiles/mapfiles/libjava/reorder-i586	Wed Nov 07 09:58:39 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-data = R0x2000;
-text = LOAD ?RXO;
-# Test Null
-text: .text%_init;
-text: .text%init64IO: OUTPUTDIR/UnixFileSystem_md.o;
-text: .text%JNI_OnLoad;
-text: .text%Canonicalize;
-text: .text%canonicalize;
-text: .text%collapse: OUTPUTDIR/canonicalize_md.o;
-text: .text%Java_java_lang_Object_registerNatives;
-text: .text%Java_java_lang_System_registerNatives;
-text: .text%Java_java_lang_Thread_registerNatives;
-text: .text%Java_java_security_AccessController_getStackAccessControlContext;
-text: .text%Java_java_security_AccessController_getInheritedAccessControlContext;
-text: .text%Java_java_lang_ClassLoader_registerNatives;
-text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2;
-text: .text%Java_java_lang_Class_registerNatives;
-text: .text%Java_java_lang_Class_getPrimitiveClass;
-text: .text%Java_java_lang_System_initProperties;
-text: .text%GetJavaProperties;
-text: .text%uname: OUTPUTDIR/java_props_md.o;
-text: .text%mapLookup: OUTPUTDIR/java_props_md.o;
-text: .text%setPathEnvironment: OUTPUTDIR/java_props_md.o;
-text: .text%JNU_NewStringPlatform;
-text: .text%JNU_CallStaticMethodByName;
-text: .text%NewStringPlatform;
-text: .text%Java_java_io_FileInputStream_initIDs;
-text: .text%Java_java_io_FileDescriptor_initIDs;
-text: .text%Java_java_io_FileOutputStream_initIDs;
-text: .text%Java_java_lang_System_setIn0;
-text: .text%Java_sun_reflect_Reflection_getCallerClass;
-text: .text%Java_java_lang_Class_forName0;
-text: .text%Java_java_lang_String_intern;
-text: .text%Java_sun_reflect_NativeConstructorAccessorImpl_newInstance0;
-text: .text%Java_java_lang_Throwable_fillInStackTrace;
-text: .text%Java_java_lang_System_setOut0;
-text: .text%Java_java_lang_System_setErr0;
-text: .text%Java_java_lang_Compiler_registerNatives;
-text: .text%Java_java_io_FileSystem_getFileSystem;
-text: .text%JNU_NewObjectByName;
-text: .text%Java_java_io_UnixFileSystem_initIDs;
-text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2;
-text: .text%Java_java_io_UnixFileSystem_list;
-text: .text%JNU_GetStringPlatformChars;
-text: .text%JNU_ReleaseStringPlatformChars;
-text: .text%JNU_ClassString;
-text: .text%JNU_CopyObjectArray;
-text: .text%Java_java_io_UnixFileSystem_canonicalize;
-text: .text%Java_java_io_UnixFileSystem_getBooleanAttributes0;
-text: .text%Java_java_lang_ClassLoader_findLoadedClass;
-text: .text%Java_java_lang_ClassLoader_findBootstrapClass;
-text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2Ljava_security_AccessControlContext_2;
-text: .text%Java_java_lang_System_mapLibraryName;
-text: .text%cpchars: OUTPUTDIR/System.o;
-text: .text%Java_java_lang_ClassLoader_00024NativeLibrary_load;
-text: .text%Java_java_lang_ClassLoader_00024NativeLibrary_find;
-text: .text%Java_java_lang_Float_floatToIntBits;
-text: .text%Java_java_lang_Double_doubleToLongBits;
-text: .text%Java_java_io_FileInputStream_open;
-text: .text%fileOpen;
-text: .text%Java_java_io_UnixFileSystem_getLength;
-text: .text%Java_java_io_FileInputStream_readBytes;
-text: .text%readBytes;
-text: .text%Java_java_io_FileInputStream_close0;
-text: .text%Java_java_lang_Object_getClass;
-text: .text%Java_java_lang_ClassLoader_defineClass0;
-text: .text%VerifyClassCodes;
-# Test Exit
-text: .text%Java_java_lang_Shutdown_halt;
-# Test Hello
-text: .text%Java_java_io_FileOutputStream_writeBytes;
-text: .text%writeBytes;
-# Test Sleep
-# Test IntToString
-# Test LoadToolkit
-text: .text%Java_java_util_ResourceBundle_getClassContext;
-text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2;
-text: .text%JNU_GetEnv;
-text: .text%Java_java_io_UnixFileSystem_checkAccess;
-text: .text%Java_sun_reflect_NativeMethodAccessorImpl_invoke0;
-text: .text%Java_java_lang_ref_Finalizer_invokeFinalizeMethod;
-text: .text%Java_java_io_FileInputStream_available;
-text: .text%Java_java_lang_reflect_Array_newArray;
-text: .text%Java_java_lang_Throwable_getStackTraceDepth;
-text: .text%Java_java_lang_Throwable_getStackTraceElement;
-text: .text%Java_java_lang_System_identityHashCode;
-text: .text%Java_sun_misc_Signal_findSignal;
-text: .text%Java_sun_misc_Signal_handle0;
-text: .text%JNU_NotifyAll;
-# Test LoadFrame
-text: .text%JNU_CallMethodByName;
-text: .text%JNU_CallMethodByNameV;
-text: .text%Java_java_util_logging_FileHandler_lockFile;
-text: .text%Java_java_io_FileOutputStream_open;
-text: .text%Java_java_io_UnixFileSystem_createDirectory;
-text: .text%Java_java_io_UnixFileSystem_getLastModifiedTime;
-text: .text%Java_java_util_prefs_FileSystemPreferences_lockFile0;
-text: .text%Java_java_io_UnixFileSystem_setLastModifiedTime;
-text: .text%Java_java_util_prefs_FileSystemPreferences_unlockFile0;
-text: .text%Java_java_io_FileOutputStream_close0;
-text: .text%Java_java_util_logging_FileHandler_unlockFile;
-# Test LoadJFrame
-text: .text%Java_java_lang_Class_isAssignableFrom;
-text: .text%Java_java_lang_Class_isInstance;
-# Test JHello
-# SwingSet
-text: .text%Java_java_util_TimeZone_getSystemTimeZoneID;
-text: .text%findJavaTZ_md;
-text: .text%Java_java_lang_StrictMath_log;
--- a/makefiles/mapfiles/libjpeg/reorder-i586	Wed Nov 07 09:58:39 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-data = R0x2000;
-text = LOAD ?RXO;
-# Test Null
-# Test Exit
-# Test Hello
-# Test Sleep
-# Test IntToString
-# Test LoadToolkit
-# Test LoadFrame
-# Test LoadJFrame
-# Test JHello
-# SwingSet
-text: .text%JNI_OnLoad;
-text: .text%Java_sun_awt_image_JPEGImageDecoder_initIDs;
-text: .text%Java_sun_awt_image_JPEGImageDecoder_readImage;
-text: .text%jStdError;
-text: .text%jCreaDecompress;
-text: .text%jIMemMgr;
-text: .text%jMemInit;
-text: .text%jGetSmall;
-text: .text%jIMReader;
-text: .text%alloc_small: OUTPUTDIR/jmemmgr.o;
-text: .text%reset_marker_reader: OUTPUTDIR/jdmarker.o;
-text: .text%jIInCtlr;
-# text: .text%GET_ARRAYS: OUTPUTDIR/jpegdecoder.o;
-text: .text%jReadHeader;
-text: .text%jConsumeInput;
-text: .text%reset_input_controller: OUTPUTDIR/jdinput.o;
-text: .text%reset_error_mgr: OUTPUTDIR/jerror.o;
-text: .text%sun_jpeg_init_source;
-text: .text%consume_markers: OUTPUTDIR/jdinput.o;
-text: .text%read_markers: OUTPUTDIR/jdmarker.o;
-# text: .text%first_marker: OUTPUTDIR/jdmarker.o;
-text: .text%sun_jpeg_fill_input_buffer;
-# text: .text%RELEASE_ARRAYS: OUTPUTDIR/jpegdecoder.o;
-# text: .text%get_soi: OUTPUTDIR/jdmarker.o;
-text: .text%emit_message: OUTPUTDIR/jerror.o;
-# text: .text%next_marker: OUTPUTDIR/jdmarker.o;
-text: .text%get_interesting_appn: OUTPUTDIR/jdmarker.o;
-# text: .text%examine_app0: OUTPUTDIR/jdmarker.o;
-text: .text%skip_variable: OUTPUTDIR/jdmarker.o;
-text: .text%sun_jpeg_skip_input_data;
-# text: .text%examine_app14: OUTPUTDIR/jdmarker.o;
-text: .text%get_dqt: OUTPUTDIR/jdmarker.o;
-text: .text%jAlcQTable;
-text: .text%get_sof: OUTPUTDIR/jdmarker.o;
-# text: .text%get_dri: OUTPUTDIR/jdmarker.o;
-text: .text%get_dht: OUTPUTDIR/jdmarker.o;
-text: .text%jAlcHTable;
-text: .text%get_sos: OUTPUTDIR/jdmarker.o;
-# text: .text%initial_setup: OUTPUTDIR/jdinput.o;
-text: .text%jDivRound;
-# text: .text%default_decompress_parms: OUTPUTDIR/jdapimin.o;
-text: .text%jHasMultScn;
-text: .text%jStrtDecompress;
-text: .text%jIDMaster;
-# text: .text%master_selection: OUTPUTDIR/jdmaster.o;
-text: .text%jCalcDimensions;
-# text: .text%use_merged_upsample: OUTPUTDIR/jdmaster.o;
-# text: .text%prepare_range_limit_table: OUTPUTDIR/jdmaster.o;
-text: .text%jIDColor;
-# text: .text%build_ycc_rgb_table: OUTPUTDIR/jdcolor.o;
-text: .text%jIUpsampler;
-text: .text%jRound;
-text: .text%alloc_sarray: OUTPUTDIR/jmemmgr.o;
-text: .text%alloc_large: OUTPUTDIR/jmemmgr.o;
-text: .text%jGetLarge;
-text: .text%jIDPostC;
-text: .text%jIIDCT;
-text: .text%jIHDecoder;
-text: .text%jIDCoefC;
-text: .text%jIDMainC;
-# text: .text%alloc_funny_pointers: OUTPUTDIR/jdmainct.o;
-text: .text%realize_virt_arrays: OUTPUTDIR/jmemmgr.o;
-text: .text%start_input_pass: OUTPUTDIR/jdinput.o;
-# text: .text%per_scan_setup: OUTPUTDIR/jdinput.o;
-# text: .text%latch_quant_tables: OUTPUTDIR/jdinput.o;
-text: .text%start_pass_huff_decoder: OUTPUTDIR/jdhuff.o;
-text: .text%jMkDDerived;
-text: .text%start_input_pass: OUTPUTDIR/jdcoefct.o;
-# text: .text%start_iMCU_row: OUTPUTDIR/jdcoefct.o;
-# text: .text%output_pass_setup: OUTPUTDIR/jdapistd.o;
-text: .text%prepare_for_output_pass: OUTPUTDIR/jdmaster.o;
-text: .text%start_pass: OUTPUTDIR/jddctmgr.o;
-text: .text%start_output_pass: OUTPUTDIR/jdcoefct.o;
-text: .text%start_pass_dcolor: OUTPUTDIR/jdcolor.o;
-text: .text%start_pass_upsample: OUTPUTDIR/jdsample.o;
-text: .text%start_pass_dpost: OUTPUTDIR/jdpostct.o;
-text: .text%start_pass_main: OUTPUTDIR/jdmainct.o;
-# text: .text%make_funny_pointers: OUTPUTDIR/jdmainct.o;
-text: .text%jReadScanlines;
-text: .text%process_data_context_main: OUTPUTDIR/jdmainct.o;
-text: .text%decompress_onepass: OUTPUTDIR/jdcoefct.o;
-text: .text%jZeroFar;
-text: .text%decode_mcu: OUTPUTDIR/jdhuff.o;
-text: .text%jFilBitBuf;
-text: .text%jHufDecode;
-text: .text%jRDislow;
-text: .text%sep_upsample: OUTPUTDIR/jdsample.o;
-text: .text%fullsize_upsample: OUTPUTDIR/jdsample.o;
-text: .text%h2v2_fancy_upsample: OUTPUTDIR/jdsample.o;
-text: .text%ycc_rgb_convert: OUTPUTDIR/jdcolor.o;
-# text: .text%set_wraparound_pointers: OUTPUTDIR/jdmainct.o;
-# text: .text%process_restart: OUTPUTDIR/jdhuff.o;
-text: .text%read_restart_marker: OUTPUTDIR/jdmarker.o;
-text: .text%finish_input_pass: OUTPUTDIR/jdinput.o;
-# text: .text%set_bottom_pointers: OUTPUTDIR/jdmainct.o;
-text: .text%jFinDecompress;
-text: .text%finish_output_pass: OUTPUTDIR/jdmaster.o;
-text: .text%sun_jpeg_term_source;
-text: .text%jAbort;
-text: .text%free_pool: OUTPUTDIR/jmemmgr.o;
-text: .text%jFreeLarge;
-text: .text%jFreeSmall;
-text: .text%jDestDecompress;
-text: .text%jDestroy;
-text: .text%self_destruct: OUTPUTDIR/jmemmgr.o;
-text: .text%jMemTerm;
-text: .text%process_data_simple_main: OUTPUTDIR/jdmainct.o;
--- a/makefiles/mapfiles/libnio/mapfile-bsd	Wed Nov 07 09:58:39 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,179 +0,0 @@
-#
-# Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-SUNWprivate_1.1 {
-	global:
-                Java_java_nio_MappedByteBuffer_force0;
-                Java_java_nio_MappedByteBuffer_isLoaded0;
-                Java_java_nio_MappedByteBuffer_load0;
-                Java_sun_nio_ch_DatagramChannelImpl_disconnect0;
-                Java_sun_nio_ch_DatagramChannelImpl_initIDs;
-                Java_sun_nio_ch_DatagramChannelImpl_receive0;
-                Java_sun_nio_ch_DatagramChannelImpl_send0;
-                Java_sun_nio_ch_DatagramDispatcher_read0;
-                Java_sun_nio_ch_DatagramDispatcher_readv0;
-                Java_sun_nio_ch_DatagramDispatcher_write0;
-                Java_sun_nio_ch_DatagramDispatcher_writev0;
-                Java_sun_nio_ch_FileChannelImpl_close0;
-                Java_sun_nio_ch_FileChannelImpl_initIDs;
-                Java_sun_nio_ch_FileChannelImpl_map0;
-                Java_sun_nio_ch_FileChannelImpl_position0;
-                Java_sun_nio_ch_FileChannelImpl_transferTo0;
-                Java_sun_nio_ch_FileChannelImpl_unmap0;
-                Java_sun_nio_ch_FileDispatcherImpl_close0;
-                Java_sun_nio_ch_FileDispatcherImpl_closeIntFD;
-		Java_sun_nio_ch_FileDispatcherImpl_force0;
-                Java_sun_nio_ch_FileDispatcherImpl_init;
-		Java_sun_nio_ch_FileDispatcherImpl_lock0;
-                Java_sun_nio_ch_FileDispatcherImpl_preClose0;
-                Java_sun_nio_ch_FileDispatcherImpl_pread0;
-                Java_sun_nio_ch_FileDispatcherImpl_pwrite0;
-                Java_sun_nio_ch_FileDispatcherImpl_read0;
-                Java_sun_nio_ch_FileDispatcherImpl_readv0;
-		Java_sun_nio_ch_FileDispatcherImpl_release0;
-		Java_sun_nio_ch_FileDispatcherImpl_size0;
-		Java_sun_nio_ch_FileDispatcherImpl_truncate0;
-                Java_sun_nio_ch_FileDispatcherImpl_write0;
-                Java_sun_nio_ch_FileDispatcherImpl_writev0;
-                Java_sun_nio_ch_FileKey_init;
-                Java_sun_nio_ch_FileKey_initIDs;
-		Java_sun_nio_ch_InheritedChannel_close0;
-		Java_sun_nio_ch_InheritedChannel_dup;
-		Java_sun_nio_ch_InheritedChannel_dup2;
-		Java_sun_nio_ch_InheritedChannel_open0;
-		Java_sun_nio_ch_InheritedChannel_peerAddress0;
-		Java_sun_nio_ch_InheritedChannel_peerPort0;
-		Java_sun_nio_ch_InheritedChannel_soType0;
-                Java_sun_nio_ch_IOUtil_configureBlocking;
-                Java_sun_nio_ch_IOUtil_drain;
-                Java_sun_nio_ch_IOUtil_fdVal;
-                Java_sun_nio_ch_IOUtil_initIDs;
-                Java_sun_nio_ch_IOUtil_makePipe;
-                Java_sun_nio_ch_IOUtil_randomBytes;
-                Java_sun_nio_ch_IOUtil_setfdVal;
-		Java_sun_nio_ch_KQueue_kqueue;
-		Java_sun_nio_ch_KQueue_keventRegister;
-		Java_sun_nio_ch_KQueue_keventPoll;
-		Java_sun_nio_ch_KQueue_keventSize;
-		Java_sun_nio_ch_KQueue_identOffset;
-		Java_sun_nio_ch_KQueue_filterOffset;
-		Java_sun_nio_ch_KQueue_flagsOffset;
-		Java_sun_nio_ch_KQueuePort_socketpair;
-		Java_sun_nio_ch_KQueuePort_interrupt;
-		Java_sun_nio_ch_KQueuePort_drain1;
-		Java_sun_nio_ch_KQueuePort_close0;
-		Java_sun_nio_ch_NativeThread_current;
-		Java_sun_nio_ch_NativeThread_init;
-		Java_sun_nio_ch_NativeThread_signal;
-		Java_sun_nio_ch_Net_canIPv6SocketJoinIPv4Group0;
-		Java_sun_nio_ch_Net_canJoin6WithIPv4Group0;
-		Java_sun_nio_ch_Net_socket0;
-		Java_sun_nio_ch_Net_bind0;
-		Java_sun_nio_ch_Net_connect0;
-		Java_sun_nio_ch_Net_listen;
-		Java_sun_nio_ch_Net_localPort;
-		Java_sun_nio_ch_Net_localInetAddress;
-		Java_sun_nio_ch_Net_getIntOption0;
-		Java_sun_nio_ch_Net_setIntOption0;
-                Java_sun_nio_ch_Net_initIDs;
-		Java_sun_nio_ch_Net_isIPv6Available0;
-		Java_sun_nio_ch_Net_joinOrDrop4;
-		Java_sun_nio_ch_Net_blockOrUnblock4;
-		Java_sun_nio_ch_Net_joinOrDrop6;
-		Java_sun_nio_ch_Net_blockOrUnblock6;
-		Java_sun_nio_ch_Net_setInterface4;
-		Java_sun_nio_ch_Net_getInterface4;
-		Java_sun_nio_ch_Net_setInterface6;
-		Java_sun_nio_ch_Net_getInterface6;
-		Java_sun_nio_ch_Net_shutdown;
-                Java_sun_nio_ch_PollArrayWrapper_interrupt;
-                Java_sun_nio_ch_PollArrayWrapper_poll0;
-                Java_sun_nio_ch_ServerSocketChannelImpl_accept0;
-                Java_sun_nio_ch_ServerSocketChannelImpl_initIDs;
-                Java_sun_nio_ch_SocketChannelImpl_checkConnect;
-		Java_sun_nio_ch_SocketChannelImpl_sendOutOfBandData;
-		Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_accept0;
-		Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_initIDs;
-		Java_sun_nio_ch_UnixAsynchronousSocketChannelImpl_checkConnect;
-		Java_sun_nio_fs_BsdNativeDispatcher_initIDs;
-		Java_sun_nio_fs_BsdNativeDispatcher_getfsstat;
-		Java_sun_nio_fs_BsdNativeDispatcher_fsstatEntry;
-		Java_sun_nio_fs_BsdNativeDispatcher_endfsstat;
-		Java_sun_nio_fs_GnomeFileTypeDetector_initializeGio;
-		Java_sun_nio_fs_GnomeFileTypeDetector_probeUsingGio;
-		Java_sun_nio_fs_GnomeFileTypeDetector_initializeGnomeVfs;
-		Java_sun_nio_fs_GnomeFileTypeDetector_probeUsingGnomeVfs;
-		Java_sun_nio_fs_UnixNativeDispatcher_init;
-		Java_sun_nio_fs_UnixNativeDispatcher_getcwd;
-		Java_sun_nio_fs_UnixNativeDispatcher_strerror;
-		Java_sun_nio_fs_UnixNativeDispatcher_dup;
-		Java_sun_nio_fs_UnixNativeDispatcher_access0;
-		Java_sun_nio_fs_UnixNativeDispatcher_stat0;
-		Java_sun_nio_fs_UnixNativeDispatcher_lstat0;
-		Java_sun_nio_fs_UnixNativeDispatcher_fstat;
-		Java_sun_nio_fs_UnixNativeDispatcher_fstatat0;
-		Java_sun_nio_fs_UnixNativeDispatcher_chmod0;
-		Java_sun_nio_fs_UnixNativeDispatcher_fchmod;
-		Java_sun_nio_fs_UnixNativeDispatcher_chown0;
-		Java_sun_nio_fs_UnixNativeDispatcher_lchown0;
-		Java_sun_nio_fs_UnixNativeDispatcher_fchown;
-		Java_sun_nio_fs_UnixNativeDispatcher_utimes0;
-		Java_sun_nio_fs_UnixNativeDispatcher_futimes;
-		Java_sun_nio_fs_UnixNativeDispatcher_open0;
-		Java_sun_nio_fs_UnixNativeDispatcher_openat0;
-		Java_sun_nio_fs_UnixNativeDispatcher_close;
-		Java_sun_nio_fs_UnixNativeDispatcher_read;
-		Java_sun_nio_fs_UnixNativeDispatcher_write;
-		Java_sun_nio_fs_UnixNativeDispatcher_fopen0;
-		Java_sun_nio_fs_UnixNativeDispatcher_fclose;
-		Java_sun_nio_fs_UnixNativeDispatcher_opendir0;
-		Java_sun_nio_fs_UnixNativeDispatcher_fdopendir;
-		Java_sun_nio_fs_UnixNativeDispatcher_readdir;
-		Java_sun_nio_fs_UnixNativeDispatcher_closedir;
-		Java_sun_nio_fs_UnixNativeDispatcher_link0;
-		Java_sun_nio_fs_UnixNativeDispatcher_unlink0;
-		Java_sun_nio_fs_UnixNativeDispatcher_unlinkat0;
-		Java_sun_nio_fs_UnixNativeDispatcher_rename0;
-		Java_sun_nio_fs_UnixNativeDispatcher_renameat0;
-		Java_sun_nio_fs_UnixNativeDispatcher_mkdir0;
-		Java_sun_nio_fs_UnixNativeDispatcher_rmdir0;
-		Java_sun_nio_fs_UnixNativeDispatcher_symlink0;
-		Java_sun_nio_fs_UnixNativeDispatcher_readlink0;
-		Java_sun_nio_fs_UnixNativeDispatcher_realpath0;
-		Java_sun_nio_fs_UnixNativeDispatcher_statvfs0;
-		Java_sun_nio_fs_UnixNativeDispatcher_pathconf0;
-		Java_sun_nio_fs_UnixNativeDispatcher_fpathconf;
-		Java_sun_nio_fs_UnixNativeDispatcher_mknod0;
-		Java_sun_nio_fs_UnixNativeDispatcher_getpwuid;
-		Java_sun_nio_fs_UnixNativeDispatcher_getgrgid;
-		Java_sun_nio_fs_UnixNativeDispatcher_getpwnam0;
-		Java_sun_nio_fs_UnixNativeDispatcher_getgrnam0;
-		Java_sun_nio_fs_UnixNativeDispatcher_getextmntent;
-		Java_sun_nio_fs_UnixCopyFile_transfer;
-		handleSocketError;
-
-	local:
-		*;
-};
--- a/makefiles/mapfiles/libnio/mapfile-linux	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/mapfiles/libnio/mapfile-linux	Tue Nov 06 18:41:01 2012 -0800
@@ -116,6 +116,7 @@
 		Java_sun_nio_ch_Net_setInterface6;
 		Java_sun_nio_ch_Net_getInterface6;
 		Java_sun_nio_ch_Net_shutdown;
+		Java_sun_nio_ch_Net_poll;
                 Java_sun_nio_ch_PollArrayWrapper_interrupt;
                 Java_sun_nio_ch_PollArrayWrapper_poll0;
                 Java_sun_nio_ch_ServerSocketChannelImpl_accept0;
--- a/makefiles/mapfiles/libnio/mapfile-macosx	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/mapfiles/libnio/mapfile-macosx	Tue Nov 06 18:41:01 2012 -0800
@@ -108,6 +108,7 @@
 		Java_sun_nio_ch_Net_setInterface6;
 		Java_sun_nio_ch_Net_getInterface6;
 		Java_sun_nio_ch_Net_shutdown;
+		Java_sun_nio_ch_Net_poll;
                 Java_sun_nio_ch_PollArrayWrapper_interrupt;
                 Java_sun_nio_ch_PollArrayWrapper_poll0;
                 Java_sun_nio_ch_ServerSocketChannelImpl_accept0;
--- a/makefiles/mapfiles/libnio/mapfile-solaris	Wed Nov 07 09:58:39 2012 +0900
+++ b/makefiles/mapfiles/libnio/mapfile-solaris	Tue Nov 06 18:41:01 2012 -0800
@@ -104,6 +104,7 @@
 		Java_sun_nio_ch_Net_setInterface6;
 		Java_sun_nio_ch_Net_getInterface6;
 		Java_sun_nio_ch_Net_shutdown;
+		Java_sun_nio_ch_Net_poll;
                 Java_sun_nio_ch_PollArrayWrapper_interrupt;
                 Java_sun_nio_ch_PollArrayWrapper_poll0;
                 Java_sun_nio_ch_ServerSocketChannelImpl_accept0;
--- a/makefiles/mapfiles/libnio/reorder-i586	Wed Nov 07 09:58:39 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-data = R0x2000;
-text = LOAD ?RXO;
-# Test Null
-# Test Exit
-# Test Hello
-# Test Sleep
-# Test IntToString
-# Test LoadToolkit
-text: .text%Java_sun_nio_ch_FileChannelImpl_initIDs;
-text: .text%Java_sun_nio_ch_FileDispatcher_initIDs;
-text: .text%Java_sun_nio_ch_IOUtil_initIDs;
-text: .text%Java_sun_nio_ch_FileDispatcher_read0;
-text: .text%convertReturnVal;
-# Test LoadFrame
-# Test LoadJFrame
-# Test JHello
-# SwingSet
--- a/makefiles/mapfiles/libverify/reorder-i586	Wed Nov 07 09:58:39 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-data = R0x2000;
-text = LOAD ?RXO;
-# Test Null
-text: .text%VerifyFixClassname;
-text: .text%VerifyClassname;
-text: .text%skip_over_fieldname: OUTPUTDIR/check_format.o;
-text: .text%skip_over_field_signature: OUTPUTDIR/check_format.o;
-text: .text%VerifyClass;
-text: .text%make_class_info_from_name: OUTPUTDIR/check_code.o;
-text: .text%class_name_to_ID: OUTPUTDIR/check_code.o;
-text: .text%make_class_info: OUTPUTDIR/check_code.o;
-text: .text%free_block: OUTPUTDIR/check_code.o;
-text: .text%verify_method: OUTPUTDIR/check_code.o;
-text: .text%verify_opcode_operands: OUTPUTDIR/check_code.o;
-text: .text%initialize_dataflow: OUTPUTDIR/check_code.o;
-text: .text%signature_to_fieldtype: OUTPUTDIR/check_code.o;
-text: .text%check_register_values: OUTPUTDIR/check_code.o;
-text: .text%pop_stack: OUTPUTDIR/check_code.o;
-text: .text%update_registers: OUTPUTDIR/check_code.o;
-text: .text%push_stack: OUTPUTDIR/check_code.o;
-text: .text%merge_into_successors: OUTPUTDIR/check_code.o;
-text: .text%cp_index_to_class_fullinfo: OUTPUTDIR/check_code.o;
-text: .text%set_protected: OUTPUTDIR/check_code.o;
-text: .text%merge_into_one_successor: OUTPUTDIR/check_code.o;
-text: .text%merge_registers: OUTPUTDIR/check_code.o;
-# Test Exit
-# Test Hello
-text: .text%merge_fullinfo_types: OUTPUTDIR/check_code.o;
-text: .text%isAssignableTo: OUTPUTDIR/check_code.o;
-# Test Sleep
-text: .text%isLegalTarget: OUTPUTDIR/check_code.o;
-text: .text%verify_constant_pool_type: OUTPUTDIR/check_code.o;
-# Test IntToString
-# Test LoadToolkit
-# Test LoadFrame
-# Test LoadJFrame
-# Test JHello
-# SwingSet
-text: .text%copy_stack: OUTPUTDIR/check_code.o;
-text: .text%ntohl: OUTPUTDIR/check_code.o;
--- a/makefiles/mapfiles/libzip/reorder-i586	Wed Nov 07 09:58:39 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-data = R0x2000;
-text = LOAD ?RXO;
-# Test Null
-text: .text%ZIP_Open;
-text: .text%ZIP_Open_Generic;
-text: .text%InitializeZip;
-text: .text%allocZip;
-text: .text%readCEN: OUTPUTDIR/zip_util.o;
-text: .text%findEND: OUTPUTDIR/zip_util.o;
-text: .text%hash: OUTPUTDIR/zip_util.o;
-text: .text%isMetaName: OUTPUTDIR/zip_util.o;
-text: .text%addMetaName: OUTPUTDIR/zip_util.o;
-text: .text%ZIP_FindEntry;
-text: .text%ZIP_GetEntry;
-text: .text%ZIP_Lock;
-text: .text%readLOC: OUTPUTDIR/zip_util.o;
-text: .text%ZIP_Unlock;
-text: .text%ZIP_FreeEntry;
-text: .text%Java_java_util_zip_ZipFile_initIDs;
-text: .text%Java_java_util_zip_ZipFile_open;
-text: .text%Java_java_util_zip_ZipFile_getTotal;
-text: .text%Java_java_util_zip_ZipFile_getEntry;
-text: .text%Java_java_util_zip_ZipFile_freeEntry;
-text: .text%Java_java_util_zip_ZipFile_getEntryTime;
-text: .text%Java_java_util_zip_ZipFile_getEntryCrc;
-text: .text%Java_java_util_zip_ZipFile_getEntryCSize;
-text: .text%Java_java_util_zip_ZipFile_getEntrySize;
-text: .text%Java_java_util_zip_ZipFile_getEntryFlag;
-text: .text%Java_java_util_zip_ZipFile_getEntryMethod;
-text: .text%Java_java_util_zip_ZipFile_getEntryBytes;
-text: .text%Java_java_util_zip_Inflater_initIDs;
-text: .text%Java_java_util_zip_Inflater_init;
-text: .text%inflateInit2_;
-text: .text%zcalloc;
-text: .text%inflateReset;
-text: .text%Java_java_util_zip_Inflater_inflateBytes;
-text: .text%inflate;
-text: .text%Java_java_util_zip_ZipFile_read;
-text: .text%ZIP_Read;
-text: .text%huft_build: OUTPUTDIR/inftrees.o;
-text: .text%zcfree;
-text: .text%Java_java_util_jar_JarFile_getMetaInfEntryNames;
-text: .text%ZIP_ReadEntry;
-text: .text%InflateFully;
-text: .text%inflateEnd;
-text: .text%Java_java_util_zip_Inflater_reset;
-text: .text%Java_java_util_zip_ZipFile_close;
-text: .text%ZIP_Close;
-text: .text%Java_java_util_zip_Inflater_end;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/sun/awt/X11/ToBin.java	Tue Nov 06 18:41:01 2012 -0800
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2005, 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.
+ */
+
+package sun.awt.X11;
+
+import java.io.*;
+import java.awt.image.*;
+import javax.imageio.*;
+import java.awt.*;
+
+public class ToBin {
+    public static void main(String[] args) throws Exception {
+        BufferedImage im = ImageIO.read(System.in);
+        BufferedImage bi = null;
+        int iconWidth = im.getWidth(null);
+        int iconHeight = im.getHeight(null);
+        if (im != null && iconHeight != 0 &&  iconWidth != 0) {
+            bi = new BufferedImage(iconWidth, iconHeight, BufferedImage.TYPE_INT_ARGB);
+            Graphics g = bi.getGraphics();
+            try {
+                g.drawImage(im, 0, 0, iconWidth, iconHeight, null);
+            } finally {
+                g.dispose();
+            }
+        }
+        DataBuffer srcBuf = bi.getData().getDataBuffer();
+        int[] buf = ((DataBufferInt)srcBuf).getData();
+        System.out.print(iconWidth + ",");
+        System.out.println(iconHeight + ",");
+        for (int i = 0; i < buf.length; i++) {
+            System.out.print("0x" + Integer.toHexString(buf[i]) + ", ");
+            if (i % 10 == 0) {
+                System.out.println();
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefiles/sun/osxapp/ToBin.java	Tue Nov 06 18:41:01 2012 -0800
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+
+package sun.osxapp;
+
+import java.io.*;
+
+public class ToBin {
+    public static void main(String[] args) throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        int nRead;
+        byte[] data = new byte[4096];
+
+        while ((nRead = System.in.read(data, 0, data.length)) != -1) {
+            baos.write(data, 0, nRead);
+        }
+
+        baos.flush();
+
+        byte[] buf = baos.toByteArray();
+        for (int i = 0; i < buf.length; i++) {
+            System.out.print(String.format("0x%1$02X", buf[i]) + ", ");
+            if (i % 20 == 0) {
+                System.out.println();
+            }
+        }
+    }
+}
--- a/makefiles/sun/xawt/ToBin.java	Wed Nov 07 09:58:39 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2005, 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.
- */
-
-package sun.awt.X11;
-
-import java.io.*;
-import java.awt.image.*;
-import javax.imageio.*;
-import java.awt.*;
-
-public class ToBin {
-    public static void main(String[] args) throws Exception {
-        BufferedImage im = ImageIO.read(System.in);
-        BufferedImage bi = null;
-        int iconWidth = im.getWidth(null);
-        int iconHeight = im.getHeight(null);
-        if (im != null && iconHeight != 0 &&  iconWidth != 0) {
-            bi = new BufferedImage(iconWidth, iconHeight, BufferedImage.TYPE_INT_ARGB);
-            Graphics g = bi.getGraphics();
-            try {
-                g.drawImage(im, 0, 0, iconWidth, iconHeight, null);
-            } finally {
-                g.dispose();
-            }
-        }
-        DataBuffer srcBuf = bi.getData().getDataBuffer();
-        int[] buf = ((DataBufferInt)srcBuf).getData();
-        System.out.print(iconWidth + ",");
-        System.out.println(iconHeight + ",");
-        for (int i = 0; i < buf.length; i++) {
-            System.out.print("0x" + Integer.toHexString(buf[i]) + ", ");
-            if (i % 10 == 0) {
-                System.out.println();
-            }
-        }
-    }
-}
--- a/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Tue Nov 06 18:41:01 2012 -0800
@@ -598,29 +598,21 @@
     }
 
     /**
-     * Called by the delegate when any part of the window should be repainted.
+     * Called by the {@code PlatformWindow} when any part of the window should
+     * be repainted.
      */
-    public void notifyExpose(final int x, final int y, final int w, final int h) {
-        // TODO: there's a serious problem with Swing here: it handles
-        // the exposition internally, so SwingPaintEventDispatcher always
-        // return null from createPaintEvent(). However, we flush the
-        // back buffer here unconditionally, so some flickering may appear.
-        // A possible solution is to split postPaintEvent() into two parts,
-        // and override that part which is only called after if
-        // createPaintEvent() returned non-null value and flush the buffer
-        // from the overridden method
-        flushOnscreenGraphics();
-        repaintPeer(new Rectangle(x, y, w, h));
+    public final void notifyExpose(final Rectangle r) {
+        repaintPeer(r);
     }
 
     /**
-     * Called by the delegate when this window is moved/resized by user.
-     * There's no notifyReshape() in LWComponentPeer as the only
+     * Called by the {@code PlatformWindow} when this window is moved/resized by
+     * user. There's no notifyReshape() in LWComponentPeer as the only
      * components which could be resized by user are top-level windows.
      */
     public final void notifyReshape(int x, int y, int w, int h) {
-        boolean moved = false;
-        boolean resized = false;
+        final boolean moved;
+        final boolean resized;
         synchronized (getStateLock()) {
             moved = (x != sysX) || (y != sysY);
             resized = (w != sysW) || (h != sysH);
@@ -644,12 +636,13 @@
             flushOnscreenGraphics();
         }
 
-        // Third, COMPONENT_MOVED/COMPONENT_RESIZED events
+        // Third, COMPONENT_MOVED/COMPONENT_RESIZED/PAINT events
         if (moved) {
             handleMove(x, y, true);
         }
         if (resized) {
-            handleResize(w, h,true);
+            handleResize(w, h, true);
+            repaintPeer();
         }
     }
 
@@ -682,8 +675,9 @@
         getLWToolkit().getCursorManager().updateCursorLater(this);
     }
 
-    public void notifyActivation(boolean activation) {
-        changeFocusedWindow(activation);
+    public void notifyActivation(boolean activation, LWWindowPeer opposite) {
+        Window oppositeWindow = (opposite == null)? null : opposite.getTarget();
+        changeFocusedWindow(activation, oppositeWindow);
     }
 
     // MouseDown in non-client area
@@ -1158,6 +1152,9 @@
         Window currentActive = KeyboardFocusManager.
             getCurrentKeyboardFocusManager().getActiveWindow();
 
+        Window opposite = LWKeyboardFocusManagerPeer.getInstance().
+            getCurrentFocusedWindow();
+
         // Make the owner active window.
         if (isSimpleWindow()) {
             LWWindowPeer owner = getOwnerFrameDialog(this);
@@ -1184,16 +1181,17 @@
             }
 
             // DKFM will synthesize all the focus/activation events correctly.
-            changeFocusedWindow(true);
+            changeFocusedWindow(true, opposite);
             return true;
 
         // In case the toplevel is active but not focused, change focus directly,
         // as requesting native focus on it will not have effect.
         } else if (getTarget() == currentActive && !getTarget().hasFocus()) {
 
-            changeFocusedWindow(true);
+            changeFocusedWindow(true, opposite);
             return true;
         }
+
         return platformWindow.requestWindowFocus();
     }
 
@@ -1223,7 +1221,7 @@
     /*
      * Changes focused window on java level.
      */
-    private void changeFocusedWindow(boolean becomesFocused) {
+    private void changeFocusedWindow(boolean becomesFocused, Window opposite) {
         if (focusLog.isLoggable(PlatformLogger.FINE)) {
             focusLog.fine((becomesFocused?"gaining":"loosing") + " focus window: " + this);
         }
@@ -1247,9 +1245,6 @@
             }
         }
 
-        KeyboardFocusManagerPeer kfmPeer = LWKeyboardFocusManagerPeer.getInstance();
-        Window oppositeWindow = becomesFocused ? kfmPeer.getCurrentFocusedWindow() : null;
-
         // Note, the method is not called:
         // - when the opposite (gaining focus) window is an owned/owner window.
         // - for a simple window in any case.
@@ -1261,10 +1256,11 @@
             grabbingWindow.ungrab();
         }
 
+        KeyboardFocusManagerPeer kfmPeer = LWKeyboardFocusManagerPeer.getInstance();
         kfmPeer.setCurrentFocusedWindow(becomesFocused ? getTarget() : null);
 
         int eventID = becomesFocused ? WindowEvent.WINDOW_GAINED_FOCUS : WindowEvent.WINDOW_LOST_FOCUS;
-        WindowEvent windowEvent = new TimedWindowEvent(getTarget(), eventID, oppositeWindow, System.currentTimeMillis());
+        WindowEvent windowEvent = new TimedWindowEvent(getTarget(), eventID, opposite, System.currentTimeMillis());
 
         // TODO: wrap in SequencedEvent
         postEvent(windowEvent);
--- a/src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java	Tue Nov 06 18:41:01 2012 -0800
@@ -113,14 +113,14 @@
     public void handleFocusEvent(boolean focused) {
         this.focused = focused;
         if (parentWindowActive) {
-            responder.handleWindowFocusEvent(focused);
+            responder.handleWindowFocusEvent(focused, null);
         }
     }
 
     public void handleWindowFocusEvent(boolean parentWindowActive) {
         this.parentWindowActive = parentWindowActive;
         if (focused) {
-            responder.handleWindowFocusEvent(parentWindowActive);
+            responder.handleWindowFocusEvent(parentWindowActive, null);
         }
     }
 
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java	Tue Nov 06 18:41:01 2012 -0800
@@ -218,7 +218,7 @@
         }
     }
 
-    void handleWindowFocusEvent(boolean gained) {
-        peer.notifyActivation(gained);
+    void handleWindowFocusEvent(boolean gained, LWWindowPeer opposite) {
+        peer.notifyActivation(gained, opposite);
     }
 }
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java	Tue Nov 06 18:41:01 2012 -0800
@@ -26,7 +26,6 @@
 package sun.lwawt.macosx;
 
 import java.awt.*;
-import java.awt.event.*;
 import java.awt.image.VolatileImage;
 
 import sun.awt.CGraphicsConfig;
@@ -202,12 +201,11 @@
                                  event.getCharactersIgnoringModifiers(), event.getKeyCode(), true);
     }
 
+    /**
+     * Called by the native delegate in layer backed view mode or in the simple
+     * NSView mode. See NSView.drawRect().
+     */
     private void deliverWindowDidExposeEvent() {
-        Rectangle r = peer.getBounds();
-        peer.notifyExpose(0, 0, r.width, r.height);
-    }
-
-    private void deliverWindowDidExposeEvent(float x, float y, float w, float h) {
-        peer.notifyExpose((int)x, (int)y, (int)w, (int)h);
+        peer.notifyExpose(peer.getSize());
     }
 }
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Tue Nov 06 18:41:01 2012 -0800
@@ -46,7 +46,7 @@
 import com.apple.laf.ClientPropertyApplicator.Property;
 import com.sun.awt.AWTUtilities;
 
-public class CPlatformWindow extends CFRetainedResource implements PlatformWindow {
+public final class CPlatformWindow extends CFRetainedResource implements PlatformWindow {
     private native long nativeCreateNSWindow(long nsViewPtr, long styleBits, double x, double y, double w, double h);
     private static native void nativeSetNSWindowStyleBits(long nsWindowPtr, int mask, int data);
     private static native void nativeSetNSWindowMenuBar(long nsWindowPtr, long menuBarPtr);
@@ -199,7 +199,7 @@
     // In order to keep it up-to-date we will update them on
     // 1) setting native bounds via nativeSetBounds() call
     // 2) getting notification from the native level via deliverMoveResizeEvent()
-    private Rectangle nativeBounds;
+    private Rectangle nativeBounds = new Rectangle(0, 0, 0, 0);
     private volatile boolean isFullScreenMode = false;
 
     private Window target;
@@ -869,16 +869,24 @@
         }
     }
 
+    private void flushBuffers() {
+        if (isVisible() && !nativeBounds.isEmpty()) {
+            LWCToolkit.getLWCToolkit().flushPendingEventsOnAppkit(target);
+        }
+    }
+
     /*************************************************************
      * Callbacks from the AWTWindow and AWTView objc classes.
      *************************************************************/
-    private void deliverWindowFocusEvent(boolean gained){
+    private void deliverWindowFocusEvent(boolean gained, CPlatformWindow opposite){
         // Fix for 7150349: ingore "gained" notifications when the app is inactive.
         if (gained && !((LWCToolkit)Toolkit.getDefaultToolkit()).isApplicationActive()) {
             focusLogger.fine("the app is inactive, so the notification is ignored");
             return;
         }
-        responder.handleWindowFocusEvent(gained);
+
+        LWWindowPeer oppositePeer = (opposite == null)? null : opposite.getPeer();
+        responder.handleWindowFocusEvent(gained, oppositePeer);
     }
 
     private void deliverMoveResizeEvent(int x, int y, int width, int height) {
@@ -886,10 +894,16 @@
         // move/resize notifications contain a bounds smaller than
         // the whole screen and therefore we ignore the native notifications
         // and the content view itself creates correct synthetic notifications
-        if (isFullScreenMode) return;
+        if (isFullScreenMode) {
+            return;
+        }
 
+        final Rectangle oldB = nativeBounds;
         nativeBounds = new Rectangle(x, y, width, height);
         peer.notifyReshape(x, y, width, height);
+        if (!oldB.getSize().equals(nativeBounds.getSize()) ) {
+            flushBuffers();
+        }
         //TODO validateSurface already called from notifyReshape
         validateSurface();
     }
--- a/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Tue Nov 06 18:41:01 2012 -0800
@@ -150,6 +150,10 @@
            });
     }
 
+    public static LWCToolkit getLWCToolkit() {
+        return (LWCToolkit)Toolkit.getDefaultToolkit();
+    }
+
     @Override
     protected PlatformWindow createPlatformWindow(PeerType peerType) {
         if (peerType == PeerType.EMBEDDEDFRAME) {
@@ -407,7 +411,6 @@
         return BUTTONS;
     }
 
-
     @Override
     public boolean isTraySupported() {
         return true;
@@ -489,6 +492,22 @@
         synchronized(ret) { return ret[0]; }
     }
 
+    /**
+     * Just a wrapper for LWCToolkit.invokeAndWait. Posts an empty event to the
+     * appropriate event queue and waits for it to finish.
+     */
+    public static void flushPendingEventsOnAppkit(final Component component) {
+        try {
+            invokeAndWait(new Runnable() {
+                @Override
+                public void run() {
+                }
+            }, component);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
     // Kicks an event over to the appropriate eventqueue and waits for it to finish
     // To avoid deadlocking, we manually run the NSRunLoop while waiting
     // Any selector invoked using ThreadUtilities performOnMainThread will be processed in doAWTRunLoop
--- a/src/macosx/native/sun/awt/AWTView.m	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/macosx/native/sun/awt/AWTView.m	Tue Nov 06 18:41:01 2012 -0800
@@ -86,11 +86,14 @@
 
     if (windowLayer != nil) {
         self.cglLayer = windowLayer;
+        //Layer hosting view
+        [self setLayer: cglLayer];
         [self setWantsLayer: YES];
-        [self.layer addSublayer: (CALayer *)cglLayer];
-        [self setLayerContentsRedrawPolicy: NSViewLayerContentsRedrawDuringViewResize];
-        [self setLayerContentsPlacement: NSViewLayerContentsPlacementTopLeft];
-        [self setAutoresizingMask: NSViewHeightSizable | NSViewWidthSizable];
+        //Layer backed view
+        //[self.layer addSublayer: (CALayer *)cglLayer];
+        //[self setLayerContentsRedrawPolicy: NSViewLayerContentsRedrawDuringViewResize];
+        //[self setLayerContentsPlacement: NSViewLayerContentsPlacementTopLeft];
+        //[self setAutoresizingMask: NSViewHeightSizable | NSViewWidthSizable];
 
 #ifdef REMOTELAYER
         CGLLayer *parentLayer = (CGLLayer*)self.cglLayer;
--- a/src/macosx/native/sun/awt/AWTWindow.h	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/macosx/native/sun/awt/AWTWindow.h	Tue Nov 06 18:41:01 2012 -0800
@@ -69,6 +69,9 @@
 - (BOOL) worksWhenModal;
 - (void)sendEvent:(NSEvent *)event;
 
++ (void) setLastKeyWindow:(AWTWindow *)window;
++ (AWTWindow *) lastKeyWindow;
+
 @end
 
 @interface AWTWindow_Normal : NSWindow
--- a/src/macosx/native/sun/awt/AWTWindow.m	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/macosx/native/sun/awt/AWTWindow.m	Tue Nov 06 18:41:01 2012 -0800
@@ -51,6 +51,14 @@
 
 static JNF_CLASS_CACHE(jc_CPlatformWindow, "sun/lwawt/macosx/CPlatformWindow");
 
+// Cocoa windowDidBecomeKey/windowDidResignKey notifications
+// doesn't provide information about "opposite" window, so we
+// have to do a bit of tracking. This variable points to a window
+// which had been the key window just before a new key window
+// was set. It would be nil if the new key window isn't an AWT 
+// window or the app currently has no key window.
+static AWTWindow* lastKeyWindow = nil;
+
 // --------------------------------------------------------------
 // NSWindow/NSPanel descendants implementation
 #define AWT_NS_WINDOW_IMPLEMENTATION                            \
@@ -505,15 +513,17 @@
     [self _deliverIconify:JNI_FALSE];
 }
 
-- (void) _deliverWindowFocusEvent:(BOOL)focused {
+- (void) _deliverWindowFocusEvent:(BOOL)focused oppositeWindow:(AWTWindow *)opposite {
 //AWT_ASSERT_APPKIT_THREAD;
-
     JNIEnv *env = [ThreadUtilities getJNIEnvUncached];
     jobject platformWindow = [self.javaPlatformWindow jObjectWithEnv:env];
     if (platformWindow != NULL) {
-        static JNF_MEMBER_CACHE(jm_deliverWindowFocusEvent, jc_CPlatformWindow, "deliverWindowFocusEvent", "(Z)V");
-        JNFCallVoidMethod(env, platformWindow, jm_deliverWindowFocusEvent, (jboolean)focused);
+        jobject oppositeWindow = [opposite.javaPlatformWindow jObjectWithEnv:env];
+
+        static JNF_MEMBER_CACHE(jm_deliverWindowFocusEvent, jc_CPlatformWindow, "deliverWindowFocusEvent", "(ZLsun/lwawt/macosx/CPlatformWindow;)V");
+        JNFCallVoidMethod(env, platformWindow, jm_deliverWindowFocusEvent, (jboolean)focused, oppositeWindow);
         (*env)->DeleteLocalRef(env, platformWindow);
+        (*env)->DeleteLocalRef(env, oppositeWindow);
     }
 }
 
@@ -522,7 +532,10 @@
 AWT_ASSERT_APPKIT_THREAD;
     [AWTToolkit eventCountPlusPlus];
     [CMenuBar activate:self.javaMenuBar modallyDisabled:NO];
-    [self _deliverWindowFocusEvent:YES];
+    AWTWindow *opposite = [AWTWindow lastKeyWindow];
+    [AWTWindow setLastKeyWindow:nil];
+
+    [self _deliverWindowFocusEvent:YES oppositeWindow: opposite];
 }
 
 - (void) windowDidResignKey: (NSNotification *) notification {
@@ -530,7 +543,18 @@
 AWT_ASSERT_APPKIT_THREAD;
     [AWTToolkit eventCountPlusPlus];
     [self.javaMenuBar deactivate];
-    [self _deliverWindowFocusEvent:NO];
+
+    // the new key window
+    NSWindow *keyWindow = [NSApp keyWindow];
+    AWTWindow *opposite = nil;
+    if ([AWTWindow isAWTWindow: keyWindow]) {
+        opposite = (AWTWindow *)[keyWindow delegate];
+        [AWTWindow setLastKeyWindow: self];
+    } else {
+        [AWTWindow setLastKeyWindow: nil];
+    }
+
+    [self _deliverWindowFocusEvent:NO oppositeWindow: opposite];
 }
 
 - (void) windowDidBecomeMain: (NSNotification *) notification {
@@ -684,6 +708,17 @@
     }
 }
 
++ (void) setLastKeyWindow:(AWTWindow *)window {
+    [window retain];
+    [lastKeyWindow release];
+    lastKeyWindow = window;
+}
+
++ (AWTWindow *) lastKeyWindow {
+    return lastKeyWindow;
+}
+
+
 @end // AWTWindow
 
 
@@ -1208,6 +1243,10 @@
     [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
         AWTWindow *window = (AWTWindow*)[nsWindow delegate];
 
+        if ([AWTWindow lastKeyWindow] == window) {
+            [AWTWindow setLastKeyWindow: nil];
+        }
+
         // AWTWindow holds a reference to the NSWindow in its nsWindow
         // property. Unsetting the delegate allows it to be deallocated
         // which releases the reference. This, in turn, allows the window
--- a/src/macosx/native/sun/awt/CMenuItem.m	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/macosx/native/sun/awt/CMenuItem.m	Tue Nov 06 18:41:01 2012 -0800
@@ -76,7 +76,7 @@
     NSEvent *currEvent = [[NSApplication sharedApplication] currentEvent];
     if ([currEvent type] == NSKeyDown) {
         NSString *menuKey = [sender keyEquivalent];
-        NSString *eventKey = [currEvent characters];
+        NSString *eventKey = [currEvent charactersIgnoringModifiers];
         if ([menuKey isEqualToString:eventKey]) {
             return;
         }
--- a/src/macosx/native/sun/java2d/opengl/CGLLayer.m	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/macosx/native/sun/java2d/opengl/CGLLayer.m	Tue Nov 06 18:41:01 2012 -0800
@@ -57,9 +57,10 @@
 
     // NOTE: async=YES means that the layer is re-cached periodically
     self.asynchronous = FALSE;
-    self.autoresizingMask = kCALayerWidthSizable | kCALayerHeightSizable;
     self.contentsGravity = kCAGravityTopLeft;
-    self.needsDisplayOnBoundsChange = YES;
+    //Layer backed view
+    //self.needsDisplayOnBoundsChange = YES;
+    //self.autoresizingMask = kCALayerWidthSizable | kCALayerHeightSizable;
     textureID = 0; // texture will be created by rendering pipe
     target = 0;
 
@@ -109,6 +110,10 @@
     glDisable(target);
 }
 
+-(BOOL)canDrawInCGLContext:(CGLContextObj)glContext pixelFormat:(CGLPixelFormatObj)pixelFormat forLayerTime:(CFTimeInterval)timeInterval displayTime:(const CVTimeStamp *)timeStamp{
+    return textureID == 0 ? NO : YES;
+}
+
 -(void)drawInCGLContext:(CGLContextObj)glContext pixelFormat:(CGLPixelFormatObj)pixelFormat forLayerTime:(CFTimeInterval)timeInterval displayTime:(const CVTimeStamp *)timeStamp
 {
     AWT_ASSERT_APPKIT_THREAD;
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java	Tue Nov 06 18:41:01 2012 -0800
@@ -31,6 +31,8 @@
 import java.awt.KeyEventPostProcessor;
 import java.awt.Window;
 import java.awt.Toolkit;
+
+import sun.awt.AWTAccessor;
 import sun.awt.SunToolkit;
 
 import java.awt.event.ActionEvent;
@@ -133,10 +135,15 @@
                 // window. If this time appears to be greater than the altRelease
                 // event time the event is skipped to avoid unexpected menu
                 // activation. See 7121442.
+                // Also we must ensure that original source of key event belongs
+                // to the same window object as winAncestor. See 8001633.
                 boolean skip = false;
                 Toolkit tk = Toolkit.getDefaultToolkit();
                 if (tk instanceof SunToolkit) {
-                    skip = ev.getWhen() <= ((SunToolkit)tk).getWindowDeactivationTime(winAncestor);
+                    Component originalSource = AWTAccessor.getKeyEventAccessor()
+                            .getOriginalSource(ev);
+                    skip = SunToolkit.getContainingWindow(originalSource) != winAncestor ||
+                            ev.getWhen() <= ((SunToolkit) tk).getWindowDeactivationTime(winAncestor);
                 }
 
                 if (menu != null && !skip) {
--- a/src/share/classes/java/awt/event/KeyEvent.java	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/share/classes/java/awt/event/KeyEvent.java	Tue Nov 06 18:41:01 2012 -0800
@@ -930,6 +930,10 @@
                                                long extendedKeyCode) {
                     ev.extendedKeyCode = extendedKeyCode;
                 }
+
+                public Component getOriginalSource( KeyEvent ev ) {
+                    return ev.originalSource;
+                }
             });
     }
 
@@ -939,6 +943,14 @@
      */
     private static native void initIDs();
 
+    /**
+     * The original event source.
+     *
+     * Event source can be changed during processing, but in some cases
+     * we need to be able to obtain original source.
+     */
+    private Component originalSource;
+
     private KeyEvent(Component source, int id, long when, int modifiers,
                     int keyCode, char keyChar, int keyLocation, boolean isProxyActive) {
         this(source, id, when, modifiers, keyCode, keyChar, keyLocation);
@@ -1023,6 +1035,7 @@
         } else if ((getModifiers() == 0) && (getModifiersEx() != 0)) {
             setOldModifiers();
         }
+        originalSource = source;
     }
 
     /**
--- a/src/share/classes/javax/swing/AncestorNotifier.java	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/share/classes/javax/swing/AncestorNotifier.java	Tue Nov 06 18:41:01 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -45,7 +45,7 @@
 @SuppressWarnings("serial")
 class AncestorNotifier implements ComponentListener, PropertyChangeListener, Serializable
 {
-    Component firstInvisibleAncestor;
+    transient Component firstInvisibleAncestor;
     EventListenerList listenerList = new EventListenerList();
     JComponent root;
 
--- a/src/share/classes/javax/swing/text/html/parser/Parser.java	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/share/classes/javax/swing/text/html/parser/Parser.java	Tue Nov 06 18:41:01 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -952,7 +952,7 @@
                         ch = readCh();
                         break;
                 }
-                char data[] = {mapNumericReference((char) n)};
+                char data[] = mapNumericReference(n);
                 return data;
             }
             addString('#');
@@ -1021,7 +1021,7 @@
     }
 
     /**
-     * Converts numeric character reference to Unicode character.
+     * Converts numeric character reference to char array.
      *
      * Normally the code in a reference should be always converted
      * to the Unicode character with the same code, but due to
@@ -1030,13 +1030,21 @@
      * to displayable characters with other codes.
      *
      * @param c the code of numeric character reference.
-     * @return the character corresponding to the reference code.
+     * @return a char array corresponding to the reference code.
      */
-    private char mapNumericReference(char c) {
-        if (c < 130 || c > 159) {
-            return c;
+    private char[] mapNumericReference(int c) {
+        char[] data;
+        if (c >= 0xffff) { // outside unicode BMP.
+            try {
+                data = Character.toChars(c);
+            } catch (IllegalArgumentException e) {
+                data = new char[0];
+            }
+        } else {
+            data = new char[1];
+            data[0] = (c < 130 || c > 159) ? (char) c : cp1252Map[c - 130];
         }
-        return cp1252Map[c - 130];
+        return data;
     }
 
     /**
--- a/src/share/classes/sun/awt/AWTAccessor.java	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/share/classes/sun/awt/AWTAccessor.java	Tue Nov 06 18:41:01 2012 -0800
@@ -629,6 +629,11 @@
          * Sets extendedKeyCode field for KeyEvent
          */
         void setExtendedKeyCode(KeyEvent ev, long extendedKeyCode);
+
+        /**
+         * Gets original source for KeyEvent
+         */
+        Component getOriginalSource(KeyEvent ev);
     }
 
     /**
--- a/src/share/native/sun/java2d/cmm/lcms/cmscam02.c	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/share/native/sun/java2d/cmm/lcms/cmscam02.c	Tue Nov 06 18:41:01 2012 -0800
@@ -30,7 +30,7 @@
 //---------------------------------------------------------------------------------
 //
 //  Little Color Management System
-//  Copyright (c) 1998-2010 Marti Maria Saguer
+//  Copyright (c) 1998-2012 Marti Maria Saguer
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the "Software"),
@@ -409,29 +409,29 @@
     switch (lpMod -> surround) {
 
 
-      case CUTSHEET_SURROUND:
-          lpMod->F = 0.8;
-          lpMod->c = 0.41;
-          lpMod->Nc = 0.8;
-          break;
+    case CUTSHEET_SURROUND:
+        lpMod->F = 0.8;
+        lpMod->c = 0.41;
+        lpMod->Nc = 0.8;
+        break;
 
-      case DARK_SURROUND:
-          lpMod -> F  = 0.8;
-          lpMod -> c  = 0.525;
-          lpMod -> Nc = 0.8;
-          break;
+    case DARK_SURROUND:
+        lpMod -> F  = 0.8;
+        lpMod -> c  = 0.525;
+        lpMod -> Nc = 0.8;
+        break;
 
-      case DIM_SURROUND:
-          lpMod -> F  = 0.9;
-          lpMod -> c  = 0.59;
-          lpMod -> Nc = 0.95;
-          break;
+    case DIM_SURROUND:
+        lpMod -> F  = 0.9;
+        lpMod -> c  = 0.59;
+        lpMod -> Nc = 0.95;
+        break;
 
-      default:
-          // Average surround
-          lpMod -> F  = 1.0;
-          lpMod -> c  = 0.69;
-          lpMod -> Nc = 1.0;
+    default:
+        // Average surround
+        lpMod -> F  = 1.0;
+        lpMod -> c  = 0.69;
+        lpMod -> Nc = 1.0;
     }
 
     lpMod -> n   = compute_n(lpMod);
--- a/src/share/native/sun/java2d/cmm/lcms/cmscgats.c	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/share/native/sun/java2d/cmm/lcms/cmscgats.c	Tue Nov 06 18:41:01 2012 -0800
@@ -30,7 +30,7 @@
 //---------------------------------------------------------------------------------
 //
 //  Little Color Management System
-//  Copyright (c) 1998-2010 Marti Maria Saguer
+//  Copyright (c) 1998-2012 Marti Maria Saguer
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the "Software"),
@@ -73,6 +73,7 @@
 #    define DIR_CHAR    '/'
 #endif
 
+
 // Symbols
 typedef enum {
 
@@ -143,6 +144,8 @@
 // Table. Each individual table can hold properties and rows & cols
 typedef struct _Table {
 
+        char SheetType[MAXSTR];               // The first row of the IT8 (the type)
+
         int            nSamples, nPatches;    // Cols, Rows
         int            SampleID;              // Pos of ID
 
@@ -162,7 +165,6 @@
 // This struct hold all information about an open IT8 handler.
 typedef struct {
 
-        char SheetType[MAXSTR];               // The first row of the IT8 (the type)
 
         cmsUInt32Number  TablesCount;                     // How many tables in this stream
         cmsUInt32Number  nTable;                          // The actual table
@@ -433,6 +435,8 @@
     return FALSE;
 }
 
+
+
 // Makes a file path based on a given reference path
 // NOTE: this function doesn't check if the path exists or even if it's legal
 static
@@ -574,7 +578,7 @@
     if (it8->ch == '.') {        // Decimal point
 
         cmsFloat64Number frac = 0.0;      // fraction
-        int prec = 0;           // precision
+        int prec = 0;                     // precision
 
         NextCh(it8);               // Eats dec. point
 
@@ -621,6 +625,81 @@
     }
 }
 
+// Parses a float number
+// This can not call directly atof because it uses locale dependant
+// parsing, while CCMX files always use . as decimal separator
+static
+cmsFloat64Number ParseFloatNumber(const char *Buffer)
+{
+    cmsFloat64Number dnum = 0.0;
+    int sign = 1;
+
+    if (*Buffer == '-' || *Buffer == '+') {
+
+         sign = (*Buffer == '-') ? -1 : 1;
+         Buffer++;
+    }
+
+
+    while (*Buffer && isdigit((int) *Buffer)) {
+
+        dnum = dnum * 10.0 + (*Buffer - '0');
+        if (*Buffer) Buffer++;
+    }
+
+    if (*Buffer == '.') {
+
+        cmsFloat64Number frac = 0.0;      // fraction
+        int prec = 0;                     // precission
+
+        if (*Buffer) Buffer++;
+
+        while (*Buffer && isdigit((int) *Buffer)) {
+
+            frac = frac * 10.0 + (*Buffer - '0');
+            prec++;
+            if (*Buffer) Buffer++;
+        }
+
+        dnum = dnum + (frac / xpow10(prec));
+    }
+
+    // Exponent, example 34.00E+20
+    if (*Buffer && toupper(*Buffer) == 'E') {
+
+        int e;
+        int sgn;
+
+        if (*Buffer) Buffer++;
+        sgn = 1;
+
+        if (*Buffer == '-') {
+
+            sgn = -1;
+            if (*Buffer) Buffer++;
+        }
+        else
+            if (*Buffer == '+') {
+
+                sgn = +1;
+                if (*Buffer) Buffer++;
+            }
+
+            e = 0;
+            while (*Buffer && isdigit((int) *Buffer)) {
+
+                if ((cmsFloat64Number) e * 10L < INT_MAX)
+                    e = e * 10 + (*Buffer - '0');
+
+                if (*Buffer) Buffer++;
+            }
+
+            e = sgn*e;
+            dnum = dnum * xpow10(e);
+    }
+
+    return sign * dnum;
+}
 
 
 // Reads next symbol
@@ -1011,7 +1090,7 @@
     cmsUInt32Number Free = it8 ->Allocator.BlockSize - it8 ->Allocator.Used;
     cmsUInt8Number* ptr;
 
-    size = _cmsALIGNLONG(size);
+    size = _cmsALIGNMEM(size);
 
     if (size > Free) {
 
@@ -1212,7 +1291,7 @@
 cmsHANDLE  CMSEXPORT cmsIT8Alloc(cmsContext ContextID)
 {
     cmsIT8* it8;
-    int i;
+    cmsUInt32Number i;
 
     it8 = (cmsIT8*) _cmsMallocZero(ContextID, sizeof(cmsIT8));
     if (it8 == NULL) return NULL;
@@ -1243,7 +1322,7 @@
     it8 -> lineno = 1;
 
     strcpy(it8->DoubleFormatter, DEFAULT_DBL_FORMAT);
-    strcpy(it8->SheetType, "CGATS.17");
+    cmsIT8SetSheetType((cmsHANDLE) it8, "CGATS.17");
 
     // Initialize predefined properties & data
 
@@ -1260,18 +1339,15 @@
 
 const char* CMSEXPORT cmsIT8GetSheetType(cmsHANDLE hIT8)
 {
-        cmsIT8* it8 = (cmsIT8*) hIT8;
-
-        return it8 ->SheetType;
-
+        return GetTable((cmsIT8*) hIT8)->SheetType;
 }
 
 cmsBool CMSEXPORT cmsIT8SetSheetType(cmsHANDLE hIT8, const char* Type)
 {
-        cmsIT8* it8 = (cmsIT8*) hIT8;
-
-        strncpy(it8 ->SheetType, Type, MAXSTR-1);
-        it8 ->SheetType[MAXSTR-1] = 0;
+        TABLE* t = GetTable((cmsIT8*) hIT8);
+
+        strncpy(t ->SheetType, Type, MAXSTR-1);
+        t ->SheetType[MAXSTR-1] = 0;
         return TRUE;
 }
 
@@ -1285,8 +1361,6 @@
     return AddToList(it8, &GetTable(it8)->HeaderList, "# ", NULL, Val, WRITE_UNCOOKED) != NULL;
 }
 
-
-
 // Sets a property
 cmsBool CMSEXPORT cmsIT8SetPropertyStr(cmsHANDLE hIT8, const char* Key, const char *Val)
 {
@@ -1298,7 +1372,6 @@
     return AddToList(it8, &GetTable(it8)->HeaderList, Key, NULL, Val, WRITE_STRINGIFY) != NULL;
 }
 
-
 cmsBool CMSEXPORT cmsIT8SetPropertyDbl(cmsHANDLE hIT8, const char* cProp, cmsFloat64Number Val)
 {
     cmsIT8* it8 = (cmsIT8*) hIT8;
@@ -1351,8 +1424,7 @@
 {
     const char *v = cmsIT8GetProperty(hIT8, cProp);
 
-    if (v) return atof(v);
-    else return 0.0;
+    return ParseFloatNumber(v);
 }
 
 const char* CMSEXPORT cmsIT8GetPropertyMulti(cmsHANDLE hIT8, const char* Key, const char *SubKey)
@@ -1553,6 +1625,9 @@
     KEYVALUE* p;
     TABLE* t = GetTable(it8);
 
+    // Writes the type
+    WriteStr(fp, t->SheetType);
+    WriteStr(fp, "\n");
 
     for (p = t->HeaderList; (p != NULL); p = p->Next)
     {
@@ -1701,8 +1776,6 @@
     sd.stream = fopen(cFileName, "wt");
     if (!sd.stream) return FALSE;
 
-    WriteStr(&sd, it8->SheetType);
-    WriteStr(&sd, "\n");
     for (i=0; i < it8 ->TablesCount; i++) {
 
             cmsIT8SetTable(hIT8, i);
@@ -1737,20 +1810,18 @@
     else
         sd.Max  = 0;                // Just counting the needed bytes
 
-    WriteStr(&sd, it8->SheetType);
-    WriteStr(&sd, "\n");
     for (i=0; i < it8 ->TablesCount; i++) {
 
-            cmsIT8SetTable(hIT8, i);
-            WriteHeader(it8, &sd);
-            WriteDataFormat(&sd, it8);
-            WriteData(&sd, it8);
+        cmsIT8SetTable(hIT8, i);
+        WriteHeader(it8, &sd);
+        WriteDataFormat(&sd, it8);
+        WriteData(&sd, it8);
     }
 
     sd.Used++;  // The \0 at the very end
 
     if (sd.Base)
-        sd.Ptr = 0;
+        *sd.Ptr = 0;
 
     *BytesNeeded = sd.Used;
 
@@ -1963,12 +2034,8 @@
 
 
 static
-cmsBool ParseIT8(cmsIT8* it8, cmsBool nosheet)
+void ReadType(cmsIT8* it8, char* SheetTypePtr)
 {
-    char* SheetTypePtr = it8 ->SheetType;
-
-    if (nosheet == 0) {
-
     // First line is a very special case.
 
     while (isseparator(it8->ch))
@@ -1979,9 +2046,20 @@
         *SheetTypePtr++= (char) it8 ->ch;
         NextCh(it8);
     }
+
+    *SheetTypePtr = 0;
+}
+
+
+static
+cmsBool ParseIT8(cmsIT8* it8, cmsBool nosheet)
+{
+    char* SheetTypePtr = it8 ->Tab[0].SheetType;
+
+    if (nosheet == 0) {
+        ReadType(it8, SheetTypePtr);
     }
 
-    *SheetTypePtr = 0;
     InSymbol(it8);
 
     SkipEOLN(it8);
@@ -2003,6 +2081,39 @@
 
                             AllocTable(it8);
                             it8 ->nTable = it8 ->TablesCount - 1;
+
+                            // Read sheet type if present. We only support identifier and string.
+                            // <ident> <eoln> is a type string
+                            // anything else, is not a type string
+                            if (nosheet == 0) {
+
+                                if (it8 ->sy == SIDENT) {
+
+                                    // May be a type sheet or may be a prop value statement. We cannot use insymbol in
+                                    // this special case...
+                                     while (isseparator(it8->ch))
+                                         NextCh(it8);
+
+                                     // If a newline is found, then this is a type string
+                                    if (it8 ->ch == '\n') {
+
+                                         cmsIT8SetSheetType(it8, it8 ->id);
+                                         InSymbol(it8);
+                                    }
+                                    else
+                                    {
+                                        // It is not. Just continue
+                                        cmsIT8SetSheetType(it8, "");
+                                    }
+                                }
+                                else
+                                    // Validate quoted strings
+                                    if (it8 ->sy == SSTRING) {
+                                        cmsIT8SetSheetType(it8, it8 ->str);
+                                        InSymbol(it8);
+                                    }
+                           }
+
                     }
                     break;
 
@@ -2123,14 +2234,14 @@
 
 // Try to infere if the file is a CGATS/IT8 file at all. Read first line
 // that should be something like some printable characters plus a \n
-
+// returns 0 if this is not like a CGATS, or an integer otherwise. This integer is the number of words in first line?
 static
 int IsMyBlock(cmsUInt8Number* Buffer, int n)
 {
-    int cols = 1, space = 0, quot = 0;
+    int words = 1, space = 0, quot = 0;
     int i;
 
-    if (n < 10) return FALSE;   // Too small
+    if (n < 10) return 0;   // Too small
 
     if (n > 132)
         n = 132;
@@ -2141,7 +2252,7 @@
         {
         case '\n':
         case '\r':
-            return quot == 1 || cols > 2 ? 0 : cols;
+            return ((quot == 1) || (words > 2)) ? 0 : words;
         case '\t':
         case ' ':
             if(!quot && !space)
@@ -2153,14 +2264,13 @@
         default:
             if (Buffer[i] < 32) return 0;
             if (Buffer[i] > 127) return 0;
-            cols += space;
+            words += space;
             space = 0;
             break;
         }
     }
 
-    return FALSE;
-
+    return 0;
 }
 
 
@@ -2271,7 +2381,7 @@
     it8 ->nTable = 0;
 
     if (fclose(it8 ->FileStack[0]->Stream)!= 0) {
-        cmsIT8Free(hIT8);
+            cmsIT8Free(hIT8);
             return NULL;
     }
 
@@ -2454,13 +2564,7 @@
 
     Buffer = cmsIT8GetDataRowCol(hIT8, row, col);
 
-    if (Buffer) {
-
-        return atof(Buffer);
-
-    } else
-        return 0;
-
+    return ParseFloatNumber(Buffer);
 }
 
 
@@ -2515,14 +2619,7 @@
 
     Buffer = cmsIT8GetData(it8, cPatch, cSample);
 
-    if (Buffer) {
-
-        return atof(Buffer);
-
-    } else {
-
-        return 0;
-    }
+    return ParseFloatNumber(Buffer);
 }
 
 
@@ -2680,5 +2777,7 @@
         strcpy(it8->DoubleFormatter, DEFAULT_DBL_FORMAT);
     else
         strcpy(it8->DoubleFormatter, Formatter);
+
+    it8 ->DoubleFormatter[sizeof(it8 ->DoubleFormatter)-1] = 0;
 }
 
--- a/src/share/native/sun/java2d/cmm/lcms/cmscnvrt.c	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/share/native/sun/java2d/cmm/lcms/cmscnvrt.c	Tue Nov 06 18:41:01 2012 -0800
@@ -30,7 +30,7 @@
 //---------------------------------------------------------------------------------
 //
 //  Little Color Management System
-//  Copyright (c) 1998-2010 Marti Maria Saguer
+//  Copyright (c) 1998-2012 Marti Maria Saguer
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the "Software"),
@@ -193,17 +193,21 @@
 static
 cmsFloat64Number CHAD2Temp(const cmsMAT3* Chad)
 {
-    // Convert D50 across CHAD to get the absolute white point
-     cmsVEC3 d, s;
-     cmsCIEXYZ Dest;
-     cmsCIExyY DestChromaticity;
-     cmsFloat64Number TempK;
+    // Convert D50 across inverse CHAD to get the absolute white point
+    cmsVEC3 d, s;
+    cmsCIEXYZ Dest;
+    cmsCIExyY DestChromaticity;
+    cmsFloat64Number TempK;
+    cmsMAT3 m1, m2;
+
+    m1 = *Chad;
+    if (!_cmsMAT3inverse(&m1, &m2)) return FALSE;
 
     s.n[VX] = cmsD50_XYZ() -> X;
     s.n[VY] = cmsD50_XYZ() -> Y;
     s.n[VZ] = cmsD50_XYZ() -> Z;
 
-    _cmsMAT3eval(&d, Chad, &s);
+    _cmsMAT3eval(&d, &m2, &s);
 
     Dest.X = d.n[VX];
     Dest.Y = d.n[VY];
@@ -219,15 +223,14 @@
 
 // Compute a CHAD based on a given temperature
 static
-void Temp2CHAD(cmsMAT3* Chad, cmsFloat64Number Temp)
+    void Temp2CHAD(cmsMAT3* Chad, cmsFloat64Number Temp)
 {
     cmsCIEXYZ White;
     cmsCIExyY ChromaticityOfWhite;
 
     cmsWhitePointFromTemp(&ChromaticityOfWhite, Temp);
     cmsxyY2XYZ(&White, &ChromaticityOfWhite);
-    _cmsAdaptationMatrix(Chad, NULL, cmsD50_XYZ(), &White);
-
+    _cmsAdaptationMatrix(Chad, NULL, &White, cmsD50_XYZ());
 }
 
 // Join scalings to obtain relative input to absolute and then to relative output.
@@ -240,7 +243,7 @@
                                const cmsMAT3* ChromaticAdaptationMatrixOut,
                                cmsMAT3* m)
 {
-    cmsMAT3 Scale, m1, m2, m3;
+    cmsMAT3 Scale, m1, m2, m3, m4;
 
     // Adaptation state
     if (AdaptationState == 1.0) {
@@ -259,23 +262,32 @@
         _cmsVEC3init(&Scale.v[1], 0,  WhitePointIn->Y / WhitePointOut->Y, 0);
         _cmsVEC3init(&Scale.v[2], 0, 0,  WhitePointIn->Z / WhitePointOut->Z);
 
-        m1 = *ChromaticAdaptationMatrixIn;
-        if (!_cmsMAT3inverse(&m1, &m2)) return FALSE;
-        _cmsMAT3per(&m3, &m2, &Scale);
 
-        // m3 holds CHAD from input white to D50 times abs. col. scaling
         if (AdaptationState == 0.0) {
 
+            m1 = *ChromaticAdaptationMatrixOut;
+            _cmsMAT3per(&m2, &m1, &Scale);
+            // m2 holds CHAD from output white to D50 times abs. col. scaling
+
             // Observer is not adapted, undo the chromatic adaptation
             _cmsMAT3per(m, &m3, ChromaticAdaptationMatrixOut);
 
+            m3 = *ChromaticAdaptationMatrixIn;
+            if (!_cmsMAT3inverse(&m3, &m4)) return FALSE;
+            _cmsMAT3per(m, &m2, &m4);
+
         } else {
 
             cmsMAT3 MixedCHAD;
             cmsFloat64Number TempSrc, TempDest, Temp;
 
-            TempSrc  = CHAD2Temp(ChromaticAdaptationMatrixIn);  // K for source white
-            TempDest = CHAD2Temp(ChromaticAdaptationMatrixOut); // K for dest white
+            m1 = *ChromaticAdaptationMatrixIn;
+            if (!_cmsMAT3inverse(&m1, &m2)) return FALSE;
+            _cmsMAT3per(&m3, &m2, &Scale);
+            // m3 holds CHAD from input white to D50 times abs. col. scaling
+
+            TempSrc  = CHAD2Temp(ChromaticAdaptationMatrixIn);
+            TempDest = CHAD2Temp(ChromaticAdaptationMatrixOut);
 
             if (TempSrc < 0.0 || TempDest < 0.0) return FALSE; // Something went wrong
 
@@ -285,9 +297,9 @@
                 return TRUE;
             }
 
-            Temp = AdaptationState * TempSrc + (1.0 - AdaptationState) * TempDest;
+            Temp = (1.0 - AdaptationState) * TempDest + AdaptationState * TempSrc;
 
-            // Get a CHAD from D50 to whatever output temperature. This replaces output CHAD
+            // Get a CHAD from whatever output temperature to D50. This replaces output CHAD
             Temp2CHAD(&MixedCHAD, Temp);
 
             _cmsMAT3per(m, &m3, &MixedCHAD);
@@ -362,7 +374,7 @@
             cmsCIEXYZ BlackPointIn, BlackPointOut;
 
             cmsDetectBlackPoint(&BlackPointIn,  hProfiles[i-1], Intent, 0);
-            cmsDetectBlackPoint(&BlackPointOut, hProfiles[i], Intent, 0);
+            cmsDetectDestinationBlackPoint(&BlackPointOut, hProfiles[i], Intent, 0);
 
             // If black points are equal, then do nothing
             if (BlackPointIn.X != BlackPointOut.X ||
@@ -463,6 +475,10 @@
     // If they are same, they are compatible.
     if (a == b) return TRUE;
 
+    // Check for MCH4 substitution of CMYK
+    if ((a == cmsSig4colorData) && (b == cmsSigCmykData)) return TRUE;
+    if ((a == cmsSigCmykData) && (b == cmsSig4colorData)) return TRUE;
+
     // Check for XYZ/Lab. Those spaces are interchangeable as they can be computed one from other.
     if ((a == cmsSigXYZData) && (b == cmsSigLabData)) return TRUE;
     if ((a == cmsSigLabData) && (b == cmsSigXYZData)) return TRUE;
@@ -511,7 +527,7 @@
             lIsInput = TRUE;
         }
         else {
-            // Else use profile in the input direction if current space is not PCS
+          // Else use profile in the input direction if current space is not PCS
         lIsInput      = (CurrentColorSpace != cmsSigXYZData) &&
                         (CurrentColorSpace != cmsSigLabData);
         }
@@ -537,7 +553,7 @@
 
         // If devicelink is found, then no custom intent is allowed and we can
         // read the LUT to be applied. Settings don't apply here.
-        if (lIsDeviceLink) {
+        if (lIsDeviceLink || ((ClassSig == cmsSigNamedColorClass) && (nProfiles == 1))) {
 
             // Get the involved LUT from the profile
             Lut = _cmsReadDevicelinkLUT(hProfile, Intent);
@@ -876,7 +892,8 @@
 
     // Check for non-cmyk profiles
     if (cmsGetColorSpace(hProfiles[0]) != cmsSigCmykData ||
-        cmsGetColorSpace(hProfiles[nProfiles-1]) != cmsSigCmykData)
+        !(cmsGetColorSpace(hProfiles[nProfiles-1]) == cmsSigCmykData ||
+        cmsGetDeviceClass(hProfiles[nProfiles-1]) == cmsSigOutputClass))
            return  DefaultICCintents(ContextID, nProfiles, ICCIntents, hProfiles, BPC, AdaptationStates, dwFlags);
 
     // Allocate an empty LUT for holding the result
@@ -893,6 +910,8 @@
 
     // Get total area coverage (in 0..1 domain)
     bp.MaxTAC = cmsDetectTAC(hProfiles[nProfiles-1]) / 100.0;
+    if (bp.MaxTAC <= 0) goto Cleanup;
+
 
     // Create a LUT holding normal ICC transform
     bp.cmyk2cmyk = DefaultICCintents(ContextID,
@@ -902,6 +921,7 @@
                                          BPC,
                                          AdaptationStates,
                                          dwFlags);
+    if (bp.cmyk2cmyk == NULL) goto Cleanup;
 
     // Now the tone curve
     bp.KTone = _cmsBuildKToneCurve(ContextID, 4096, nProfiles,
@@ -910,7 +930,7 @@
                                    BPC,
                                    AdaptationStates,
                                    dwFlags);
-
+    if (bp.KTone == NULL) goto Cleanup;
 
     // To measure the output, Last profile to Lab
     hLab = cmsCreateLab4ProfileTHR(ContextID, NULL);
@@ -918,6 +938,7 @@
                                          CHANNELS_SH(4)|BYTES_SH(2), hLab, TYPE_Lab_DBL,
                                          INTENT_RELATIVE_COLORIMETRIC,
                                          cmsFLAGS_NOCACHE|cmsFLAGS_NOOPTIMIZE);
+    if ( bp.hProofOutput == NULL) goto Cleanup;
 
     // Same as anterior, but lab in the 0..1 range
     bp.cmyk2Lab = cmsCreateTransformTHR(ContextID, hProfiles[nProfiles-1],
@@ -925,6 +946,7 @@
                                          FLOAT_SH(1)|CHANNELS_SH(3)|BYTES_SH(4),
                                          INTENT_RELATIVE_COLORIMETRIC,
                                          cmsFLAGS_NOCACHE|cmsFLAGS_NOOPTIMIZE);
+    if (bp.cmyk2Lab == NULL) goto Cleanup;
     cmsCloseProfile(hLab);
 
     // Error estimation (for debug only)
--- a/src/share/native/sun/java2d/cmm/lcms/cmserr.c	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/share/native/sun/java2d/cmm/lcms/cmserr.c	Tue Nov 06 18:41:01 2012 -0800
@@ -30,7 +30,7 @@
 //---------------------------------------------------------------------------------
 //
 //  Little Color Management System
-//  Copyright (c) 1998-2010 Marti Maria Saguer
+//  Copyright (c) 1998-2012 Marti Maria Saguer
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the "Software"),
@@ -72,17 +72,21 @@
 // long int because C99 specifies ftell in such way (7.19.9.2)
 long int CMSEXPORT cmsfilelength(FILE* f)
 {
-    long int n;
+    long int p , n;
+
+    p = ftell(f); // register current file position
 
     if (fseek(f, 0, SEEK_END) != 0) {
         return -1;
     }
+
     n = ftell(f);
-    fseek(f, 0, SEEK_SET);
+    fseek(f, p, SEEK_SET); // file position restored
 
     return n;
 }
 
+
 // Memory handling ------------------------------------------------------------------
 //
 // This is the interface to low-level memory management routines. By default a simple
@@ -160,6 +164,12 @@
 {
     cmsUInt32Number Total = num * size;
 
+    // Preserve calloc behaviour
+    if (Total == 0) return NULL;
+
+    // Safe check for overflow.
+    if (num >= UINT_MAX / size) return NULL;
+
     // Check for overflow
     if (Total < num || Total < size) {
         return NULL;
@@ -269,12 +279,16 @@
 // Sub allocation takes care of many pointers of small size. The memory allocated in
 // this way have be freed at once. Next function allocates a single chunk for linked list
 // I prefer this method over realloc due to the big inpact on xput realloc may have if
-// memory is being swapped to disk. This approach is safer (although thats not true on any platform)
+// memory is being swapped to disk. This approach is safer (although that may not be true on all platforms)
 static
 _cmsSubAllocator_chunk* _cmsCreateSubAllocChunk(cmsContext ContextID, cmsUInt32Number Initial)
 {
     _cmsSubAllocator_chunk* chunk;
 
+    // 20K by default
+    if (Initial == 0)
+        Initial = 20*1024;
+
     // Create the container
     chunk = (_cmsSubAllocator_chunk*) _cmsMallocZero(ContextID, sizeof(_cmsSubAllocator_chunk));
     if (chunk == NULL) return NULL;
@@ -288,9 +302,7 @@
         return NULL;
     }
 
-    // 20K by default
-    if (Initial == 0)
-        Initial = 20*1024;
+
 
     chunk ->BlockSize = Initial;
     chunk ->Used      = 0;
@@ -344,7 +356,7 @@
     cmsUInt32Number Free = sub -> h ->BlockSize - sub -> h -> Used;
     cmsUInt8Number* ptr;
 
-    size = _cmsALIGNLONG(size);
+    size = _cmsALIGNMEM(size);
 
     // Check for memory. If there is no room, allocate a new chunk of double memory size.
     if (size > Free) {
--- a/src/share/native/sun/java2d/cmm/lcms/cmsgamma.c	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/share/native/sun/java2d/cmm/lcms/cmsgamma.c	Tue Nov 06 18:41:01 2012 -0800
@@ -30,7 +30,7 @@
 //---------------------------------------------------------------------------------
 //
 //  Little Color Management System
-//  Copyright (c) 1998-2010 Marti Maria Saguer
+//  Copyright (c) 1998-2012 Marti Maria Saguer
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the "Software"),
@@ -277,18 +277,28 @@
 
     switch (Type) {
 
-    // X = Y ^ Gamma
+   // X = Y ^ Gamma
     case 1:
-        if (R < 0)
-            Val = 0;
+        if (R < 0) {
+
+            if (fabs(Params[0] - 1.0) < MATRIX_DET_TOLERANCE)
+                Val = R;
+            else
+                Val = 0;
+        }
         else
             Val = pow(R, Params[0]);
         break;
 
     // Type 1 Reversed: X = Y ^1/gamma
     case -1:
-        if (R < 0)
-            Val = 0;
+         if (R < 0) {
+
+            if (fabs(Params[0] - 1.0) < MATRIX_DET_TOLERANCE)
+                Val = R;
+            else
+                Val = 0;
+        }
         else
             Val = pow(R, 1/Params[0]);
         break;
@@ -552,6 +562,19 @@
     return MINUS_INF;
 }
 
+// Access to estimated low-res table
+cmsUInt32Number CMSEXPORT cmsGetToneCurveEstimatedTableEntries(const cmsToneCurve* t)
+{
+    _cmsAssert(t != NULL);
+    return t ->nEntries;
+}
+
+const cmsUInt16Number* CMSEXPORT cmsGetToneCurveEstimatedTable(const cmsToneCurve* t)
+{
+    _cmsAssert(t != NULL);
+    return t ->Table16;
+}
+
 
 // Create an empty gamma curve, by using tables. This specifies only the limited-precision part, and leaves the
 // floating point description empty.
@@ -828,7 +851,7 @@
 cmsToneCurve* CMSEXPORT cmsReverseToneCurveEx(cmsInt32Number nResultSamples, const cmsToneCurve* InCurve)
 {
     cmsToneCurve *out;
-    cmsFloat64Number a = 1, b = 0, y, x1, y1, x2, y2;
+    cmsFloat64Number a = 0, b = 0, y, x1, y1, x2, y2;
     int i, j;
     int Ascending;
 
@@ -859,6 +882,7 @@
         j = GetInterval(y, InCurve->Table16, InCurve->InterpParams);
         if (j >= 0) {
 
+
             // Get limits of interval
             x1 = InCurve ->Table16[j];
             x2 = InCurve ->Table16[j+1];
@@ -883,6 +907,7 @@
         out ->Table16[i] = _cmsQuickSaturateWord(a* y + b);
     }
 
+
     return out;
 }
 
@@ -891,7 +916,7 @@
 {
     _cmsAssert(InGamma != NULL);
 
-    return cmsReverseToneCurveEx(InGamma -> nEntries, InGamma);
+    return cmsReverseToneCurveEx(4096, InGamma);
 }
 
 // From: Eilers, P.H.C. (1994) Smoothing and interpolation with finite
@@ -1035,20 +1060,42 @@
 {
     int n;
     int i, last;
+    cmsBool lDescending;
 
     _cmsAssert(t != NULL);
 
-    n    = t ->nEntries;
-    last = t ->Table16[n-1];
+    // Degenerated curves are monotonic? Ok, let's pass them
+    n = t ->nEntries;
+    if (n < 2) return TRUE;
 
-    for (i = n-2; i >= 0; --i) {
+    // Curve direction
+    lDescending = cmsIsToneCurveDescending(t);
 
-        if (t ->Table16[i] > last)
+    if (lDescending) {
 
-            return FALSE;
-        else
-            last = t ->Table16[i];
+        last = t ->Table16[0];
 
+        for (i = 1; i < n; i++) {
+
+            if (t ->Table16[i] - last > 2) // We allow some ripple
+                return FALSE;
+            else
+                last = t ->Table16[i];
+
+        }
+    }
+    else {
+
+        last = t ->Table16[n-1];
+
+        for (i = n-2; i >= 0; --i) {
+
+            if (t ->Table16[i] - last > 2)
+                return FALSE;
+            else
+                last = t ->Table16[i];
+
+        }
     }
 
     return TRUE;
@@ -1163,4 +1210,3 @@
 
     return (sum / n);   // The mean
 }
-
--- a/src/share/native/sun/java2d/cmm/lcms/cmsgmt.c	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/share/native/sun/java2d/cmm/lcms/cmsgmt.c	Tue Nov 06 18:41:01 2012 -0800
@@ -30,7 +30,7 @@
 //---------------------------------------------------------------------------------
 //
 //  Little Color Management System
-//  Copyright (c) 1998-2010 Marti Maria Saguer
+//  Copyright (c) 1998-2012 Marti Maria Saguer
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the "Software"),
@@ -212,7 +212,6 @@
 
     // Make sure it is monotonic
     if (!cmsIsToneCurveMonotonic(KTone)) {
-
         cmsFreeToneCurve(KTone);
         return NULL;
     }
@@ -246,7 +245,7 @@
     GAMUTCHAIN*  t = (GAMUTCHAIN* ) Cargo;
     cmsCIELab LabIn1, LabOut1;
     cmsCIELab LabIn2, LabOut2;
-    cmsFloat32Number Proof[cmsMAXCHANNELS], Proof2[cmsMAXCHANNELS];
+    cmsUInt16Number Proof[cmsMAXCHANNELS], Proof2[cmsMAXCHANNELS];
     cmsFloat64Number dE1, dE2, ErrorRatio;
 
     // Assume in-gamut by default.
@@ -396,8 +395,8 @@
                                               cmsFLAGS_NOCACHE);
 
 
-    // Does create the forward step. Lab double to cmsFloat32Number
-    dwFormat    = (FLOAT_SH(1)|CHANNELS_SH(nChannels)|BYTES_SH(4));
+    // Does create the forward step. Lab double to device
+    dwFormat    = (CHANNELS_SH(nChannels)|BYTES_SH(2));
     Chain.hForward = cmsCreateTransformTHR(ContextID,
                                            hLab, TYPE_Lab_DBL,
                                            hGamut, dwFormat,
@@ -421,10 +420,10 @@
 
         if (Gamut != NULL) {
 
-            CLUT = cmsStageAllocCLut16bit(ContextID, nGridpoints, nChannels, 1, NULL);
-            cmsPipelineInsertStage(Gamut, cmsAT_BEGIN, CLUT);
+          CLUT = cmsStageAllocCLut16bit(ContextID, nGridpoints, nChannels, 1, NULL);
+          cmsPipelineInsertStage(Gamut, cmsAT_BEGIN, CLUT);
 
-            cmsStageSampleCLut16bit(CLUT, GamutSampler, (void*) &Chain, 0);
+          cmsStageSampleCLut16bit(CLUT, GamutSampler, (void*) &Chain, 0);
         }
     }
     else
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/native/sun/java2d/cmm/lcms/cmshalf.c	Tue Nov 06 18:41:01 2012 -0800
@@ -0,0 +1,564 @@
+/*
+ * 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 available under and governed by the GNU General Public
+// License version 2 only, as published by the Free Software Foundation.
+// However, the following notice accompanied the original version of this
+// file:
+//
+//---------------------------------------------------------------------------------
+//
+//  Little Color Management System
+//  Copyright (c) 1998-2012 Marti Maria Saguer
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the "Software"),
+// to deal in the Software without restriction, including without limitation
+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
+// and/or sell copies of the Software, and to permit persons to whom the Software
+// is furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
+// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+//---------------------------------------------------------------------------------
+//
+//
+#include "lcms2_internal.h"
+
+#ifndef CMS_NO_HALF_SUPPORT
+
+// This code is inspired in the paper "Fast Half Float Conversions"
+// by Jeroen van der Zijp
+
+static cmsUInt32Number Mantissa[2048] = {
+
+0x00000000, 0x33800000, 0x34000000, 0x34400000, 0x34800000, 0x34a00000,
+0x34c00000, 0x34e00000, 0x35000000, 0x35100000, 0x35200000, 0x35300000,
+0x35400000, 0x35500000, 0x35600000, 0x35700000, 0x35800000, 0x35880000,
+0x35900000, 0x35980000, 0x35a00000, 0x35a80000, 0x35b00000, 0x35b80000,
+0x35c00000, 0x35c80000, 0x35d00000, 0x35d80000, 0x35e00000, 0x35e80000,
+0x35f00000, 0x35f80000, 0x36000000, 0x36040000, 0x36080000, 0x360c0000,
+0x36100000, 0x36140000, 0x36180000, 0x361c0000, 0x36200000, 0x36240000,
+0x36280000, 0x362c0000, 0x36300000, 0x36340000, 0x36380000, 0x363c0000,
+0x36400000, 0x36440000, 0x36480000, 0x364c0000, 0x36500000, 0x36540000,
+0x36580000, 0x365c0000, 0x36600000, 0x36640000, 0x36680000, 0x366c0000,
+0x36700000, 0x36740000, 0x36780000, 0x367c0000, 0x36800000, 0x36820000,
+0x36840000, 0x36860000, 0x36880000, 0x368a0000, 0x368c0000, 0x368e0000,
+0x36900000, 0x36920000, 0x36940000, 0x36960000, 0x36980000, 0x369a0000,
+0x369c0000, 0x369e0000, 0x36a00000, 0x36a20000, 0x36a40000, 0x36a60000,
+0x36a80000, 0x36aa0000, 0x36ac0000, 0x36ae0000, 0x36b00000, 0x36b20000,
+0x36b40000, 0x36b60000, 0x36b80000, 0x36ba0000, 0x36bc0000, 0x36be0000,
+0x36c00000, 0x36c20000, 0x36c40000, 0x36c60000, 0x36c80000, 0x36ca0000,
+0x36cc0000, 0x36ce0000, 0x36d00000, 0x36d20000, 0x36d40000, 0x36d60000,
+0x36d80000, 0x36da0000, 0x36dc0000, 0x36de0000, 0x36e00000, 0x36e20000,
+0x36e40000, 0x36e60000, 0x36e80000, 0x36ea0000, 0x36ec0000, 0x36ee0000,
+0x36f00000, 0x36f20000, 0x36f40000, 0x36f60000, 0x36f80000, 0x36fa0000,
+0x36fc0000, 0x36fe0000, 0x37000000, 0x37010000, 0x37020000, 0x37030000,
+0x37040000, 0x37050000, 0x37060000, 0x37070000, 0x37080000, 0x37090000,
+0x370a0000, 0x370b0000, 0x370c0000, 0x370d0000, 0x370e0000, 0x370f0000,
+0x37100000, 0x37110000, 0x37120000, 0x37130000, 0x37140000, 0x37150000,
+0x37160000, 0x37170000, 0x37180000, 0x37190000, 0x371a0000, 0x371b0000,
+0x371c0000, 0x371d0000, 0x371e0000, 0x371f0000, 0x37200000, 0x37210000,
+0x37220000, 0x37230000, 0x37240000, 0x37250000, 0x37260000, 0x37270000,
+0x37280000, 0x37290000, 0x372a0000, 0x372b0000, 0x372c0000, 0x372d0000,
+0x372e0000, 0x372f0000, 0x37300000, 0x37310000, 0x37320000, 0x37330000,
+0x37340000, 0x37350000, 0x37360000, 0x37370000, 0x37380000, 0x37390000,
+0x373a0000, 0x373b0000, 0x373c0000, 0x373d0000, 0x373e0000, 0x373f0000,
+0x37400000, 0x37410000, 0x37420000, 0x37430000, 0x37440000, 0x37450000,
+0x37460000, 0x37470000, 0x37480000, 0x37490000, 0x374a0000, 0x374b0000,
+0x374c0000, 0x374d0000, 0x374e0000, 0x374f0000, 0x37500000, 0x37510000,
+0x37520000, 0x37530000, 0x37540000, 0x37550000, 0x37560000, 0x37570000,
+0x37580000, 0x37590000, 0x375a0000, 0x375b0000, 0x375c0000, 0x375d0000,
+0x375e0000, 0x375f0000, 0x37600000, 0x37610000, 0x37620000, 0x37630000,
+0x37640000, 0x37650000, 0x37660000, 0x37670000, 0x37680000, 0x37690000,
+0x376a0000, 0x376b0000, 0x376c0000, 0x376d0000, 0x376e0000, 0x376f0000,
+0x37700000, 0x37710000, 0x37720000, 0x37730000, 0x37740000, 0x37750000,
+0x37760000, 0x37770000, 0x37780000, 0x37790000, 0x377a0000, 0x377b0000,
+0x377c0000, 0x377d0000, 0x377e0000, 0x377f0000, 0x37800000, 0x37808000,
+0x37810000, 0x37818000, 0x37820000, 0x37828000, 0x37830000, 0x37838000,
+0x37840000, 0x37848000, 0x37850000, 0x37858000, 0x37860000, 0x37868000,
+0x37870000, 0x37878000, 0x37880000, 0x37888000, 0x37890000, 0x37898000,
+0x378a0000, 0x378a8000, 0x378b0000, 0x378b8000, 0x378c0000, 0x378c8000,
+0x378d0000, 0x378d8000, 0x378e0000, 0x378e8000, 0x378f0000, 0x378f8000,
+0x37900000, 0x37908000, 0x37910000, 0x37918000, 0x37920000, 0x37928000,
+0x37930000, 0x37938000, 0x37940000, 0x37948000, 0x37950000, 0x37958000,
+0x37960000, 0x37968000, 0x37970000, 0x37978000, 0x37980000, 0x37988000,
+0x37990000, 0x37998000, 0x379a0000, 0x379a8000, 0x379b0000, 0x379b8000,
+0x379c0000, 0x379c8000, 0x379d0000, 0x379d8000, 0x379e0000, 0x379e8000,
+0x379f0000, 0x379f8000, 0x37a00000, 0x37a08000, 0x37a10000, 0x37a18000,
+0x37a20000, 0x37a28000, 0x37a30000, 0x37a38000, 0x37a40000, 0x37a48000,
+0x37a50000, 0x37a58000, 0x37a60000, 0x37a68000, 0x37a70000, 0x37a78000,
+0x37a80000, 0x37a88000, 0x37a90000, 0x37a98000, 0x37aa0000, 0x37aa8000,
+0x37ab0000, 0x37ab8000, 0x37ac0000, 0x37ac8000, 0x37ad0000, 0x37ad8000,
+0x37ae0000, 0x37ae8000, 0x37af0000, 0x37af8000, 0x37b00000, 0x37b08000,
+0x37b10000, 0x37b18000, 0x37b20000, 0x37b28000, 0x37b30000, 0x37b38000,
+0x37b40000, 0x37b48000, 0x37b50000, 0x37b58000, 0x37b60000, 0x37b68000,
+0x37b70000, 0x37b78000, 0x37b80000, 0x37b88000, 0x37b90000, 0x37b98000,
+0x37ba0000, 0x37ba8000, 0x37bb0000, 0x37bb8000, 0x37bc0000, 0x37bc8000,
+0x37bd0000, 0x37bd8000, 0x37be0000, 0x37be8000, 0x37bf0000, 0x37bf8000,
+0x37c00000, 0x37c08000, 0x37c10000, 0x37c18000, 0x37c20000, 0x37c28000,
+0x37c30000, 0x37c38000, 0x37c40000, 0x37c48000, 0x37c50000, 0x37c58000,
+0x37c60000, 0x37c68000, 0x37c70000, 0x37c78000, 0x37c80000, 0x37c88000,
+0x37c90000, 0x37c98000, 0x37ca0000, 0x37ca8000, 0x37cb0000, 0x37cb8000,
+0x37cc0000, 0x37cc8000, 0x37cd0000, 0x37cd8000, 0x37ce0000, 0x37ce8000,
+0x37cf0000, 0x37cf8000, 0x37d00000, 0x37d08000, 0x37d10000, 0x37d18000,
+0x37d20000, 0x37d28000, 0x37d30000, 0x37d38000, 0x37d40000, 0x37d48000,
+0x37d50000, 0x37d58000, 0x37d60000, 0x37d68000, 0x37d70000, 0x37d78000,
+0x37d80000, 0x37d88000, 0x37d90000, 0x37d98000, 0x37da0000, 0x37da8000,
+0x37db0000, 0x37db8000, 0x37dc0000, 0x37dc8000, 0x37dd0000, 0x37dd8000,
+0x37de0000, 0x37de8000, 0x37df0000, 0x37df8000, 0x37e00000, 0x37e08000,
+0x37e10000, 0x37e18000, 0x37e20000, 0x37e28000, 0x37e30000, 0x37e38000,
+0x37e40000, 0x37e48000, 0x37e50000, 0x37e58000, 0x37e60000, 0x37e68000,
+0x37e70000, 0x37e78000, 0x37e80000, 0x37e88000, 0x37e90000, 0x37e98000,
+0x37ea0000, 0x37ea8000, 0x37eb0000, 0x37eb8000, 0x37ec0000, 0x37ec8000,
+0x37ed0000, 0x37ed8000, 0x37ee0000, 0x37ee8000, 0x37ef0000, 0x37ef8000,
+0x37f00000, 0x37f08000, 0x37f10000, 0x37f18000, 0x37f20000, 0x37f28000,
+0x37f30000, 0x37f38000, 0x37f40000, 0x37f48000, 0x37f50000, 0x37f58000,
+0x37f60000, 0x37f68000, 0x37f70000, 0x37f78000, 0x37f80000, 0x37f88000,
+0x37f90000, 0x37f98000, 0x37fa0000, 0x37fa8000, 0x37fb0000, 0x37fb8000,
+0x37fc0000, 0x37fc8000, 0x37fd0000, 0x37fd8000, 0x37fe0000, 0x37fe8000,
+0x37ff0000, 0x37ff8000, 0x38000000, 0x38004000, 0x38008000, 0x3800c000,
+0x38010000, 0x38014000, 0x38018000, 0x3801c000, 0x38020000, 0x38024000,
+0x38028000, 0x3802c000, 0x38030000, 0x38034000, 0x38038000, 0x3803c000,
+0x38040000, 0x38044000, 0x38048000, 0x3804c000, 0x38050000, 0x38054000,
+0x38058000, 0x3805c000, 0x38060000, 0x38064000, 0x38068000, 0x3806c000,
+0x38070000, 0x38074000, 0x38078000, 0x3807c000, 0x38080000, 0x38084000,
+0x38088000, 0x3808c000, 0x38090000, 0x38094000, 0x38098000, 0x3809c000,
+0x380a0000, 0x380a4000, 0x380a8000, 0x380ac000, 0x380b0000, 0x380b4000,
+0x380b8000, 0x380bc000, 0x380c0000, 0x380c4000, 0x380c8000, 0x380cc000,
+0x380d0000, 0x380d4000, 0x380d8000, 0x380dc000, 0x380e0000, 0x380e4000,
+0x380e8000, 0x380ec000, 0x380f0000, 0x380f4000, 0x380f8000, 0x380fc000,
+0x38100000, 0x38104000, 0x38108000, 0x3810c000, 0x38110000, 0x38114000,
+0x38118000, 0x3811c000, 0x38120000, 0x38124000, 0x38128000, 0x3812c000,
+0x38130000, 0x38134000, 0x38138000, 0x3813c000, 0x38140000, 0x38144000,
+0x38148000, 0x3814c000, 0x38150000, 0x38154000, 0x38158000, 0x3815c000,
+0x38160000, 0x38164000, 0x38168000, 0x3816c000, 0x38170000, 0x38174000,
+0x38178000, 0x3817c000, 0x38180000, 0x38184000, 0x38188000, 0x3818c000,
+0x38190000, 0x38194000, 0x38198000, 0x3819c000, 0x381a0000, 0x381a4000,
+0x381a8000, 0x381ac000, 0x381b0000, 0x381b4000, 0x381b8000, 0x381bc000,
+0x381c0000, 0x381c4000, 0x381c8000, 0x381cc000, 0x381d0000, 0x381d4000,
+0x381d8000, 0x381dc000, 0x381e0000, 0x381e4000, 0x381e8000, 0x381ec000,
+0x381f0000, 0x381f4000, 0x381f8000, 0x381fc000, 0x38200000, 0x38204000,
+0x38208000, 0x3820c000, 0x38210000, 0x38214000, 0x38218000, 0x3821c000,
+0x38220000, 0x38224000, 0x38228000, 0x3822c000, 0x38230000, 0x38234000,
+0x38238000, 0x3823c000, 0x38240000, 0x38244000, 0x38248000, 0x3824c000,
+0x38250000, 0x38254000, 0x38258000, 0x3825c000, 0x38260000, 0x38264000,
+0x38268000, 0x3826c000, 0x38270000, 0x38274000, 0x38278000, 0x3827c000,
+0x38280000, 0x38284000, 0x38288000, 0x3828c000, 0x38290000, 0x38294000,
+0x38298000, 0x3829c000, 0x382a0000, 0x382a4000, 0x382a8000, 0x382ac000,
+0x382b0000, 0x382b4000, 0x382b8000, 0x382bc000, 0x382c0000, 0x382c4000,
+0x382c8000, 0x382cc000, 0x382d0000, 0x382d4000, 0x382d8000, 0x382dc000,
+0x382e0000, 0x382e4000, 0x382e8000, 0x382ec000, 0x382f0000, 0x382f4000,
+0x382f8000, 0x382fc000, 0x38300000, 0x38304000, 0x38308000, 0x3830c000,
+0x38310000, 0x38314000, 0x38318000, 0x3831c000, 0x38320000, 0x38324000,
+0x38328000, 0x3832c000, 0x38330000, 0x38334000, 0x38338000, 0x3833c000,
+0x38340000, 0x38344000, 0x38348000, 0x3834c000, 0x38350000, 0x38354000,
+0x38358000, 0x3835c000, 0x38360000, 0x38364000, 0x38368000, 0x3836c000,
+0x38370000, 0x38374000, 0x38378000, 0x3837c000, 0x38380000, 0x38384000,
+0x38388000, 0x3838c000, 0x38390000, 0x38394000, 0x38398000, 0x3839c000,
+0x383a0000, 0x383a4000, 0x383a8000, 0x383ac000, 0x383b0000, 0x383b4000,
+0x383b8000, 0x383bc000, 0x383c0000, 0x383c4000, 0x383c8000, 0x383cc000,
+0x383d0000, 0x383d4000, 0x383d8000, 0x383dc000, 0x383e0000, 0x383e4000,
+0x383e8000, 0x383ec000, 0x383f0000, 0x383f4000, 0x383f8000, 0x383fc000,
+0x38400000, 0x38404000, 0x38408000, 0x3840c000, 0x38410000, 0x38414000,
+0x38418000, 0x3841c000, 0x38420000, 0x38424000, 0x38428000, 0x3842c000,
+0x38430000, 0x38434000, 0x38438000, 0x3843c000, 0x38440000, 0x38444000,
+0x38448000, 0x3844c000, 0x38450000, 0x38454000, 0x38458000, 0x3845c000,
+0x38460000, 0x38464000, 0x38468000, 0x3846c000, 0x38470000, 0x38474000,
+0x38478000, 0x3847c000, 0x38480000, 0x38484000, 0x38488000, 0x3848c000,
+0x38490000, 0x38494000, 0x38498000, 0x3849c000, 0x384a0000, 0x384a4000,
+0x384a8000, 0x384ac000, 0x384b0000, 0x384b4000, 0x384b8000, 0x384bc000,
+0x384c0000, 0x384c4000, 0x384c8000, 0x384cc000, 0x384d0000, 0x384d4000,
+0x384d8000, 0x384dc000, 0x384e0000, 0x384e4000, 0x384e8000, 0x384ec000,
+0x384f0000, 0x384f4000, 0x384f8000, 0x384fc000, 0x38500000, 0x38504000,
+0x38508000, 0x3850c000, 0x38510000, 0x38514000, 0x38518000, 0x3851c000,
+0x38520000, 0x38524000, 0x38528000, 0x3852c000, 0x38530000, 0x38534000,
+0x38538000, 0x3853c000, 0x38540000, 0x38544000, 0x38548000, 0x3854c000,
+0x38550000, 0x38554000, 0x38558000, 0x3855c000, 0x38560000, 0x38564000,
+0x38568000, 0x3856c000, 0x38570000, 0x38574000, 0x38578000, 0x3857c000,
+0x38580000, 0x38584000, 0x38588000, 0x3858c000, 0x38590000, 0x38594000,
+0x38598000, 0x3859c000, 0x385a0000, 0x385a4000, 0x385a8000, 0x385ac000,
+0x385b0000, 0x385b4000, 0x385b8000, 0x385bc000, 0x385c0000, 0x385c4000,
+0x385c8000, 0x385cc000, 0x385d0000, 0x385d4000, 0x385d8000, 0x385dc000,
+0x385e0000, 0x385e4000, 0x385e8000, 0x385ec000, 0x385f0000, 0x385f4000,
+0x385f8000, 0x385fc000, 0x38600000, 0x38604000, 0x38608000, 0x3860c000,
+0x38610000, 0x38614000, 0x38618000, 0x3861c000, 0x38620000, 0x38624000,
+0x38628000, 0x3862c000, 0x38630000, 0x38634000, 0x38638000, 0x3863c000,
+0x38640000, 0x38644000, 0x38648000, 0x3864c000, 0x38650000, 0x38654000,
+0x38658000, 0x3865c000, 0x38660000, 0x38664000, 0x38668000, 0x3866c000,
+0x38670000, 0x38674000, 0x38678000, 0x3867c000, 0x38680000, 0x38684000,
+0x38688000, 0x3868c000, 0x38690000, 0x38694000, 0x38698000, 0x3869c000,
+0x386a0000, 0x386a4000, 0x386a8000, 0x386ac000, 0x386b0000, 0x386b4000,
+0x386b8000, 0x386bc000, 0x386c0000, 0x386c4000, 0x386c8000, 0x386cc000,
+0x386d0000, 0x386d4000, 0x386d8000, 0x386dc000, 0x386e0000, 0x386e4000,
+0x386e8000, 0x386ec000, 0x386f0000, 0x386f4000, 0x386f8000, 0x386fc000,
+0x38700000, 0x38704000, 0x38708000, 0x3870c000, 0x38710000, 0x38714000,
+0x38718000, 0x3871c000, 0x38720000, 0x38724000, 0x38728000, 0x3872c000,
+0x38730000, 0x38734000, 0x38738000, 0x3873c000, 0x38740000, 0x38744000,
+0x38748000, 0x3874c000, 0x38750000, 0x38754000, 0x38758000, 0x3875c000,
+0x38760000, 0x38764000, 0x38768000, 0x3876c000, 0x38770000, 0x38774000,
+0x38778000, 0x3877c000, 0x38780000, 0x38784000, 0x38788000, 0x3878c000,
+0x38790000, 0x38794000, 0x38798000, 0x3879c000, 0x387a0000, 0x387a4000,
+0x387a8000, 0x387ac000, 0x387b0000, 0x387b4000, 0x387b8000, 0x387bc000,
+0x387c0000, 0x387c4000, 0x387c8000, 0x387cc000, 0x387d0000, 0x387d4000,
+0x387d8000, 0x387dc000, 0x387e0000, 0x387e4000, 0x387e8000, 0x387ec000,
+0x387f0000, 0x387f4000, 0x387f8000, 0x387fc000, 0x38000000, 0x38002000,
+0x38004000, 0x38006000, 0x38008000, 0x3800a000, 0x3800c000, 0x3800e000,
+0x38010000, 0x38012000, 0x38014000, 0x38016000, 0x38018000, 0x3801a000,
+0x3801c000, 0x3801e000, 0x38020000, 0x38022000, 0x38024000, 0x38026000,
+0x38028000, 0x3802a000, 0x3802c000, 0x3802e000, 0x38030000, 0x38032000,
+0x38034000, 0x38036000, 0x38038000, 0x3803a000, 0x3803c000, 0x3803e000,
+0x38040000, 0x38042000, 0x38044000, 0x38046000, 0x38048000, 0x3804a000,
+0x3804c000, 0x3804e000, 0x38050000, 0x38052000, 0x38054000, 0x38056000,
+0x38058000, 0x3805a000, 0x3805c000, 0x3805e000, 0x38060000, 0x38062000,
+0x38064000, 0x38066000, 0x38068000, 0x3806a000, 0x3806c000, 0x3806e000,
+0x38070000, 0x38072000, 0x38074000, 0x38076000, 0x38078000, 0x3807a000,
+0x3807c000, 0x3807e000, 0x38080000, 0x38082000, 0x38084000, 0x38086000,
+0x38088000, 0x3808a000, 0x3808c000, 0x3808e000, 0x38090000, 0x38092000,
+0x38094000, 0x38096000, 0x38098000, 0x3809a000, 0x3809c000, 0x3809e000,
+0x380a0000, 0x380a2000, 0x380a4000, 0x380a6000, 0x380a8000, 0x380aa000,
+0x380ac000, 0x380ae000, 0x380b0000, 0x380b2000, 0x380b4000, 0x380b6000,
+0x380b8000, 0x380ba000, 0x380bc000, 0x380be000, 0x380c0000, 0x380c2000,
+0x380c4000, 0x380c6000, 0x380c8000, 0x380ca000, 0x380cc000, 0x380ce000,
+0x380d0000, 0x380d2000, 0x380d4000, 0x380d6000, 0x380d8000, 0x380da000,
+0x380dc000, 0x380de000, 0x380e0000, 0x380e2000, 0x380e4000, 0x380e6000,
+0x380e8000, 0x380ea000, 0x380ec000, 0x380ee000, 0x380f0000, 0x380f2000,
+0x380f4000, 0x380f6000, 0x380f8000, 0x380fa000, 0x380fc000, 0x380fe000,
+0x38100000, 0x38102000, 0x38104000, 0x38106000, 0x38108000, 0x3810a000,
+0x3810c000, 0x3810e000, 0x38110000, 0x38112000, 0x38114000, 0x38116000,
+0x38118000, 0x3811a000, 0x3811c000, 0x3811e000, 0x38120000, 0x38122000,
+0x38124000, 0x38126000, 0x38128000, 0x3812a000, 0x3812c000, 0x3812e000,
+0x38130000, 0x38132000, 0x38134000, 0x38136000, 0x38138000, 0x3813a000,
+0x3813c000, 0x3813e000, 0x38140000, 0x38142000, 0x38144000, 0x38146000,
+0x38148000, 0x3814a000, 0x3814c000, 0x3814e000, 0x38150000, 0x38152000,
+0x38154000, 0x38156000, 0x38158000, 0x3815a000, 0x3815c000, 0x3815e000,
+0x38160000, 0x38162000, 0x38164000, 0x38166000, 0x38168000, 0x3816a000,
+0x3816c000, 0x3816e000, 0x38170000, 0x38172000, 0x38174000, 0x38176000,
+0x38178000, 0x3817a000, 0x3817c000, 0x3817e000, 0x38180000, 0x38182000,
+0x38184000, 0x38186000, 0x38188000, 0x3818a000, 0x3818c000, 0x3818e000,
+0x38190000, 0x38192000, 0x38194000, 0x38196000, 0x38198000, 0x3819a000,
+0x3819c000, 0x3819e000, 0x381a0000, 0x381a2000, 0x381a4000, 0x381a6000,
+0x381a8000, 0x381aa000, 0x381ac000, 0x381ae000, 0x381b0000, 0x381b2000,
+0x381b4000, 0x381b6000, 0x381b8000, 0x381ba000, 0x381bc000, 0x381be000,
+0x381c0000, 0x381c2000, 0x381c4000, 0x381c6000, 0x381c8000, 0x381ca000,
+0x381cc000, 0x381ce000, 0x381d0000, 0x381d2000, 0x381d4000, 0x381d6000,
+0x381d8000, 0x381da000, 0x381dc000, 0x381de000, 0x381e0000, 0x381e2000,
+0x381e4000, 0x381e6000, 0x381e8000, 0x381ea000, 0x381ec000, 0x381ee000,
+0x381f0000, 0x381f2000, 0x381f4000, 0x381f6000, 0x381f8000, 0x381fa000,
+0x381fc000, 0x381fe000, 0x38200000, 0x38202000, 0x38204000, 0x38206000,
+0x38208000, 0x3820a000, 0x3820c000, 0x3820e000, 0x38210000, 0x38212000,
+0x38214000, 0x38216000, 0x38218000, 0x3821a000, 0x3821c000, 0x3821e000,
+0x38220000, 0x38222000, 0x38224000, 0x38226000, 0x38228000, 0x3822a000,
+0x3822c000, 0x3822e000, 0x38230000, 0x38232000, 0x38234000, 0x38236000,
+0x38238000, 0x3823a000, 0x3823c000, 0x3823e000, 0x38240000, 0x38242000,
+0x38244000, 0x38246000, 0x38248000, 0x3824a000, 0x3824c000, 0x3824e000,
+0x38250000, 0x38252000, 0x38254000, 0x38256000, 0x38258000, 0x3825a000,
+0x3825c000, 0x3825e000, 0x38260000, 0x38262000, 0x38264000, 0x38266000,
+0x38268000, 0x3826a000, 0x3826c000, 0x3826e000, 0x38270000, 0x38272000,
+0x38274000, 0x38276000, 0x38278000, 0x3827a000, 0x3827c000, 0x3827e000,
+0x38280000, 0x38282000, 0x38284000, 0x38286000, 0x38288000, 0x3828a000,
+0x3828c000, 0x3828e000, 0x38290000, 0x38292000, 0x38294000, 0x38296000,
+0x38298000, 0x3829a000, 0x3829c000, 0x3829e000, 0x382a0000, 0x382a2000,
+0x382a4000, 0x382a6000, 0x382a8000, 0x382aa000, 0x382ac000, 0x382ae000,
+0x382b0000, 0x382b2000, 0x382b4000, 0x382b6000, 0x382b8000, 0x382ba000,
+0x382bc000, 0x382be000, 0x382c0000, 0x382c2000, 0x382c4000, 0x382c6000,
+0x382c8000, 0x382ca000, 0x382cc000, 0x382ce000, 0x382d0000, 0x382d2000,
+0x382d4000, 0x382d6000, 0x382d8000, 0x382da000, 0x382dc000, 0x382de000,
+0x382e0000, 0x382e2000, 0x382e4000, 0x382e6000, 0x382e8000, 0x382ea000,
+0x382ec000, 0x382ee000, 0x382f0000, 0x382f2000, 0x382f4000, 0x382f6000,
+0x382f8000, 0x382fa000, 0x382fc000, 0x382fe000, 0x38300000, 0x38302000,
+0x38304000, 0x38306000, 0x38308000, 0x3830a000, 0x3830c000, 0x3830e000,
+0x38310000, 0x38312000, 0x38314000, 0x38316000, 0x38318000, 0x3831a000,
+0x3831c000, 0x3831e000, 0x38320000, 0x38322000, 0x38324000, 0x38326000,
+0x38328000, 0x3832a000, 0x3832c000, 0x3832e000, 0x38330000, 0x38332000,
+0x38334000, 0x38336000, 0x38338000, 0x3833a000, 0x3833c000, 0x3833e000,
+0x38340000, 0x38342000, 0x38344000, 0x38346000, 0x38348000, 0x3834a000,
+0x3834c000, 0x3834e000, 0x38350000, 0x38352000, 0x38354000, 0x38356000,
+0x38358000, 0x3835a000, 0x3835c000, 0x3835e000, 0x38360000, 0x38362000,
+0x38364000, 0x38366000, 0x38368000, 0x3836a000, 0x3836c000, 0x3836e000,
+0x38370000, 0x38372000, 0x38374000, 0x38376000, 0x38378000, 0x3837a000,
+0x3837c000, 0x3837e000, 0x38380000, 0x38382000, 0x38384000, 0x38386000,
+0x38388000, 0x3838a000, 0x3838c000, 0x3838e000, 0x38390000, 0x38392000,
+0x38394000, 0x38396000, 0x38398000, 0x3839a000, 0x3839c000, 0x3839e000,
+0x383a0000, 0x383a2000, 0x383a4000, 0x383a6000, 0x383a8000, 0x383aa000,
+0x383ac000, 0x383ae000, 0x383b0000, 0x383b2000, 0x383b4000, 0x383b6000,
+0x383b8000, 0x383ba000, 0x383bc000, 0x383be000, 0x383c0000, 0x383c2000,
+0x383c4000, 0x383c6000, 0x383c8000, 0x383ca000, 0x383cc000, 0x383ce000,
+0x383d0000, 0x383d2000, 0x383d4000, 0x383d6000, 0x383d8000, 0x383da000,
+0x383dc000, 0x383de000, 0x383e0000, 0x383e2000, 0x383e4000, 0x383e6000,
+0x383e8000, 0x383ea000, 0x383ec000, 0x383ee000, 0x383f0000, 0x383f2000,
+0x383f4000, 0x383f6000, 0x383f8000, 0x383fa000, 0x383fc000, 0x383fe000,
+0x38400000, 0x38402000, 0x38404000, 0x38406000, 0x38408000, 0x3840a000,
+0x3840c000, 0x3840e000, 0x38410000, 0x38412000, 0x38414000, 0x38416000,
+0x38418000, 0x3841a000, 0x3841c000, 0x3841e000, 0x38420000, 0x38422000,
+0x38424000, 0x38426000, 0x38428000, 0x3842a000, 0x3842c000, 0x3842e000,
+0x38430000, 0x38432000, 0x38434000, 0x38436000, 0x38438000, 0x3843a000,
+0x3843c000, 0x3843e000, 0x38440000, 0x38442000, 0x38444000, 0x38446000,
+0x38448000, 0x3844a000, 0x3844c000, 0x3844e000, 0x38450000, 0x38452000,
+0x38454000, 0x38456000, 0x38458000, 0x3845a000, 0x3845c000, 0x3845e000,
+0x38460000, 0x38462000, 0x38464000, 0x38466000, 0x38468000, 0x3846a000,
+0x3846c000, 0x3846e000, 0x38470000, 0x38472000, 0x38474000, 0x38476000,
+0x38478000, 0x3847a000, 0x3847c000, 0x3847e000, 0x38480000, 0x38482000,
+0x38484000, 0x38486000, 0x38488000, 0x3848a000, 0x3848c000, 0x3848e000,
+0x38490000, 0x38492000, 0x38494000, 0x38496000, 0x38498000, 0x3849a000,
+0x3849c000, 0x3849e000, 0x384a0000, 0x384a2000, 0x384a4000, 0x384a6000,
+0x384a8000, 0x384aa000, 0x384ac000, 0x384ae000, 0x384b0000, 0x384b2000,
+0x384b4000, 0x384b6000, 0x384b8000, 0x384ba000, 0x384bc000, 0x384be000,
+0x384c0000, 0x384c2000, 0x384c4000, 0x384c6000, 0x384c8000, 0x384ca000,
+0x384cc000, 0x384ce000, 0x384d0000, 0x384d2000, 0x384d4000, 0x384d6000,
+0x384d8000, 0x384da000, 0x384dc000, 0x384de000, 0x384e0000, 0x384e2000,
+0x384e4000, 0x384e6000, 0x384e8000, 0x384ea000, 0x384ec000, 0x384ee000,
+0x384f0000, 0x384f2000, 0x384f4000, 0x384f6000, 0x384f8000, 0x384fa000,
+0x384fc000, 0x384fe000, 0x38500000, 0x38502000, 0x38504000, 0x38506000,
+0x38508000, 0x3850a000, 0x3850c000, 0x3850e000, 0x38510000, 0x38512000,
+0x38514000, 0x38516000, 0x38518000, 0x3851a000, 0x3851c000, 0x3851e000,
+0x38520000, 0x38522000, 0x38524000, 0x38526000, 0x38528000, 0x3852a000,
+0x3852c000, 0x3852e000, 0x38530000, 0x38532000, 0x38534000, 0x38536000,
+0x38538000, 0x3853a000, 0x3853c000, 0x3853e000, 0x38540000, 0x38542000,
+0x38544000, 0x38546000, 0x38548000, 0x3854a000, 0x3854c000, 0x3854e000,
+0x38550000, 0x38552000, 0x38554000, 0x38556000, 0x38558000, 0x3855a000,
+0x3855c000, 0x3855e000, 0x38560000, 0x38562000, 0x38564000, 0x38566000,
+0x38568000, 0x3856a000, 0x3856c000, 0x3856e000, 0x38570000, 0x38572000,
+0x38574000, 0x38576000, 0x38578000, 0x3857a000, 0x3857c000, 0x3857e000,
+0x38580000, 0x38582000, 0x38584000, 0x38586000, 0x38588000, 0x3858a000,
+0x3858c000, 0x3858e000, 0x38590000, 0x38592000, 0x38594000, 0x38596000,
+0x38598000, 0x3859a000, 0x3859c000, 0x3859e000, 0x385a0000, 0x385a2000,
+0x385a4000, 0x385a6000, 0x385a8000, 0x385aa000, 0x385ac000, 0x385ae000,
+0x385b0000, 0x385b2000, 0x385b4000, 0x385b6000, 0x385b8000, 0x385ba000,
+0x385bc000, 0x385be000, 0x385c0000, 0x385c2000, 0x385c4000, 0x385c6000,
+0x385c8000, 0x385ca000, 0x385cc000, 0x385ce000, 0x385d0000, 0x385d2000,
+0x385d4000, 0x385d6000, 0x385d8000, 0x385da000, 0x385dc000, 0x385de000,
+0x385e0000, 0x385e2000, 0x385e4000, 0x385e6000, 0x385e8000, 0x385ea000,
+0x385ec000, 0x385ee000, 0x385f0000, 0x385f2000, 0x385f4000, 0x385f6000,
+0x385f8000, 0x385fa000, 0x385fc000, 0x385fe000, 0x38600000, 0x38602000,
+0x38604000, 0x38606000, 0x38608000, 0x3860a000, 0x3860c000, 0x3860e000,
+0x38610000, 0x38612000, 0x38614000, 0x38616000, 0x38618000, 0x3861a000,
+0x3861c000, 0x3861e000, 0x38620000, 0x38622000, 0x38624000, 0x38626000,
+0x38628000, 0x3862a000, 0x3862c000, 0x3862e000, 0x38630000, 0x38632000,
+0x38634000, 0x38636000, 0x38638000, 0x3863a000, 0x3863c000, 0x3863e000,
+0x38640000, 0x38642000, 0x38644000, 0x38646000, 0x38648000, 0x3864a000,
+0x3864c000, 0x3864e000, 0x38650000, 0x38652000, 0x38654000, 0x38656000,
+0x38658000, 0x3865a000, 0x3865c000, 0x3865e000, 0x38660000, 0x38662000,
+0x38664000, 0x38666000, 0x38668000, 0x3866a000, 0x3866c000, 0x3866e000,
+0x38670000, 0x38672000, 0x38674000, 0x38676000, 0x38678000, 0x3867a000,
+0x3867c000, 0x3867e000, 0x38680000, 0x38682000, 0x38684000, 0x38686000,
+0x38688000, 0x3868a000, 0x3868c000, 0x3868e000, 0x38690000, 0x38692000,
+0x38694000, 0x38696000, 0x38698000, 0x3869a000, 0x3869c000, 0x3869e000,
+0x386a0000, 0x386a2000, 0x386a4000, 0x386a6000, 0x386a8000, 0x386aa000,
+0x386ac000, 0x386ae000, 0x386b0000, 0x386b2000, 0x386b4000, 0x386b6000,
+0x386b8000, 0x386ba000, 0x386bc000, 0x386be000, 0x386c0000, 0x386c2000,
+0x386c4000, 0x386c6000, 0x386c8000, 0x386ca000, 0x386cc000, 0x386ce000,
+0x386d0000, 0x386d2000, 0x386d4000, 0x386d6000, 0x386d8000, 0x386da000,
+0x386dc000, 0x386de000, 0x386e0000, 0x386e2000, 0x386e4000, 0x386e6000,
+0x386e8000, 0x386ea000, 0x386ec000, 0x386ee000, 0x386f0000, 0x386f2000,
+0x386f4000, 0x386f6000, 0x386f8000, 0x386fa000, 0x386fc000, 0x386fe000,
+0x38700000, 0x38702000, 0x38704000, 0x38706000, 0x38708000, 0x3870a000,
+0x3870c000, 0x3870e000, 0x38710000, 0x38712000, 0x38714000, 0x38716000,
+0x38718000, 0x3871a000, 0x3871c000, 0x3871e000, 0x38720000, 0x38722000,
+0x38724000, 0x38726000, 0x38728000, 0x3872a000, 0x3872c000, 0x3872e000,
+0x38730000, 0x38732000, 0x38734000, 0x38736000, 0x38738000, 0x3873a000,
+0x3873c000, 0x3873e000, 0x38740000, 0x38742000, 0x38744000, 0x38746000,
+0x38748000, 0x3874a000, 0x3874c000, 0x3874e000, 0x38750000, 0x38752000,
+0x38754000, 0x38756000, 0x38758000, 0x3875a000, 0x3875c000, 0x3875e000,
+0x38760000, 0x38762000, 0x38764000, 0x38766000, 0x38768000, 0x3876a000,
+0x3876c000, 0x3876e000, 0x38770000, 0x38772000, 0x38774000, 0x38776000,
+0x38778000, 0x3877a000, 0x3877c000, 0x3877e000, 0x38780000, 0x38782000,
+0x38784000, 0x38786000, 0x38788000, 0x3878a000, 0x3878c000, 0x3878e000,
+0x38790000, 0x38792000, 0x38794000, 0x38796000, 0x38798000, 0x3879a000,
+0x3879c000, 0x3879e000, 0x387a0000, 0x387a2000, 0x387a4000, 0x387a6000,
+0x387a8000, 0x387aa000, 0x387ac000, 0x387ae000, 0x387b0000, 0x387b2000,
+0x387b4000, 0x387b6000, 0x387b8000, 0x387ba000, 0x387bc000, 0x387be000,
+0x387c0000, 0x387c2000, 0x387c4000, 0x387c6000, 0x387c8000, 0x387ca000,
+0x387cc000, 0x387ce000, 0x387d0000, 0x387d2000, 0x387d4000, 0x387d6000,
+0x387d8000, 0x387da000, 0x387dc000, 0x387de000, 0x387e0000, 0x387e2000,
+0x387e4000, 0x387e6000, 0x387e8000, 0x387ea000, 0x387ec000, 0x387ee000,
+0x387f0000, 0x387f2000, 0x387f4000, 0x387f6000, 0x387f8000, 0x387fa000,
+0x387fc000, 0x387fe000
+};
+
+static cmsUInt16Number Offset[64] = {
+0x0000, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400,
+0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400,
+0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400,
+0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400,
+0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400,
+0x0400, 0x0400, 0x0000, 0x0400, 0x0400, 0x0400,
+0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400,
+0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400,
+0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400,
+0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400,
+0x0400, 0x0400, 0x0400, 0x0400
+};
+
+static cmsUInt32Number Exponent[64] = {
+0x00000000, 0x00800000, 0x01000000, 0x01800000, 0x02000000, 0x02800000,
+0x03000000, 0x03800000, 0x04000000, 0x04800000, 0x05000000, 0x05800000,
+0x06000000, 0x06800000, 0x07000000, 0x07800000, 0x08000000, 0x08800000,
+0x09000000, 0x09800000, 0x0a000000, 0x0a800000, 0x0b000000, 0x0b800000,
+0x0c000000, 0x0c800000, 0x0d000000, 0x0d800000, 0x0e000000, 0x0e800000,
+0x0f000000, 0x47800000, 0x80000000, 0x80800000, 0x81000000, 0x81800000,
+0x82000000, 0x82800000, 0x83000000, 0x83800000, 0x84000000, 0x84800000,
+0x85000000, 0x85800000, 0x86000000, 0x86800000, 0x87000000, 0x87800000,
+0x88000000, 0x88800000, 0x89000000, 0x89800000, 0x8a000000, 0x8a800000,
+0x8b000000, 0x8b800000, 0x8c000000, 0x8c800000, 0x8d000000, 0x8d800000,
+0x8e000000, 0x8e800000, 0x8f000000, 0xc7800000
+};
+
+static cmsUInt16Number Base[512] = {
+0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+0x0000, 0x0000, 0x0000, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040,
+0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x0c00, 0x1000, 0x1400, 0x1800, 0x1c00,
+0x2000, 0x2400, 0x2800, 0x2c00, 0x3000, 0x3400, 0x3800, 0x3c00, 0x4000, 0x4400,
+0x4800, 0x4c00, 0x5000, 0x5400, 0x5800, 0x5c00, 0x6000, 0x6400, 0x6800, 0x6c00,
+0x7000, 0x7400, 0x7800, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00,
+0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x8000, 0x8000, 0x8000, 0x8000,
+0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
+0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
+0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
+0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
+0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
+0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
+0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
+0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
+0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
+0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8001,
+0x8002, 0x8004, 0x8008, 0x8010, 0x8020, 0x8040, 0x8080, 0x8100, 0x8200, 0x8400,
+0x8800, 0x8c00, 0x9000, 0x9400, 0x9800, 0x9c00, 0xa000, 0xa400, 0xa800, 0xac00,
+0xb000, 0xb400, 0xb800, 0xbc00, 0xc000, 0xc400, 0xc800, 0xcc00, 0xd000, 0xd400,
+0xd800, 0xdc00, 0xe000, 0xe400, 0xe800, 0xec00, 0xf000, 0xf400, 0xf800, 0xfc00,
+0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00,
+0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00,
+0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00,
+0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00,
+0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00,
+0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00,
+0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00,
+0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00,
+0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00,
+0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00,
+0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00, 0xfc00,
+0xfc00, 0xfc00
+};
+
+static cmsUInt8Number  Shift[512] = {
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x17,
+0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, 0x0f, 0x0e, 0x0d, 0x0d, 0x0d, 0x0d,
+0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d,
+0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0d, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13,
+0x12, 0x11, 0x10, 0x0f, 0x0e, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d,
+0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d,
+0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+0x18, 0x18, 0x18, 0x18, 0x0d
+};
+
+cmsFloat32Number _cmsHalf2Float(cmsUInt16Number h)
+{
+    union {
+        cmsFloat32Number flt;
+        cmsUInt32Number  num;
+    } out;
+
+    int n = h >> 10;
+
+    out.num = Mantissa[  (h & 0x3ff) + Offset[ n ] ] + Exponent[ n ];
+    return out.flt;
+}
+
+cmsUInt16Number _cmsFloat2Half(cmsFloat32Number flt)
+{
+    union {
+        cmsFloat32Number flt;
+        cmsUInt32Number  num;
+    } in;
+
+    cmsUInt32Number n, j;
+
+    in.flt = flt;
+    n = in.num;
+    j = (n >> 23) & 0x1ff;
+
+    return (cmsUInt16Number) ((cmsUInt32Number) Base[ j ] + (( n & 0x007fffff) >> Shift[ j ]));
+}
+
+#endif
--- a/src/share/native/sun/java2d/cmm/lcms/cmsintrp.c	Wed Nov 07 09:58:39 2012 +0900
+++ b/src/share/native/sun/java2d/cmm/lcms/cmsintrp.c	Tue Nov 06 18:41:01 2012 -0800
@@ -30,7 +30,7 @@
 //---------------------------------------------------------------------------------
 //
 //  Little Color Management System
-//  Copyright (c) 1998-2010 Marti Maria Saguer
+//  Copyright (c) 1998-2012 Marti Maria Saguer
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the "Software"),
@@ -55,7 +55,7 @@
 
 #include "lcms2_internal.h"
 
-// This module incorporates several interpolation routines, for 1, 3, 4, 5, 6, 7 and 8 channels on input and
+// This module incorporates several interpolation routines, for 1 to 8 channels on input and
 // up to 65535 channels on output. The user may change those by using the interpolation plug-in
 
 // Interpolation routines by default
@@ -83,7 +83,7 @@
 
 
 // Set the interpolation method
-static
+
 cmsBool _cmsSetInterpolationRoutine(cmsInterpParams* p)
 {
     // Invoke factory, possibly in the Plug-in
@@ -318,6 +318,116 @@
        }
 }
 
+// Bilinear interpolation (16 bits) - cmsFloat32Number version
+static
+void BilinearInterpFloat(const cmsFloat32Number Input[],
+                         cmsFloat32Number Output[],
+                         const cmsInterpParams* p)
+
+{
+#   define LERP(a,l,h)    (cmsFloat32Number) ((l)+(((h)-(l))*(a)))
+#   define DENS(i,j)      (LutTable[(i)+(j)+OutChan])
+
+    const cmsFloat32Number* LutTable = (cmsFloat32Number*) p ->Table;
+    cmsFloat32Number      px, py;
+    int        x0, y0,
+               X0, Y0, X1, Y1;
+    int        TotalOut, OutChan;
+    cmsFloat32Number      fx, fy,
+        d00, d01, d10, d11,
+        dx0, dx1,
+        dxy;
+
+    TotalOut   = p -> nOutputs;
+    px = Input[0] * p->Domain[0];
+    py = Input[1] * p->Domain[1];
+
+    x0 = (int) _cmsQuickFloor(px); fx = px - (cmsFloat32Number) x0;
+    y0 = (int) _cmsQuickFloor(py); fy = py - (cmsFloat32Number) y0;
+
+    X0 = p -> opta[1] * x0;
+    X1 = X0 + (Input[0] >= 1.0 ? 0 : p->opta[1]);
+
+    Y0 = p -> opta[0] * y0;
+    Y1 = Y0 + (Input[1] >= 1.0 ? 0 : p->opta[0]);
+
+    for (OutChan = 0; OutChan < TotalOut; OutChan++) {
+
+        d00 = DENS(X0, Y0);
+        d01 = DENS(X0, Y1);
+        d10 = DENS(X1, Y0);
+        d11 = DENS(X1, Y1);
+
+        dx0 = LERP(fx, d00, d10);
+        dx1 = LERP(fx, d01, d11);
+
+        dxy = LERP(fy, dx0, dx1);
+
+        Output[OutChan] = dxy;
+    }
+
+
+#   undef LERP
+#   undef DENS
+}
+
+// Bilinear interpolation (16 bits) - optimized version
+static
+void BilinearInterp16(register const cmsUInt16Number Input[],
+                      register cmsUInt16Number Output[],
+                      register const cmsInterpParams* p)
+
+{
+#define DENS(i,j) (LutTable[(i)+(j)+OutChan])
+#define LERP(a,l,h)     (cmsUInt16Number) (l + ROUND_FIXED_TO_INT(((h-l)*a)))
+
+           const cmsUInt16Number* LutTable = (cmsUInt16Number*) p ->Table;
+           int        OutChan, TotalOut;
+           cmsS15Fixed16Number    fx, fy;
+  register int        rx, ry;
+           int        x0, y0;
+  register int        X0, X1, Y0, Y1;
+           int        d00, d01, d10, d11,
+                      dx0, dx1,
+                      dxy;
+
+    TotalOut   = p -> nOutputs;
+
+    fx = _cmsToFixedDomain((int) Input[0] * p -> Domain[0]);
+    x0  = FIXED_TO_INT(fx);
+    rx  = FIXED_REST_TO_INT(fx);    // Rest in 0..1.0 domain
+
+
+    fy = _cmsToFixedDomain((int) Input[1] * p -> Domain[1]);
+    y0  = FIXED_TO_INT(fy);
+    ry  = FIXED_REST_TO_INT(fy);
+
+
+    X0 = p -> opta[1] * x0;
+    X1 = X0 + (Input[0] == 0xFFFFU ? 0 : p->opta[1]);
+
+    Y0 = p -> opta[0] * y0;
+    Y1 = Y0 + (Input[1] == 0xFFFFU ? 0 : p->opta[0]);
+
+    for (OutChan = 0; OutChan < TotalOut; OutChan++) {
+
+        d00 = DENS(X0, Y0);
+        d01 = DENS(X0, Y1);
+        d10 = DENS(X1, Y0);
+        d11 = DENS(X1, Y1);
+
+        dx0 = LERP(rx, d00, d10);
+        dx1 = LERP(rx, d01, d11);
+
+        dxy = LERP(ry, dx0, dx1);
+
+        Output[OutChan] = (cmsUInt16Number) dxy;
+    }
+
+
+#   undef LERP
+#   undef DENS
+}
 
 
 // Trilinear interpolation (16 bits) - cmsFloat32Number version
@@ -343,9 +453,21 @@
 
     TotalOut   = p -> nOutputs;
 
-    px = Input[0] * p->Domain[0];
-    py = Input[1] * p->Domain[1];
-    pz = Input[2] * p->Domain[2];
+    // We need some clipping here
+    px = Input[0];
+    py = Input[1];
+    pz = Input[2];
+
+    if (px < 0) px = 0;
+    if (px > 1) px = 1;
+    if (py < 0) py = 0;
+    if (py > 1) py = 1;
+    if (pz < 0) pz = 0;
+    if (pz > 1) pz = 1;
+
+    px *= p->Domain[0];
+    py *= p->Domain[1];
+    pz *= p->Domain[2];
 
     x0 = (int) _cmsQuickFloor(px); fx = px - (cmsFloat32Number) x0;
     y0 = (int) _cmsQuickFloor(py); fy = py - (cmsFloat32Number) y0;
@@ -486,9 +608,21 @@
 
     TotalOut   = p -> nOutputs;
 
-    px = Input[0] * p->Domain[0];
-    py = Input[1] * p->Domain[1];
-    pz = Input[2] * p->Domain[2];
+    // We need some clipping here
+    px = Input[0];
+    py = Input[1];
+    pz = Input[2];
+
+    if (px < 0) px = 0;
+    if (px > 1) px = 1;
+    if (py < 0) py = 0;
+    if (py > 1) py = 1;
+    if (pz < 0) pz = 0;
+    if (pz > 1) pz = 1;
+
+    px *= p->Domain[0];
+    py *= p->Domain[1];
+    pz *= p->Domain[2];
 
     x0 = (int) _cmsQuickFloor(px); rx = (px - (cmsFloat32Number) x0);
     y0 = (int) _cmsQuickFloor(py); ry = (py - (cmsFloat32Number) y0);
@@ -570,7 +704,6 @@
 
 
 
-#define DENS(i,j,k) (LutTable[(i)+(j)+(k)+OutChan])
 
 static
 void TetrahedralInterp16(register const cmsUInt16Number Input[],
@@ -578,99 +711,131 @@
                          register const cmsInterpParams* p)
 {
     const cmsUInt16Number* LutTable = (cmsUInt16Number*) p -> Table;
-    cmsS15Fixed16Number    fx, fy, fz;
-    cmsS15Fixed16Number    rx, ry, rz;
-    int                    x0, y0, z0;
-    cmsS15Fixed16Number    c0, c1, c2, c3, Rest;
-    cmsUInt32Number        OutChan;