changeset 49735:f6ad4d73c834

8199884: JDK-8199749 broke build with make 3.81 Reviewed-by: tbell
author erikj
date Tue, 20 Mar 2018 17:42:20 -0700
parents 26c24703e547
children 7b35d2a59fb3
files make/common/MakeBase.gmk make/common/NativeCompilation.gmk
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/make/common/MakeBase.gmk	Tue Mar 20 11:29:16 2018 -0700
+++ b/make/common/MakeBase.gmk	Tue Mar 20 17:42:20 2018 -0700
@@ -67,6 +67,7 @@
 # In GNU Make 4.0 and higher, there is a file function for writing to files.
 ifeq (4.0, $(firstword $(sort 4.0 $(MAKE_VERSION))))
   HAS_FILE_FUNCTION := true
+  CORRECT_FUNCTION_IN_RECIPE_EVALUATION := true
 endif
 
 ##############################
--- a/make/common/NativeCompilation.gmk	Tue Mar 20 11:29:16 2018 -0700
+++ b/make/common/NativeCompilation.gmk	Tue Mar 20 17:42:20 2018 -0700
@@ -827,7 +827,9 @@
           $$(shell $(RM) $$($1_TARGET))
         endif
         $$($1_DEBUGINFO_FILES): $$($1_TARGET)
-		$$(if $$(wildcard $$@), , $$(error $$@ was not created for $$<))
+		$$(if $$(CORRECT_FUNCTION_IN_RECIPE_EVALUATION), \
+		  $$(if $$(wildcard $$@), , $$(error $$@ was not created for $$<)) \
+		)
 		$(TOUCH) $$@
 
         $1 += $$($1_DEBUGINFO_FILES)
@@ -875,7 +877,9 @@
         $$(shell $(RM) $$($1_TARGET))
       endif
       $$($1_IMPORT_LIBRARY): $$($1_TARGET)
-		$$(if $$(wildcard $$@), , $$(error $$@ was not created for $$<))
+		$$(if $$(CORRECT_FUNCTION_IN_RECIPE_EVALUATION), \
+		  $$(if $$(wildcard $$@), , $$(error $$@ was not created for $$<)) \
+		)
 		$(TOUCH) $$@
     endif