changeset 6826:296676d534c5 jdk8-b85

Merge
author katleman
date Tue, 09 Apr 2013 15:17:51 -0700
parents 43da85020921 fddd158b872a
children 081327aac5be e5c5e369af6a
files
diffstat 14 files changed, 89 insertions(+), 189 deletions(-) [+]
line wrap: on
line diff
--- a/makefiles/CompileDemos.gmk	Thu Apr 04 19:05:32 2013 -0700
+++ b/makefiles/CompileDemos.gmk	Tue Apr 09 15:17:51 2013 -0700
@@ -136,8 +136,7 @@
 			$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/$6share/demo/$2/$1/,$7)))
     ifneq ($7,)
         $(JDK_OUTPUTDIR)/demo/$2/$1/% : $(JDK_TOPDIR)/src/$6share/demo/$2/$1/%
-		$(MKDIR) -p $$(@D)
-		$(CP) $$< $$@
+		$$(call install-file)
 		$(CHMOD) -f ug+w $$@
 
         BUILD_DEMOS += $$($1_COPY_TARGETS)
@@ -190,8 +189,7 @@
 			$(JDK_OUTPUTDIR)/demo/nbproject/%,\
 			$(call CacheFind,$(JDK_TOPDIR)/src/closed/share/demo/nbproject))
     $(JDK_OUTPUTDIR)/demo/nbproject/% : $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%
-		$(MKDIR) -p $(@D)
-		$(CP) $< $@
+		$(call install-file)
 		$(CHMOD) -f ug+w $@
 endif
 
@@ -268,8 +266,7 @@
 		ZIP:=$(JDK_OUTPUTDIR)/demo/jvmti/$1/src.zip))
 
      $(JDK_OUTPUTDIR)/demo/jvmti/$1/README.txt : $(JDK_TOPDIR)/src/share/demo/jvmti/$1/README.txt
