diff --git a/jdk/makefiles/CompileDemos.gmk b/jdk/makefiles/CompileDemos.gmk index f3100b10ab3..f61d9404020 100644 --- a/jdk/makefiles/CompileDemos.gmk +++ b/jdk/makefiles/CompileDemos.gmk @@ -136,8 +136,7 @@ define SetupDemo $$(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 @@ ifndef OPENJDK $(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 @@ define SetupJVMTIDemo 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_SOURCES:=$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/tools/exa 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 @@ BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jpda/src.zip $(JDK_OUTPUTDIR)/demo/jpda/exa ################################################################################################## $(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 @@ BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/share/demo/nbproject/%,\ $(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 @@ BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/README 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)/demoobjs/jni/Poller/Poller.o : $(JDK_OUTPUTDIR)/demo/jni/Poller $(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 @@ ifndef OPENJDK $(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 diff --git a/jdk/makefiles/CompileJavaClasses.gmk b/jdk/makefiles/CompileJavaClasses.gmk index 584458c00c4..24ce0d922f0 100644 --- a/jdk/makefiles/CompileJavaClasses.gmk +++ b/jdk/makefiles/CompileJavaClasses.gmk @@ -281,8 +281,7 @@ endif # 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 diff --git a/jdk/makefiles/CompileLaunchers.gmk b/jdk/makefiles/CompileLaunchers.gmk index 501c986082e..7ecad956fbb 100644 --- a/jdk/makefiles/CompileLaunchers.gmk +++ b/jdk/makefiles/CompileLaunchers.gmk @@ -489,8 +489,7 @@ endif # -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 @@ ifeq ($(OPENJDK_TARGET_OS),windows) $(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 diff --git a/jdk/makefiles/CompileNativeLibraries.gmk b/jdk/makefiles/CompileNativeLibraries.gmk index e73c91f3adb..0158000c130 100644 --- a/jdk/makefiles/CompileNativeLibraries.gmk +++ b/jdk/makefiles/CompileNativeLibraries.gmk @@ -109,7 +109,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM_MAC,\ 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 @@ BUILD_LIBRARIES += $(BUILD_LIBNET) $(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 @@ else ifeq ($(OPENJDK_TARGET_OS),macosx) 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 diff --git a/jdk/makefiles/CopyFiles.gmk b/jdk/makefiles/CopyFiles.gmk index 0b4bbfd68ce..6b15e677b32 100644 --- a/jdk/makefiles/CopyFiles.gmk +++ b/jdk/makefiles/CopyFiles.gmk @@ -46,14 +46,10 @@ H_TARGET_FILES =$(INCLUDEDIR)/jdwpTransport.h \ $(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_SRC_FILES = $(wildcard $(MGMT_LIB_SRC)/*) 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 @@ COPY_FILES += $(MGMT_TARGET_FILES) 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_SRCS = $(wildcard $(PSFONTPROPFILE_SRC_DIR)/*.properties*) 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 @@ OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/macosx/lib 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_DEST_DIR = $(LIBDIR)/images/cursors 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 @@ endif # OPENJDK_TARGET_OS 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 @@ COPY_FILES += $(CURSORS_TARGET_FILES) 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 @@ COPY_FILES += $(LIBDIR)/content-types.properties 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 @@ ifeq ($(OPENJDK_TARGET_OS),windows) 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_SRCS:=$(wildcard $(ICCPROFILE_SRC_DIR)/*.pf) 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 @@ ifeq ($(OPENJDK_TARGET_OS),windows) 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 @@ endif 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 @@ ifeq ($(OPENJDK_TARGET_CPU_BITS),32) 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_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.security-$(OPENJDK_TARGET 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_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.policy 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_SRC := $(CACERTS_FILE) 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_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/trusted.libraries 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_SRC := $(foreach F,$(SHARED_FONTS_FILES),$(SHARED_FONTS_SRC_DIR)/$( 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_SRC := $(foreach F,$(OBL_FONTS_FILES),$(OBL_FONTS_SRC_DIR)/$(F)) 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_SRC := $(foreach F,$(JS_RESOURCES_FILES),$(JS_RESOURCES_SRC_DIR)/$( 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_amd64 = # no amd64 library yet 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_SRC := $(JDK_TOPDIR)/src/share/lib/security/sunpkcs11-solaris.cfg 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_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/ucrypto-solaris.c 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 @@ endif ########################################################################################## $(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 diff --git a/jdk/makefiles/CopyIntoClasses.gmk b/jdk/makefiles/CopyIntoClasses.gmk index 549a58efd68..d4df3424b6e 100644 --- a/jdk/makefiles/CopyIntoClasses.gmk +++ b/jdk/makefiles/CopyIntoClasses.gmk @@ -223,9 +223,7 @@ COPY_EXTRA += $(OUT_SERVICES_FILES_PRINT) ### $(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 diff --git a/jdk/makefiles/CopySamples.gmk b/jdk/makefiles/CopySamples.gmk index 7f432f8693b..1f6b3bfb893 100644 --- a/jdk/makefiles/CopySamples.gmk +++ b/jdk/makefiles/CopySamples.gmk @@ -53,19 +53,13 @@ ifneq (, $(filter $(OPENJDK_TARGET_OS), solaris macosx)) 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) diff --git a/jdk/makefiles/GendataFontConfig.gmk b/jdk/makefiles/GendataFontConfig.gmk index 7f539083c9d..189a7327a1d 100644 --- a/jdk/makefiles/GendataFontConfig.gmk +++ b/jdk/makefiles/GendataFontConfig.gmk @@ -72,9 +72,7 @@ endif $(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 diff --git a/jdk/makefiles/GensrcCharacterData.gmk b/jdk/makefiles/GensrcCharacterData.gmk index e720ab860ed..f64edbab85c 100644 --- a/jdk/makefiles/GensrcCharacterData.gmk +++ b/jdk/makefiles/GensrcCharacterData.gmk @@ -55,9 +55,8 @@ $(eval $(call SetupCharacterData,CharacterData0E,-plane 14,11 4 1)) # 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 diff --git a/jdk/makefiles/GensrcMisc.gmk b/jdk/makefiles/GensrcMisc.gmk index 72a789b452c..812b2cee6c7 100644 --- a/jdk/makefiles/GensrcMisc.gmk +++ b/jdk/makefiles/GensrcMisc.gmk @@ -72,9 +72,8 @@ ifeq ($(OPENJDK_TARGET_OS_API),posix) $(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 @@ $(JDK_OUTPUTDIR)/gensrc/sun/nio/ch/SocketOptionRegistry.java : $(BUILD_GENSRC_SO $(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 @@ $(JDK_OUTPUTDIR)/gensrc/sun/nio/fs/UnixConstants.java : $(BUILD_GENSRC_UC_EXE) $(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 diff --git a/jdk/makefiles/GensrcSwing.gmk b/jdk/makefiles/GensrcSwing.gmk index 9f3bff1ba41..f5741ae5f46 100644 --- a/jdk/makefiles/GensrcSwing.gmk +++ b/jdk/makefiles/GensrcSwing.gmk @@ -85,14 +85,12 @@ $(JDK_OUTPUTDIR)/gensrc_no_srczip/_the.generated_beaninfo: $(BEANS_SRC) $(JDK_OU # 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 diff --git a/jdk/makefiles/SignJars.gmk b/jdk/makefiles/SignJars.gmk index 99caa99cc22..6e84d14844a 100644 --- a/jdk/makefiles/SignJars.gmk +++ b/jdk/makefiles/SignJars.gmk @@ -79,8 +79,7 @@ check-keystore: 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" diff --git a/jdk/makefiles/Tools.gmk b/jdk/makefiles/Tools.gmk index 360cbe4092e..66d08b49be3 100644 --- a/jdk/makefiles/Tools.gmk +++ b/jdk/makefiles/Tools.gmk @@ -47,17 +47,15 @@ $(eval $(call SetupJavaCompilation,BUILD_TOOLS,\ 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