8201222: JDK-8199539 broke the OpenJDK build
authorerikj
Fri, 06 Apr 2018 02:52:24 +0200
changeset 49540 9704789737c1
parent 49539 af97dd04d913
child 49541 4f6887eade94
8201222: JDK-8199539 broke the OpenJDK build Reviewed-by: darcy
make/copy/CopyCommon.gmk
--- a/make/copy/CopyCommon.gmk	Thu Apr 05 17:11:25 2018 -0700
+++ b/make/copy/CopyCommon.gmk	Fri Apr 06 02:52:24 2018 +0200
@@ -73,11 +73,12 @@
 #   EXCLUDES : List of filenames to exclude from copy
 SetupCopyLegalFiles = $(NamedParamsMacroTemplate)
 define SetupCopyLegalFilesBody
-  $$(eval $$(call SetupCopyFiles, $1, \
-      SRC := $$(CUSTOM_ROOT), \
-      DEST := $$(LEGAL_DST_DIR), \
-      FILES := $$(filter-out $$(addprefix %/, $$($1_EXCLUDES)), \
-          $$(wildcard $$(addsuffix /*, $$(call FindModuleLegalSrcDirs, $$(MODULE))))), \
-      FLATTEN := true, \
-  ))
+  $$(foreach f, $$(filter-out $$(addprefix %/, $$($1_EXCLUDES)), \
+      $$(wildcard $$(addsuffix /*, $$(call FindModuleLegalSrcDirs, $$(MODULE))))), \
+    $$(eval $$(call SetupCopyFiles, $1_$$(notdir $$f), \
+        DEST := $$(LEGAL_DST_DIR), \
+        FILES := $$f, \
+    )) \
+    $$(eval $1 += $$($1_$$(notdir $$f))) \
+  )
 endef