-		$(MKDIR) -p $$(@D)
-		$(CP) $$< $$@
+		$$(call install-file)
 		$(CHMOD) -f ug+w $$@
 
      ifneq (,$$(wildcard $(JDK_TOPDIR)/src/share/demo/jvmti/$1/*.java))
@@ -325,23 +322,22 @@
 JPDA_FILES:=$(subst $(JDK_TOPDIR)/src/share/classes/,,$(JPDA_SOURCES))
 
 $(JDK_OUTPUTDIR)/demo/jpda/src.zip : $(JPDA_SOURCES)
-		$(MKDIR) -p $(@D)
-		(cd $(JDK_TOPDIR)/src/share/classes && $(ZIP) -qru $@ com -i "com/sun/tools/example/*")
+	$(MKDIR) -p $(@D)
+	(cd $(JDK_TOPDIR)/src/share/classes && $(ZIP) -qru $@ com -i "com/sun/tools/example/*")
 
 $(JDK_OUTPUTDIR)/demo/jpda/examples.jar : $(JPDA_SOURCES)
-		$(MKDIR) -p $(@D)
-		$(RM) $(@D)/_the.sources
-		$(call ListPathsSafely,JPDA_FILES,\n, >> $(@D)/_the.sources)
-		$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" 		\
-		       -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $(JDK_TOPDIR)/make/tools/manifest.mf > $(@D)/_the.manifest
-		$(ECHO) "Main-Class: " >> $(@D)/_the.manifest
-		(cd $(JDK_TOPDIR)/src/share/classes && $(JAR) cfm  $@ $(@D)/_the.manifest @$(@D)/_the.sources)
-		(cd $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example && $(JAR) uf $@ README)
+	$(MKDIR) -p $(@D)
+	$(RM) $(@D)/_the.sources
+	$(call ListPathsSafely,JPDA_FILES,\n, >> $(@D)/_the.sources)
+	$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" 		\
+	       -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $(JDK_TOPDIR)/make/tools/manifest.mf > $(@D)/_the.manifest
+	$(ECHO) "Main-Class: " >> $(@D)/_the.manifest
+	(cd $(JDK_TOPDIR)/src/share/classes && $(JAR) cfm  $@ $(@D)/_the.manifest @$(@D)/_the.sources)
+	(cd $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example && $(JAR) uf $@ README)
 
 $(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README : $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example/README
-		$(MKDIR) -p $(@D)
-		$(CP) $< $@
-		$(CHMOD) -f ug+w $@
+	$(call install-file)
+	$(CHMOD) -f ug+w $@
 
 BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jpda/src.zip $(JDK_OUTPUTDIR)/demo/jpda/examples.jar \
 		$(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README
@@ -349,14 +345,12 @@
 ##################################################################################################
 
 $(JDK_OUTPUTDIR)/demo/management/index.html : $(JDK_TOPDIR)/src/share/demo/management/index.html
-		$(MKDIR) -p $(@D)
-		$(CP) $< $@
-		$(CHMOD) -f ug+w $@
+	$(call install-file)
+	$(CHMOD) -f ug+w $@
 
 $(JDK_OUTPUTDIR)/demo/jvmti/index.html : $(JDK_TOPDIR)/src/share/demo/jvmti/index.html
-		$(MKDIR) -p $(@D)
-		$(CP) $< $@
-		$(CHMOD) -f ug+w $@
+	$(call install-file)
+	$(CHMOD) -f ug+w $@
 
 BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/management/index.html \
 		$(JDK_OUTPUTDIR)/demo/jvmti/index.html
@@ -369,15 +363,13 @@
 		$(call CacheFind,$(JDK_TOPDIR)/src/share/demo/nbproject))
 
 $(JDK_OUTPUTDIR)/demo/nbproject/% : $(JDK_TOPDIR)/src/share/demo/nbproject/%
-	$(MKDIR) -p $(@D)
-	$(CP) $< $@
+	$(call install-file)
 	$(CHMOD) -f ug+w $@
 
 ##################################################################################################
 
 $(JDK_OUTPUTDIR)/demo/README: $(JDK_TOPDIR)/src/share/demo/README
-	$(MKDIR) -p $(@D)
-	$(CP) $< $@
+	$(call install-file)
 
 BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/README
 
@@ -386,14 +378,12 @@
 ifeq ($(OPENJDK_TARGET_OS), solaris)
 
 $(JDK_OUTPUTDIR)/democlasses/jni/Poller/% : $(JDK_TOPDIR)/src/solaris/demo/jni/Poller/%
-		$(MKDIR) -p $(@D)
-		$(CP) $< $@
-		$(CHMOD) -f ug+w $@
+	$(call install-file)
+	$(CHMOD) -f ug+w $@
 
 $(JDK_OUTPUTDIR)/demo/jni/Poller/README.txt : $(JDK_TOPDIR)/src/solaris/demo/jni/Poller/README.txt
-		$(MKDIR) -p $(@D)
-		$(CP) $< $@
-		$(CHMOD) -f ug+w $@
+	$(call install-file)
+	$(CHMOD) -f ug+w $@
 
 $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar : \
   $(JDK_OUTPUTDIR)/democlasses/jni/Poller/README.txt $(JDK_OUTPUTDIR)/democlasses/jni/Poller/Poller.c
@@ -433,8 +423,7 @@
 
 $(JDK_OUTPUTDIR)/demo/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX) : \
   $(JDK_OUTPUTDIR)/demoobjs/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
-	$(MKDIR) -p $(@D)
-	$(CP) $< $@
+	$(call install-file)
 
 BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
 
@@ -456,8 +445,8 @@
      $(JDK_OUTPUTDIR)/demo/db/README-JDK-DEMOS.html: \
 		$(JDK_TOPDIR)/src/closed/share/db/README-JDK-DEMOS.html \
 		| $(JDK_OUTPUTDIR)/demo/_the.db.unzipped
-	$(MKDIR) -p $(@D)
-	$(CP) '$<' '$@'
+	$(call install-file)
+
      BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/_the.db.unzipped $(JDK_OUTPUTDIR)/demo/db/README-JDK-DEMOS.html
 endif
 
--- a/makefiles/CompileJavaClasses.gmk	Thu Apr 04 19:05:32 2013 -0700
+++ b/makefiles/CompileJavaClasses.gmk	Tue Apr 09 15:17:51 2013 -0700
@@ -281,8 +281,7 @@
 # These resources violates the convention of having code and resources together under
 # $(JDK_TOPDIR)/src/.../classes directories
 $(JDK_OUTPUTDIR)/classes/javax/swing/beaninfo/images/%.gif: $(JDK_TOPDIR)/make/tools/swing-beans/beaninfo/images/%.gif
-	$(MKDIR) -p $(@D)
-	$(CP) $< $@
+	$(call install-file)
 
 # The JDK_USER_DEFINED_FILTER is a poor man's incremental build: by specifying
 # JDK_FILTER at the make command line, only a subset of the JDK java files will
--- a/makefiles/CompileLaunchers.gmk	Thu Apr 04 19:05:32 2013 -0700
+++ b/makefiles/CompileLaunchers.gmk	Tue Apr 09 15:17:51 2013 -0700
@@ -489,8 +489,7 @@
 # -link -incremental:no
 # like all other launchers.
 $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(EXE_SUFFIX): $(BUILD_UNPACKEXE)
-	$(MKDIR) -p $(@D)
-	$(CP) '$<' '$@'
+	$(call install-file)
 
 BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(EXE_SUFFIX)
 
@@ -588,8 +587,7 @@
         $(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) $< $@
+	$(call install-file)
 	$(CHMOD) a+x $@
 endif
 
--- a/makefiles/CompileNativeLibraries.gmk	Thu Apr 04 19:05:32 2013 -0700
+++ b/makefiles/CompileNativeLibraries.gmk	Tue Apr 09 15:17:51 2013 -0700
@@ -109,7 +109,7 @@
 
 BUILD_LIBFDLIBM := $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)
 $(BUILD_LIBFDLIBM) : $(BUILD_LIBFDLIBM_MAC)
-	$(CP) -a $< $@
+	$(call install-file)
 
 endif
 BUILD_LIBRARIES += $(BUILD_LIBFDLIBM)
@@ -1838,16 +1838,14 @@
 
 $(JDK_OUTPUTDIR)/lib/net.properties: $(JDK_TOPDIR)/src/share/lib/net.properties
 	$(ECHO) $(LOG_INFO) Copying $(@F)
-	$(MKDIR) -p $(@D)
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES += $(JDK_OUTPUTDIR)/lib/net.properties
 
 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) $(LOG_INFO) Copying $(@F)
-	$(MKDIR) -p $(@D)
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES += $(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template
 endif
@@ -2168,7 +2166,7 @@
 		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjli_static))
 
 $(JDK_OUTPUTDIR)/objs/libjli_static.a : $(BUILD_LIBJLI_STATIC)
-	$(CP) -a $< $@
+	$(call install-file)
 
 BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/libjli_static.a
 endif
--- a/makefiles/CopyFiles.gmk	Thu Apr 04 19:05:32 2013 -0700
+++ b/makefiles/CopyFiles.gmk	Tue Apr 09 15:17:51 2013 -0700
@@ -46,14 +46,10 @@
 		$(OPENJDK_TARGET_OS_INCLUDE)/jawt_md.h
 
 $(INCLUDEDIR)/%.h: $(JDK_TOPDIR)/src/share/javavm/export/%.h
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 $(OPENJDK_TARGET_OS_INCLUDE)/%.h: $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/javavm/export/%.h
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES = $(H_TARGET_FILES)
 
@@ -88,22 +84,16 @@
 MGMT_TARGET_FILES = $(subst $(MGMT_LIB_SRC),$(MGMT_LIBDIR),$(MGMT_SRC_FILES))
 
 $(MGMT_LIBDIR)/management.properties: $(MGMT_LIB_SRC)/management.properties
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 	$(CHMOD) 644 $@
 
 # this file has different permissions...don't know why...
 $(MGMT_LIBDIR)/jmxremote.access: $(MGMT_LIB_SRC)/jmxremote.access
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 	$(CHMOD) 644 $@
 
 $(MGMT_LIBDIR)/%: $(MGMT_LIB_SRC)/%
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 	$(CHMOD) 444 $@
 
 COPY_FILES += $(MGMT_TARGET_FILES)
@@ -113,9 +103,7 @@
 LOGGING_LIB_SRC = $(JDK_TOPDIR)/src/share/lib
 
 $(LIBDIR)/logging.properties: $(LOGGING_LIB_SRC)/logging.properties
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES += $(LIBDIR)/logging.properties
 
@@ -128,9 +116,7 @@
 PSFONTPROPFILE_TARGET_FILES = $(subst $(PSFONTPROPFILE_SRC_DIR),$(LIBDIR),$(PSFONTPROPFILE_SRCS))
 
 $(LIBDIR)/%: $(PSFONTPROPFILE_SRC_DIR)/%
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES += $(PSFONTPROPFILE_TARGET_FILES)
 
@@ -145,9 +131,7 @@
 endif
 
 $(LIBDIR)/flavormap.properties: $(OPENJDK_TARGET_OS_LIB_SRC)/flavormap.properties
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES += $(LIBDIR)/flavormap.properties
 
@@ -155,9 +139,7 @@
 CURSORS_OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib/images/cursors
 
 $(CURSORS_DEST_DIR)/cursors.properties: $(CURSORS_OPENJDK_TARGET_OS_LIB_SRC)/cursors.properties
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES += $(CURSORS_DEST_DIR)/cursors.properties
 
@@ -170,9 +152,7 @@
 CURSORS_TARGET_FILES =  $(subst $(CURSORS_LIB_SRC),$(CURSORS_DEST_DIR),$(CURSORS_SRC_FILES))
 
 $(CURSORS_DEST_DIR)/%: $(CURSORS_LIB_SRC)/%
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES += $(CURSORS_TARGET_FILES)
 
@@ -181,9 +161,7 @@
 CONTENT_TYPES_SRC=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
 
 $(LIBDIR)/content-types.properties: $(CONTENT_TYPES_SRC)/content-types.properties
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES += $(LIBDIR)/content-types.properties
 
@@ -192,9 +170,7 @@
 CALENDARS_SRC := $(JDK_TOPDIR)/src/share/lib
 
 $(LIBDIR)/calendars.properties: $(CALENDARS_SRC)/calendars.properties
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES += $(LIBDIR)/calendars.properties
 
@@ -205,9 +181,7 @@
 TZMAPPINGS_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
 
 $(LIBDIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES += $(LIBDIR)/tzmappings
 
@@ -227,9 +201,7 @@
 ICCPROFILE_TARGET_FILES:=$(subst $(ICCPROFILE_SRC_DIR),$(ICCPROFILE_DEST_DIR),$(ICCPROFILE_SRCS))
 
 $(ICCPROFILE_DEST_DIR)%.pf: $(ICCPROFILE_SRC_DIR)%.pf
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 	$(CHMOD) 444 $@
 
 COPY_FILES += $(ICCPROFILE_TARGET_FILES)
@@ -279,9 +251,7 @@
     MSVCR_TARGET := $(JDK_OUTPUTDIR)/bin/$(notdir $(MSVCR_DLL))
     # Chmod to avoid permission issues if bundles are unpacked on unix platforms.
     $(MSVCR_TARGET): $(MSVCR_DLL)
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 	$(CHMOD) a+rx $@
 
     COPY_FILES += $(MSVCR_TARGET)
@@ -292,9 +262,7 @@
 HPROF_SRC=$(JDK_TOPDIR)/src/share/demo/jvmti/hprof/jvm.hprof.txt
 
 $(LIBDIR)/jvm.hprof.txt : $(HPROF_SRC)
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES += $(LIBDIR)/jvm.hprof.txt
 
@@ -351,17 +319,13 @@
         else
             # Use the default jvm.cfg for this 32 bit setup. 
             $(JVMCFG): $(JVMCFG_SRC)
-	    	$(MKDIR) -p $(@D)
-		$(RM) $@
-		$(CP) $< $@
+	    	$(call install-file)
         endif
     endif
 else
     # Use the default jvm.cfg for this 64 bit setup.
     $(JVMCFG): $(JVMCFG_SRC)
-		$(MKDIR) -p $(@D)
-		$(RM) $@
-		$(CP) $< $@
+		$(call install-file)
 endif
 
 COPY_FILES += $(JVMCFG)
@@ -372,9 +336,7 @@
 PROPS_DST := $(JDK_OUTPUTDIR)/lib/security/java.security
 
 $(PROPS_DST): $(PROPS_SRC)
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES += $(PROPS_DST)
 
@@ -384,9 +346,7 @@
 POLICY_DST := $(JDK_OUTPUTDIR)/lib/security/java.policy
 
 $(POLICY_DST): $(POLICY_SRC)
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES += $(POLICY_DST)
 
@@ -396,9 +356,7 @@
 CACERTS_DST := $(JDK_OUTPUTDIR)/lib/security/cacerts
 
 $(CACERTS_DST): $(CACERTS_SRC)
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES += $(CACERTS_DST)
 
@@ -413,16 +371,12 @@
 TRUSTEDLIBS_DST := $(JDK_OUTPUTDIR)/lib/security/trusted.libraries
 
 $(BLACKLIST_DST): $(BLACKLIST_SRC)
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES += $(BLACKLIST_DST)
 
 $(TRUSTEDLIBS_DST): $(TRUSTEDLIBS_SRC)
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES += $(TRUSTEDLIBS_DST)
 
@@ -448,14 +402,10 @@
 SHARED_FONTS_DST := $(foreach F,$(SHARED_FONTS_FILES),$(SHARED_FONTS_DST_DIR)/$(F))
 
 $(SHARED_FONTS_DST_DIR)/%.ttf : $(SHARED_FONTS_SRC_DIR)/%.ttf
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 $(SHARED_FONTS_DST_DIR)/fonts.dir : $(JDK_TOPDIR)/src/solaris/classes/sun/awt/motif/java.fonts.dir
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES += $(SHARED_FONTS_DST)
 
@@ -476,14 +426,10 @@
 OBL_FONTS_DST := $(foreach F,$(OBL_FONTS_FILES),$(OBL_FONTS_DST_DIR)/$(F))
 
 $(OBL_FONTS_DST_DIR)/%.ttf : $(OBL_FONTS_SRC_DIR)/%.ttf
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 $(OBL_FONTS_DST_DIR)/fonts.dir : $(JDK_TOPDIR)/src/solaris/classes/sun/awt/motif/java.oblique-fonts.dir
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES += $(OBL_FONTS_DST) $(OBL_FONTS_DST_DIR)/fonts.dir
 
@@ -502,9 +448,7 @@
 JS_RESOURCES_DST := $(foreach F,$(JS_RESOURCES_FILES),$(JS_RESOURCES_DST_DIR)/$(F))
 
 $(JS_RESOURCES_DST_DIR)/% : $(JS_RESOURCES_SRC_DIR)/%
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES += $(JS_RESOURCES_DST)
 
@@ -539,15 +483,11 @@
 DGALIBS = $(_DGALIBS_$(OPENJDK_TARGET_CPU_LEGACY):%=$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/%)
 
 $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libxinerama.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(OPENJDK_TARGET_CPU_LEGACY)/libxinerama.so
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 	$(CHMOD) 755 $@
 
 $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNW%.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(OPENJDK_TARGET_CPU_LEGACY)/libjdgaSUNW%.so
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 	$(CHMOD) 755 $@
 
 $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNWafb.so: $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNWffb.so
@@ -567,9 +507,7 @@
 SUNPKCS11_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/sunpkcs11-solaris.cfg
 
 $(SUNPKCS11_CFG_DST) : $(SUNPKCS11_CFG_SRC)
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES += $(SUNPKCS11_CFG_DST)
 
@@ -584,9 +522,7 @@
 UCRYPTO_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/ucrypto-solaris.cfg
 
 $(UCRYPTO_CFG_DST) : $(UCRYPTO_CFG_SRC)
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES += $(UCRYPTO_CFG_DST)
 
@@ -596,9 +532,7 @@
 ##########################################################################################
 
 $(JDK_OUTPUTDIR)/lib/sound.properties : $(JDK_TOPDIR)/src/share/lib/sound.properties
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $(@)
+	$(call install-file)
 
 COPY_FILES += $(JDK_OUTPUTDIR)/lib/sound.properties
 
--- a/makefiles/CopyIntoClasses.gmk	Thu Apr 04 19:05:32 2013 -0700
+++ b/makefiles/CopyIntoClasses.gmk	Tue Apr 09 15:17:51 2013 -0700
@@ -223,9 +223,7 @@
 ###
 
 $(JDK_OUTPUTDIR)/classes/sun/nio/cs/ext/sjis0213.dat : $(JDK_OUTPUTDIR)/gensrc/sun/nio/cs/ext/sjis0213.dat
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $(@)
+	$(call install-file)
 
 COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/sun/nio/cs/ext/sjis0213.dat
 
--- a/makefiles/CopySamples.gmk	Thu Apr 04 19:05:32 2013 -0700
+++ b/makefiles/CopySamples.gmk	Tue Apr 09 15:17:51 2013 -0700
@@ -53,19 +53,13 @@
 endif
 
 $(SAMPLE_TARGET_DIR)/dtrace/%: $(SAMPLE_SOLARIS_SOURCE_DIR)/dtrace/%
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 $(SAMPLE_TARGET_DIR)/webservices/%: $(SAMPLE_CLOSED_SOURCE_DIR)/webservices/%
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 $(SAMPLE_TARGET_DIR)/%: $(SAMPLE_SOURCE_DIR)/%
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(CP) $< $@
+	$(call install-file)
 
 COPY_FILES += $(SAMPLE_TARGET)
 
--- a/makefiles/GendataFontConfig.gmk	Thu Apr 04 19:05:32 2013 -0700
+++ b/makefiles/GendataFontConfig.gmk	Tue Apr 09 15:17:51 2013 -0700
@@ -72,9 +72,7 @@
 
 $(GENDATA_FONT_CONFIG_DST)/%.src : \
     $(GENDATA_FONT_CONFIG_SRC_DIR)/$(GENDATA_FONT_CONFIG_SRC_PREFIX)%
-	$(RM) $@
-	$(MKDIR) -p $(@D)
-	$(CP) $< $@
+	$(call install-file)
 
 $(GENDATA_FONT_CONFIG_DST)/%.bfc : \
     $(GENDATA_FONT_CONFIG_SRC_DIR)/$(GENDATA_FONT_CONFIG_SRC_PREFIX)%.properties
--- a/makefiles/GensrcCharacterData.gmk	Thu Apr 04 19:05:32 2013 -0700
+++ b/makefiles/GensrcCharacterData.gmk	Tue Apr 09 15:17:51 2013 -0700
@@ -55,9 +55,8 @@
 
 # Copy two Java files that need no preprocessing.
 $(JDK_OUTPUTDIR)/gensrc/java/lang/%.java : $(CHARACTERDATA)/%.java.template
-	$(MKDIR) -p $(@D)
 	$(ECHO) $(LOG_INFO) Generating $(@F)
-	$(CP) -f $< $@
+	$(call install-file)
 
 GENSRC_CHARACTERDATA += $(JDK_OUTPUTDIR)/gensrc/java/lang/CharacterDataUndefined.java \
                        $(JDK_OUTPUTDIR)/gensrc/java/lang/CharacterDataPrivateUse.java
--- a/makefiles/GensrcMisc.gmk	Thu Apr 04 19:05:32 2013 -0700
+++ b/makefiles/GensrcMisc.gmk	Tue Apr 09 15:17:51 2013 -0700
@@ -72,9 +72,8 @@
 
     $(JDK_OUTPUTDIR)/gensrc/java/lang/UNIXProcess.java : \
               $(JDK_TOPDIR)/src/solaris/classes/java/lang/UNIXProcess.java.$(UPSUFFIX)
-	$(MKDIR) -p $(@D)
 	$(ECHO) $(LOG_INFO) Copying UNIXProcess.java.$(OPENJDK_TARGET_OS) to java/lang/UNIXProcess.java
-	$(CP) $< $@
+	$(call install-file)
 	$(CHMOD) u+rw $@
 
     GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/java/lang/UNIXProcess.java
@@ -114,9 +113,7 @@
 	$(MV) $@.tmp $@
 else
 $(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) $< $@
+	$(call install-file)
 endif
 
 ##########################################################################################
@@ -156,9 +153,7 @@
 	$(MV) $@.tmp $@
 else
 $(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) $< $@
+	$(call install-file)
 endif
 
 endif
--- a/makefiles/GensrcSwing.gmk	Thu Apr 04 19:05:32 2013 -0700
+++ b/makefiles/GensrcSwing.gmk	Tue Apr 09 15:17:51 2013 -0700
@@ -85,14 +85,12 @@
 # For some reason it is under $(JDK_TOPDIR)/make/tools/swing-beans/javax/swing
 # Should it be moved under $(JDK_TOPDIR)/src/share/classes/javax/swing instead?
 $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing/SwingBeanInfoBase.java: $(DOCLETSRC_DIR)/javax/swing/SwingBeanInfoBase.java
-	$(MKDIR) -p $(@D)
-	$(CP) $< $@
+	$(call install-file)
 
 # This file is the part of dt.jar 
 # For some reason it is under $(JDK_TOPDIR)/make/tools/swing-beans/sun/swing
 # Should it be moved under $(JDK_TOPDIR)/src/share/classes/sun/swing instead?
 $(JDK_OUTPUTDIR)/gensrc/sun/swing/BeanInfoUtils.java: $(DOCLETSRC_DIR)/sun/swing/BeanInfoUtils.java
-	$(MKDIR) -p $(@D)
-	$(CP) $< $@
+	$(call install-file)
 
 GENSRC_SWING_BEANINFO = $(JDK_OUTPUTDIR)/gensrc_no_srczip/_the.generated_beaninfo
--- a/makefiles/Profiles.gmk	Thu Apr 04 19:05:32 2013 -0700
+++ b/makefiles/Profiles.gmk	Tue Apr 09 15:17:51 2013 -0700
@@ -93,8 +93,11 @@
         $(IMAGES_OUTPUTDIR)/lib/dt.jar \
         $(IMAGES_OUTPUTDIR)/lib/tools.jar \
         $(IMAGES_OUTPUTDIR)/lib/ct.sym \
-        $(IMAGES_OUTPUTDIR)/src.zip \
-        $(IMAGES_OUTPUTDIR)/lib/sa-jdi.jar
+        $(IMAGES_OUTPUTDIR)/src.zip
+
+ifeq ($(INCLUDE_SA),true)
+    ALL_JARS += $(IMAGES_OUTPUTDIR)/lib/sa-jdi.jar
+endif
 
 ifeq ($(OPENJDK_TARGET_OS),solaris)
     ifndef OPENJDK
--- a/makefiles/SignJars.gmk	Thu Apr 04 19:05:32 2013 -0700
+++ b/makefiles/SignJars.gmk	Tue Apr 09 15:17:51 2013 -0700
@@ -79,8 +79,7 @@
 	fi
 
 $(JCE_OUTPUTDIR)/%: $(IMAGES_OUTPUTDIR)/unsigned/%
-	$(MKDIR) -p $(@D)
-	$(CP) $< $@
+	$(call install-file)
 	$(JARSIGNER) -keystore $(SIGNING_KEYSTORE) \
 	    $@ $(SIGNING_ALIAS) < $(SIGNING_PASSPHRASE)
 	@$(PRINTF) "\nJar codesigning finished.\n"
--- a/makefiles/Tools.gmk	Thu Apr 04 19:05:32 2013 -0700
+++ b/makefiles/Tools.gmk	Tue Apr 09 15:17:51 2013 -0700
@@ -47,17 +47,15 @@
 endif
 
 $(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/%.template : \
-	$(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/%.template
-	$(MKDIR) -p $(@D)
-	$(CP) $< $@
+		$(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/%.template
+	$(call install-file)
 
 BUILD_TOOLS += $(foreach i,$(wildcard $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/*.template),$(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/$(notdir $i))
 
 # Resources used by CheckDeps tool
 $(JDK_OUTPUTDIR)/btclasses/build/tools/deps/% : \
-	$(JDK_TOPDIR)/make/tools/src/build/tools/deps/%
-	$(MKDIR) -p $(@D)
-	$(CP) $< $@
+		$(JDK_TOPDIR)/make/tools/src/build/tools/deps/%
+	$(call install-file)
 
 BUILD_TOOLS += $(JDK_OUTPUTDIR)/btclasses/build/tools/deps/refs.allowed