diff options
Diffstat (limited to 'contrib/bmake/unit-tests/varname-make_print_var_on_error.mk')
-rw-r--r-- | contrib/bmake/unit-tests/varname-make_print_var_on_error.mk | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/contrib/bmake/unit-tests/varname-make_print_var_on_error.mk b/contrib/bmake/unit-tests/varname-make_print_var_on_error.mk index 9ea78cb2cb4a..3c498febc386 100644 --- a/contrib/bmake/unit-tests/varname-make_print_var_on_error.mk +++ b/contrib/bmake/unit-tests/varname-make_print_var_on_error.mk @@ -1,4 +1,4 @@ -# $NetBSD: varname-make_print_var_on_error.mk,v 1.4 2020/10/23 06:18:23 rillig Exp $ +# $NetBSD: varname-make_print_var_on_error.mk,v 1.5 2020/12/13 19:08:20 rillig Exp $ # # Tests for the special MAKE_PRINT_VAR_ON_ERROR variable, which prints the # values of selected variables on error. @@ -7,10 +7,17 @@ # since at the point where it is filled in PrintOnError, the first command in # gn->commands has been set to NULL already. This leaves .ERROR_CMD an empty # list. +# +# See also: +# compat-error.mk + +# XXX: As of 2020-12-13, PrintOnError calls Var_Subst with VAR_GLOBAL, which +# does not expand the node-local variables like .TARGET. This results in the +# double '${.TARGET}' in the output. MAKE_PRINT_VAR_ON_ERROR= .ERROR_TARGET .ERROR_CMD all: - @: command before - @echo fail; false - @: command after + @: before '${.TARGET}' '$${.TARGET}' '$$$${.TARGET}' + echo fail ${.TARGET}; false '${.TARGET}' '$${.TARGET}' '$$$${.TARGET}' + @: after '${.TARGET}' '$${.TARGET}' '$$$${.TARGET}' |