Module Name: src Committed By: rillig Date: Tue Aug 6 18:00:17 UTC 2024
Modified Files: src/usr.bin/make: cond.c src/usr.bin/make/unit-tests: cond-cmp-numeric-eq.exp cond-cmp-numeric-eq.mk cond-cmp-numeric.exp cond-cmp-numeric.mk cond-cmp-string.exp cond-cmp-string.mk cond-eof.exp cond-eof.mk cond-func-empty.exp cond-func-empty.mk cond-op-and.exp cond-op-and.mk cond-op-not.exp cond-op-not.mk cond-op-or.exp cond-op-or.mk cond-op-parentheses.exp cond-op-parentheses.mk cond-op.exp cond-op.mk cond-token-number.exp cond-token-number.mk cond-token-plain.exp cond-token-plain.mk cond-token-string.exp cond-token-string.mk cond-token-var.exp cond-token-var.mk cond-undef-lint.exp cond-undef-lint.mk directive-if.exp directive-if.mk directive-include-fatal.exp directive-include-fatal.mk opt-debug-lint.exp opt-debug-lint.mk var-eval-short.exp var-eval-short.mk vardebug.exp vardebug.mk varmod-edge.exp varmod-edge.mk varmod-gmtime.exp varmod-gmtime.mk varmod-ifelse.exp varmod-ifelse.mk varmod-localtime.exp varmod-localtime.mk varmod-loop-varname.exp varmod-loop-varname.mk varmod-match.exp varmod-match.mk varmod-mtime.exp varmod-mtime.mk varmod-order.exp varmod-order.mk varmod-range.exp varmod-range.mk varmod-sysv.exp varmod-sysv.mk varmod-to-separator.exp varmod-to-separator.mk varmod.exp varmod.mk varparse-dynamic.exp varparse-dynamic.mk Log Message: make: in error message about conditionals, use single quotes Single quotes are used less often in the conditionals themselves, which leads to fewer confusions. To generate a diff of this commit: cvs rdiff -u -r1.367 -r1.368 src/usr.bin/make/cond.c cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/cond-cmp-numeric-eq.exp \ src/usr.bin/make/unit-tests/cond-eof.exp \ src/usr.bin/make/unit-tests/cond-op-and.exp cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/cond-cmp-numeric-eq.mk \ src/usr.bin/make/unit-tests/cond-cmp-numeric.mk \ src/usr.bin/make/unit-tests/cond-func-empty.exp \ src/usr.bin/make/unit-tests/cond-op-parentheses.exp \ src/usr.bin/make/unit-tests/cond-op-parentheses.mk cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/cond-cmp-numeric.exp \ src/usr.bin/make/unit-tests/cond-op-and.mk \ src/usr.bin/make/unit-tests/cond-token-number.mk \ src/usr.bin/make/unit-tests/varmod-loop-varname.exp cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/cond-cmp-string.exp \ src/usr.bin/make/unit-tests/cond-op.exp \ src/usr.bin/make/unit-tests/varmod-range.mk cvs rdiff -u -r1.19 -r1.20 src/usr.bin/make/unit-tests/cond-cmp-string.mk \ src/usr.bin/make/unit-tests/cond-token-plain.mk \ src/usr.bin/make/unit-tests/varmod-sysv.mk cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/cond-eof.mk \ src/usr.bin/make/unit-tests/cond-op-not.exp \ src/usr.bin/make/unit-tests/cond-op-or.exp \ src/usr.bin/make/unit-tests/cond-undef-lint.exp cvs rdiff -u -r1.25 -r1.26 src/usr.bin/make/unit-tests/cond-func-empty.mk cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/cond-op-not.mk \ src/usr.bin/make/unit-tests/cond-token-number.exp \ src/usr.bin/make/unit-tests/cond-token-var.mk \ src/usr.bin/make/unit-tests/varparse-dynamic.mk cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/cond-op-or.mk \ src/usr.bin/make/unit-tests/directive-if.mk cvs rdiff -u -r1.16 -r1.17 src/usr.bin/make/unit-tests/cond-op.mk \ src/usr.bin/make/unit-tests/varmod-to-separator.exp cvs rdiff -u -r1.20 -r1.21 src/usr.bin/make/unit-tests/cond-token-plain.exp \ src/usr.bin/make/unit-tests/opt-debug-lint.exp \ src/usr.bin/make/unit-tests/varmod-gmtime.exp \ src/usr.bin/make/unit-tests/varmod-match.exp cvs rdiff -u -r1.14 -r1.15 src/usr.bin/make/unit-tests/cond-token-string.exp \ src/usr.bin/make/unit-tests/var-eval-short.mk \ src/usr.bin/make/unit-tests/varmod-order.exp \ src/usr.bin/make/unit-tests/varmod-sysv.exp cvs rdiff -u -r1.11 -r1.12 src/usr.bin/make/unit-tests/cond-token-string.mk \ src/usr.bin/make/unit-tests/directive-if.exp \ src/usr.bin/make/unit-tests/vardebug.mk \ src/usr.bin/make/unit-tests/varmod-mtime.mk cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/cond-token-var.exp \ src/usr.bin/make/unit-tests/cond-undef-lint.mk \ src/usr.bin/make/unit-tests/directive-include-fatal.exp \ src/usr.bin/make/unit-tests/directive-include-fatal.mk cvs rdiff -u -r1.18 -r1.19 src/usr.bin/make/unit-tests/opt-debug-lint.mk \ src/usr.bin/make/unit-tests/varmod-to-separator.mk \ src/usr.bin/make/unit-tests/varmod.mk cvs rdiff -u -r1.29 -r1.30 src/usr.bin/make/unit-tests/var-eval-short.exp \ src/usr.bin/make/unit-tests/varmod-edge.mk cvs rdiff -u -r1.36 -r1.37 src/usr.bin/make/unit-tests/vardebug.exp cvs rdiff -u -r1.26 -r1.27 src/usr.bin/make/unit-tests/varmod-edge.exp \ src/usr.bin/make/unit-tests/varmod-match.mk cvs rdiff -u -r1.24 -r1.25 src/usr.bin/make/unit-tests/varmod-gmtime.mk cvs rdiff -u -r1.23 -r1.24 src/usr.bin/make/unit-tests/varmod-ifelse.exp cvs rdiff -u -r1.32 -r1.33 src/usr.bin/make/unit-tests/varmod-ifelse.mk cvs rdiff -u -r1.17 -r1.18 src/usr.bin/make/unit-tests/varmod-localtime.exp \ src/usr.bin/make/unit-tests/varmod-localtime.mk cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/varmod-loop-varname.mk \ src/usr.bin/make/unit-tests/varmod-mtime.exp cvs rdiff -u -r1.15 -r1.16 src/usr.bin/make/unit-tests/varmod-order.mk \ src/usr.bin/make/unit-tests/varmod-range.exp \ src/usr.bin/make/unit-tests/varmod.exp cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/varparse-dynamic.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/cond.c diff -u src/usr.bin/make/cond.c:1.367 src/usr.bin/make/cond.c:1.368 --- src/usr.bin/make/cond.c:1.367 Tue Aug 6 17:46:01 2024 +++ src/usr.bin/make/cond.c Tue Aug 6 18:00:16 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.367 2024/08/06 17:46:01 rillig Exp $ */ +/* $NetBSD: cond.c,v 1.368 2024/08/06 18:00:16 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -91,7 +91,7 @@ #include "dir.h" /* "@(#)cond.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: cond.c,v 1.367 2024/08/06 17:46:01 rillig Exp $"); +MAKE_RCSID("$NetBSD: cond.c,v 1.368 2024/08/06 18:00:16 rillig Exp $"); /* * Conditional expressions conform to this grammar: @@ -940,7 +940,7 @@ CondEvalExpression(const char *cond, boo rval = CR_ERROR; if (rval == CR_ERROR && eprint && !par.printedError) - Parse_Error(PARSE_FATAL, "Malformed conditional (%s)", cond); + Parse_Error(PARSE_FATAL, "Malformed conditional '%s'", cond); return rval; } Index: src/usr.bin/make/unit-tests/cond-cmp-numeric-eq.exp diff -u src/usr.bin/make/unit-tests/cond-cmp-numeric-eq.exp:1.5 src/usr.bin/make/unit-tests/cond-cmp-numeric-eq.exp:1.6 --- src/usr.bin/make/unit-tests/cond-cmp-numeric-eq.exp:1.5 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/cond-cmp-numeric-eq.exp Tue Aug 6 18:00:16 2024 @@ -1,5 +1,5 @@ -make: "cond-cmp-numeric-eq.mk" line 68: Malformed conditional (!(12345 = 12345)) -make: "cond-cmp-numeric-eq.mk" line 76: Malformed conditional (!(12345 === 12345)) +make: "cond-cmp-numeric-eq.mk" line 68: Malformed conditional '!(12345 = 12345)' +make: "cond-cmp-numeric-eq.mk" line 76: Malformed conditional '!(12345 === 12345)' make: Fatal errors encountered -- cannot continue make: stopped in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/cond-eof.exp diff -u src/usr.bin/make/unit-tests/cond-eof.exp:1.5 src/usr.bin/make/unit-tests/cond-eof.exp:1.6 --- src/usr.bin/make/unit-tests/cond-eof.exp:1.5 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/cond-eof.exp Tue Aug 6 18:00:16 2024 @@ -1,6 +1,6 @@ -make: "cond-eof.mk" line 17: Malformed conditional (0 ${SIDE_EFFECT} ${SIDE_EFFECT2}) -make: "cond-eof.mk" line 20: Malformed conditional (1 ${SIDE_EFFECT} ${SIDE_EFFECT2}) -make: "cond-eof.mk" line 23: Malformed conditional ((0) ${SIDE_EFFECT} ${SIDE_EFFECT2}) +make: "cond-eof.mk" line 17: Malformed conditional '0 ${SIDE_EFFECT} ${SIDE_EFFECT2}' +make: "cond-eof.mk" line 20: Malformed conditional '1 ${SIDE_EFFECT} ${SIDE_EFFECT2}' +make: "cond-eof.mk" line 23: Malformed conditional '(0) ${SIDE_EFFECT} ${SIDE_EFFECT2}' make: Fatal errors encountered -- cannot continue make: stopped in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/cond-op-and.exp diff -u src/usr.bin/make/unit-tests/cond-op-and.exp:1.5 src/usr.bin/make/unit-tests/cond-op-and.exp:1.6 --- src/usr.bin/make/unit-tests/cond-op-and.exp:1.5 Sat Jul 6 21:21:10 2024 +++ src/usr.bin/make/unit-tests/cond-op-and.exp Tue Aug 6 18:00:16 2024 @@ -1,6 +1,6 @@ -make: "cond-op-and.mk" line 36: Malformed conditional (0 || (${DEF} && ${UNDEF})) -make: "cond-op-and.mk" line 41: Malformed conditional (0 || (${UNDEF} && ${UNDEF})) -make: "cond-op-and.mk" line 44: Malformed conditional (0 || (!${UNDEF} && ${UNDEF})) +make: "cond-op-and.mk" line 36: Malformed conditional '0 || (${DEF} && ${UNDEF})' +make: "cond-op-and.mk" line 41: Malformed conditional '0 || (${UNDEF} && ${UNDEF})' +make: "cond-op-and.mk" line 44: Malformed conditional '0 || (!${UNDEF} && ${UNDEF})' make: "cond-op-and.mk" line 60: Unknown operator '&' make: "cond-op-and.mk" line 66: Unknown operator '&' make: "cond-op-and.mk" line 72: Unknown operator '&' Index: src/usr.bin/make/unit-tests/cond-cmp-numeric-eq.mk diff -u src/usr.bin/make/unit-tests/cond-cmp-numeric-eq.mk:1.7 src/usr.bin/make/unit-tests/cond-cmp-numeric-eq.mk:1.8 --- src/usr.bin/make/unit-tests/cond-cmp-numeric-eq.mk:1.7 Thu Sep 7 05:36:33 2023 +++ src/usr.bin/make/unit-tests/cond-cmp-numeric-eq.mk Tue Aug 6 18:00:16 2024 @@ -1,4 +1,4 @@ -# $NetBSD: cond-cmp-numeric-eq.mk,v 1.7 2023/09/07 05:36:33 rillig Exp $ +# $NetBSD: cond-cmp-numeric-eq.mk,v 1.8 2024/08/06 18:00:16 rillig Exp $ # # Tests for numeric comparisons with the == operator in .if conditions. @@ -64,7 +64,7 @@ .endif # There is no = operator for numbers. -# expect+1: Malformed conditional (!(12345 = 12345)) +# expect+1: Malformed conditional '!(12345 = 12345)' .if !(12345 = 12345) . error .else @@ -72,7 +72,7 @@ .endif # There is no === operator for numbers either. -# expect+1: Malformed conditional (!(12345 === 12345)) +# expect+1: Malformed conditional '!(12345 === 12345)' .if !(12345 === 12345) . error .else Index: src/usr.bin/make/unit-tests/cond-cmp-numeric.mk diff -u src/usr.bin/make/unit-tests/cond-cmp-numeric.mk:1.7 src/usr.bin/make/unit-tests/cond-cmp-numeric.mk:1.8 --- src/usr.bin/make/unit-tests/cond-cmp-numeric.mk:1.7 Sat Mar 4 08:07:29 2023 +++ src/usr.bin/make/unit-tests/cond-cmp-numeric.mk Tue Aug 6 18:00:16 2024 @@ -1,4 +1,4 @@ -# $NetBSD: cond-cmp-numeric.mk,v 1.7 2023/03/04 08:07:29 rillig Exp $ +# $NetBSD: cond-cmp-numeric.mk,v 1.8 2024/08/06 18:00:16 rillig Exp $ # # Tests for numeric comparisons in .if conditions. # @@ -34,7 +34,7 @@ # whether the operator is valid, leaving the rest of the work to the # evaluation functions EvalCompareNum and EvalCompareStr. Ensure that this # parse error is properly reported. -# expect+1: Malformed conditional (123 ! 123) +# expect+1: Malformed conditional '123 ! 123' .if 123 ! 123 . error .else Index: src/usr.bin/make/unit-tests/cond-func-empty.exp diff -u src/usr.bin/make/unit-tests/cond-func-empty.exp:1.7 src/usr.bin/make/unit-tests/cond-func-empty.exp:1.8 --- src/usr.bin/make/unit-tests/cond-func-empty.exp:1.7 Wed Jun 28 06:15:42 2023 +++ src/usr.bin/make/unit-tests/cond-func-empty.exp Tue Aug 6 18:00:16 2024 @@ -1,5 +1,5 @@ make: "cond-func-empty.mk" line 168: Unclosed variable "WORD" -make: "cond-func-empty.mk" line 168: Malformed conditional (empty(WORD) +make: "cond-func-empty.mk" line 168: Malformed conditional 'empty(WORD' make: Fatal errors encountered -- cannot continue make: stopped in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/cond-op-parentheses.exp diff -u src/usr.bin/make/unit-tests/cond-op-parentheses.exp:1.7 src/usr.bin/make/unit-tests/cond-op-parentheses.exp:1.8 --- src/usr.bin/make/unit-tests/cond-op-parentheses.exp:1.7 Thu Jul 4 20:18:40 2024 +++ src/usr.bin/make/unit-tests/cond-op-parentheses.exp Tue Aug 6 18:00:17 2024 @@ -1,7 +1,7 @@ make: "cond-op-parentheses.mk" line 22: Comparison with '>' requires both operands '3' and '(2' to be numeric -make: "cond-op-parentheses.mk" line 25: Malformed conditional ((3) > 2) -make: "cond-op-parentheses.mk" line 44: Malformed conditional (() -make: "cond-op-parentheses.mk" line 58: Malformed conditional ()) +make: "cond-op-parentheses.mk" line 25: Malformed conditional '(3) > 2' +make: "cond-op-parentheses.mk" line 44: Malformed conditional '(' +make: "cond-op-parentheses.mk" line 58: Malformed conditional ')' make: Fatal errors encountered -- cannot continue make: stopped making "all" in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/cond-op-parentheses.mk diff -u src/usr.bin/make/unit-tests/cond-op-parentheses.mk:1.7 src/usr.bin/make/unit-tests/cond-op-parentheses.mk:1.8 --- src/usr.bin/make/unit-tests/cond-op-parentheses.mk:1.7 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/cond-op-parentheses.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: cond-op-parentheses.mk,v 1.7 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: cond-op-parentheses.mk,v 1.8 2024/08/06 18:00:17 rillig Exp $ # # Tests for parentheses in .if conditions, which group expressions to override # the precedence of the operators '!', '&&' and '||'. Parentheses cannot be @@ -21,7 +21,7 @@ # expect+1: Comparison with '>' requires both operands '3' and '(2' to be numeric .if 3 > (2) .endif -# expect+1: Malformed conditional ((3) > 2) +# expect+1: Malformed conditional '(3) > 2' .if (3) > 2 .endif @@ -40,7 +40,7 @@ .endif # An unbalanced opening parenthesis is a parse error. -# expect+1: Malformed conditional (() +# expect+1: Malformed conditional '(' .if ( . error .else @@ -54,7 +54,7 @@ # TOK_TRUE, TOK_FALSE or TOK_ERROR. In cond.c 1.241, the return type of that # function was changed to a properly restricted enum type, to prevent this bug # from occurring again. -# expect+1: Malformed conditional ()) +# expect+1: Malformed conditional ')' .if ) . error .else Index: src/usr.bin/make/unit-tests/cond-cmp-numeric.exp diff -u src/usr.bin/make/unit-tests/cond-cmp-numeric.exp:1.10 src/usr.bin/make/unit-tests/cond-cmp-numeric.exp:1.11 --- src/usr.bin/make/unit-tests/cond-cmp-numeric.exp:1.10 Thu Jul 4 20:18:40 2024 +++ src/usr.bin/make/unit-tests/cond-cmp-numeric.exp Tue Aug 6 18:00:16 2024 @@ -5,7 +5,7 @@ make: "cond-cmp-numeric.mk" line 21: Com CondParser_Eval: !(${:UNaN} == NaN) Comparing "NaN" == "NaN" CondParser_Eval: 123 ! 123 -make: "cond-cmp-numeric.mk" line 38: Malformed conditional (123 ! 123) +make: "cond-cmp-numeric.mk" line 38: Malformed conditional '123 ! 123' CondParser_Eval: ${:U 123} < 124 Comparing 123.000000 < 124.000000 CondParser_Eval: ${:U123 } < 124 Index: src/usr.bin/make/unit-tests/cond-op-and.mk diff -u src/usr.bin/make/unit-tests/cond-op-and.mk:1.10 src/usr.bin/make/unit-tests/cond-op-and.mk:1.11 --- src/usr.bin/make/unit-tests/cond-op-and.mk:1.10 Sat Jul 6 21:21:10 2024 +++ src/usr.bin/make/unit-tests/cond-op-and.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: cond-op-and.mk,v 1.10 2024/07/06 21:21:10 rillig Exp $ +# $NetBSD: cond-op-and.mk,v 1.11 2024/08/06 18:00:17 rillig Exp $ # # Tests for the && operator in .if conditions. @@ -32,15 +32,15 @@ # Test combinations of outer '||' with inner '&&', to ensure that the operands # of the inner '&&' are only evaluated if necessary. DEF= defined -# expect+1: Malformed conditional (0 || (${DEF} && ${UNDEF})) +# expect+1: Malformed conditional '0 || (${DEF} && ${UNDEF})' .if 0 || (${DEF} && ${UNDEF}) .endif .if 0 || (!${DEF} && ${UNDEF}) .endif -# expect+1: Malformed conditional (0 || (${UNDEF} && ${UNDEF})) +# expect+1: Malformed conditional '0 || (${UNDEF} && ${UNDEF})' .if 0 || (${UNDEF} && ${UNDEF}) .endif -# expect+1: Malformed conditional (0 || (!${UNDEF} && ${UNDEF})) +# expect+1: Malformed conditional '0 || (!${UNDEF} && ${UNDEF})' .if 0 || (!${UNDEF} && ${UNDEF}) .endif .if 1 || (${DEF} && ${UNDEF}) Index: src/usr.bin/make/unit-tests/cond-token-number.mk diff -u src/usr.bin/make/unit-tests/cond-token-number.mk:1.10 src/usr.bin/make/unit-tests/cond-token-number.mk:1.11 --- src/usr.bin/make/unit-tests/cond-token-number.mk:1.10 Sun Nov 19 21:47:52 2023 +++ src/usr.bin/make/unit-tests/cond-token-number.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: cond-token-number.mk,v 1.10 2023/11/19 21:47:52 rillig Exp $ +# $NetBSD: cond-token-number.mk,v 1.11 2024/08/06 18:00:17 rillig Exp $ # # Tests for number tokens in .if conditions. # @@ -12,7 +12,7 @@ # accepted by the condition parser. # # See the ch_isdigit call in CondParser_String. -# expect+1: Malformed conditional (-0) +# expect+1: Malformed conditional '-0' .if -0 . error .else @@ -23,7 +23,7 @@ # accepted by the condition parser. # # See the ch_isdigit call in CondParser_String. -# expect+1: Malformed conditional (+0) +# expect+1: Malformed conditional '+0' .if +0 . error .else @@ -34,7 +34,7 @@ # accepted by the condition parser. # # See the ch_isdigit call in CondParser_String. -# expect+1: Malformed conditional (!-1) +# expect+1: Malformed conditional '!-1' .if !-1 . error .else @@ -45,7 +45,7 @@ # accepted by the condition parser. # # See the ch_isdigit call in CondParser_String. -# expect+1: Malformed conditional (!+1) +# expect+1: Malformed conditional '!+1' .if !+1 . error .else Index: src/usr.bin/make/unit-tests/varmod-loop-varname.exp diff -u src/usr.bin/make/unit-tests/varmod-loop-varname.exp:1.10 src/usr.bin/make/unit-tests/varmod-loop-varname.exp:1.11 --- src/usr.bin/make/unit-tests/varmod-loop-varname.exp:1.10 Fri Jul 5 19:47:22 2024 +++ src/usr.bin/make/unit-tests/varmod-loop-varname.exp Tue Aug 6 18:00:17 2024 @@ -1,11 +1,11 @@ make: "varmod-loop-varname.mk" line 18: while evaluating "${:Uone two three:@${:Ubar:S,b,v,}@+${var}+@} != "+one+ +two+ +three+"" with value "one two three": In the :@ modifier, the variable name "${:Ubar:S,b,v,}" must not contain a dollar -make: "varmod-loop-varname.mk" line 18: Malformed conditional (${:Uone two three:@${:Ubar:S,b,v,}@+${var}+@} != "+one+ +two+ +three+") +make: "varmod-loop-varname.mk" line 18: Malformed conditional '${:Uone two three:@${:Ubar:S,b,v,}@+${var}+@} != "+one+ +two+ +three+"' make: "varmod-loop-varname.mk" line 89: while evaluating variable "1 2 3" with value "1 2 3": In the :@ modifier, the variable name "v$" must not contain a dollar -make: "varmod-loop-varname.mk" line 89: Malformed conditional (${1 2 3:L:@v$@($v)@} != "(1) (2) (3)") +make: "varmod-loop-varname.mk" line 89: Malformed conditional '${1 2 3:L:@v$@($v)@} != "(1) (2) (3)"' make: "varmod-loop-varname.mk" line 96: while evaluating variable "1 2 3" with value "1 2 3": In the :@ modifier, the variable name "v$$" must not contain a dollar -make: "varmod-loop-varname.mk" line 96: Malformed conditional (${1 2 3:L:@v$$@($v)@} != "() () ()") +make: "varmod-loop-varname.mk" line 96: Malformed conditional '${1 2 3:L:@v$$@($v)@} != "() () ()"' make: "varmod-loop-varname.mk" line 103: while evaluating variable "1 2 3" with value "1 2 3": In the :@ modifier, the variable name "v$$$" must not contain a dollar -make: "varmod-loop-varname.mk" line 103: Malformed conditional (${1 2 3:L:@v$$$@($v)@} != "() () ()") +make: "varmod-loop-varname.mk" line 103: Malformed conditional '${1 2 3:L:@v$$$@($v)@} != "() () ()"' make: Fatal errors encountered -- cannot continue make: stopped making "all" in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/cond-cmp-string.exp diff -u src/usr.bin/make/unit-tests/cond-cmp-string.exp:1.13 src/usr.bin/make/unit-tests/cond-cmp-string.exp:1.14 --- src/usr.bin/make/unit-tests/cond-cmp-string.exp:1.13 Tue Mar 28 14:38:29 2023 +++ src/usr.bin/make/unit-tests/cond-cmp-string.exp Tue Aug 6 18:00:16 2024 @@ -1,7 +1,7 @@ -make: "cond-cmp-string.mk" line 19: Malformed conditional (str != str) -make: "cond-cmp-string.mk" line 44: Malformed conditional ("string" != "str""ing") -make: "cond-cmp-string.mk" line 52: Malformed conditional (!("value" = "value")) -make: "cond-cmp-string.mk" line 60: Malformed conditional (!("value" === "value")) +make: "cond-cmp-string.mk" line 19: Malformed conditional 'str != str' +make: "cond-cmp-string.mk" line 44: Malformed conditional '"string" != "str""ing"' +make: "cond-cmp-string.mk" line 52: Malformed conditional '!("value" = "value")' +make: "cond-cmp-string.mk" line 60: Malformed conditional '!("value" === "value")' make: "cond-cmp-string.mk" line 118: Comparison with '<' requires both operands 'string' and 'string' to be numeric make: "cond-cmp-string.mk" line 126: Comparison with '<=' requires both operands 'string' and 'string' to be numeric make: "cond-cmp-string.mk" line 134: Comparison with '>' requires both operands 'string' and 'string' to be numeric Index: src/usr.bin/make/unit-tests/cond-op.exp diff -u src/usr.bin/make/unit-tests/cond-op.exp:1.13 src/usr.bin/make/unit-tests/cond-op.exp:1.14 --- src/usr.bin/make/unit-tests/cond-op.exp:1.13 Thu Jul 4 20:18:40 2024 +++ src/usr.bin/make/unit-tests/cond-op.exp Tue Aug 6 18:00:17 2024 @@ -1,7 +1,7 @@ -make: "cond-op.mk" line 51: Malformed conditional ("!word" == !word) -make: "cond-op.mk" line 72: Malformed conditional (0 ${ERR::=evaluated}) +make: "cond-op.mk" line 51: Malformed conditional '"!word" == !word' +make: "cond-op.mk" line 72: Malformed conditional '0 ${ERR::=evaluated}' make: "cond-op.mk" line 77: A misplaced expression after 0 is not evaluated. -make: "cond-op.mk" line 82: Malformed conditional (1 ${ERR::=evaluated}) +make: "cond-op.mk" line 82: Malformed conditional '1 ${ERR::=evaluated}' make: "cond-op.mk" line 87: A misplaced expression after 1 is not evaluated. make: "cond-op.mk" line 93: A B C => (A || B) && C A || B && C A || (B && C) make: "cond-op.mk" line 108: 0 0 0 => 0 0 0 @@ -12,10 +12,10 @@ make: "cond-op.mk" line 108: 1 0 0 => make: "cond-op.mk" line 108: 1 0 1 => 1 1 1 make: "cond-op.mk" line 108: 1 1 0 => 0 1 1 make: "cond-op.mk" line 108: 1 1 1 => 1 1 1 -make: "cond-op.mk" line 120: Malformed conditional (1 &&) -make: "cond-op.mk" line 129: Malformed conditional (0 &&) -make: "cond-op.mk" line 138: Malformed conditional (1 ||) -make: "cond-op.mk" line 148: Malformed conditional (0 ||) +make: "cond-op.mk" line 120: Malformed conditional '1 &&' +make: "cond-op.mk" line 129: Malformed conditional '0 &&' +make: "cond-op.mk" line 138: Malformed conditional '1 ||' +make: "cond-op.mk" line 148: Malformed conditional '0 ||' make: Fatal errors encountered -- cannot continue make: stopped making "all" in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/varmod-range.mk diff -u src/usr.bin/make/unit-tests/varmod-range.mk:1.13 src/usr.bin/make/unit-tests/varmod-range.mk:1.14 --- src/usr.bin/make/unit-tests/varmod-range.mk:1.13 Fri Jul 5 19:47:22 2024 +++ src/usr.bin/make/unit-tests/varmod-range.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-range.mk,v 1.13 2024/07/05 19:47:22 rillig Exp $ +# $NetBSD: varmod-range.mk,v 1.14 2024/08/06 18:00:17 rillig Exp $ # # Tests for the :range variable modifier, which generates sequences # of integers from the given range. @@ -39,7 +39,7 @@ # XXX: As of 2023-12-17, the ':range=n' modifier does not turn the undefined # expression into a defined one, even though it does not depend on the value # of the expression. This looks like an oversight. -# expect+1: Malformed conditional (${:range=5} != "") +# expect+1: Malformed conditional '${:range=5} != ""' .if ${:range=5} != "" . error .else @@ -63,7 +63,7 @@ # Since 2020-11-01, the parser issues a more precise "Invalid number" error # instead. # expect+2: while evaluating "${:U:range=x}Rest" != "Rest"" with value "": Invalid number "x}Rest" != "Rest"" for ':range' modifier -# expect+1: Malformed conditional ("${:U:range=x}Rest" != "Rest") +# expect+1: Malformed conditional '"${:U:range=x}Rest" != "Rest"' .if "${:U:range=x}Rest" != "Rest" . error .else @@ -74,7 +74,7 @@ # This parse error stops at the 'x', trying to parse it as a variable # modifier. # expect+2: while evaluating "${:U:range=0x0}Rest" != "Rest"" with value "1": Unknown modifier "x0" -# expect+1: Malformed conditional ("${:U:range=0x0}Rest" != "Rest") +# expect+1: Malformed conditional '"${:U:range=0x0}Rest" != "Rest"' .if "${:U:range=0x0}Rest" != "Rest" . error .else @@ -92,7 +92,7 @@ # modifier name too short # expect+2: while evaluating variable "a b c" with value "a b c": Unknown modifier "rang" -# expect+1: Malformed conditional ("${a b c:L:rang}Rest" != "Rest") +# expect+1: Malformed conditional '"${a b c:L:rang}Rest" != "Rest"' .if "${a b c:L:rang}Rest" != "Rest" . error .else @@ -101,7 +101,7 @@ # misspelled modifier name # expect+2: while evaluating variable "a b c" with value "a b c": Unknown modifier "rango" -# expect+1: Malformed conditional ("${a b c:L:rango}Rest" != "Rest") +# expect+1: Malformed conditional '"${a b c:L:rango}Rest" != "Rest"' .if "${a b c:L:rango}Rest" != "Rest" . error .else @@ -110,7 +110,7 @@ # modifier name too long # expect+2: while evaluating variable "a b c" with value "a b c": Unknown modifier "ranger" -# expect+1: Malformed conditional ("${a b c:L:ranger}Rest" != "Rest") +# expect+1: Malformed conditional '"${a b c:L:ranger}Rest" != "Rest"' .if "${a b c:L:ranger}Rest" != "Rest" . error .else Index: src/usr.bin/make/unit-tests/cond-cmp-string.mk diff -u src/usr.bin/make/unit-tests/cond-cmp-string.mk:1.19 src/usr.bin/make/unit-tests/cond-cmp-string.mk:1.20 --- src/usr.bin/make/unit-tests/cond-cmp-string.mk:1.19 Tue Apr 23 22:51:28 2024 +++ src/usr.bin/make/unit-tests/cond-cmp-string.mk Tue Aug 6 18:00:16 2024 @@ -1,4 +1,4 @@ -# $NetBSD: cond-cmp-string.mk,v 1.19 2024/04/23 22:51:28 rillig Exp $ +# $NetBSD: cond-cmp-string.mk,v 1.20 2024/08/06 18:00:16 rillig Exp $ # # Tests for string comparisons in .if conditions. @@ -15,7 +15,7 @@ # The left-hand side of the comparison must be enclosed in quotes. # This one is not enclosed in quotes and thus generates an error message. -# expect+1: Malformed conditional (str != str) +# expect+1: Malformed conditional 'str != str' .if str != str . error .endif @@ -40,7 +40,7 @@ # It is not possible to concatenate two string literals to form a single # string. In C, Python and the shell this is possible, but not in make. -# expect+1: Malformed conditional ("string" != "str""ing") +# expect+1: Malformed conditional '"string" != "str""ing"' .if "string" != "str""ing" . error .else @@ -48,7 +48,7 @@ .endif # There is no = operator for strings. -# expect+1: Malformed conditional (!("value" = "value")) +# expect+1: Malformed conditional '!("value" = "value")' .if !("value" = "value") . error .else @@ -56,7 +56,7 @@ .endif # There is no === operator for strings either. -# expect+1: Malformed conditional (!("value" === "value")) +# expect+1: Malformed conditional '!("value" === "value")' .if !("value" === "value") . error .else Index: src/usr.bin/make/unit-tests/cond-token-plain.mk diff -u src/usr.bin/make/unit-tests/cond-token-plain.mk:1.19 src/usr.bin/make/unit-tests/cond-token-plain.mk:1.20 --- src/usr.bin/make/unit-tests/cond-token-plain.mk:1.19 Sun Nov 19 21:47:52 2023 +++ src/usr.bin/make/unit-tests/cond-token-plain.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: cond-token-plain.mk,v 1.19 2023/11/19 21:47:52 rillig Exp $ +# $NetBSD: cond-token-plain.mk,v 1.20 2024/08/06 18:00:17 rillig Exp $ # # Tests for plain tokens (that is, string literals without quotes) # in .if conditions. These are also called bare words. @@ -156,7 +156,7 @@ VAR= defined # If the left-hand side is missing, it's a parse error as well, but without # a specific error message. -# expect+1: Malformed conditional (== "") +# expect+1: Malformed conditional '== ""' .if == "" . error .else @@ -193,7 +193,7 @@ ${:U\\\\}= backslash # FIXME: In CondParser_String, Var_Parse returns var_Error without a # corresponding error message. -# expect+1: Malformed conditional ($$$$$$$$ != "") +# expect+1: Malformed conditional '$$$$$$$$ != ""' .if $$$$$$$$ != "" . error .else @@ -202,18 +202,18 @@ ${:U\\\\}= backslash # In a condition in an .if directive, the left-hand side must not be an # unquoted string literal. -# expect+1: Malformed conditional (left == right) +# expect+1: Malformed conditional 'left == right' .if left == right .endif # Before cond.c 1.276 from 2021-09-21, an expression containing the # modifier ':?:' allowed unquoted string literals for the rest of the # condition. This was an unintended implementation mistake. -# expect+1: Malformed conditional (${0:?:} || left == right) +# expect+1: Malformed conditional '${0:?:} || left == right' .if ${0:?:} || left == right .endif # This affected only the comparisons after the expression, so the following # was still a syntax error. -# expect+1: Malformed conditional (left == right || ${0:?:}) +# expect+1: Malformed conditional 'left == right || ${0:?:}' .if left == right || ${0:?:} .endif @@ -232,7 +232,7 @@ ${:U\\\\}= backslash # for the second time. The right-hand side of a comparison may be a bare # word, but that side has no risk of being parsed more than once. # -# expect+1: Malformed conditional (VAR.${IF_COUNT::+=1} != "") +# expect+1: Malformed conditional 'VAR.${IF_COUNT::+=1} != ""' .if VAR.${IF_COUNT::+=1} != "" . error .else Index: src/usr.bin/make/unit-tests/varmod-sysv.mk diff -u src/usr.bin/make/unit-tests/varmod-sysv.mk:1.19 src/usr.bin/make/unit-tests/varmod-sysv.mk:1.20 --- src/usr.bin/make/unit-tests/varmod-sysv.mk:1.19 Thu Jul 4 17:47:54 2024 +++ src/usr.bin/make/unit-tests/varmod-sysv.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-sysv.mk,v 1.19 2024/07/04 17:47:54 rillig Exp $ +# $NetBSD: varmod-sysv.mk,v 1.20 2024/08/06 18:00:17 rillig Exp $ # # Tests for the variable modifier ':from=to', which replaces the suffix # "from" with "to". It can also use '%' as a wildcard. @@ -212,7 +212,7 @@ # error, while the correct error message would be "Unknown modifier" since # there is no modifier named "fromto". # expect+2: while evaluating variable "word216" with value "word216": Unfinished modifier ('=' missing) -# expect+1: Malformed conditional (${word216:L:from${:D=}to}) +# expect+1: Malformed conditional '${word216:L:from${:D=}to}' .if ${word216:L:from${:D=}to} . error .endif @@ -257,7 +257,7 @@ INDIRECT= 1:${VALUE} 2:$${VALUE} 4:$$$${ # The error case of an unfinished ':from=to' modifier after the '=' requires # an expression that is missing the closing '}'. # expect+2: while evaluating variable "error" with value "error": Unfinished modifier ('}' missing) -# expect+1: Malformed conditional (${error:L:from=$(})) +# expect+1: Malformed conditional '${error:L:from=$(})' .if ${error:L:from=$(}) .endif Index: src/usr.bin/make/unit-tests/cond-eof.mk diff -u src/usr.bin/make/unit-tests/cond-eof.mk:1.6 src/usr.bin/make/unit-tests/cond-eof.mk:1.7 --- src/usr.bin/make/unit-tests/cond-eof.mk:1.6 Sun Nov 19 21:47:52 2023 +++ src/usr.bin/make/unit-tests/cond-eof.mk Tue Aug 6 18:00:16 2024 @@ -1,4 +1,4 @@ -# $NetBSD: cond-eof.mk,v 1.6 2023/11/19 21:47:52 rillig Exp $ +# $NetBSD: cond-eof.mk,v 1.7 2024/08/06 18:00:16 rillig Exp $ # # Tests for parsing the end of '.if' conditions, which are represented as the # token TOK_EOF. @@ -13,12 +13,12 @@ SIDE_EFFECT2= ${:!echo 'side effect 2' 1 # These syntax errors are an edge case that does not occur during normal # operation. Still, it is easy to avoid evaluating these expressions, just in # case they have side effects. -# expect+1: Malformed conditional (0 ${SIDE_EFFECT} ${SIDE_EFFECT2}) +# expect+1: Malformed conditional '0 ${SIDE_EFFECT} ${SIDE_EFFECT2}' .if 0 ${SIDE_EFFECT} ${SIDE_EFFECT2} .endif -# expect+1: Malformed conditional (1 ${SIDE_EFFECT} ${SIDE_EFFECT2}) +# expect+1: Malformed conditional '1 ${SIDE_EFFECT} ${SIDE_EFFECT2}' .if 1 ${SIDE_EFFECT} ${SIDE_EFFECT2} .endif -# expect+1: Malformed conditional ((0) ${SIDE_EFFECT} ${SIDE_EFFECT2}) +# expect+1: Malformed conditional '(0) ${SIDE_EFFECT} ${SIDE_EFFECT2}' .if (0) ${SIDE_EFFECT} ${SIDE_EFFECT2} .endif Index: src/usr.bin/make/unit-tests/cond-op-not.exp diff -u src/usr.bin/make/unit-tests/cond-op-not.exp:1.6 src/usr.bin/make/unit-tests/cond-op-not.exp:1.7 --- src/usr.bin/make/unit-tests/cond-op-not.exp:1.6 Thu Jul 4 20:18:40 2024 +++ src/usr.bin/make/unit-tests/cond-op-not.exp Tue Aug 6 18:00:17 2024 @@ -3,7 +3,7 @@ make: "cond-op-not.mk" line 39: Not spac make: "cond-op-not.mk" line 44: Not 0 evaluates to true. make: "cond-op-not.mk" line 53: Not 1 evaluates to false. make: "cond-op-not.mk" line 60: Not word evaluates to false. -make: "cond-op-not.mk" line 65: Malformed conditional (!) +make: "cond-op-not.mk" line 65: Malformed conditional '!' make: Fatal errors encountered -- cannot continue make: stopped making "all" in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/cond-op-or.exp diff -u src/usr.bin/make/unit-tests/cond-op-or.exp:1.6 src/usr.bin/make/unit-tests/cond-op-or.exp:1.7 --- src/usr.bin/make/unit-tests/cond-op-or.exp:1.6 Sat Jul 6 21:21:10 2024 +++ src/usr.bin/make/unit-tests/cond-op-or.exp Tue Aug 6 18:00:17 2024 @@ -1,6 +1,6 @@ -make: "cond-op-or.mk" line 36: Malformed conditional (1 && (!${DEF} || ${UNDEF})) -make: "cond-op-or.mk" line 41: Malformed conditional (1 && (!${UNDEF} || ${UNDEF})) -make: "cond-op-or.mk" line 44: Malformed conditional (1 && (${UNDEF} || ${UNDEF})) +make: "cond-op-or.mk" line 36: Malformed conditional '1 && (!${DEF} || ${UNDEF})' +make: "cond-op-or.mk" line 41: Malformed conditional '1 && (!${UNDEF} || ${UNDEF})' +make: "cond-op-or.mk" line 44: Malformed conditional '1 && (${UNDEF} || ${UNDEF})' make: "cond-op-or.mk" line 60: Unknown operator '|' make: "cond-op-or.mk" line 66: Unknown operator '|' make: "cond-op-or.mk" line 72: Unknown operator '|' Index: src/usr.bin/make/unit-tests/cond-undef-lint.exp diff -u src/usr.bin/make/unit-tests/cond-undef-lint.exp:1.6 src/usr.bin/make/unit-tests/cond-undef-lint.exp:1.7 --- src/usr.bin/make/unit-tests/cond-undef-lint.exp:1.6 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/cond-undef-lint.exp Tue Aug 6 18:00:17 2024 @@ -1,10 +1,10 @@ make: "cond-undef-lint.mk" line 25: Variable "UNDEF" is undefined -make: "cond-undef-lint.mk" line 25: Malformed conditional (${UNDEF}) +make: "cond-undef-lint.mk" line 25: Malformed conditional '${UNDEF}' make: "cond-undef-lint.mk" line 43: Variable "UNDEF" is undefined make: "cond-undef-lint.mk" line 43: Variable "VAR." is undefined -make: "cond-undef-lint.mk" line 43: Malformed conditional (${VAR.${UNDEF}}) +make: "cond-undef-lint.mk" line 43: Malformed conditional '${VAR.${UNDEF}}' make: "cond-undef-lint.mk" line 56: Variable "VAR.defined" is undefined -make: "cond-undef-lint.mk" line 56: Malformed conditional (${VAR.${DEF}}) +make: "cond-undef-lint.mk" line 56: Malformed conditional '${VAR.${DEF}}' make: Fatal errors encountered -- cannot continue make: stopped in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/cond-func-empty.mk diff -u src/usr.bin/make/unit-tests/cond-func-empty.mk:1.25 src/usr.bin/make/unit-tests/cond-func-empty.mk:1.26 --- src/usr.bin/make/unit-tests/cond-func-empty.mk:1.25 Sun Jun 2 15:31:26 2024 +++ src/usr.bin/make/unit-tests/cond-func-empty.mk Tue Aug 6 18:00:16 2024 @@ -1,4 +1,4 @@ -# $NetBSD: cond-func-empty.mk,v 1.25 2024/06/02 15:31:26 rillig Exp $ +# $NetBSD: cond-func-empty.mk,v 1.26 2024/08/06 18:00:16 rillig Exp $ # # Tests for the empty() function in .if conditions, which tests an # expression for emptiness. @@ -164,7 +164,7 @@ ${:U WORD }= variable name with spaces .endif # expect+2: Unclosed variable "WORD" -# expect+1: Malformed conditional (empty(WORD) +# expect+1: Malformed conditional 'empty(WORD' .if empty(WORD . error .else Index: src/usr.bin/make/unit-tests/cond-op-not.mk diff -u src/usr.bin/make/unit-tests/cond-op-not.mk:1.8 src/usr.bin/make/unit-tests/cond-op-not.mk:1.9 --- src/usr.bin/make/unit-tests/cond-op-not.mk:1.8 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/cond-op-not.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: cond-op-not.mk,v 1.8 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: cond-op-not.mk,v 1.9 2024/08/06 18:00:17 rillig Exp $ # # Tests for the ! operator in .if conditions, which negates its argument. @@ -61,7 +61,7 @@ .endif # A single exclamation mark is a parse error. -# expect+1: Malformed conditional (!) +# expect+1: Malformed conditional '!' .if ! . error .else Index: src/usr.bin/make/unit-tests/cond-token-number.exp diff -u src/usr.bin/make/unit-tests/cond-token-number.exp:1.8 src/usr.bin/make/unit-tests/cond-token-number.exp:1.9 --- src/usr.bin/make/unit-tests/cond-token-number.exp:1.8 Thu Jul 4 20:18:40 2024 +++ src/usr.bin/make/unit-tests/cond-token-number.exp Tue Aug 6 18:00:17 2024 @@ -1,7 +1,7 @@ -make: "cond-token-number.mk" line 16: Malformed conditional (-0) -make: "cond-token-number.mk" line 27: Malformed conditional (+0) -make: "cond-token-number.mk" line 38: Malformed conditional (!-1) -make: "cond-token-number.mk" line 49: Malformed conditional (!+1) +make: "cond-token-number.mk" line 16: Malformed conditional '-0' +make: "cond-token-number.mk" line 27: Malformed conditional '+0' +make: "cond-token-number.mk" line 38: Malformed conditional '!-1' +make: "cond-token-number.mk" line 49: Malformed conditional '!+1' make: Fatal errors encountered -- cannot continue make: stopped making "all" in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/cond-token-var.mk diff -u src/usr.bin/make/unit-tests/cond-token-var.mk:1.8 src/usr.bin/make/unit-tests/cond-token-var.mk:1.9 --- src/usr.bin/make/unit-tests/cond-token-var.mk:1.8 Sun Nov 19 21:47:52 2023 +++ src/usr.bin/make/unit-tests/cond-token-var.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: cond-token-var.mk,v 1.8 2023/11/19 21:47:52 rillig Exp $ +# $NetBSD: cond-token-var.mk,v 1.9 2024/08/06 18:00:17 rillig Exp $ # # Tests for expressions in .if conditions. # @@ -24,13 +24,13 @@ DEF= defined .endif # A variable that appears on the left-hand side must be defined. -# expect+1: Malformed conditional (${UNDEF} == ${DEF}) +# expect+1: Malformed conditional '${UNDEF} == ${DEF}' .if ${UNDEF} == ${DEF} . error .endif # A variable that appears on the right-hand side must be defined. -# expect+1: Malformed conditional (${DEF} == ${UNDEF}) +# expect+1: Malformed conditional '${DEF} == ${UNDEF}' .if ${DEF} == ${UNDEF} . error .endif @@ -40,7 +40,7 @@ DEF= defined .endif # An undefined variable on its own generates a parse error. -# expect+1: Malformed conditional (${UNDEF}) +# expect+1: Malformed conditional '${UNDEF}' .if ${UNDEF} .endif Index: src/usr.bin/make/unit-tests/varparse-dynamic.mk diff -u src/usr.bin/make/unit-tests/varparse-dynamic.mk:1.8 src/usr.bin/make/unit-tests/varparse-dynamic.mk:1.9 --- src/usr.bin/make/unit-tests/varparse-dynamic.mk:1.8 Sun Nov 19 22:32:44 2023 +++ src/usr.bin/make/unit-tests/varparse-dynamic.mk Tue Aug 6 18:00:17 2024 @@ -1,14 +1,14 @@ -# $NetBSD: varparse-dynamic.mk,v 1.8 2023/11/19 22:32:44 rillig Exp $ +# $NetBSD: varparse-dynamic.mk,v 1.9 2024/08/06 18:00:17 rillig Exp $ # Before 2020-07-27, there was an off-by-one error in Var_Parse that skipped # the last character in the variable name. # To trigger the bug, the variable had to be undefined. .if ${.TARGET} # exact match, may be undefined .endif -# expect+1: Malformed conditional (${.TARGEX}) +# expect+1: Malformed conditional '${.TARGEX}' .if ${.TARGEX} # 1 character difference, must be defined .endif -# expect+1: Malformed conditional (${.TARGXX}) +# expect+1: Malformed conditional '${.TARGXX}' .if ${.TARGXX} # 2 characters difference, must be defined .endif Index: src/usr.bin/make/unit-tests/cond-op-or.mk diff -u src/usr.bin/make/unit-tests/cond-op-or.mk:1.12 src/usr.bin/make/unit-tests/cond-op-or.mk:1.13 --- src/usr.bin/make/unit-tests/cond-op-or.mk:1.12 Sat Jul 6 21:21:10 2024 +++ src/usr.bin/make/unit-tests/cond-op-or.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: cond-op-or.mk,v 1.12 2024/07/06 21:21:10 rillig Exp $ +# $NetBSD: cond-op-or.mk,v 1.13 2024/08/06 18:00:17 rillig Exp $ # # Tests for the || operator in .if conditions. @@ -32,15 +32,15 @@ # Test combinations of outer '&&' with inner '||', to ensure that the operands # of the inner '||' are only evaluated if necessary. DEF= defined -# expect+1: Malformed conditional (1 && (!${DEF} || ${UNDEF})) +# expect+1: Malformed conditional '1 && (!${DEF} || ${UNDEF})' .if 1 && (!${DEF} || ${UNDEF}) .endif .if 1 && (${DEF} || ${UNDEF}) .endif -# expect+1: Malformed conditional (1 && (!${UNDEF} || ${UNDEF})) +# expect+1: Malformed conditional '1 && (!${UNDEF} || ${UNDEF})' .if 1 && (!${UNDEF} || ${UNDEF}) .endif -# expect+1: Malformed conditional (1 && (${UNDEF} || ${UNDEF})) +# expect+1: Malformed conditional '1 && (${UNDEF} || ${UNDEF})' .if 1 && (${UNDEF} || ${UNDEF}) .endif .if 0 && (!${DEF} || ${UNDEF}) Index: src/usr.bin/make/unit-tests/directive-if.mk diff -u src/usr.bin/make/unit-tests/directive-if.mk:1.12 src/usr.bin/make/unit-tests/directive-if.mk:1.13 --- src/usr.bin/make/unit-tests/directive-if.mk:1.12 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/directive-if.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: directive-if.mk,v 1.12 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: directive-if.mk,v 1.13 2024/08/06 18:00:17 rillig Exp $ # # Tests for the .if directive. # @@ -51,7 +51,7 @@ .endif # Missing condition. -# expect+1: Malformed conditional () +# expect+1: Malformed conditional '' .if . error .else Index: src/usr.bin/make/unit-tests/cond-op.mk diff -u src/usr.bin/make/unit-tests/cond-op.mk:1.16 src/usr.bin/make/unit-tests/cond-op.mk:1.17 --- src/usr.bin/make/unit-tests/cond-op.mk:1.16 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/cond-op.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: cond-op.mk,v 1.16 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: cond-op.mk,v 1.17 2024/08/06 18:00:17 rillig Exp $ # # Tests for operators like &&, ||, ! in .if conditions. # @@ -47,7 +47,7 @@ # appear unquoted. If any, it must be enclosed in quotes. # In any case, it is not interpreted as a negation of an unquoted string. # See CondParser_String. -# expect+1: Malformed conditional ("!word" == !word) +# expect+1: Malformed conditional '"!word" == !word' .if "!word" == !word . error .endif @@ -68,7 +68,7 @@ # next token, even though in this position of the condition, only comparison # operators, TOK_AND, TOK_OR or TOK_RPAREN are allowed. .undef ERR -# expect+1: Malformed conditional (0 ${ERR::=evaluated}) +# expect+1: Malformed conditional '0 ${ERR::=evaluated}' .if 0 ${ERR::=evaluated} . error .endif @@ -78,7 +78,7 @@ .endif .undef ERR -# expect+1: Malformed conditional (1 ${ERR::=evaluated}) +# expect+1: Malformed conditional '1 ${ERR::=evaluated}' .if 1 ${ERR::=evaluated} . error .endif @@ -116,7 +116,7 @@ # This condition is obviously malformed. It is properly detected and also # was properly detected before 2021-01-19, but only because the left hand # side of the '&&' evaluated to true. -# expect+1: Malformed conditional (1 &&) +# expect+1: Malformed conditional '1 &&' .if 1 && . error .else @@ -125,7 +125,7 @@ # This obviously malformed condition was not detected as such before cond.c # 1.238 from 2021-01-19. -# expect+1: Malformed conditional (0 &&) +# expect+1: Malformed conditional '0 &&' .if 0 && . error .else @@ -134,7 +134,7 @@ # This obviously malformed condition was not detected as such before cond.c # 1.238 from 2021-01-19. -# expect+1: Malformed conditional (1 ||) +# expect+1: Malformed conditional '1 ||' .if 1 || . error .else @@ -144,7 +144,7 @@ # This condition is obviously malformed. It is properly detected and also # was properly detected before 2021-01-19, but only because the left hand # side of the '||' evaluated to false. -# expect+1: Malformed conditional (0 ||) +# expect+1: Malformed conditional '0 ||' .if 0 || . error .else Index: src/usr.bin/make/unit-tests/varmod-to-separator.exp diff -u src/usr.bin/make/unit-tests/varmod-to-separator.exp:1.16 src/usr.bin/make/unit-tests/varmod-to-separator.exp:1.17 --- src/usr.bin/make/unit-tests/varmod-to-separator.exp:1.16 Fri Jul 5 19:47:22 2024 +++ src/usr.bin/make/unit-tests/varmod-to-separator.exp Tue Aug 6 18:00:17 2024 @@ -1,29 +1,29 @@ make: "varmod-to-separator.mk" line 155: while evaluating variable "WORDS" with value "one two three": Invalid character number at "400:tu}" -make: "varmod-to-separator.mk" line 155: Malformed conditional (${WORDS:[1..3]:ts\400:tu}) +make: "varmod-to-separator.mk" line 155: Malformed conditional '${WORDS:[1..3]:ts\400:tu}' make: "varmod-to-separator.mk" line 171: while evaluating variable "WORDS" with value "one two three": Invalid character number at "100:tu}" -make: "varmod-to-separator.mk" line 171: Malformed conditional (${WORDS:[1..3]:ts\x100:tu}) +make: "varmod-to-separator.mk" line 171: Malformed conditional '${WORDS:[1..3]:ts\x100:tu}' make: "varmod-to-separator.mk" line 180: while evaluating variable "word" with value "word": Invalid character number at ",}" -make: "varmod-to-separator.mk" line 180: Malformed conditional (${word:L:ts\x,}) +make: "varmod-to-separator.mk" line 180: Malformed conditional '${word:L:ts\x,}' make: "varmod-to-separator.mk" line 187: while evaluating variable "word" with value "word": Invalid character number at "112233445566778899}" -make: "varmod-to-separator.mk" line 187: Malformed conditional (${word:L:ts\x112233445566778899}) +make: "varmod-to-separator.mk" line 187: Malformed conditional '${word:L:ts\x112233445566778899}' make: "varmod-to-separator.mk" line 193: while evaluating variable "WORDS" with value "one two three": Bad modifier ":ts\-300" -make: "varmod-to-separator.mk" line 193: Malformed conditional (${WORDS:[1..3]:ts\-300:tu}) +make: "varmod-to-separator.mk" line 193: Malformed conditional '${WORDS:[1..3]:ts\-300:tu}' make: "varmod-to-separator.mk" line 203: while evaluating variable "1 2 3" with value "1 2 3": Bad modifier ":ts\8" -make: "varmod-to-separator.mk" line 203: Malformed conditional (${1 2 3:L:ts\8:tu}) +make: "varmod-to-separator.mk" line 203: Malformed conditional '${1 2 3:L:ts\8:tu}' make: "varmod-to-separator.mk" line 212: while evaluating variable "1 2 3" with value "1 2 3": Bad modifier ":ts\100L" -make: "varmod-to-separator.mk" line 212: Malformed conditional (${1 2 3:L:ts\100L}) +make: "varmod-to-separator.mk" line 212: Malformed conditional '${1 2 3:L:ts\100L}' make: "varmod-to-separator.mk" line 221: while evaluating variable "1 2 3" with value "1 2 3": Bad modifier ":ts\x40g" -make: "varmod-to-separator.mk" line 221: Malformed conditional (${1 2 3:L:ts\x40g}) +make: "varmod-to-separator.mk" line 221: Malformed conditional '${1 2 3:L:ts\x40g}' make: "varmod-to-separator.mk" line 231: while evaluating variable "WORDS" with value "one two three four five six": Bad modifier ":tx" -make: "varmod-to-separator.mk" line 231: Malformed conditional (${WORDS:tx}) +make: "varmod-to-separator.mk" line 231: Malformed conditional '${WORDS:tx}' make: "varmod-to-separator.mk" line 240: while evaluating variable "WORDS" with value "one two three four five six": Bad modifier ":ts\X" -make: "varmod-to-separator.mk" line 240: Malformed conditional (${WORDS:ts\X}) +make: "varmod-to-separator.mk" line 240: Malformed conditional '${WORDS:ts\X}' make: "varmod-to-separator.mk" line 250: while evaluating variable "WORDS" with value "one two three four five six": Bad modifier ":t\X" -make: "varmod-to-separator.mk" line 250: Malformed conditional (${WORDS:t\X} != "anything") +make: "varmod-to-separator.mk" line 250: Malformed conditional '${WORDS:t\X} != "anything"' make: "varmod-to-separator.mk" line 267: while evaluating "${:Ua b:ts\69}" with value "a b": Bad modifier ":ts\69" -make: "varmod-to-separator.mk" line 267: Malformed conditional (${:Ua b:ts\69}) +make: "varmod-to-separator.mk" line 267: Malformed conditional '${:Ua b:ts\69}' make: "varmod-to-separator.mk" line 276: while evaluating "${:Ua b:ts\x1F60E}" with value "a b": Invalid character number at "1F60E}" -make: "varmod-to-separator.mk" line 276: Malformed conditional (${:Ua b:ts\x1F60E}) +make: "varmod-to-separator.mk" line 276: Malformed conditional '${:Ua b:ts\x1F60E}' make: Fatal errors encountered -- cannot continue make: stopped in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/cond-token-plain.exp diff -u src/usr.bin/make/unit-tests/cond-token-plain.exp:1.20 src/usr.bin/make/unit-tests/cond-token-plain.exp:1.21 --- src/usr.bin/make/unit-tests/cond-token-plain.exp:1.20 Sun Nov 19 21:47:52 2023 +++ src/usr.bin/make/unit-tests/cond-token-plain.exp Tue Aug 6 18:00:17 2024 @@ -41,7 +41,7 @@ make: "cond-token-plain.mk" line 144: Nu CondParser_Eval: "" == make: "cond-token-plain.mk" line 151: Missing right-hand side of operator '==' CondParser_Eval: == "" -make: "cond-token-plain.mk" line 160: Malformed conditional (== "") +make: "cond-token-plain.mk" line 160: Malformed conditional '== ""' CondParser_Eval: \\ make: "cond-token-plain.mk" line 176: The variable '\\' is not defined. CondParser_Eval: \\ @@ -49,15 +49,15 @@ make: "cond-token-plain.mk" line 182: No CondParser_Eval: "unquoted\"quoted" != unquoted"quoted Comparing "unquoted"quoted" != "unquoted"quoted" CondParser_Eval: $$$$$$$$ != "" -make: "cond-token-plain.mk" line 197: Malformed conditional ($$$$$$$$ != "") +make: "cond-token-plain.mk" line 197: Malformed conditional '$$$$$$$$ != ""' CondParser_Eval: left == right -make: "cond-token-plain.mk" line 206: Malformed conditional (left == right) +make: "cond-token-plain.mk" line 206: Malformed conditional 'left == right' CondParser_Eval: ${0:?:} || left == right CondParser_Eval: 0 -make: "cond-token-plain.mk" line 212: Malformed conditional (${0:?:} || left == right) +make: "cond-token-plain.mk" line 212: Malformed conditional '${0:?:} || left == right' CondParser_Eval: left == right || ${0:?:} -make: "cond-token-plain.mk" line 217: Malformed conditional (left == right || ${0:?:}) -make: "cond-token-plain.mk" line 236: Malformed conditional (VAR.${IF_COUNT::+=1} != "") +make: "cond-token-plain.mk" line 217: Malformed conditional 'left == right || ${0:?:}' +make: "cond-token-plain.mk" line 236: Malformed conditional 'VAR.${IF_COUNT::+=1} != ""' make: Fatal errors encountered -- cannot continue make: stopped in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/opt-debug-lint.exp diff -u src/usr.bin/make/unit-tests/opt-debug-lint.exp:1.20 src/usr.bin/make/unit-tests/opt-debug-lint.exp:1.21 --- src/usr.bin/make/unit-tests/opt-debug-lint.exp:1.20 Thu Jul 4 17:47:54 2024 +++ src/usr.bin/make/unit-tests/opt-debug-lint.exp Tue Aug 6 18:00:17 2024 @@ -1,7 +1,7 @@ make: "opt-debug-lint.mk" line 21: Variable "X" is undefined -make: "opt-debug-lint.mk" line 21: Malformed conditional ($X) +make: "opt-debug-lint.mk" line 21: Malformed conditional '$X' make: "opt-debug-lint.mk" line 45: Variable "UNDEF" is undefined -make: "opt-debug-lint.mk" line 45: Malformed conditional (${UNDEF}) +make: "opt-debug-lint.mk" line 45: Malformed conditional '${UNDEF}' make: "opt-debug-lint.mk" line 67: while evaluating variable "value" with value "value": Missing delimiter ':' after modifier "L" make: "opt-debug-lint.mk" line 67: while evaluating variable "value" with value "value": Missing delimiter ':' after modifier "P" make: "opt-debug-lint.mk" line 76: while evaluating variable "value" with value "": Unknown modifier "${" Index: src/usr.bin/make/unit-tests/varmod-gmtime.exp diff -u src/usr.bin/make/unit-tests/varmod-gmtime.exp:1.20 src/usr.bin/make/unit-tests/varmod-gmtime.exp:1.21 --- src/usr.bin/make/unit-tests/varmod-gmtime.exp:1.20 Fri Jul 5 19:47:22 2024 +++ src/usr.bin/make/unit-tests/varmod-gmtime.exp Tue Aug 6 18:00:17 2024 @@ -1,13 +1,13 @@ make: "varmod-gmtime.mk" line 61: while evaluating "${:L:gmtime=-1} != """ with value "": Invalid time value "-1" -make: "varmod-gmtime.mk" line 61: Malformed conditional (${:L:gmtime=-1} != "") +make: "varmod-gmtime.mk" line 61: Malformed conditional '${:L:gmtime=-1} != ""' make: "varmod-gmtime.mk" line 72: while evaluating "${:L:gmtime= 1} != """ with value "": Invalid time value " 1" -make: "varmod-gmtime.mk" line 72: Malformed conditional (${:L:gmtime= 1} != "") +make: "varmod-gmtime.mk" line 72: Malformed conditional '${:L:gmtime= 1} != ""' make: "varmod-gmtime.mk" line 120: while evaluating "${:L:gmtime=10000000000000000000000000000000} != """ with value "": Invalid time value "10000000000000000000000000000000" -make: "varmod-gmtime.mk" line 120: Malformed conditional (${:L:gmtime=10000000000000000000000000000000} != "") +make: "varmod-gmtime.mk" line 120: Malformed conditional '${:L:gmtime=10000000000000000000000000000000} != ""' make: "varmod-gmtime.mk" line 133: while evaluating "${:L:gmtime=error} != """ with value "": Invalid time value "error" -make: "varmod-gmtime.mk" line 133: Malformed conditional (${:L:gmtime=error} != "") +make: "varmod-gmtime.mk" line 133: Malformed conditional '${:L:gmtime=error} != ""' make: "varmod-gmtime.mk" line 144: while evaluating variable "%Y" with value "%Y": Invalid time value "100000S,1970,bad," -make: "varmod-gmtime.mk" line 144: Malformed conditional (${%Y:L:gmtime=100000S,1970,bad,} != "bad") +make: "varmod-gmtime.mk" line 144: Malformed conditional '${%Y:L:gmtime=100000S,1970,bad,} != "bad"' make: Fatal errors encountered -- cannot continue make: stopped making "all" in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/varmod-match.exp diff -u src/usr.bin/make/unit-tests/varmod-match.exp:1.20 src/usr.bin/make/unit-tests/varmod-match.exp:1.21 --- src/usr.bin/make/unit-tests/varmod-match.exp:1.20 Tue Jul 9 17:07:23 2024 +++ src/usr.bin/make/unit-tests/varmod-match.exp Tue Aug 6 18:00:17 2024 @@ -8,7 +8,7 @@ make: "varmod-match.mk" line 344: while make: "varmod-match.mk" line 356: while evaluating variable "WORDS" with value "[x- x x- y yyyyy": Unfinished character range in pattern '[^x-' of modifier ':M' make: "varmod-match.mk" line 364: while evaluating variable " : :: " with value " : :: ": Unfinished character list in pattern '[' of modifier ':M' make: "varmod-match.mk" line 364: while evaluating variable " : :: " with value "": Unknown modifier "]" -make: "varmod-match.mk" line 364: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":") +make: "varmod-match.mk" line 364: Malformed conditional '${ ${:U\:} ${:U\:\:} :L:M[:]} != ":"' make: Fatal errors encountered -- cannot continue make: stopped in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/cond-token-string.exp diff -u src/usr.bin/make/unit-tests/cond-token-string.exp:1.14 src/usr.bin/make/unit-tests/cond-token-string.exp:1.15 --- src/usr.bin/make/unit-tests/cond-token-string.exp:1.14 Fri Jul 5 19:47:22 2024 +++ src/usr.bin/make/unit-tests/cond-token-string.exp Tue Aug 6 18:00:17 2024 @@ -1,7 +1,7 @@ make: "cond-token-string.mk" line 15: while evaluating "${:Uvalue:Z}"" with value "value": Unknown modifier "Z" -make: "cond-token-string.mk" line 15: Malformed conditional ("" != "${:Uvalue:Z}") +make: "cond-token-string.mk" line 15: Malformed conditional '"" != "${:Uvalue:Z}"' make: "cond-token-string.mk" line 25: xvalue is not defined. -make: "cond-token-string.mk" line 32: Malformed conditional (x${:Uvalue} == "") +make: "cond-token-string.mk" line 32: Malformed conditional 'x${:Uvalue} == ""' make: "cond-token-string.mk" line 42: Expected. CondParser_Eval: "UNDEF" make: "cond-token-string.mk" line 52: The string literal "UNDEF" is not empty. Index: src/usr.bin/make/unit-tests/var-eval-short.mk diff -u src/usr.bin/make/unit-tests/var-eval-short.mk:1.14 src/usr.bin/make/unit-tests/var-eval-short.mk:1.15 --- src/usr.bin/make/unit-tests/var-eval-short.mk:1.14 Fri Jul 5 20:01:52 2024 +++ src/usr.bin/make/unit-tests/var-eval-short.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: var-eval-short.mk,v 1.14 2024/07/05 20:01:52 rillig Exp $ +# $NetBSD: var-eval-short.mk,v 1.15 2024/08/06 18:00:17 rillig Exp $ # # Tests for each variable modifier to ensure that they only do the minimum # necessary computations. If the result of the expression is irrelevant, @@ -42,7 +42,7 @@ FAIL= ${:!echo unexpected 1>&2!} # Since var.c 1.907 from 2021-04-04, a '$' is no longer allowed in the # variable name. # expect+2: while parsing "${:Uword:@${FAIL}@expr@}": In the :@ modifier, the variable name "${FAIL}" must not contain a dollar -# expect+1: Malformed conditional (0 && ${:Uword:@${FAIL}@expr@}) +# expect+1: Malformed conditional '0 && ${:Uword:@${FAIL}@expr@}' .if 0 && ${:Uword:@${FAIL}@expr@} .endif Index: src/usr.bin/make/unit-tests/varmod-order.exp diff -u src/usr.bin/make/unit-tests/varmod-order.exp:1.14 src/usr.bin/make/unit-tests/varmod-order.exp:1.15 --- src/usr.bin/make/unit-tests/varmod-order.exp:1.14 Sat Jul 20 08:54:19 2024 +++ src/usr.bin/make/unit-tests/varmod-order.exp Tue Aug 6 18:00:17 2024 @@ -4,21 +4,21 @@ make: "varmod-order.mk" line 20: while e make: "varmod-order.mk" line 22: while evaluating variable "NUMBERS" with value "1 2 3 4 5 6 7 8 9 10": Unclosed expression, expecting '}' for modifier "On" make: "varmod-order.mk" line 24: while evaluating variable "NUMBERS" with value "10 9 8 7 6 5 4 3 2 1": Unclosed expression, expecting '}' for modifier "Onr" make: "varmod-order.mk" line 31: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Oxn" -make: "varmod-order.mk" line 31: Malformed conditional (${NUMBERS:Oxn}) +make: "varmod-order.mk" line 31: Malformed conditional '${NUMBERS:Oxn}' make: "varmod-order.mk" line 41: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":On_typo" -make: "varmod-order.mk" line 41: Malformed conditional (${NUMBERS:On_typo}) +make: "varmod-order.mk" line 41: Malformed conditional '${NUMBERS:On_typo}' make: "varmod-order.mk" line 51: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Onr_typo" -make: "varmod-order.mk" line 51: Malformed conditional (${NUMBERS:Onr_typo}) +make: "varmod-order.mk" line 51: Malformed conditional '${NUMBERS:Onr_typo}' make: "varmod-order.mk" line 61: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Orn_typo" -make: "varmod-order.mk" line 61: Malformed conditional (${NUMBERS:Orn_typo}) +make: "varmod-order.mk" line 61: Malformed conditional '${NUMBERS:Orn_typo}' make: "varmod-order.mk" line 73: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Onn" -make: "varmod-order.mk" line 73: Malformed conditional (${NUMBERS:Onn}) +make: "varmod-order.mk" line 73: Malformed conditional '${NUMBERS:Onn}' make: "varmod-order.mk" line 83: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Onrr" -make: "varmod-order.mk" line 83: Malformed conditional (${NUMBERS:Onrr}) +make: "varmod-order.mk" line 83: Malformed conditional '${NUMBERS:Onrr}' make: "varmod-order.mk" line 93: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Orrn" -make: "varmod-order.mk" line 93: Malformed conditional (${NUMBERS:Orrn}) +make: "varmod-order.mk" line 93: Malformed conditional '${NUMBERS:Orrn}' make: "varmod-order.mk" line 108: while evaluating variable "SWITCH" with value "On": Bad modifier ":On=Off" -make: "varmod-order.mk" line 108: Malformed conditional (${SWITCH:On=Off} != "Off") +make: "varmod-order.mk" line 108: Malformed conditional '${SWITCH:On=Off} != "Off"' make: Fatal errors encountered -- cannot continue make: stopped making "all" in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/varmod-sysv.exp diff -u src/usr.bin/make/unit-tests/varmod-sysv.exp:1.14 src/usr.bin/make/unit-tests/varmod-sysv.exp:1.15 --- src/usr.bin/make/unit-tests/varmod-sysv.exp:1.14 Thu Jul 4 20:18:40 2024 +++ src/usr.bin/make/unit-tests/varmod-sysv.exp Tue Aug 6 18:00:17 2024 @@ -1,5 +1,5 @@ make: "varmod-sysv.mk" line 216: while evaluating variable "word216" with value "word216": Unfinished modifier ('=' missing) -make: "varmod-sysv.mk" line 216: Malformed conditional (${word216:L:from${:D=}to}) +make: "varmod-sysv.mk" line 216: Malformed conditional '${word216:L:from${:D=}to}' word modifier result '' = "" suffix = "suffix" @@ -146,7 +146,7 @@ suffix pre%ffix=NPre%N prefix pre%ffix=NPre%NS "prefix" pre-middle-suffix pre%ffix=NPre%NS "NPre-middle-suNS" make: "varmod-sysv.mk" line 261: while evaluating variable "error" with value "error": Unfinished modifier ('}' missing) -make: "varmod-sysv.mk" line 261: Malformed conditional (${error:L:from=$(})) +make: "varmod-sysv.mk" line 261: Malformed conditional '${error:L:from=$(})' make: Fatal errors encountered -- cannot continue make: stopped making "all" in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/cond-token-string.mk diff -u src/usr.bin/make/unit-tests/cond-token-string.mk:1.11 src/usr.bin/make/unit-tests/cond-token-string.mk:1.12 --- src/usr.bin/make/unit-tests/cond-token-string.mk:1.11 Fri Jul 5 19:47:22 2024 +++ src/usr.bin/make/unit-tests/cond-token-string.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: cond-token-string.mk,v 1.11 2024/07/05 19:47:22 rillig Exp $ +# $NetBSD: cond-token-string.mk,v 1.12 2024/08/06 18:00:17 rillig Exp $ # # Tests for quoted string literals in .if conditions. # @@ -10,7 +10,7 @@ # Cover the code in CondParser_String that frees the memory after parsing # an expression based on an undefined variable. -# expect+2: Malformed conditional ("" != "${:Uvalue:Z}") +# expect+2: Malformed conditional '"" != "${:Uvalue:Z}"' # expect+1: while evaluating "${:Uvalue:Z}"" with value "value": Unknown modifier "Z" .if "" != "${:Uvalue:Z}" . error @@ -28,7 +28,7 @@ # The 'x' produces a "Malformed conditional" since the left-hand side of a # comparison in an .if directive must be either an expression, a # quoted string literal or a number that starts with a digit. -# expect+1: Malformed conditional (x${:Uvalue} == "") +# expect+1: Malformed conditional 'x${:Uvalue} == ""' .if x${:Uvalue} == "" . error .else Index: src/usr.bin/make/unit-tests/directive-if.exp diff -u src/usr.bin/make/unit-tests/directive-if.exp:1.11 src/usr.bin/make/unit-tests/directive-if.exp:1.12 --- src/usr.bin/make/unit-tests/directive-if.exp:1.11 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/directive-if.exp Tue Aug 6 18:00:17 2024 @@ -5,7 +5,7 @@ make: "directive-if.mk" line 45: This is make: "directive-if.mk" line 47: if-less else make: "directive-if.mk" line 49: This is not conditional. make: "directive-if.mk" line 51: if-less endif -make: "directive-if.mk" line 55: Malformed conditional () +make: "directive-if.mk" line 55: Malformed conditional '' make: "directive-if.mk" line 66: Quotes in plain words are probably a mistake. make: "directive-if.mk" line 76: Don't do this, always put a space after a directive. make: "directive-if.mk" line 81: Don't do this, always put a space after a directive. Index: src/usr.bin/make/unit-tests/vardebug.mk diff -u src/usr.bin/make/unit-tests/vardebug.mk:1.11 src/usr.bin/make/unit-tests/vardebug.mk:1.12 --- src/usr.bin/make/unit-tests/vardebug.mk:1.11 Fri Jul 5 19:47:22 2024 +++ src/usr.bin/make/unit-tests/vardebug.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: vardebug.mk,v 1.11 2024/07/05 19:47:22 rillig Exp $ +# $NetBSD: vardebug.mk,v 1.12 2024/08/06 18:00:17 rillig Exp $ # # Demonstrates the debugging output for var.c. @@ -58,7 +58,7 @@ VAR+= 3 # When ApplyModifiers results in an error, this appears in the debug log # as "is error", without surrounding quotes. # expect: Result of ${:unknown} is error (eval-defined, defined) -# expect+2: Malformed conditional (${:Uvariable:unknown}) +# expect+2: Malformed conditional '${:Uvariable:unknown}' # expect+1: while evaluating "${:Uvariable:unknown}" with value "variable": Unknown modifier "unknown" .if ${:Uvariable:unknown} .endif @@ -69,7 +69,7 @@ VAR+= 3 # There is a specialized error message for "Undefined variable", but as of # 2020-08-08, that is not covered by any unit tests. It might even be # unreachable. -# expect+1: Malformed conditional (${UNDEFINED}) +# expect+1: Malformed conditional '${UNDEFINED}' .if ${UNDEFINED} .endif Index: src/usr.bin/make/unit-tests/varmod-mtime.mk diff -u src/usr.bin/make/unit-tests/varmod-mtime.mk:1.11 src/usr.bin/make/unit-tests/varmod-mtime.mk:1.12 --- src/usr.bin/make/unit-tests/varmod-mtime.mk:1.11 Thu Jul 4 17:47:54 2024 +++ src/usr.bin/make/unit-tests/varmod-mtime.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-mtime.mk,v 1.11 2024/07/04 17:47:54 rillig Exp $ +# $NetBSD: varmod-mtime.mk,v 1.12 2024/08/06 18:00:17 rillig Exp $ # # Tests for the ':mtime' variable modifier, which maps each word of the # expression to that file's modification time. @@ -43,7 +43,7 @@ not_found_mtime:= ${no/such/file:L:mtime # The fallback timestamp must only be an integer, without trailing characters. # expect+2: while evaluating variable "no/such/file" with value "no/such/file": Invalid argument '123x' for modifier ':mtime' -# expect+1: Malformed conditional (${no/such/file:L:mtime=123x}) +# expect+1: Malformed conditional '${no/such/file:L:mtime=123x}' .if ${no/such/file:L:mtime=123x} . error .else @@ -66,7 +66,7 @@ _!= rm -f ${COOKIE} # # expect+3: while evaluating variable "no/such/file1 no/such/file2" with value "no/such/file1 no/such/file2": Cannot determine mtime for 'no/such/file1': <ENOENT> # expect+2: while evaluating variable "no/such/file1 no/such/file2" with value "no/such/file1 no/such/file2": Cannot determine mtime for 'no/such/file2': <ENOENT> -# expect+1: Malformed conditional (${no/such/file1 no/such/file2:L:mtime=error}) +# expect+1: Malformed conditional '${no/such/file1 no/such/file2:L:mtime=error}' .if ${no/such/file1 no/such/file2:L:mtime=error} . error .else @@ -77,7 +77,7 @@ _!= rm -f ${COOKIE} # Only the word 'error' is a special argument to the ':mtime' modifier, all # other words result in a parse error. # expect+2: while evaluating variable "MAKEFILE" with value "varmod-mtime.mk": Invalid argument 'errorhandler-no' for modifier ':mtime' -# expect+1: Malformed conditional (${MAKEFILE:mtime=errorhandler-no} > 0) +# expect+1: Malformed conditional '${MAKEFILE:mtime=errorhandler-no} > 0' .if ${MAKEFILE:mtime=errorhandler-no} > 0 .else . error @@ -86,7 +86,7 @@ _!= rm -f ${COOKIE} # Only the word 'error' can be used as a fallback argument to the modifier. # expect+2: while evaluating variable "MAKEFILE" with value "varmod-mtime.mk": Invalid argument 'warn' for modifier ':mtime' -# expect+1: Malformed conditional (${MAKEFILE:mtime=warn} > 0) +# expect+1: Malformed conditional '${MAKEFILE:mtime=warn} > 0' .if ${MAKEFILE:mtime=warn} > 0 . error .else @@ -111,7 +111,7 @@ end:= ${%s:L:gmtime} # If there is a typo in the modifier name, it does not match. # expect+2: while evaluating variable "anything" with value "anything": Unknown modifier "mtim" -# expect+1: Malformed conditional (${anything:L:mtim}) +# expect+1: Malformed conditional '${anything:L:mtim}' .if ${anything:L:mtim} . error .else Index: src/usr.bin/make/unit-tests/cond-token-var.exp diff -u src/usr.bin/make/unit-tests/cond-token-var.exp:1.4 src/usr.bin/make/unit-tests/cond-token-var.exp:1.5 --- src/usr.bin/make/unit-tests/cond-token-var.exp:1.4 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/cond-token-var.exp Tue Aug 6 18:00:17 2024 @@ -1,7 +1,7 @@ make: "cond-token-var.mk" line 21: ok -make: "cond-token-var.mk" line 28: Malformed conditional (${UNDEF} == ${DEF}) -make: "cond-token-var.mk" line 34: Malformed conditional (${DEF} == ${UNDEF}) -make: "cond-token-var.mk" line 44: Malformed conditional (${UNDEF}) +make: "cond-token-var.mk" line 28: Malformed conditional '${UNDEF} == ${DEF}' +make: "cond-token-var.mk" line 34: Malformed conditional '${DEF} == ${UNDEF}' +make: "cond-token-var.mk" line 44: Malformed conditional '${UNDEF}' make: Fatal errors encountered -- cannot continue make: stopped in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/cond-undef-lint.mk diff -u src/usr.bin/make/unit-tests/cond-undef-lint.mk:1.4 src/usr.bin/make/unit-tests/cond-undef-lint.mk:1.5 --- src/usr.bin/make/unit-tests/cond-undef-lint.mk:1.4 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/cond-undef-lint.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: cond-undef-lint.mk,v 1.4 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: cond-undef-lint.mk,v 1.5 2024/08/06 18:00:17 rillig Exp $ # # Tests for defined and undefined variables in .if conditions, in lint mode. # @@ -20,7 +20,7 @@ DEF= defined .endif # Since the condition fails to evaluate, neither of the branches is taken. -# expect+2: Malformed conditional (${UNDEF}) +# expect+2: Malformed conditional '${UNDEF}' # expect+1: Variable "UNDEF" is undefined .if ${UNDEF} . error @@ -39,7 +39,7 @@ DEF= defined # of the expression must not be evaluated at all. # expect+3: Variable "UNDEF" is undefined # expect+2: Variable "VAR." is undefined -# expect+1: Malformed conditional (${VAR.${UNDEF}}) +# expect+1: Malformed conditional '${VAR.${UNDEF}}' .if ${VAR.${UNDEF}} . error .else @@ -52,7 +52,7 @@ DEF= defined # debatable. Or would any practical use of CFLAGS.${OPSYS} be via an indirect # expression, as in the next example? # expect+2: Variable "VAR.defined" is undefined -# expect+1: Malformed conditional (${VAR.${DEF}}) +# expect+1: Malformed conditional '${VAR.${DEF}}' .if ${VAR.${DEF}} . error .else Index: src/usr.bin/make/unit-tests/directive-include-fatal.exp diff -u src/usr.bin/make/unit-tests/directive-include-fatal.exp:1.4 src/usr.bin/make/unit-tests/directive-include-fatal.exp:1.5 --- src/usr.bin/make/unit-tests/directive-include-fatal.exp:1.4 Thu Jul 4 20:18:40 2024 +++ src/usr.bin/make/unit-tests/directive-include-fatal.exp Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -make: "directive-include-fatal.mk" line 14: Malformed conditional (${UNDEF}) +make: "directive-include-fatal.mk" line 14: Malformed conditional '${UNDEF}' make: Fatal errors encountered -- cannot continue make: stopped making "all" in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/directive-include-fatal.mk diff -u src/usr.bin/make/unit-tests/directive-include-fatal.mk:1.4 src/usr.bin/make/unit-tests/directive-include-fatal.mk:1.5 --- src/usr.bin/make/unit-tests/directive-include-fatal.mk:1.4 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/directive-include-fatal.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: directive-include-fatal.mk,v 1.4 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: directive-include-fatal.mk,v 1.5 2024/08/06 18:00:17 rillig Exp $ # # Test for the .include directive combined with fatal errors. # @@ -10,7 +10,7 @@ # the "fatals" counter. # Using an undefined variable in a condition generates a fatal error. -# expect+1: Malformed conditional (${UNDEF}) +# expect+1: Malformed conditional '${UNDEF}' .if ${UNDEF} .endif Index: src/usr.bin/make/unit-tests/opt-debug-lint.mk diff -u src/usr.bin/make/unit-tests/opt-debug-lint.mk:1.18 src/usr.bin/make/unit-tests/opt-debug-lint.mk:1.19 --- src/usr.bin/make/unit-tests/opt-debug-lint.mk:1.18 Thu Jul 4 17:47:54 2024 +++ src/usr.bin/make/unit-tests/opt-debug-lint.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: opt-debug-lint.mk,v 1.18 2024/07/04 17:47:54 rillig Exp $ +# $NetBSD: opt-debug-lint.mk,v 1.19 2024/08/06 18:00:17 rillig Exp $ # # Tests for the -dL command line option, which runs additional checks # to catch common mistakes, such as unclosed expressions. @@ -16,7 +16,7 @@ # # See also: # cond-undef-lint.mk -# expect+2: Malformed conditional ($X) +# expect+2: Malformed conditional '$X' # expect+1: Variable "X" is undefined .if $X . error @@ -40,7 +40,7 @@ # hoping for the caller to print an error message. This resulted in the # well-known "Malformed conditional" error message, even though the # conditional was well-formed and the only error was an undefined variable. -# expect+2: Malformed conditional (${UNDEF}) +# expect+2: Malformed conditional '${UNDEF}' # expect+1: Variable "UNDEF" is undefined .if ${UNDEF} . error Index: src/usr.bin/make/unit-tests/varmod-to-separator.mk diff -u src/usr.bin/make/unit-tests/varmod-to-separator.mk:1.18 src/usr.bin/make/unit-tests/varmod-to-separator.mk:1.19 --- src/usr.bin/make/unit-tests/varmod-to-separator.mk:1.18 Fri Jul 5 19:47:22 2024 +++ src/usr.bin/make/unit-tests/varmod-to-separator.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-to-separator.mk,v 1.18 2024/07/05 19:47:22 rillig Exp $ +# $NetBSD: varmod-to-separator.mk,v 1.19 2024/08/06 18:00:17 rillig Exp $ # # Tests for the :ts variable modifier, which joins the words of the variable # using an arbitrary character as word separator. @@ -151,7 +151,7 @@ WORDS= one two three four five six # # Since 2020-11-01, these out-of-bounds values are rejected. # expect+2: while evaluating variable "WORDS" with value "one two three": Invalid character number at "400:tu}" -# expect+1: Malformed conditional (${WORDS:[1..3]:ts\400:tu}) +# expect+1: Malformed conditional '${WORDS:[1..3]:ts\400:tu}' .if ${WORDS:[1..3]:ts\400:tu} . warning The separator \400 is accepted even though it is out of bounds. .else @@ -167,7 +167,7 @@ WORDS= one two three four five six # # Since 2020-11-01, these out-of-bounds values are rejected. # expect+2: while evaluating variable "WORDS" with value "one two three": Invalid character number at "100:tu}" -# expect+1: Malformed conditional (${WORDS:[1..3]:ts\x100:tu}) +# expect+1: Malformed conditional '${WORDS:[1..3]:ts\x100:tu}' .if ${WORDS:[1..3]:ts\x100:tu} . warning The separator \x100 is accepted even though it is out of bounds. .else @@ -176,20 +176,20 @@ WORDS= one two three four five six # The number after ':ts\x' must be hexadecimal. # expect+2: while evaluating variable "word" with value "word": Invalid character number at ",}" -# expect+1: Malformed conditional (${word:L:ts\x,}) +# expect+1: Malformed conditional '${word:L:ts\x,}' .if ${word:L:ts\x,} .endif # The hexadecimal number must be in the range of 'unsigned long' on all # supported platforms. # expect+2: while evaluating variable "word" with value "word": Invalid character number at "112233445566778899}" -# expect+1: Malformed conditional (${word:L:ts\x112233445566778899}) +# expect+1: Malformed conditional '${word:L:ts\x112233445566778899}' .if ${word:L:ts\x112233445566778899} .endif # Negative numbers are not allowed for the separator character. # expect+2: while evaluating variable "WORDS" with value "one two three": Bad modifier ":ts\-300" -# expect+1: Malformed conditional (${WORDS:[1..3]:ts\-300:tu}) +# expect+1: Malformed conditional '${WORDS:[1..3]:ts\-300:tu}' .if ${WORDS:[1..3]:ts\-300:tu} . warning The separator \-300 is accepted even though it is negative. .else @@ -199,7 +199,7 @@ WORDS= one two three four five six # The character number is interpreted as octal number by default. # The digit '8' is not an octal digit though. # expect+2: while evaluating variable "1 2 3" with value "1 2 3": Bad modifier ":ts\8" -# expect+1: Malformed conditional (${1 2 3:L:ts\8:tu}) +# expect+1: Malformed conditional '${1 2 3:L:ts\8:tu}' .if ${1 2 3:L:ts\8:tu} . warning The separator \8 is accepted even though it is not octal. .else @@ -208,7 +208,7 @@ WORDS= one two three four five six # Trailing characters after the octal character number are rejected. # expect+2: while evaluating variable "1 2 3" with value "1 2 3": Bad modifier ":ts\100L" -# expect+1: Malformed conditional (${1 2 3:L:ts\100L}) +# expect+1: Malformed conditional '${1 2 3:L:ts\100L}' .if ${1 2 3:L:ts\100L} . warning The separator \100L is accepted even though it contains an 'L'. .else @@ -217,7 +217,7 @@ WORDS= one two three four five six # Trailing characters after the hexadecimal character number are rejected. # expect+2: while evaluating variable "1 2 3" with value "1 2 3": Bad modifier ":ts\x40g" -# expect+1: Malformed conditional (${1 2 3:L:ts\x40g}) +# expect+1: Malformed conditional '${1 2 3:L:ts\x40g}' .if ${1 2 3:L:ts\x40g} . warning The separator \x40g is accepted even though it contains a 'g'. .else @@ -227,7 +227,7 @@ WORDS= one two three four five six # In the :t modifier, the :t must be followed by any of A, l, s, u. # expect+2: while evaluating variable "WORDS" with value "one two three four five six": Bad modifier ":tx" -# expect+1: Malformed conditional (${WORDS:tx}) +# expect+1: Malformed conditional '${WORDS:tx}' .if ${WORDS:tx} . error .else @@ -236,7 +236,7 @@ WORDS= one two three four five six # The word separator can only be a single character. # expect+2: while evaluating variable "WORDS" with value "one two three four five six": Bad modifier ":ts\X" -# expect+1: Malformed conditional (${WORDS:ts\X}) +# expect+1: Malformed conditional '${WORDS:ts\X}' .if ${WORDS:ts\X} . error .else @@ -246,7 +246,7 @@ WORDS= one two three four five six # After the backslash, only n, t, an octal number, or x and a hexadecimal # number are allowed. # expect+2: while evaluating variable "WORDS" with value "one two three four five six": Bad modifier ":t\X" -# expect+1: Malformed conditional (${WORDS:t\X} != "anything") +# expect+1: Malformed conditional '${WORDS:t\X} != "anything"' .if ${WORDS:t\X} != "anything" . info This line is not reached. .endif @@ -263,7 +263,7 @@ WORDS= one two three four five six # 2016.02.27.16.20.06, the result was '1E2', since 2016.03.07.20.20.35 make no # longer accepts this escape and complains. # expect+2: while evaluating "${:Ua b:ts\69}" with value "a b": Bad modifier ":ts\69" -# expect+1: Malformed conditional (${:Ua b:ts\69}) +# expect+1: Malformed conditional '${:Ua b:ts\69}' .if ${:Ua b:ts\69} . error .else @@ -272,7 +272,7 @@ WORDS= one two three four five six # Try whether bmake is Unicode-ready. # expect+2: while evaluating "${:Ua b:ts\x1F60E}" with value "a b": Invalid character number at "1F60E}" -# expect+1: Malformed conditional (${:Ua b:ts\x1F60E}) +# expect+1: Malformed conditional '${:Ua b:ts\x1F60E}' .if ${:Ua b:ts\x1F60E} # U+1F60E "smiling face with sunglasses" . error .else Index: src/usr.bin/make/unit-tests/varmod.mk diff -u src/usr.bin/make/unit-tests/varmod.mk:1.18 src/usr.bin/make/unit-tests/varmod.mk:1.19 --- src/usr.bin/make/unit-tests/varmod.mk:1.18 Fri Jul 5 19:47:22 2024 +++ src/usr.bin/make/unit-tests/varmod.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: varmod.mk,v 1.18 2024/07/05 19:47:22 rillig Exp $ +# $NetBSD: varmod.mk,v 1.19 2024/08/06 18:00:17 rillig Exp $ # # Tests for variable modifiers, such as :Q, :S,from,to or :Ufallback. # @@ -122,17 +122,17 @@ VAR= STOP # Test the word selection modifier ':[n]' with a very large number that is # larger than ULONG_MAX for any supported platform. # expect+2: while evaluating variable "word" with value "word": Bad modifier ":[99333000222000111000]" -# expect+1: Malformed conditional (${word:L:[99333000222000111000]}) +# expect+1: Malformed conditional '${word:L:[99333000222000111000]}' .if ${word:L:[99333000222000111000]} .endif # expect+2: while evaluating variable "word" with value "word": Bad modifier ":[2147483648]" -# expect+1: Malformed conditional (${word:L:[2147483648]}) +# expect+1: Malformed conditional '${word:L:[2147483648]}' .if ${word:L:[2147483648]} .endif # Test the range generation modifier ':range=n' with a very large number that # is larger than SIZE_MAX for any supported platform. -# expect+2: Malformed conditional (${word:L:range=99333000222000111000}) +# expect+2: Malformed conditional '${word:L:range=99333000222000111000}' # expect+1: while evaluating variable "word" with value "word": Invalid number "99333000222000111000}" for ':range' modifier .if ${word:L:range=99333000222000111000} .endif @@ -141,7 +141,7 @@ VAR= STOP # the end of the string. The sequence '\\' '\0' is not an escaped delimiter, # as it would be wrong to skip past the end of the string. # expect+2: while evaluating "${:${:Ugmtime=\\}}" with value "": Invalid time value "\" -# expect+1: Malformed conditional (${:${:Ugmtime=\\}}) +# expect+1: Malformed conditional '${:${:Ugmtime=\\}}' .if ${:${:Ugmtime=\\}} . error .endif @@ -177,7 +177,7 @@ ${:U }= <space> . error .endif # expect+2: while evaluating variable "word" with value "": Bad modifier ":[$]" -# expect+1: Malformed conditional (${word:[$]}) +# expect+1: Malformed conditional '${word:[$]}' .if ${word:[$]} . error .else @@ -202,14 +202,14 @@ VAR_DOLLAR= VAR$$ .if ${:Ufallback$} != "fallback" . error .endif -# expect+2: Malformed conditional (${%y:L:gmtime=1000$}) +# expect+2: Malformed conditional '${%y:L:gmtime=1000$}' # expect+1: while evaluating variable "%y" with value "%y": Invalid time value "1000$" .if ${%y:L:gmtime=1000$} . error .else . error .endif -# expect+2: Malformed conditional (${%y:L:localtime=1000$}) +# expect+2: Malformed conditional '${%y:L:localtime=1000$}' # expect+1: while evaluating variable "%y" with value "%y": Invalid time value "1000$" .if ${%y:L:localtime=1000$} . error @@ -225,7 +225,7 @@ VAR_DOLLAR= VAR$$ . error .endif # expect+2: while evaluating variable "." with value ".": Invalid argument 'fallback$' for modifier ':mtime' -# expect+1: Malformed conditional (${.:L:mtime=fallback$}) +# expect+1: Malformed conditional '${.:L:mtime=fallback$}' .if ${.:L:mtime=fallback$} . error .else Index: src/usr.bin/make/unit-tests/var-eval-short.exp diff -u src/usr.bin/make/unit-tests/var-eval-short.exp:1.29 src/usr.bin/make/unit-tests/var-eval-short.exp:1.30 --- src/usr.bin/make/unit-tests/var-eval-short.exp:1.29 Fri Jul 5 20:01:52 2024 +++ src/usr.bin/make/unit-tests/var-eval-short.exp Tue Aug 6 18:00:17 2024 @@ -1,5 +1,5 @@ make: "var-eval-short.mk" line 46: while parsing "${:Uword:@${FAIL}@expr@}": In the :@ modifier, the variable name "${FAIL}" must not contain a dollar -make: "var-eval-short.mk" line 46: Malformed conditional (0 && ${:Uword:@${FAIL}@expr@}) +make: "var-eval-short.mk" line 46: Malformed conditional '0 && ${:Uword:@${FAIL}@expr@}' Parsing line 159: .if 0 && ${0:?${FAIL}then:${FAIL}else} CondParser_Eval: 0 && ${0:?${FAIL}then:${FAIL}else} Var_Parse: ${0:?${FAIL}then:${FAIL}else} (parse) Index: src/usr.bin/make/unit-tests/varmod-edge.mk diff -u src/usr.bin/make/unit-tests/varmod-edge.mk:1.29 src/usr.bin/make/unit-tests/varmod-edge.mk:1.30 --- src/usr.bin/make/unit-tests/varmod-edge.mk:1.29 Tue Jul 9 17:07:23 2024 +++ src/usr.bin/make/unit-tests/varmod-edge.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-edge.mk,v 1.29 2024/07/09 17:07:23 rillig Exp $ +# $NetBSD: varmod-edge.mk,v 1.30 2024/08/06 18:00:17 rillig Exp $ # # Tests for edge cases in variable modifiers. # @@ -198,7 +198,7 @@ EXP= # empty # Even in expressions based on an unnamed variable, there may be errors. # XXX: The error message should mention the variable name of the expression, # even though that name is empty in this case. -# expect+2: Malformed conditional (${:Z}) +# expect+2: Malformed conditional '${:Z}' # expect+1: while evaluating "${:Z}" with value "": Unknown modifier "Z" .if ${:Z} . error @@ -213,7 +213,7 @@ EXP= # empty # modifier for (',' missing)", having two spaces in a row. # # expect+2: while evaluating "${:S,}" with value "": Unfinished modifier (',' missing) -# expect+1: Malformed conditional (${:S,}) +# expect+1: Malformed conditional '${:S,}' .if ${:S,} . error .else Index: src/usr.bin/make/unit-tests/vardebug.exp diff -u src/usr.bin/make/unit-tests/vardebug.exp:1.36 src/usr.bin/make/unit-tests/vardebug.exp:1.37 --- src/usr.bin/make/unit-tests/vardebug.exp:1.36 Fri Jul 5 19:47:22 2024 +++ src/usr.bin/make/unit-tests/vardebug.exp Tue Aug 6 18:00:17 2024 @@ -56,9 +56,9 @@ Result of ${:Uvariable} is "variable" (e Evaluating modifier ${:u...} on value "variable" (eval-defined, defined) make: "vardebug.mk" line 63: while evaluating "${:Uvariable:unknown}" with value "variable": Unknown modifier "unknown" Result of ${:unknown} is error (eval-defined, defined) -make: "vardebug.mk" line 63: Malformed conditional (${:Uvariable:unknown}) +make: "vardebug.mk" line 63: Malformed conditional '${:Uvariable:unknown}' Var_Parse: ${UNDEFINED} (eval-defined) -make: "vardebug.mk" line 73: Malformed conditional (${UNDEFINED}) +make: "vardebug.mk" line 73: Malformed conditional '${UNDEFINED}' Global: ignoring delete '.SHELL' as it is not found Command: .SHELL = </path/to/shell> Command: ignoring '.SHELL = overwritten' as it is read-only Index: src/usr.bin/make/unit-tests/varmod-edge.exp diff -u src/usr.bin/make/unit-tests/varmod-edge.exp:1.26 src/usr.bin/make/unit-tests/varmod-edge.exp:1.27 --- src/usr.bin/make/unit-tests/varmod-edge.exp:1.26 Tue Jul 9 17:07:23 2024 +++ src/usr.bin/make/unit-tests/varmod-edge.exp Tue Aug 6 18:00:17 2024 @@ -4,9 +4,9 @@ make: "varmod-edge.mk" line 178: while e make: "varmod-edge.mk" line 194: while evaluating variable "MOD" with value "${INP::::}": while evaluating variable "INP" with value "value": Unknown modifier ":" make: "varmod-edge.mk" line 194: while evaluating variable "MOD" with value "${INP::::}": while evaluating variable "INP" with value "": Unknown modifier ":" make: "varmod-edge.mk" line 203: while evaluating "${:Z}" with value "": Unknown modifier "Z" -make: "varmod-edge.mk" line 203: Malformed conditional (${:Z}) +make: "varmod-edge.mk" line 203: Malformed conditional '${:Z}' make: "varmod-edge.mk" line 217: while evaluating "${:S,}" with value "": Unfinished modifier (',' missing) -make: "varmod-edge.mk" line 217: Malformed conditional (${:S,}) +make: "varmod-edge.mk" line 217: Malformed conditional '${:S,}' make: Fatal errors encountered -- cannot continue make: stopped in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/varmod-match.mk diff -u src/usr.bin/make/unit-tests/varmod-match.mk:1.26 src/usr.bin/make/unit-tests/varmod-match.mk:1.27 --- src/usr.bin/make/unit-tests/varmod-match.mk:1.26 Tue Jul 9 17:07:23 2024 +++ src/usr.bin/make/unit-tests/varmod-match.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-match.mk,v 1.26 2024/07/09 17:07:23 rillig Exp $ +# $NetBSD: varmod-match.mk,v 1.27 2024/08/06 18:00:17 rillig Exp $ # # Tests for the ':M' modifier, which keeps only those words that match the # given pattern. @@ -360,7 +360,7 @@ WORDS= [x- x x- y yyyyy # [:] matches never since the ':' starts the next modifier # expect+3: while evaluating variable " : :: " with value " : :: ": Unfinished character list in pattern '[' of modifier ':M' # expect+2: while evaluating variable " : :: " with value "": Unknown modifier "]" -# expect+1: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":") +# expect+1: Malformed conditional '${ ${:U\:} ${:U\:\:} :L:M[:]} != ":"' .if ${ ${:U\:} ${:U\:\:} :L:M[:]} != ":" . error .else Index: src/usr.bin/make/unit-tests/varmod-gmtime.mk diff -u src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.24 src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.25 --- src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.24 Fri Jul 5 19:47:22 2024 +++ src/usr.bin/make/unit-tests/varmod-gmtime.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-gmtime.mk,v 1.24 2024/07/05 19:47:22 rillig Exp $ +# $NetBSD: varmod-gmtime.mk,v 1.25 2024/08/06 18:00:17 rillig Exp $ # # Tests for the :gmtime variable modifier, which formats a timestamp # using strftime(3) in UTC. @@ -57,7 +57,7 @@ # make. Therefore, since var.c 1.631, negative time stamps produce a # parse error. # expect+2: while evaluating "${:L:gmtime=-1} != """ with value "": Invalid time value "-1" -# expect+1: Malformed conditional (${:L:gmtime=-1} != "") +# expect+1: Malformed conditional '${:L:gmtime=-1} != ""' .if ${:L:gmtime=-1} != "" . error .else @@ -68,7 +68,7 @@ # Spaces were allowed before var.c 1.631 from 2020-10-31 21:40:20, not # because it would make sense but just as a side-effect from using strtoul. # expect+2: while evaluating "${:L:gmtime= 1} != """ with value "": Invalid time value " 1" -# expect+1: Malformed conditional (${:L:gmtime= 1} != "") +# expect+1: Malformed conditional '${:L:gmtime= 1} != ""' .if ${:L:gmtime= 1} != "" . error .else @@ -116,7 +116,7 @@ # Since var.c 1.631 from 2020-10-31, the overflow is detected and produces a # parse error. # expect+2: while evaluating "${:L:gmtime=10000000000000000000000000000000} != """ with value "": Invalid time value "10000000000000000000000000000000" -# expect+1: Malformed conditional (${:L:gmtime=10000000000000000000000000000000} != "") +# expect+1: Malformed conditional '${:L:gmtime=10000000000000000000000000000000} != ""' .if ${:L:gmtime=10000000000000000000000000000000} != "" . error .else @@ -129,7 +129,7 @@ # modifiers. Because of the unknown modifier 'e' from the 'error', the whole # variable value was discarded and thus not printed. # expect+2: while evaluating "${:L:gmtime=error} != """ with value "": Invalid time value "error" -# expect+1: Malformed conditional (${:L:gmtime=error} != "") +# expect+1: Malformed conditional '${:L:gmtime=error} != ""' .if ${:L:gmtime=error} != "" . error .else @@ -140,7 +140,7 @@ # followed by the next modifier, without a ':' separator. This was the same # bug as for the ':L' and ':P' modifiers. # expect+2: while evaluating variable "%Y" with value "%Y": Invalid time value "100000S,1970,bad," -# expect+1: Malformed conditional (${%Y:L:gmtime=100000S,1970,bad,} != "bad") +# expect+1: Malformed conditional '${%Y:L:gmtime=100000S,1970,bad,} != "bad"' .if ${%Y:L:gmtime=100000S,1970,bad,} != "bad" . error .endif Index: src/usr.bin/make/unit-tests/varmod-ifelse.exp diff -u src/usr.bin/make/unit-tests/varmod-ifelse.exp:1.23 src/usr.bin/make/unit-tests/varmod-ifelse.exp:1.24 --- src/usr.bin/make/unit-tests/varmod-ifelse.exp:1.23 Fri Jul 5 20:01:52 2024 +++ src/usr.bin/make/unit-tests/varmod-ifelse.exp Tue Aug 6 18:00:17 2024 @@ -1,10 +1,10 @@ make: "varmod-ifelse.mk" line 29: while evaluating condition "bare words == "literal"": Bad condition -make: "varmod-ifelse.mk" line 29: Malformed conditional (${${:Ubare words} == "literal":?bad:bad}) +make: "varmod-ifelse.mk" line 29: Malformed conditional '${${:Ubare words} == "literal":?bad:bad}' make: "varmod-ifelse.mk" line 40: while evaluating condition " == """: Bad condition make: "varmod-ifelse.mk" line 49: while evaluating condition " == """: Bad condition -make: "varmod-ifelse.mk" line 49: Malformed conditional (${${UNDEF} == "":?bad-cond:bad-cond}) +make: "varmod-ifelse.mk" line 49: Malformed conditional '${${UNDEF} == "":?bad-cond:bad-cond}' make: "varmod-ifelse.mk" line 73: while evaluating condition "1 == == 2": Bad condition -make: "varmod-ifelse.mk" line 73: Malformed conditional (${1 == == 2:?yes:no} != "") +make: "varmod-ifelse.mk" line 73: Malformed conditional '${1 == == 2:?yes:no} != ""' CondParser_Eval: "${1 == == 2:?yes:no}" != "" CondParser_Eval: 1 == == 2 Comparing 1.000000 == 0.000000 Index: src/usr.bin/make/unit-tests/varmod-ifelse.mk diff -u src/usr.bin/make/unit-tests/varmod-ifelse.mk:1.32 src/usr.bin/make/unit-tests/varmod-ifelse.mk:1.33 --- src/usr.bin/make/unit-tests/varmod-ifelse.mk:1.32 Fri Jul 5 20:01:52 2024 +++ src/usr.bin/make/unit-tests/varmod-ifelse.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-ifelse.mk,v 1.32 2024/07/05 20:01:52 rillig Exp $ +# $NetBSD: varmod-ifelse.mk,v 1.33 2024/08/06 18:00:17 rillig Exp $ # # Tests for the ${cond:?then:else} variable modifier, which evaluates either # the then-expression or the else-expression, depending on the condition. @@ -25,7 +25,7 @@ # Var_Parse and ParseVarname, it would be more useful and predictable # though. # expect+2: while evaluating condition "bare words == "literal"": Bad condition -# expect+1: Malformed conditional (${${:Ubare words} == "literal":?bad:bad}) +# expect+1: Malformed conditional '${${:Ubare words} == "literal":?bad:bad}' .if ${${:Ubare words} == "literal":?bad:bad} . error .else @@ -45,7 +45,7 @@ COND:= ${${UNDEF} == "":?bad-assign:bad- # The difference to the ':=' variable assignment is the additional # "Malformed conditional" error message. # expect+2: while evaluating condition " == """: Bad condition -# expect+1: Malformed conditional (${${UNDEF} == "":?bad-cond:bad-cond}) +# expect+1: Malformed conditional '${${UNDEF} == "":?bad-cond:bad-cond}' .if ${${UNDEF} == "":?bad-cond:bad-cond} . error .else @@ -69,7 +69,7 @@ COND:= ${${UNDEF} == "":?bad-assign:bad- # error propagates to CondEvalExpression, where the "Malformed conditional" # comes from. # expect+2: while evaluating condition "1 == == 2": Bad condition -# expect+1: Malformed conditional (${1 == == 2:?yes:no} != "") +# expect+1: Malformed conditional '${1 == == 2:?yes:no} != ""' .if ${1 == == 2:?yes:no} != "" . error .else Index: src/usr.bin/make/unit-tests/varmod-localtime.exp diff -u src/usr.bin/make/unit-tests/varmod-localtime.exp:1.17 src/usr.bin/make/unit-tests/varmod-localtime.exp:1.18 --- src/usr.bin/make/unit-tests/varmod-localtime.exp:1.17 Fri Jul 5 19:47:22 2024 +++ src/usr.bin/make/unit-tests/varmod-localtime.exp Tue Aug 6 18:00:17 2024 @@ -1,13 +1,13 @@ make: "varmod-localtime.mk" line 61: while evaluating "${:L:localtime=-1} != """ with value "": Invalid time value "-1" -make: "varmod-localtime.mk" line 61: Malformed conditional (${:L:localtime=-1} != "") +make: "varmod-localtime.mk" line 61: Malformed conditional '${:L:localtime=-1} != ""' make: "varmod-localtime.mk" line 72: while evaluating "${:L:localtime= 1} != """ with value "": Invalid time value " 1" -make: "varmod-localtime.mk" line 72: Malformed conditional (${:L:localtime= 1} != "") +make: "varmod-localtime.mk" line 72: Malformed conditional '${:L:localtime= 1} != ""' make: "varmod-localtime.mk" line 120: while evaluating "${:L:localtime=10000000000000000000000000000000} != """ with value "": Invalid time value "10000000000000000000000000000000" -make: "varmod-localtime.mk" line 120: Malformed conditional (${:L:localtime=10000000000000000000000000000000} != "") +make: "varmod-localtime.mk" line 120: Malformed conditional '${:L:localtime=10000000000000000000000000000000} != ""' make: "varmod-localtime.mk" line 133: while evaluating "${:L:localtime=error} != """ with value "": Invalid time value "error" -make: "varmod-localtime.mk" line 133: Malformed conditional (${:L:localtime=error} != "") +make: "varmod-localtime.mk" line 133: Malformed conditional '${:L:localtime=error} != ""' make: "varmod-localtime.mk" line 144: while evaluating variable "%Y" with value "%Y": Invalid time value "100000S,1970,bad," -make: "varmod-localtime.mk" line 144: Malformed conditional (${%Y:L:localtime=100000S,1970,bad,} != "bad") +make: "varmod-localtime.mk" line 144: Malformed conditional '${%Y:L:localtime=100000S,1970,bad,} != "bad"' make: Fatal errors encountered -- cannot continue make: stopped making "all" in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/varmod-localtime.mk diff -u src/usr.bin/make/unit-tests/varmod-localtime.mk:1.17 src/usr.bin/make/unit-tests/varmod-localtime.mk:1.18 --- src/usr.bin/make/unit-tests/varmod-localtime.mk:1.17 Fri Jul 5 19:47:22 2024 +++ src/usr.bin/make/unit-tests/varmod-localtime.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-localtime.mk,v 1.17 2024/07/05 19:47:22 rillig Exp $ +# $NetBSD: varmod-localtime.mk,v 1.18 2024/08/06 18:00:17 rillig Exp $ # # Tests for the :localtime variable modifier, which formats a timestamp # using strftime(3) in local time. @@ -57,7 +57,7 @@ # make. Therefore, since var.c 1.631, negative time stamps produce a # parse error. # expect+2: while evaluating "${:L:localtime=-1} != """ with value "": Invalid time value "-1" -# expect+1: Malformed conditional (${:L:localtime=-1} != "") +# expect+1: Malformed conditional '${:L:localtime=-1} != ""' .if ${:L:localtime=-1} != "" . error .else @@ -68,7 +68,7 @@ # Spaces were allowed before var.c 1.631 from 2020-10-31 21:40:20, not # because it would make sense but just as a side-effect from using strtoul. # expect+2: while evaluating "${:L:localtime= 1} != """ with value "": Invalid time value " 1" -# expect+1: Malformed conditional (${:L:localtime= 1} != "") +# expect+1: Malformed conditional '${:L:localtime= 1} != ""' .if ${:L:localtime= 1} != "" . error .else @@ -116,7 +116,7 @@ # Since var.c 1.631 from 2020-10-31, the overflow is detected and produces a # parse error. # expect+2: while evaluating "${:L:localtime=10000000000000000000000000000000} != """ with value "": Invalid time value "10000000000000000000000000000000" -# expect+1: Malformed conditional (${:L:localtime=10000000000000000000000000000000} != "") +# expect+1: Malformed conditional '${:L:localtime=10000000000000000000000000000000} != ""' .if ${:L:localtime=10000000000000000000000000000000} != "" . error .else @@ -129,7 +129,7 @@ # modifiers. Because of the unknown modifier 'e' from the 'error', the whole # variable value was discarded and thus not printed. # expect+2: while evaluating "${:L:localtime=error} != """ with value "": Invalid time value "error" -# expect+1: Malformed conditional (${:L:localtime=error} != "") +# expect+1: Malformed conditional '${:L:localtime=error} != ""' .if ${:L:localtime=error} != "" . error .else @@ -140,7 +140,7 @@ # followed by the next modifier, without a ':' separator. This was the same # bug as for the ':L' and ':P' modifiers. # expect+2: while evaluating variable "%Y" with value "%Y": Invalid time value "100000S,1970,bad," -# expect+1: Malformed conditional (${%Y:L:localtime=100000S,1970,bad,} != "bad") +# expect+1: Malformed conditional '${%Y:L:localtime=100000S,1970,bad,} != "bad"' .if ${%Y:L:localtime=100000S,1970,bad,} != "bad" . error .endif Index: src/usr.bin/make/unit-tests/varmod-loop-varname.mk diff -u src/usr.bin/make/unit-tests/varmod-loop-varname.mk:1.9 src/usr.bin/make/unit-tests/varmod-loop-varname.mk:1.10 --- src/usr.bin/make/unit-tests/varmod-loop-varname.mk:1.9 Fri Jul 5 19:47:22 2024 +++ src/usr.bin/make/unit-tests/varmod-loop-varname.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-loop-varname.mk,v 1.9 2024/07/05 19:47:22 rillig Exp $ +# $NetBSD: varmod-loop-varname.mk,v 1.10 2024/08/06 18:00:17 rillig Exp $ # # Tests for the first part of the variable modifier ':@var@...@', which # contains the variable name to use during the loop. @@ -14,7 +14,7 @@ # Since var.c 1.907 from 2021-04-04, a '$' is no longer allowed in the # variable name. # expect+2: while evaluating "${:Uone two three:@${:Ubar:S,b,v,}@+${var}+@} != "+one+ +two+ +three+"" with value "one two three": In the :@ modifier, the variable name "${:Ubar:S,b,v,}" must not contain a dollar -# expect+1: Malformed conditional (${:Uone two three:@${:Ubar:S,b,v,}@+${var}+@} != "+one+ +two+ +three+") +# expect+1: Malformed conditional '${:Uone two three:@${:Ubar:S,b,v,}@+${var}+@} != "+one+ +two+ +three+"' .if ${:Uone two three:@${:Ubar:S,b,v,}@+${var}+@} != "+one+ +two+ +three+" . error .else @@ -85,21 +85,21 @@ RES3= 3 # Since var.c 1.907 from 2021-04-04, a '$' is no longer allowed in the # variable name. # expect+2: while evaluating variable "1 2 3" with value "1 2 3": In the :@ modifier, the variable name "v$" must not contain a dollar -# expect+1: Malformed conditional (${1 2 3:L:@v$@($v)@} != "(1) (2) (3)") +# expect+1: Malformed conditional '${1 2 3:L:@v$@($v)@} != "(1) (2) (3)"' .if ${1 2 3:L:@v$@($v)@} != "(1) (2) (3)" . error .else . error .endif # expect+2: while evaluating variable "1 2 3" with value "1 2 3": In the :@ modifier, the variable name "v$$" must not contain a dollar -# expect+1: Malformed conditional (${1 2 3:L:@v$$@($v)@} != "() () ()") +# expect+1: Malformed conditional '${1 2 3:L:@v$$@($v)@} != "() () ()"' .if ${1 2 3:L:@v$$@($v)@} != "() () ()" . error .else . error .endif # expect+2: while evaluating variable "1 2 3" with value "1 2 3": In the :@ modifier, the variable name "v$$$" must not contain a dollar -# expect+1: Malformed conditional (${1 2 3:L:@v$$$@($v)@} != "() () ()") +# expect+1: Malformed conditional '${1 2 3:L:@v$$$@($v)@} != "() () ()"' .if ${1 2 3:L:@v$$$@($v)@} != "() () ()" . error .else Index: src/usr.bin/make/unit-tests/varmod-mtime.exp diff -u src/usr.bin/make/unit-tests/varmod-mtime.exp:1.9 src/usr.bin/make/unit-tests/varmod-mtime.exp:1.10 --- src/usr.bin/make/unit-tests/varmod-mtime.exp:1.9 Thu Jul 4 17:47:54 2024 +++ src/usr.bin/make/unit-tests/varmod-mtime.exp Tue Aug 6 18:00:17 2024 @@ -1,14 +1,14 @@ make: "varmod-mtime.mk" line 47: while evaluating variable "no/such/file" with value "no/such/file": Invalid argument '123x' for modifier ':mtime' -make: "varmod-mtime.mk" line 47: Malformed conditional (${no/such/file:L:mtime=123x}) +make: "varmod-mtime.mk" line 47: Malformed conditional '${no/such/file:L:mtime=123x}' make: "varmod-mtime.mk" line 70: while evaluating variable "no/such/file1 no/such/file2" with value "no/such/file1 no/such/file2": Cannot determine mtime for 'no/such/file1': <ENOENT> make: "varmod-mtime.mk" line 70: while evaluating variable "no/such/file1 no/such/file2" with value "no/such/file1 no/such/file2": Cannot determine mtime for 'no/such/file2': <ENOENT> -make: "varmod-mtime.mk" line 70: Malformed conditional (${no/such/file1 no/such/file2:L:mtime=error}) +make: "varmod-mtime.mk" line 70: Malformed conditional '${no/such/file1 no/such/file2:L:mtime=error}' make: "varmod-mtime.mk" line 81: while evaluating variable "MAKEFILE" with value "varmod-mtime.mk": Invalid argument 'errorhandler-no' for modifier ':mtime' -make: "varmod-mtime.mk" line 81: Malformed conditional (${MAKEFILE:mtime=errorhandler-no} > 0) +make: "varmod-mtime.mk" line 81: Malformed conditional '${MAKEFILE:mtime=errorhandler-no} > 0' make: "varmod-mtime.mk" line 90: while evaluating variable "MAKEFILE" with value "varmod-mtime.mk": Invalid argument 'warn' for modifier ':mtime' -make: "varmod-mtime.mk" line 90: Malformed conditional (${MAKEFILE:mtime=warn} > 0) +make: "varmod-mtime.mk" line 90: Malformed conditional '${MAKEFILE:mtime=warn} > 0' make: "varmod-mtime.mk" line 115: while evaluating variable "anything" with value "anything": Unknown modifier "mtim" -make: "varmod-mtime.mk" line 115: Malformed conditional (${anything:L:mtim}) +make: "varmod-mtime.mk" line 115: Malformed conditional '${anything:L:mtim}' make: Fatal errors encountered -- cannot continue make: stopped in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/varmod-order.mk diff -u src/usr.bin/make/unit-tests/varmod-order.mk:1.15 src/usr.bin/make/unit-tests/varmod-order.mk:1.16 --- src/usr.bin/make/unit-tests/varmod-order.mk:1.15 Sat Jul 20 08:54:19 2024 +++ src/usr.bin/make/unit-tests/varmod-order.mk Tue Aug 6 18:00:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-order.mk,v 1.15 2024/07/20 08:54:19 rillig Exp $ +# $NetBSD: varmod-order.mk,v 1.16 2024/08/06 18:00:17 rillig Exp $ # # Tests for the :O variable modifier and its variants, which either sort the # words of the value or shuffle them. @@ -27,7 +27,7 @@ _:= ${NUMBERS:Onr # combined. # # expect+2: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Oxn" -# expect+1: Malformed conditional (${NUMBERS:Oxn}) +# expect+1: Malformed conditional '${NUMBERS:Oxn}' .if ${NUMBERS:Oxn} . error .else @@ -37,7 +37,7 @@ _:= ${NUMBERS:Onr # Extra characters after ':On' are detected and diagnosed. # # expect+2: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":On_typo" -# expect+1: Malformed conditional (${NUMBERS:On_typo}) +# expect+1: Malformed conditional '${NUMBERS:On_typo}' .if ${NUMBERS:On_typo} . error .else @@ -47,7 +47,7 @@ _:= ${NUMBERS:Onr # Extra characters after ':Onr' are detected and diagnosed. # # expect+2: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Onr_typo" -# expect+1: Malformed conditional (${NUMBERS:Onr_typo}) +# expect+1: Malformed conditional '${NUMBERS:Onr_typo}' .if ${NUMBERS:Onr_typo} . error .else @@ -57,7 +57,7 @@ _:= ${NUMBERS:Onr # Extra characters after ':Orn' are detected and diagnosed. # # expect+2: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Orn_typo" -# expect+1: Malformed conditional (${NUMBERS:Orn_typo}) +# expect+1: Malformed conditional '${NUMBERS:Orn_typo}' .if ${NUMBERS:Orn_typo} . error .else @@ -69,7 +69,7 @@ _:= ${NUMBERS:Onr # not make sense. # # expect+2: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Onn" -# expect+1: Malformed conditional (${NUMBERS:Onn}) +# expect+1: Malformed conditional '${NUMBERS:Onn}' .if ${NUMBERS:Onn} . error .else @@ -79,7 +79,7 @@ _:= ${NUMBERS:Onr # Repeating the 'r' is not supported as well, for the same reasons as above. # # expect+2: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Onrr" -# expect+1: Malformed conditional (${NUMBERS:Onrr}) +# expect+1: Malformed conditional '${NUMBERS:Onrr}' .if ${NUMBERS:Onrr} . error .else @@ -89,7 +89,7 @@ _:= ${NUMBERS:Onr # Repeating the 'r' is not supported as well, for the same reasons as above. # # expect+2: while evaluating variable "NUMBERS" with value "8 5 4 9 1 7 6 10 3 2": Bad modifier ":Orrn" -# expect+1: Malformed conditional (${NUMBERS:Orrn}) +# expect+1: Malformed conditional '${NUMBERS:Orrn}' .if ${NUMBERS:Orrn} . error .else @@ -104,7 +104,7 @@ _:= ${NUMBERS:Onr # There is no such fallback for the ':O' modifiers. SWITCH= On # expect+2: while evaluating variable "SWITCH" with value "On": Bad modifier ":On=Off" -# expect+1: Malformed conditional (${SWITCH:On=Off} != "Off") +# expect+1: Malformed conditional '${SWITCH:On=Off} != "Off"' .if ${SWITCH:On=Off} != "Off" . error .else Index: src/usr.bin/make/unit-tests/varmod-range.exp diff -u src/usr.bin/make/unit-tests/varmod-range.exp:1.15 src/usr.bin/make/unit-tests/varmod-range.exp:1.16 --- src/usr.bin/make/unit-tests/varmod-range.exp:1.15 Fri Jul 5 19:47:22 2024 +++ src/usr.bin/make/unit-tests/varmod-range.exp Tue Aug 6 18:00:17 2024 @@ -1,14 +1,14 @@ -make: "varmod-range.mk" line 43: Malformed conditional (${:range=5} != "") +make: "varmod-range.mk" line 43: Malformed conditional '${:range=5} != ""' make: "varmod-range.mk" line 67: while evaluating "${:U:range=x}Rest" != "Rest"" with value "": Invalid number "x}Rest" != "Rest"" for ':range' modifier -make: "varmod-range.mk" line 67: Malformed conditional ("${:U:range=x}Rest" != "Rest") +make: "varmod-range.mk" line 67: Malformed conditional '"${:U:range=x}Rest" != "Rest"' make: "varmod-range.mk" line 78: while evaluating "${:U:range=0x0}Rest" != "Rest"" with value "1": Unknown modifier "x0" -make: "varmod-range.mk" line 78: Malformed conditional ("${:U:range=0x0}Rest" != "Rest") +make: "varmod-range.mk" line 78: Malformed conditional '"${:U:range=0x0}Rest" != "Rest"' make: "varmod-range.mk" line 96: while evaluating variable "a b c" with value "a b c": Unknown modifier "rang" -make: "varmod-range.mk" line 96: Malformed conditional ("${a b c:L:rang}Rest" != "Rest") +make: "varmod-range.mk" line 96: Malformed conditional '"${a b c:L:rang}Rest" != "Rest"' make: "varmod-range.mk" line 105: while evaluating variable "a b c" with value "a b c": Unknown modifier "rango" -make: "varmod-range.mk" line 105: Malformed conditional ("${a b c:L:rango}Rest" != "Rest") +make: "varmod-range.mk" line 105: Malformed conditional '"${a b c:L:rango}Rest" != "Rest"' make: "varmod-range.mk" line 114: while evaluating variable "a b c" with value "a b c": Unknown modifier "ranger" -make: "varmod-range.mk" line 114: Malformed conditional ("${a b c:L:ranger}Rest" != "Rest") +make: "varmod-range.mk" line 114: Malformed conditional '"${a b c:L:ranger}Rest" != "Rest"' make: Fatal errors encountered -- cannot continue make: stopped making "all" in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/varmod.exp diff -u src/usr.bin/make/unit-tests/varmod.exp:1.15 src/usr.bin/make/unit-tests/varmod.exp:1.16 --- src/usr.bin/make/unit-tests/varmod.exp:1.15 Fri Jul 5 19:47:22 2024 +++ src/usr.bin/make/unit-tests/varmod.exp Tue Aug 6 18:00:17 2024 @@ -4,30 +4,30 @@ make: "varmod.mk" line 107: while evalua make: "varmod.mk" line 117: while evaluating variable "VAR" with value "VAR": Missing delimiter ':' after modifier "P" make: "varmod.mk" line 119: Missing argument for ".error" make: "varmod.mk" line 126: while evaluating variable "word" with value "word": Bad modifier ":[99333000222000111000]" -make: "varmod.mk" line 126: Malformed conditional (${word:L:[99333000222000111000]}) +make: "varmod.mk" line 126: Malformed conditional '${word:L:[99333000222000111000]}' make: "varmod.mk" line 130: while evaluating variable "word" with value "word": Bad modifier ":[2147483648]" -make: "varmod.mk" line 130: Malformed conditional (${word:L:[2147483648]}) +make: "varmod.mk" line 130: Malformed conditional '${word:L:[2147483648]}' make: "varmod.mk" line 137: while evaluating variable "word" with value "word": Invalid number "99333000222000111000}" for ':range' modifier -make: "varmod.mk" line 137: Malformed conditional (${word:L:range=99333000222000111000}) +make: "varmod.mk" line 137: Malformed conditional '${word:L:range=99333000222000111000}' make: "varmod.mk" line 145: while evaluating "${:${:Ugmtime=\\}}" with value "": Invalid time value "\" -make: "varmod.mk" line 145: Malformed conditional (${:${:Ugmtime=\\}}) +make: "varmod.mk" line 145: Malformed conditional '${:${:Ugmtime=\\}}' make: "varmod.mk" line 160: while evaluating variable "VAR" with value "value$": Dollar followed by nothing make: "varmod.mk" line 166: while evaluating variable "VAR" with value "value$": Dollar followed by nothing make: "varmod.mk" line 166: while evaluating variable "VAR" with value "value$ appended$": Dollar followed by nothing make: "varmod.mk" line 176: while evaluating variable "word" with value "word": Dollar followed by nothing make: "varmod.mk" line 181: while evaluating variable "word" with value "": Bad modifier ":[$]" -make: "varmod.mk" line 181: Malformed conditional (${word:[$]}) +make: "varmod.mk" line 181: Malformed conditional '${word:[$]}' make: "varmod.mk" line 198: while evaluating variable "VAR" with value "value$ appended$": Dollar followed by nothing make: "varmod.mk" line 198: while evaluating variable "VAR" with value "value<space>appended": Invalid variable name '}', at "$} != "set"" make: "varmod.mk" line 202: while evaluating "${:Ufallback$} != "fallback"" with value "": Invalid variable name '}', at "$} != "fallback"" make: "varmod.mk" line 207: while evaluating variable "%y" with value "%y": Invalid time value "1000$" -make: "varmod.mk" line 207: Malformed conditional (${%y:L:gmtime=1000$}) +make: "varmod.mk" line 207: Malformed conditional '${%y:L:gmtime=1000$}' make: "varmod.mk" line 214: while evaluating variable "%y" with value "%y": Invalid time value "1000$" -make: "varmod.mk" line 214: Malformed conditional (${%y:L:localtime=1000$}) +make: "varmod.mk" line 214: Malformed conditional '${%y:L:localtime=1000$}' make: "varmod.mk" line 220: while evaluating variable "word" with value "word": Dollar followed by nothing make: "varmod.mk" line 224: while evaluating variable "word" with value "word": Dollar followed by nothing make: "varmod.mk" line 229: while evaluating variable "." with value ".": Invalid argument 'fallback$' for modifier ':mtime' -make: "varmod.mk" line 229: Malformed conditional (${.:L:mtime=fallback$}) +make: "varmod.mk" line 229: Malformed conditional '${.:L:mtime=fallback$}' make: Fatal errors encountered -- cannot continue make: stopped in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/varparse-dynamic.exp diff -u src/usr.bin/make/unit-tests/varparse-dynamic.exp:1.3 src/usr.bin/make/unit-tests/varparse-dynamic.exp:1.4 --- src/usr.bin/make/unit-tests/varparse-dynamic.exp:1.3 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/varparse-dynamic.exp Tue Aug 6 18:00:17 2024 @@ -1,5 +1,5 @@ -make: "varparse-dynamic.mk" line 9: Malformed conditional (${.TARGEX}) -make: "varparse-dynamic.mk" line 12: Malformed conditional (${.TARGXX}) +make: "varparse-dynamic.mk" line 9: Malformed conditional '${.TARGEX}' +make: "varparse-dynamic.mk" line 12: Malformed conditional '${.TARGXX}' make: Fatal errors encountered -- cannot continue make: stopped in unit-tests exit status 1