upstream fix for changed handling of include file open failures in

upcoming gmake 4.3; ok kurt@
This commit is contained in:
naddy 2020-02-01 15:06:24 +00:00
parent 97906a69df
commit 11b1187f19

View File

@ -0,0 +1,29 @@
$OpenBSD: patch-make_common_MakeBase_gmk,v 1.1 2020/02/01 15:06:24 naddy Exp $
gmake 4.3 changed the handling of include file open failures
https://hg.openjdk.java.net/jdk/jdk/rev/0743e1d49930
Index: make/common/MakeBase.gmk
--- make/common/MakeBase.gmk.orig
+++ make/common/MakeBase.gmk
@@ -974,15 +974,16 @@ DependOnVariableFileName = \
# Param 2 - (optional) name of file to store value in
DependOnVariableHelper = \
$(strip \
- $(eval -include $(call DependOnVariableFileName, $1, $2)) \
+ $(eval $1_filename := $(call DependOnVariableFileName, $1, $2)) \
+ $(if $(wildcard $($1_filename)), $(eval include $($1_filename))) \
$(if $(call equals, $(strip $($1)), $(strip $($1_old))),,\
- $(call MakeDir, $(dir $(call DependOnVariableFileName, $1, $2))) \
+ $(call MakeDir, $(dir $($1_filename))) \
$(if $(findstring $(LOG_LEVEL), trace), \
$(info NewVariable $1: >$(strip $($1))<) \
$(info OldVariable $1: >$(strip $($1_old))<)) \
$(call WriteFile, $1_old:=$(call DoubleDollar,$(call EscapeHash,$($1))), \
- $(call DependOnVariableFileName, $1, $2))) \
- $(call DependOnVariableFileName, $1, $2) \
+ $($1_filename))) \
+ $($1_filename) \
)
# Main macro