8199884: JDK-8199749 broke build with make 3.81

Reviewed-by: tbell
This commit is contained in:
Erik Joelsson 2018-03-20 17:42:20 -07:00
parent ce2fbabb94
commit dca38708e5
2 changed files with 7 additions and 2 deletions

View File

@ -67,6 +67,7 @@ endef
# 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
##############################

View File

@ -827,7 +827,9 @@ define SetupNativeCompilationBody
$$(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 @@ define SetupNativeCompilationBody
$$(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