8211677: Java resource copy and clean should use MakeTargetDir macro
authorerikj
Thu, 04 Oct 2018 09:43:49 -0700
changeset 52018 592dff6ac440
parent 52017 d3424ddad792
child 52019 d63efc278e93
8211677: Java resource copy and clean should use MakeTargetDir macro Reviewed-by: tbell, ihse
make/common/JavaCompilation.gmk
--- a/make/common/JavaCompilation.gmk	Fri Aug 17 12:19:52 2018 +0200
+++ b/make/common/JavaCompilation.gmk	Thu Oct 04 09:43:49 2018 -0700
@@ -76,8 +76,8 @@
     $1_COPY_$$($2_TARGET) := 1
     # Now we can setup the dependency that will trigger the copying.
     $$($1_BIN)$$($1_MODULE_SUBDIR)$$($2_TARGET) : $2
-	$(MKDIR) -p $$(@D)
-	$(CP) $$< $$@
+	$$(call LogInfo, Copying $$(patsubst $(OUTPUTDIR)/%,%, $$@))
+	$$(install-file)
 	$(CHMOD) -f ug+w $$@
 
     # And do not forget this target
@@ -120,7 +120,8 @@
   ifneq ($$($1_CLEAN_$$($2_TARGET)), 1)
     $1_CLEAN_$$($2_TARGET) := 1
     $$($1_BIN)$$($1_MODULE_SUBDIR)$$($2_TARGET) : $2
-	$(MKDIR) -p $$(@D)
+	$$(call LogInfo, Cleaning $$(patsubst $(OUTPUTDIR)/%,%, $$@))
+	$$(call MakeTargetDir)
 	export LC_ALL=C ; ( $(CAT) $$< && $(ECHO) "" ) \
 	    | $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' \
 	        -e 's/\([^\\]\)!/\1\\!/g' -e 's/^[ 	]*#.*/#/g' \