(urgent) RFR: JDK-8201222: JDK-8199539 broke the OpenJDK build

Erik Joelsson erik.joelsson at oracle.com
Fri Apr 6 00:08:46 UTC 2018


The fix in JDK-8199539 works fine for OracleJDK builds but broke the 
OpenJDK build. The problem is that I used CUSTOM_ROOT as the SRC dir for 
SetupCopyFiles. This was a bit of a hack together with FLATTEN := true. 
The idea was that I didn't care about the source dir but just wanted 
each file listed copied into the dest dir. CUSTOM_ROOT is however only 
defined in the OracleJDK build so won't work in an open only build. I've 
reworked this to instead loop over the files and call SetupCopyFiles 
once for each file to be copied instead.

Bug: https://bugs.openjdk.java.net/browse/JDK-8201222

Patch:

diff -r 149dc554808c make/copy/CopyCommon.gmk
--- a/make/copy/CopyCommon.gmk
+++ b/make/copy/CopyCommon.gmk
@@ -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

/Erik



More information about the build-dev mailing list