Module Name: src Committed By: rillig Date: Sun Nov 19 21:47:52 UTC 2023
Modified Files: src/usr.bin/make/unit-tests: cmdline-undefined.mk comment.mk cond-cmp-string.mk cond-cmp-unary.mk cond-eof.mk cond-func-defined.exp cond-func-defined.mk cond-func-empty.mk cond-func-exists.mk cond-func.mk cond-late.mk cond-short.mk cond-token-number.mk cond-token-plain.exp cond-token-plain.mk cond-token-string.exp cond-token-string.mk cond-token-var.mk dep-var.mk deptgt-makeflags.mk deptgt.mk directive-else.mk directive-for-empty.mk directive-for-errors.mk directive-for-escape.mk directive-for-if.mk directive-ifmake.mk lint.mk opt-debug-file.mk opt-debug-jobs.mk opt-debug-lint.mk opt-debug-var.mk parse-var.mk sh-dots.mk var-op-assign.mk var-op-default.mk var-op-expand.mk var-recursive.mk var-scope-cmdline.mk var-scope-local.mk varmod-assign.mk varmod-defined.mk varmod-edge.mk varmod-gmtime.mk varmod-ifelse.exp varmod-ifelse.mk varmod-indirect.mk varmod-l-name-to-value.mk varmod-localtime.mk varmod-loop-varname.mk varmod-loop.mk varmod-match-escape.mk varmod-match.mk varmod-range.mk varmod-subst-regex.mk varmod-sysv.mk varmod-to-separator.mk varmod-undefined.mk varmod.mk varname-empty.mk varname.mk varparse-errors.mk varparse-mod.mk varparse-undef-partial.mk Log Message: tests/make: replace 'variable expression' with 'expression' Each expression is based on a variable, there's no need for the verbosity. The wording in make's diagnostics will be changed in a follow-up commit. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/cmdline-undefined.mk \ src/usr.bin/make/unit-tests/sh-dots.mk \ src/usr.bin/make/unit-tests/var-op-default.mk \ src/usr.bin/make/unit-tests/var-scope-cmdline.mk \ src/usr.bin/make/unit-tests/varparse-undef-partial.mk cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/comment.mk \ src/usr.bin/make/unit-tests/cond-cmp-unary.mk \ src/usr.bin/make/unit-tests/cond-eof.mk \ src/usr.bin/make/unit-tests/opt-debug-jobs.mk \ src/usr.bin/make/unit-tests/var-recursive.mk \ src/usr.bin/make/unit-tests/varmod-loop-varname.mk cvs rdiff -u -r1.17 -r1.18 src/usr.bin/make/unit-tests/cond-cmp-string.mk \ src/usr.bin/make/unit-tests/varmod-edge.mk \ src/usr.bin/make/unit-tests/varmod-ifelse.exp cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/cond-func-defined.exp \ src/usr.bin/make/unit-tests/cond-token-var.mk \ src/usr.bin/make/unit-tests/deptgt-makeflags.mk \ src/usr.bin/make/unit-tests/var-scope-local.mk \ src/usr.bin/make/unit-tests/varmod-l-name-to-value.mk \ src/usr.bin/make/unit-tests/varmod-subst-regex.mk cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/cond-func-defined.mk \ src/usr.bin/make/unit-tests/cond-token-string.exp \ src/usr.bin/make/unit-tests/var-op-assign.mk cvs rdiff -u -r1.22 -r1.23 src/usr.bin/make/unit-tests/cond-func-empty.mk cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/cond-func-exists.mk \ src/usr.bin/make/unit-tests/directive-for-errors.mk cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/cond-func.mk \ src/usr.bin/make/unit-tests/varmod-localtime.mk \ src/usr.bin/make/unit-tests/varname.mk cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/cond-late.mk \ src/usr.bin/make/unit-tests/lint.mk cvs rdiff -u -r1.21 -r1.22 src/usr.bin/make/unit-tests/cond-short.mk \ src/usr.bin/make/unit-tests/directive-for-escape.mk cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/cond-token-number.mk \ src/usr.bin/make/unit-tests/opt-debug-file.mk \ src/usr.bin/make/unit-tests/varname-empty.mk \ src/usr.bin/make/unit-tests/varparse-errors.mk cvs rdiff -u -r1.19 -r1.20 src/usr.bin/make/unit-tests/cond-token-plain.exp cvs rdiff -u -r1.18 -r1.19 src/usr.bin/make/unit-tests/cond-token-plain.mk \ src/usr.bin/make/unit-tests/var-op-expand.mk cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/cond-token-string.mk \ src/usr.bin/make/unit-tests/dep-var.mk \ src/usr.bin/make/unit-tests/directive-else.mk \ src/usr.bin/make/unit-tests/parse-var.mk \ src/usr.bin/make/unit-tests/varmod-range.mk \ src/usr.bin/make/unit-tests/varmod-undefined.mk \ src/usr.bin/make/unit-tests/varmod.mk cvs rdiff -u -r1.14 -r1.15 src/usr.bin/make/unit-tests/deptgt.mk cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/directive-for-empty.mk \ src/usr.bin/make/unit-tests/directive-for-if.mk \ src/usr.bin/make/unit-tests/opt-debug-var.mk cvs rdiff -u -r1.11 -r1.12 src/usr.bin/make/unit-tests/directive-ifmake.mk \ src/usr.bin/make/unit-tests/varmod-match-escape.mk cvs rdiff -u -r1.15 -r1.16 src/usr.bin/make/unit-tests/opt-debug-lint.mk \ src/usr.bin/make/unit-tests/varmod-assign.mk \ src/usr.bin/make/unit-tests/varmod-defined.mk \ src/usr.bin/make/unit-tests/varmod-sysv.mk cvs rdiff -u -r1.20 -r1.21 src/usr.bin/make/unit-tests/varmod-gmtime.mk cvs rdiff -u -r1.24 -r1.25 src/usr.bin/make/unit-tests/varmod-ifelse.mk cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/varmod-indirect.mk \ src/usr.bin/make/unit-tests/varmod-to-separator.mk cvs rdiff -u -r1.23 -r1.24 src/usr.bin/make/unit-tests/varmod-loop.mk cvs rdiff -u -r1.16 -r1.17 src/usr.bin/make/unit-tests/varmod-match.mk cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/varparse-mod.mk 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/unit-tests/cmdline-undefined.mk diff -u src/usr.bin/make/unit-tests/cmdline-undefined.mk:1.3 src/usr.bin/make/unit-tests/cmdline-undefined.mk:1.4 --- src/usr.bin/make/unit-tests/cmdline-undefined.mk:1.3 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/cmdline-undefined.mk Sun Nov 19 21:47:52 2023 @@ -1,6 +1,6 @@ -# $NetBSD: cmdline-undefined.mk,v 1.3 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: cmdline-undefined.mk,v 1.4 2023/11/19 21:47:52 rillig Exp $ # -# Tests for undefined variable expressions in the command line. +# Tests for undefined expressions in the command line. all: # When the command line is parsed, variable assignments using the Index: src/usr.bin/make/unit-tests/sh-dots.mk diff -u src/usr.bin/make/unit-tests/sh-dots.mk:1.3 src/usr.bin/make/unit-tests/sh-dots.mk:1.4 --- src/usr.bin/make/unit-tests/sh-dots.mk:1.3 Sun Oct 25 22:04:24 2020 +++ src/usr.bin/make/unit-tests/sh-dots.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: sh-dots.mk,v 1.3 2020/10/25 22:04:24 rillig Exp $ +# $NetBSD: sh-dots.mk,v 1.4 2023/11/19 21:47:52 rillig Exp $ # # Tests for the special shell command line "...", which does not run the # commands below it but appends them to the list of commands that are run @@ -29,8 +29,8 @@ commented: .IGNORE ... # Run the below commands later @echo commented delayed ${.TARGET} -# The dots don't have to be written literally, they can also come from a -# variable expression. +# The dots don't have to be written literally, they can also come from an +# expression. indirect: @echo indirect regular ${:U...} Index: src/usr.bin/make/unit-tests/var-op-default.mk diff -u src/usr.bin/make/unit-tests/var-op-default.mk:1.3 src/usr.bin/make/unit-tests/var-op-default.mk:1.4 --- src/usr.bin/make/unit-tests/var-op-default.mk:1.3 Mon Dec 7 21:35:43 2020 +++ src/usr.bin/make/unit-tests/var-op-default.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: var-op-default.mk,v 1.3 2020/12/07 21:35:43 rillig Exp $ +# $NetBSD: var-op-default.mk,v 1.4 2023/11/19 21:47:52 rillig Exp $ # # Tests for the ?= variable assignment operator, which only assigns # if the variable is still undefined. @@ -61,8 +61,8 @@ VAR.${:Uparam}?= not used # Now demonstrate that the variable name is indeed expanded exactly once. # This is tricky to measure correctly since there are many inconsistencies -# in and around the code that expands variable expressions in the various -# places where variable expressions can occur. If in doubt, enable the +# in and around the code that expands expressions in the various +# places where expressions can occur. If in doubt, enable the # following debug flags to see what happens: #.MAKEFLAGS: -dcpv EXPAND_NAME= EXPAND.$$$$ # The full variable name is EXPAND.$$ Index: src/usr.bin/make/unit-tests/var-scope-cmdline.mk diff -u src/usr.bin/make/unit-tests/var-scope-cmdline.mk:1.3 src/usr.bin/make/unit-tests/var-scope-cmdline.mk:1.4 --- src/usr.bin/make/unit-tests/var-scope-cmdline.mk:1.3 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/var-scope-cmdline.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: var-scope-cmdline.mk,v 1.3 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: var-scope-cmdline.mk,v 1.4 2023/11/19 21:47:52 rillig Exp $ # # Tests for variables specified on the command line. # @@ -55,7 +55,7 @@ # temporary loop variable after finishing the loop. It was probably not # intended back then that a side effect of this seemingly simple change was # that both global and cmdline variables could now be undefined at will as a -# side effect of evaluating a variable expression. As of 2021-02-23, this is +# side effect of evaluating an expression. As of 2021-02-23, this is # still possible. # # Most cmdline variables are set at the very beginning, when parsing the Index: src/usr.bin/make/unit-tests/varparse-undef-partial.mk diff -u src/usr.bin/make/unit-tests/varparse-undef-partial.mk:1.3 src/usr.bin/make/unit-tests/varparse-undef-partial.mk:1.4 --- src/usr.bin/make/unit-tests/varparse-undef-partial.mk:1.3 Wed Nov 4 05:10:01 2020 +++ src/usr.bin/make/unit-tests/varparse-undef-partial.mk Sun Nov 19 21:47:52 2023 @@ -1,7 +1,7 @@ -# $NetBSD: varparse-undef-partial.mk,v 1.3 2020/11/04 05:10:01 rillig Exp $ +# $NetBSD: varparse-undef-partial.mk,v 1.4 2023/11/19 21:47:52 rillig Exp $ # When an undefined variable is expanded in a ':=' assignment, only the -# initial '$' of the variable expression is skipped by the parser, while +# initial '$' of the expression is skipped by the parser, while # the remaining expression is evaluated. In edge cases this can lead to # a completely different interpretation of the partially expanded text. @@ -15,7 +15,7 @@ PARAM= :Q # parser (see Var_Subst, the Buf_AddByte in the else branch) and the rest # of the expression is expanded as usual. # -# The resulting variable expression is ${VAR.:Q}, which means that the +# The resulting expression is ${VAR.:Q}, which means that the # interpretation of the ":Q" has changed from being part of the variable # name to being a variable modifier. This is a classical code injection. EVAL:= ${LIST} @@ -37,7 +37,7 @@ ${:UVAR.\:Q}= var-dot with parameter :Q # In contrast to the previous line, evaluating the original LIST again now # produces a different result since the variable named "VAR.:Q" is now # defined. It is expanded as usual, interpreting the ":Q" as part of the -# variable name, as would be expected from reading the variable expression. +# variable name, as would be expected from reading the expression. EVAL:= ${LIST} .if ${EVAL} != "defined var-dot with parameter :Q end" . error ${EVAL} Index: src/usr.bin/make/unit-tests/comment.mk diff -u src/usr.bin/make/unit-tests/comment.mk:1.5 src/usr.bin/make/unit-tests/comment.mk:1.6 --- src/usr.bin/make/unit-tests/comment.mk:1.5 Sun May 8 06:51:27 2022 +++ src/usr.bin/make/unit-tests/comment.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: comment.mk,v 1.5 2022/05/08 06:51:27 rillig Exp $ +# $NetBSD: comment.mk,v 1.6 2023/11/19 21:47:52 rillig Exp $ # # Demonstrate how comments are written in makefiles. @@ -55,7 +55,7 @@ VAR= \# # Both in the assignment. # Since 2012-03-24 the variable modifier :[#] does not need to be escaped. # To keep the parsing code simple, any "[#" does not start a comment, even -# outside of a variable expression. +# outside of an expression. WORDS= ${VAR:[#]} [# .if ${WORDS} != "1 [#" . error Index: src/usr.bin/make/unit-tests/cond-cmp-unary.mk diff -u src/usr.bin/make/unit-tests/cond-cmp-unary.mk:1.5 src/usr.bin/make/unit-tests/cond-cmp-unary.mk:1.6 --- src/usr.bin/make/unit-tests/cond-cmp-unary.mk:1.5 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/cond-cmp-unary.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: cond-cmp-unary.mk,v 1.5 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: cond-cmp-unary.mk,v 1.6 2023/11/19 21:47:52 rillig Exp $ # # Tests for unary comparisons in .if conditions, that is, comparisons with # a single operand. If the operand is a number, it is compared to zero, @@ -24,7 +24,7 @@ . error .endif -# The empty string may come from a variable expression. +# The empty string may come from an expression. # # XXX: As of 2023-06-01, this empty string is interpreted "as a number" in # EvalTruthy, which is plain wrong. The bug is in TryParseNumber. @@ -32,13 +32,13 @@ . error .endif -# A variable expression that is not surrounded by quotes is interpreted +# An expression that is not surrounded by quotes is interpreted # as a number if possible, otherwise as a string. .if ${:U0} . error .endif -# A non-zero number from a variable expression evaluates to true. +# A non-zero number from an expression evaluates to true. .if !${:U12345} . error .endif Index: src/usr.bin/make/unit-tests/cond-eof.mk diff -u src/usr.bin/make/unit-tests/cond-eof.mk:1.5 src/usr.bin/make/unit-tests/cond-eof.mk:1.6 --- src/usr.bin/make/unit-tests/cond-eof.mk:1.5 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/cond-eof.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: cond-eof.mk,v 1.5 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: cond-eof.mk,v 1.6 2023/11/19 21:47:52 rillig Exp $ # # Tests for parsing the end of '.if' conditions, which are represented as the # token TOK_EOF. @@ -9,7 +9,7 @@ SIDE_EFFECT2= ${:!echo 'side effect 2' 1 # In the following conditions, ${SIDE_EFFECT} is the position of the first # parse error. Before cond.c 1.286 from 2021-12-10, it was always fully -# evaluated, even if it was not necessary to expand the variable expression. +# evaluated, even if it was not necessary to expand the expression. # 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. Index: src/usr.bin/make/unit-tests/opt-debug-jobs.mk diff -u src/usr.bin/make/unit-tests/opt-debug-jobs.mk:1.5 src/usr.bin/make/unit-tests/opt-debug-jobs.mk:1.6 --- src/usr.bin/make/unit-tests/opt-debug-jobs.mk:1.5 Thu Nov 12 21:54:52 2020 +++ src/usr.bin/make/unit-tests/opt-debug-jobs.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: opt-debug-jobs.mk,v 1.5 2020/11/12 21:54:52 rillig Exp $ +# $NetBSD: opt-debug-jobs.mk,v 1.6 2023/11/19 21:47:52 rillig Exp $ # # Tests for the -dj command line option, which adds debug logging about # running jobs in multiple shells. @@ -11,7 +11,7 @@ all: # Only the actual command is logged. - # To see the evaluation of the variable expressions, use -dv. + # To see the evaluation of the expressions, use -dv. : ${:Uexpanded} expression # Undefined variables expand to empty strings. Index: src/usr.bin/make/unit-tests/var-recursive.mk diff -u src/usr.bin/make/unit-tests/var-recursive.mk:1.5 src/usr.bin/make/unit-tests/var-recursive.mk:1.6 --- src/usr.bin/make/unit-tests/var-recursive.mk:1.5 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/var-recursive.mk Sun Nov 19 21:47:52 2023 @@ -1,6 +1,6 @@ -# $NetBSD: var-recursive.mk,v 1.5 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: var-recursive.mk,v 1.6 2023/11/19 21:47:52 rillig Exp $ # -# Tests for variable expressions that refer to themselves and thus +# Tests for expressions that refer to themselves and thus # cannot be evaluated. TESTS= direct indirect conditional short target Index: src/usr.bin/make/unit-tests/varmod-loop-varname.mk diff -u src/usr.bin/make/unit-tests/varmod-loop-varname.mk:1.5 src/usr.bin/make/unit-tests/varmod-loop-varname.mk:1.6 --- src/usr.bin/make/unit-tests/varmod-loop-varname.mk:1.5 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/varmod-loop-varname.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-loop-varname.mk,v 1.5 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: varmod-loop-varname.mk,v 1.6 2023/11/19 21:47:52 rillig Exp $ # # Tests for the first part of the variable modifier ':@var@...@', which # contains the variable name to use during the loop. @@ -112,7 +112,7 @@ RES3= 3 # # As of 2020-10-18, the :@ modifier is implemented by actually setting a # variable in the scope of the expression and deleting it again after the -# loop. This is different from the .for loops, which substitute the variable +# loop. This is different from the .for loops, which substitute the # expression with ${:Uvalue}, leading to different unwanted side effects. # # To make the behavior more predictable, the :@ modifier should restore the Index: src/usr.bin/make/unit-tests/cond-cmp-string.mk diff -u src/usr.bin/make/unit-tests/cond-cmp-string.mk:1.17 src/usr.bin/make/unit-tests/cond-cmp-string.mk:1.18 --- src/usr.bin/make/unit-tests/cond-cmp-string.mk:1.17 Tue Mar 28 14:38:29 2023 +++ src/usr.bin/make/unit-tests/cond-cmp-string.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: cond-cmp-string.mk,v 1.17 2023/03/28 14:38:29 rillig Exp $ +# $NetBSD: cond-cmp-string.mk,v 1.18 2023/11/19 21:47:52 rillig Exp $ # # Tests for string comparisons in .if conditions. @@ -20,11 +20,11 @@ . error .endif -# The left-hand side of the comparison requires that any variable expression +# The left-hand side of the comparison requires that any expression # is defined. # # The variable named "" is never defined, nevertheless it can be used as a -# starting point for variable expressions. Applying the :U modifier to such +# starting point for expressions. Applying the :U modifier to such # an undefined expression turns it into a defined expression. # # See ApplyModifier_Defined and DEF_DEFINED. @@ -63,13 +63,13 @@ . error .endif -# A variable expression can be enclosed in double quotes. +# An expression can be enclosed in double quotes. .if ${:Uword} != "${:Uword}" . error .endif # Between 2003-01-01 (maybe even earlier) and 2020-10-30, adding one of the -# characters " \t!=><" directly after a variable expression resulted in a +# characters " \t!=><" directly after an expression resulted in a # "Malformed conditional", even though the string was well-formed. .if ${:Uword } != "${:Uword} " . error @@ -89,12 +89,12 @@ . error .endif -# Adding another variable expression to the string literal works though. +# Adding another expression to the string literal works though. .if ${:Uword} != "${:Uwo}${:Urd}" . error .endif -# Adding a space at the beginning of the quoted variable expression works +# Adding a space at the beginning of the quoted expression works # though. .if ${:U word } != " ${:Uword} " . error Index: src/usr.bin/make/unit-tests/varmod-edge.mk diff -u src/usr.bin/make/unit-tests/varmod-edge.mk:1.17 src/usr.bin/make/unit-tests/varmod-edge.mk:1.18 --- src/usr.bin/make/unit-tests/varmod-edge.mk:1.17 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/varmod-edge.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-edge.mk,v 1.17 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: varmod-edge.mk,v 1.18 2023/11/19 21:47:52 rillig Exp $ # # Tests for edge cases in variable modifiers. # @@ -16,7 +16,7 @@ MOD.M-paren= ${INP.M-paren:M(*)} EXP.M-paren= (parentheses) () # The first closing brace matches the opening parenthesis. -# The second closing brace actually ends the variable expression. +# The second closing brace actually ends the expression. # # XXX: This is unexpected but rarely occurs in practice. TESTS+= M-mixed @@ -40,7 +40,7 @@ EXP.M-unescape= \(\{}\): # as open_parens + open_braces == closing_parens + closing_braces. This # means that ( and } form a matching pair. # -# Nested variable expressions are not parsed as such. Instead, only the +# Nested expressions are not parsed as such. Instead, only the # parentheses and braces are counted. This leads to a parse error since # the nested expression is not "${:U*)}" but only "${:U*)", which is # missing the closing brace. The expression is evaluated anyway. Index: src/usr.bin/make/unit-tests/varmod-ifelse.exp diff -u src/usr.bin/make/unit-tests/varmod-ifelse.exp:1.17 src/usr.bin/make/unit-tests/varmod-ifelse.exp:1.18 --- src/usr.bin/make/unit-tests/varmod-ifelse.exp:1.17 Sat Jul 1 09:06:34 2023 +++ src/usr.bin/make/unit-tests/varmod-ifelse.exp Sun Nov 19 21:47:52 2023 @@ -1,5 +1,5 @@ -make: Bad conditional expression 'variable expression == "literal"' in 'variable expression == "literal"?bad:bad' -make: "varmod-ifelse.mk" line 28: Malformed conditional (${${:Uvariable expression} == "literal":?bad:bad}) +make: Bad conditional expression 'bare words == "literal"' in 'bare words == "literal"?bad:bad' +make: "varmod-ifelse.mk" line 28: Malformed conditional (${${:Ubare words} == "literal":?bad:bad}) make: Bad conditional expression ' == ""' in ' == ""?bad-assign:bad-assign' make: Bad conditional expression ' == ""' in ' == ""?bad-cond:bad-cond' make: "varmod-ifelse.mk" line 46: Malformed conditional (${${UNDEF} == "":?bad-cond:bad-cond}) Index: src/usr.bin/make/unit-tests/cond-func-defined.exp diff -u src/usr.bin/make/unit-tests/cond-func-defined.exp:1.7 src/usr.bin/make/unit-tests/cond-func-defined.exp:1.8 --- src/usr.bin/make/unit-tests/cond-func-defined.exp:1.7 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/cond-func-defined.exp Sun Nov 19 21:47:52 2023 @@ -1,6 +1,6 @@ make: "cond-func-defined.mk" line 24: Missing closing parenthesis for defined() make: "cond-func-defined.mk" line 34: Missing closing parenthesis for defined() -make: "cond-func-defined.mk" line 47: In .for loops, variable expressions for the loop variables are +make: "cond-func-defined.mk" line 47: In .for loops, expressions for the loop variables are make: "cond-func-defined.mk" line 49: substituted at evaluation time. There is no actual variable make: "cond-func-defined.mk" line 51: involved, even if it feels like it. make: Fatal errors encountered -- cannot continue Index: src/usr.bin/make/unit-tests/cond-token-var.mk diff -u src/usr.bin/make/unit-tests/cond-token-var.mk:1.7 src/usr.bin/make/unit-tests/cond-token-var.mk:1.8 --- src/usr.bin/make/unit-tests/cond-token-var.mk:1.7 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/cond-token-var.mk Sun Nov 19 21:47:52 2023 @@ -1,11 +1,11 @@ -# $NetBSD: cond-token-var.mk,v 1.7 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: cond-token-var.mk,v 1.8 2023/11/19 21:47:52 rillig Exp $ # -# Tests for variable expressions in .if conditions. +# Tests for expressions in .if conditions. # -# Note the fine distinction between a variable and a variable expression. -# A variable has a name and a value. To access the value, one writes a -# variable expression of the form ${VAR}. This is a simple variable -# expression. Variable expressions can get more complicated by adding +# Note the fine distinction between a variable and an expression. +# A variable has a name and a value. To access the value, one writes an +# expression of the form ${VAR}. This is a simple +# expression. Expressions can get more complicated by adding # variable modifiers such as in ${VAR:Mpattern}. # # XXX: Strictly speaking, variable modifiers should be called expression @@ -49,7 +49,7 @@ DEF= defined .if ${UNDEF:U} .endif -# If the value of the variable expression is a number, it is compared against +# If the value of the expression is a number, it is compared against # zero. .if ${:U0} . error @@ -58,7 +58,7 @@ DEF= defined . error .endif -# If the value of the variable expression is not a number, any non-empty +# If the value of the expression is not a number, any non-empty # value evaluates to true, even if there is only whitespace. .if ${:U} . error Index: src/usr.bin/make/unit-tests/deptgt-makeflags.mk diff -u src/usr.bin/make/unit-tests/deptgt-makeflags.mk:1.7 src/usr.bin/make/unit-tests/deptgt-makeflags.mk:1.8 --- src/usr.bin/make/unit-tests/deptgt-makeflags.mk:1.7 Mon Nov 29 00:17:10 2021 +++ src/usr.bin/make/unit-tests/deptgt-makeflags.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: deptgt-makeflags.mk,v 1.7 2021/11/29 00:17:10 rillig Exp $ +# $NetBSD: deptgt-makeflags.mk,v 1.8 2023/11/19 21:47:52 rillig Exp $ # # Tests for the special target .MAKEFLAGS in dependency declarations, # which adds command line options later, at parse time. @@ -65,7 +65,7 @@ .endif # Next try at defining another newline variable. Since whitespace around the -# variable value is trimmed, two empty variable expressions ${:U} surround the +# variable value is trimmed, two empty expressions ${:U} surround the # literal newline now. This prevents the newline from being skipped during # parsing. The ':=' assignment operator expands the empty variable # expressions, leaving only the newline as the variable value. Index: src/usr.bin/make/unit-tests/var-scope-local.mk diff -u src/usr.bin/make/unit-tests/var-scope-local.mk:1.7 src/usr.bin/make/unit-tests/var-scope-local.mk:1.8 --- src/usr.bin/make/unit-tests/var-scope-local.mk:1.7 Sat Apr 29 10:16:24 2023 +++ src/usr.bin/make/unit-tests/var-scope-local.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: var-scope-local.mk,v 1.7 2023/04/29 10:16:24 rillig Exp $ +# $NetBSD: var-scope-local.mk,v 1.8 2023/11/19 21:47:52 rillig Exp $ # # Tests for target-local variables, such as ${.TARGET} or $@. These variables # are relatively short-lived as they are created just before making the @@ -107,7 +107,7 @@ dir/subdir/inference-rule-chain.ir-gen-f .if $(@) != "\$\(@)" . error .endif -# If the variable expression contains modifiers, the behavior depends on the +# If the expression contains modifiers, the behavior depends on the # actual modifiers. The modifier ':M' keeps the expression in the state # 'undefined'. Since the expression is still undefined after evaluating all # the modifiers, the value of the expression is discarded and the expression @@ -149,7 +149,7 @@ dir/subdir/inference-rule-chain.ir-gen-f # expect: Var_SetExpand: variable name "" expands to empty string, with value "three" - ignored # expect: Var_SetExpand: variable name "" expands to empty string, with value "three" - ignored one two:=three -# If the two targets to the left are generated by a variable expression, the +# If the two targets to the left are generated by an expression, the # line is parsed as a variable assignment since its left-hand side is a single # word. # expect: Global: one two = three @@ -225,7 +225,7 @@ var-scope-local-append.o: VAR+= local # target is actually made. # expect: : Making var-scope-local-append.o with VAR="local to var-scope-local-append.o". var-scope-local-append.o: VAR += to ${.TARGET} -# To access the value of a global variable, use a variable expression. This +# To access the value of a global variable, use an expression. This # expression is expanded before parsing the whole dependency line. Since the # expansion happens to the right of the dependency operator ':', the expanded # text does not influence parsing of the dependency line. Since the expansion Index: src/usr.bin/make/unit-tests/varmod-l-name-to-value.mk diff -u src/usr.bin/make/unit-tests/varmod-l-name-to-value.mk:1.7 src/usr.bin/make/unit-tests/varmod-l-name-to-value.mk:1.8 --- src/usr.bin/make/unit-tests/varmod-l-name-to-value.mk:1.7 Sat Oct 24 08:46:08 2020 +++ src/usr.bin/make/unit-tests/varmod-l-name-to-value.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-l-name-to-value.mk,v 1.7 2020/10/24 08:46:08 rillig Exp $ +# $NetBSD: varmod-l-name-to-value.mk,v 1.8 2023/11/19 21:47:52 rillig Exp $ # # Tests for the :L modifier, which returns the variable name as the new value. @@ -28,7 +28,7 @@ .endif # Between 2020-09-22 (var.c 1.527) and 2020-09-30 (var.c 1.553), there was -# a bug in the evaluation of variable expressions. Indirect modifiers like +# a bug in the evaluation of expressions. Indirect modifiers like # the below :L did not update the definedness of the enclosing expression. # This resulted in a wrong "Malformed conditional". .if ${value:${:UL}} == "" Index: src/usr.bin/make/unit-tests/varmod-subst-regex.mk diff -u src/usr.bin/make/unit-tests/varmod-subst-regex.mk:1.7 src/usr.bin/make/unit-tests/varmod-subst-regex.mk:1.8 --- src/usr.bin/make/unit-tests/varmod-subst-regex.mk:1.7 Mon Jun 21 08:17:39 2021 +++ src/usr.bin/make/unit-tests/varmod-subst-regex.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-subst-regex.mk,v 1.7 2021/06/21 08:17:39 rillig Exp $ +# $NetBSD: varmod-subst-regex.mk,v 1.8 2023/11/19 21:47:52 rillig Exp $ # # Tests for the :C,from,to, variable modifier. @@ -10,7 +10,7 @@ all: mod-regex-limits all: mod-regex-errors all: unmatched-subexpression -# The variable expression expands to 4 words. Of these words, none matches +# The expression expands to 4 words. Of these words, none matches # the regular expression "a b" since these words don't contain any # whitespace. .if ${:Ua b b c:C,a b,,} != "a b b c" @@ -18,7 +18,7 @@ all: unmatched-subexpression .endif # Using the '1' modifier does not change anything. The '1' modifier just -# means to apply at most 1 replacement in the whole variable expression. +# means to apply at most 1 replacement in the whole expression. .if ${:Ua b b c:C,a b,,1} != "a b b c" . error .endif @@ -86,7 +86,7 @@ all: unmatched-subexpression # Multiple asterisks form an invalid regular expression. This produces an # error message and (as of 2020-08-28) stops parsing in the middle of the -# variable expression. The unparsed part of the expression is then copied +# expression. The unparsed part of the expression is then copied # verbatim to the output, which is unexpected and can lead to strange shell # commands being run. mod-regex-compile-error: @@ -109,7 +109,7 @@ mod-regex-errors: # If the replacement pattern produces a parse error because of an # unknown modifier, the parse error is ignored in ParseModifierPart - # and the faulty variable expression expands to "". + # and the faulty expression expands to "". @echo $@: ${word:L:C,.*,x${:U:Z}y,W} # In regular expressions with alternatives, not all capturing groups are Index: src/usr.bin/make/unit-tests/cond-func-defined.mk diff -u src/usr.bin/make/unit-tests/cond-func-defined.mk:1.10 src/usr.bin/make/unit-tests/cond-func-defined.mk:1.11 --- src/usr.bin/make/unit-tests/cond-func-defined.mk:1.10 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/cond-func-defined.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: cond-func-defined.mk,v 1.10 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: cond-func-defined.mk,v 1.11 2023/11/19 21:47:52 rillig Exp $ # # Tests for the defined() function in .if conditions. @@ -25,7 +25,7 @@ ${:UA B}= variable name with spaces . error .endif -# If necessary, the whitespace can be generated by a variable expression. +# If necessary, the whitespace can be generated by an expression. .if !defined(${:UA B}) . error .endif @@ -43,8 +43,8 @@ ${:UA B}= variable name with spaces . if defined(var) . error . else -# expect+1: In .for loops, variable expressions for the loop variables are -. info In .for loops, variable expressions for the loop variables are +# expect+1: In .for loops, expressions for the loop variables are +. info In .for loops, expressions for the loop variables are # expect+1: substituted at evaluation time. There is no actual variable . info substituted at evaluation time. There is no actual variable # expect+1: involved, even if it feels like it. Index: src/usr.bin/make/unit-tests/cond-token-string.exp diff -u src/usr.bin/make/unit-tests/cond-token-string.exp:1.10 src/usr.bin/make/unit-tests/cond-token-string.exp:1.11 --- src/usr.bin/make/unit-tests/cond-token-string.exp:1.10 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/cond-token-string.exp Sun Nov 19 21:47:52 2023 @@ -10,7 +10,7 @@ make: "cond-token-string.mk" line 61: Th CondParser_Eval: "${UNDEF}" make: "cond-token-string.mk" line 71: An undefined variable in quotes expands to an empty string, which then evaluates to false. CondParser_Eval: "${:Uvalue}" -make: "cond-token-string.mk" line 77: A nonempty variable expression evaluates to true. +make: "cond-token-string.mk" line 77: A nonempty expression evaluates to true. CondParser_Eval: "${:U}" make: "cond-token-string.mk" line 86: An empty variable evaluates to false. CondParser_Eval: ("${VAR}") Index: src/usr.bin/make/unit-tests/var-op-assign.mk diff -u src/usr.bin/make/unit-tests/var-op-assign.mk:1.10 src/usr.bin/make/unit-tests/var-op-assign.mk:1.11 --- src/usr.bin/make/unit-tests/var-op-assign.mk:1.10 Sat Aug 19 10:52:14 2023 +++ src/usr.bin/make/unit-tests/var-op-assign.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: var-op-assign.mk,v 1.10 2023/08/19 10:52:14 rillig Exp $ +# $NetBSD: var-op-assign.mk,v 1.11 2023/11/19 21:47:52 rillig Exp $ # # Tests for the = variable assignment operator, which overwrites an existing # variable or creates it. @@ -66,7 +66,7 @@ VARIABLE NAME= variable value # neither contain parentheses nor braces. This is only a side-effect from # the implementation of the parser, which cheats when parsing a variable # name. It only counts parentheses and braces instead of properly parsing -# nested variable expressions such as VAR.${param}. +# nested expressions such as VAR.${param}. # VAR(spaces in parentheses)= () VAR{spaces in braces}= {} Index: src/usr.bin/make/unit-tests/cond-func-empty.mk diff -u src/usr.bin/make/unit-tests/cond-func-empty.mk:1.22 src/usr.bin/make/unit-tests/cond-func-empty.mk:1.23 --- src/usr.bin/make/unit-tests/cond-func-empty.mk:1.22 Fri Aug 11 05:01:12 2023 +++ src/usr.bin/make/unit-tests/cond-func-empty.mk Sun Nov 19 21:47:52 2023 @@ -1,9 +1,9 @@ -# $NetBSD: cond-func-empty.mk,v 1.22 2023/08/11 05:01:12 rillig Exp $ +# $NetBSD: cond-func-empty.mk,v 1.23 2023/11/19 21:47:52 rillig Exp $ # -# Tests for the empty() function in .if conditions, which tests a variable +# Tests for the empty() function in .if conditions, which tests an # expression for emptiness. # -# Note that the argument in the parentheses is a variable name, not a variable +# Note that the argument in the parentheses is a variable name, not an # expression. That name may be followed by ':...' modifiers. # @@ -120,7 +120,7 @@ ${:U }= space . error .endif -# The :L modifier creates a variable expression that has the same value as +# The :L modifier creates an expression that has the same value as # its name, which both are "VAR" in this case. The value is therefore not # empty. .if empty(VAR:L) @@ -138,7 +138,7 @@ ${:U }= space . error .endif -# Ensure that variable expressions that appear as part of the function call +# Ensure that expressions that appear as part of the function call # argument are properly parsed. Typical use cases for this are .for loops, # which are expanded to exactly these ${:U} expressions. # @@ -188,20 +188,20 @@ ${:U WORD }= variable name with spaces # side containing the '!empty' was evaluated though, as it had always been. # # When evaluating the !empty condition, the variable name was parsed as -# "VARNAME${:U2}", but without expanding any nested variable expression, in +# "VARNAME${:U2}", but without expanding any nested expression, in # this case the ${:U2}. The expression '${:U2}' was replaced with an empty # string, the resulting variable name was thus "VARNAME". This conceptually # wrong variable name should have been discarded quickly after parsing it, to # prevent it from doing any harm. # -# The variable expression was expanded though, and this was wrong. The +# The expression was expanded though, and this was wrong. The # expansion was done without VARE_WANTRES (called VARF_WANTRES back then) # though. This had the effect that the ${:U1} from the value of VARNAME # expanded to an empty string. This in turn created the seemingly recursive # definition VARNAME=${VARNAME}, and that definition was never meant to be # expanded. # -# This was fixed by expanding nested variable expressions in the variable name +# This was fixed by expanding nested expressions in the variable name # only if the flag VARE_WANTRES is given. VARNAME= ${VARNAME${:U1}} .if defined(VARNAME${:U2}) && !empty(VARNAME${:U2}) Index: src/usr.bin/make/unit-tests/cond-func-exists.mk diff -u src/usr.bin/make/unit-tests/cond-func-exists.mk:1.6 src/usr.bin/make/unit-tests/cond-func-exists.mk:1.7 --- src/usr.bin/make/unit-tests/cond-func-exists.mk:1.6 Mon Nov 30 20:12:29 2020 +++ src/usr.bin/make/unit-tests/cond-func-exists.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: cond-func-exists.mk,v 1.6 2020/11/30 20:12:29 rillig Exp $ +# $NetBSD: cond-func-exists.mk,v 1.7 2023/11/19 21:47:52 rillig Exp $ # # Tests for the exists() function in .if conditions. @@ -17,7 +17,7 @@ .endif # The only way to escape characters that would otherwise influence the parser -# is to enclose them in a variable expression. For function arguments, +# is to enclose them in an expression. For function arguments, # neither the backslash nor the dollar sign act as escape character. .if exists(\.) . error @@ -27,7 +27,7 @@ . error .endif -# The argument to the function can have several variable expressions. +# The argument to the function can have several expressions. # See cond-func.mk for the characters that cannot be used directly. .if !exists(${.PARSEDIR}/${.PARSEFILE}) . error Index: src/usr.bin/make/unit-tests/directive-for-errors.mk diff -u src/usr.bin/make/unit-tests/directive-for-errors.mk:1.6 src/usr.bin/make/unit-tests/directive-for-errors.mk:1.7 --- src/usr.bin/make/unit-tests/directive-for-errors.mk:1.6 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/directive-for-errors.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: directive-for-errors.mk,v 1.6 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: directive-for-errors.mk,v 1.7 2023/11/19 21:47:52 rillig Exp $ # # Tests for error handling in .for loops. @@ -35,7 +35,7 @@ # # The '$$' was not replaced with the values '1' or '3' from the .for loop, # instead it was kept as-is, and when the .info directive expanded its -# argument, each '$$' got replaced with a single '$'. The "long variable +# argument, each '$$' got replaced with a single '$'. The "long # expression" ${$} got replaced though, even though this would be a parse # error everywhere outside a .for loop. ${:U\$}= dollar # see whether the "variable" '$' is local Index: src/usr.bin/make/unit-tests/cond-func.mk diff -u src/usr.bin/make/unit-tests/cond-func.mk:1.13 src/usr.bin/make/unit-tests/cond-func.mk:1.14 --- src/usr.bin/make/unit-tests/cond-func.mk:1.13 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/cond-func.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: cond-func.mk,v 1.13 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: cond-func.mk,v 1.14 2023/11/19 21:47:52 rillig Exp $ # # Tests for those parts of the functions in .if conditions that are common # among several functions. @@ -38,7 +38,7 @@ ${VARNAME_UNBALANCED_BRACES}= variable n . error .endif -# If necessary, the whitespace can be generated by a variable expression. +# If necessary, the whitespace can be generated by an expression. .if !defined(${:UA B}) . error .endif Index: src/usr.bin/make/unit-tests/varmod-localtime.mk diff -u src/usr.bin/make/unit-tests/varmod-localtime.mk:1.13 src/usr.bin/make/unit-tests/varmod-localtime.mk:1.14 --- src/usr.bin/make/unit-tests/varmod-localtime.mk:1.13 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/varmod-localtime.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-localtime.mk,v 1.13 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: varmod-localtime.mk,v 1.14 2023/11/19 21:47:52 rillig Exp $ # # Tests for the :localtime variable modifier, which formats a timestamp # using strftime(3) in local time. @@ -45,7 +45,7 @@ # Before var.c 1.1050 from 2023-05-09, it was not possible to pass the -# seconds via a variable expression. +# seconds via an expression. .if ${%Y:L:localtime=${:U1593536400}} != "2020" . error .endif Index: src/usr.bin/make/unit-tests/varname.mk diff -u src/usr.bin/make/unit-tests/varname.mk:1.13 src/usr.bin/make/unit-tests/varname.mk:1.14 --- src/usr.bin/make/unit-tests/varname.mk:1.13 Sat Aug 19 11:09:02 2023 +++ src/usr.bin/make/unit-tests/varname.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: varname.mk,v 1.13 2023/08/19 11:09:02 rillig Exp $ +# $NetBSD: varname.mk,v 1.14 2023/11/19 21:47:52 rillig Exp $ # # Tests for special variables, such as .MAKE or .PARSEDIR. # And for variable names in general. @@ -12,7 +12,7 @@ VAR{{{}}}= 3 braces . error .endif -# In variable expressions, the parser works differently. It doesn't treat +# In expressions, the parser works differently. It doesn't treat # braces and parentheses equally, therefore the first closing brace already # marks the end of the variable name. VARNAME= VAR((( Index: src/usr.bin/make/unit-tests/cond-late.mk diff -u src/usr.bin/make/unit-tests/cond-late.mk:1.4 src/usr.bin/make/unit-tests/cond-late.mk:1.5 --- src/usr.bin/make/unit-tests/cond-late.mk:1.4 Wed May 10 15:53:32 2023 +++ src/usr.bin/make/unit-tests/cond-late.mk Sun Nov 19 21:47:52 2023 @@ -1,6 +1,6 @@ -# $NetBSD: cond-late.mk,v 1.4 2023/05/10 15:53:32 rillig Exp $ +# $NetBSD: cond-late.mk,v 1.5 2023/11/19 21:47:52 rillig Exp $ # -# Using the :? modifier, variable expressions can contain conditional +# Using the :? modifier, expressions can contain conditional # expressions that are evaluated late, at expansion time. # # Any expressions appearing in these conditions are expanded before parsing Index: src/usr.bin/make/unit-tests/lint.mk diff -u src/usr.bin/make/unit-tests/lint.mk:1.4 src/usr.bin/make/unit-tests/lint.mk:1.5 --- src/usr.bin/make/unit-tests/lint.mk:1.4 Sat Jan 30 13:50:18 2021 +++ src/usr.bin/make/unit-tests/lint.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: lint.mk,v 1.4 2021/01/30 13:50:18 rillig Exp $ +# $NetBSD: lint.mk,v 1.5 2023/11/19 21:47:52 rillig Exp $ # # Demonstrates stricter checks that are only enabled in lint mode, using the # option -dL. @@ -6,7 +6,7 @@ # Before main.c 1.421 from 2020-11-01, make exited successfully even though # the error message had been issued as PARSE_FATAL. This was because back # then, make checked for parse errors only after parsing each top-level -# makefile, in Parse_File. After that, when expanding variable expressions +# makefile, in Parse_File. After that, when expanding expressions # in shell commands, the parse errors were not checked again. # Ouch: as of 2020-08-03, the variable is malformed and parsing stops Index: src/usr.bin/make/unit-tests/cond-short.mk diff -u src/usr.bin/make/unit-tests/cond-short.mk:1.21 src/usr.bin/make/unit-tests/cond-short.mk:1.22 --- src/usr.bin/make/unit-tests/cond-short.mk:1.21 Thu Oct 19 18:24:33 2023 +++ src/usr.bin/make/unit-tests/cond-short.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: cond-short.mk,v 1.21 2023/10/19 18:24:33 rillig Exp $ +# $NetBSD: cond-short.mk,v 1.22 2023/11/19 21:47:52 rillig Exp $ # # Demonstrates that in conditions, the right-hand side of an && or || # is only evaluated if it can actually influence the result. @@ -9,9 +9,9 @@ # Before 2020-06-28, the right-hand side of an && or || operator was always # evaluated, which was wrong. In cond.c 1.69 and var.c 1.197 on 2015-10-11, # Var_Parse got a new parameter named 'wantit'. Since then it would have been -# possible to skip evaluation of irrelevant variable expressions and only +# possible to skip evaluation of irrelevant expressions and only # parse them. They were still evaluated though, the only difference to -# relevant variable expressions was that in the irrelevant variable +# relevant expressions was that in the irrelevant variable # expressions, undefined variables were allowed. This allowed for conditions # like 'defined(VAR) && ${VAR:S,from,to,} != ""', which no longer produced an # error message 'Malformed conditional', but the irrelevant expression was Index: src/usr.bin/make/unit-tests/directive-for-escape.mk diff -u src/usr.bin/make/unit-tests/directive-for-escape.mk:1.21 src/usr.bin/make/unit-tests/directive-for-escape.mk:1.22 --- src/usr.bin/make/unit-tests/directive-for-escape.mk:1.21 Fri Jun 23 06:11:06 2023 +++ src/usr.bin/make/unit-tests/directive-for-escape.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: directive-for-escape.mk,v 1.21 2023/06/23 06:11:06 rillig Exp $ +# $NetBSD: directive-for-escape.mk,v 1.22 2023/11/19 21:47:52 rillig Exp $ # # Test escaping of special characters in the iteration values of a .for loop. # These values get expanded later using the :U variable modifier, and this @@ -69,7 +69,7 @@ VALUES= $$ $${V} $${V:=-with-modifier} # Try to cover the code for nested '{}' in ExprLen, without success. # -# The value of the variable VALUES is not meant to be a variable expression. +# The value of the variable VALUES is not meant to be an expression. # Instead, it is meant to represent literal text, the only escaping mechanism # being that each '$' is written as '$$'. VALUES= $${UNDEF:U\$$\$$ {{}} end} @@ -128,7 +128,7 @@ ${:U\\}= backslash # XXX: It is not the job of ExprLen to parse an expression, it is naive to # expect ExprLen to get all the details right in just a few lines of code. # Each variable modifier has its own inconsistent way of parsing nested -# variable expressions, braces and parentheses. (Compare ':M', ':S', and +# expressions, braces and parentheses. (Compare ':M', ':S', and # ':D' for details.) The only sensible thing to do is therefore to let # Var_Parse do all the parsing work. VALUES= begin<$${UNDEF:Ufallback:N{{{}}}}>end @@ -147,7 +147,7 @@ VALUES= begin<$${UNDEF:Ufallback:N{{{}} # expect-2: $ # Before for.c 1.173 from 2023-05-08, the name of the iteration variable -# could contain colons, which affected variable expressions having this exact +# could contain colons, which affected expressions having this exact # modifier. This possibility was neither intended nor documented. NUMBERS= one two three # expect+1: invalid character ':' in .for loop variable name @@ -203,7 +203,7 @@ i,= comma . info eight ${$}${$}${$}${$} and no cents. .endfor # Outside a .for loop, '${$}' is interpreted differently. The outer '$' starts -# a variable expression. The inner '$' is followed by a '}' and is thus a +# an expression. The inner '$' is followed by a '}' and is thus a # silent syntax error, the '$' is skipped. The variable name is thus '', and # since since there is never a variable named '', the whole expression '${$}' # evaluates to an empty string. Index: src/usr.bin/make/unit-tests/cond-token-number.mk diff -u src/usr.bin/make/unit-tests/cond-token-number.mk:1.9 src/usr.bin/make/unit-tests/cond-token-number.mk:1.10 --- src/usr.bin/make/unit-tests/cond-token-number.mk:1.9 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/cond-token-number.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: cond-token-number.mk,v 1.9 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: cond-token-number.mk,v 1.10 2023/11/19 21:47:52 rillig Exp $ # # Tests for number tokens in .if conditions. # @@ -52,13 +52,13 @@ . error .endif -# When the number comes from a variable expression though, it may be signed. +# When the number comes from an expression though, it may be signed. # XXX: This is inconsistent. .if ${:U+0} . error .endif -# When the number comes from a variable expression though, it may be signed. +# When the number comes from an expression though, it may be signed. # XXX: This is inconsistent. .if !${:U+1} . error Index: src/usr.bin/make/unit-tests/opt-debug-file.mk diff -u src/usr.bin/make/unit-tests/opt-debug-file.mk:1.9 src/usr.bin/make/unit-tests/opt-debug-file.mk:1.10 --- src/usr.bin/make/unit-tests/opt-debug-file.mk:1.9 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/opt-debug-file.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: opt-debug-file.mk,v 1.9 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: opt-debug-file.mk,v 1.10 2023/11/19 21:47:52 rillig Exp $ # # Tests for the -dF command line option, which redirects the debug log # to a file instead of writing it to stderr. @@ -18,7 +18,7 @@ VAR= value ${:Uexpanded} # Make sure that the debug logging file contains some logging. DEBUG_OUTPUT:= ${:!cat opt-debug-file.debuglog!} # Grmbl. Because of the := operator in the above line, the variable -# value contains ${:Uexpanded}. This variable expression is expanded +# value contains ${:Uexpanded}. This expression is expanded # when it is used in the condition below. Therefore, be careful when storing # untrusted input in variables. #.MAKEFLAGS: -dc -dFstderr Index: src/usr.bin/make/unit-tests/varname-empty.mk diff -u src/usr.bin/make/unit-tests/varname-empty.mk:1.9 src/usr.bin/make/unit-tests/varname-empty.mk:1.10 --- src/usr.bin/make/unit-tests/varname-empty.mk:1.9 Sun Apr 4 10:13:09 2021 +++ src/usr.bin/make/unit-tests/varname-empty.mk Sun Nov 19 21:47:52 2023 @@ -1,9 +1,9 @@ -# $NetBSD: varname-empty.mk,v 1.9 2021/04/04 10:13:09 rillig Exp $ +# $NetBSD: varname-empty.mk,v 1.10 2023/11/19 21:47:52 rillig Exp $ # # Tests for the special variable with the empty name. # # There is no variable named "" at all, and this fact is used a lot in -# variable expressions of the form ${:Ufallback}. These expressions are +# expressions of the form ${:Ufallback}. These expressions are # based on the variable named "" and use the :U modifier to assign a # fallback value to the expression (but not to the variable). # Index: src/usr.bin/make/unit-tests/varparse-errors.mk diff -u src/usr.bin/make/unit-tests/varparse-errors.mk:1.9 src/usr.bin/make/unit-tests/varparse-errors.mk:1.10 --- src/usr.bin/make/unit-tests/varparse-errors.mk:1.9 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/varparse-errors.mk Sun Nov 19 21:47:52 2023 @@ -1,6 +1,6 @@ -# $NetBSD: varparse-errors.mk,v 1.9 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: varparse-errors.mk,v 1.10 2023/11/19 21:47:52 rillig Exp $ -# Tests for parsing and evaluating all kinds of variable expressions. +# Tests for parsing and evaluating all kinds of expressions. # # This is the basis for redesigning the error handling in Var_Parse and # Var_Subst, collecting typical and not so typical use cases. @@ -23,7 +23,7 @@ ERR_BAD_MOD= An ${:Uindirect:Z} expressi ERR_EVAL= An evaluation error ${:Uvalue:C,.,\3,}. -# In a conditional, a variable expression that is not enclosed in quotes is +# In a conditional, an expression that is not enclosed in quotes is # expanded using the mode VARE_UNDEFERR. # The variable itself must be defined. # It may refer to undefined variables though. Index: src/usr.bin/make/unit-tests/cond-token-plain.exp diff -u src/usr.bin/make/unit-tests/cond-token-plain.exp:1.19 src/usr.bin/make/unit-tests/cond-token-plain.exp:1.20 --- src/usr.bin/make/unit-tests/cond-token-plain.exp:1.19 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/cond-token-plain.exp Sun Nov 19 21:47:52 2023 @@ -35,9 +35,9 @@ make: "cond-token-plain.mk" line 121: ok CondParser_Eval: V${UNDEF}AR make: "cond-token-plain.mk" line 130: Undefined variables in bare words expand to an empty string. CondParser_Eval: 0${:Ux00} -make: "cond-token-plain.mk" line 139: Numbers can be composed from literals and variable expressions. +make: "cond-token-plain.mk" line 139: Numbers can be composed from literals and expressions. CondParser_Eval: 0${:Ux01} -make: "cond-token-plain.mk" line 144: Numbers can be composed from literals and variable expressions. +make: "cond-token-plain.mk" line 144: Numbers can be composed from literals and expressions. CondParser_Eval: "" == make: "cond-token-plain.mk" line 151: Missing right-hand side of operator '==' CondParser_Eval: == "" Index: src/usr.bin/make/unit-tests/cond-token-plain.mk diff -u src/usr.bin/make/unit-tests/cond-token-plain.mk:1.18 src/usr.bin/make/unit-tests/cond-token-plain.mk:1.19 --- src/usr.bin/make/unit-tests/cond-token-plain.mk:1.18 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/cond-token-plain.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: cond-token-plain.mk,v 1.18 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: cond-token-plain.mk,v 1.19 2023/11/19 21:47:52 rillig Exp $ # # Tests for plain tokens (that is, string literals without quotes) # in .if conditions. These are also called bare words. @@ -115,7 +115,7 @@ VAR= defined . error .endif -# Bare words may be intermixed with variable expressions. +# Bare words may be intermixed with expressions. .if V${:UA}R # expect+1: ok . info ok @@ -135,13 +135,13 @@ VAR= defined .if 0${:Ux00} . error .else -# expect+1: Numbers can be composed from literals and variable expressions. -. info Numbers can be composed from literals and variable expressions. +# expect+1: Numbers can be composed from literals and expressions. +. info Numbers can be composed from literals and expressions. .endif .if 0${:Ux01} -# expect+1: Numbers can be composed from literals and variable expressions. -. info Numbers can be composed from literals and variable expressions. +# expect+1: Numbers can be composed from literals and expressions. +. info Numbers can be composed from literals and expressions. .else . error .endif @@ -205,7 +205,7 @@ ${:U\\\\}= backslash # expect+1: Malformed conditional (left == right) .if left == right .endif -# Before cond.c 1.276 from 2021-09-21, a variable expression containing the +# 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) @@ -245,7 +245,7 @@ ${:U\\\\}= backslash # A different situation is when CondParser.leftUnquotedOK is true. This # situation arises in expressions of the form ${cond:?yes:no}. As of # 2021-12-30, the condition in such an expression is evaluated before parsing -# the condition, see varmod-ifelse.mk. To pass a variable expression to the +# the condition, see varmod-ifelse.mk. To pass an expression to the # condition parser, it needs to be escaped. This rarely happens in practice, # in most cases the conditions are simple enough that it doesn't matter # whether the condition is first evaluated and then parsed, or vice versa. Index: src/usr.bin/make/unit-tests/var-op-expand.mk diff -u src/usr.bin/make/unit-tests/var-op-expand.mk:1.18 src/usr.bin/make/unit-tests/var-op-expand.mk:1.19 --- src/usr.bin/make/unit-tests/var-op-expand.mk:1.18 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/var-op-expand.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: var-op-expand.mk,v 1.18 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: var-op-expand.mk,v 1.19 2023/11/19 21:47:52 rillig Exp $ # # Tests for the := variable assignment operator, which expands its # right-hand side. @@ -20,9 +20,9 @@ VAR:= value # When a ':=' assignment is performed, its right-hand side is evaluated and # expanded as far as possible. Contrary to other situations, '$$' and -# variable expressions based on undefined variables are preserved though. +# expressions based on undefined variables are preserved though. # -# Whether a variable expression is undefined or not is determined at the end +# Whether an expression is undefined or not is determined at the end # of evaluating the expression. The consequence is that ${:Ufallback} expands # to "fallback"; initially this expression is undefined since it is based on # the variable named "", which is guaranteed to be never defined, but at the Index: src/usr.bin/make/unit-tests/cond-token-string.mk diff -u src/usr.bin/make/unit-tests/cond-token-string.mk:1.8 src/usr.bin/make/unit-tests/cond-token-string.mk:1.9 --- src/usr.bin/make/unit-tests/cond-token-string.mk:1.8 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/cond-token-string.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: cond-token-string.mk,v 1.8 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: cond-token-string.mk,v 1.9 2023/11/19 21:47:52 rillig Exp $ # # Tests for quoted string literals in .if conditions. # @@ -26,7 +26,7 @@ .endif # The 'x' produces a "Malformed conditional" since the left-hand side of a -# comparison in an .if directive must be either a variable expression, 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} == "") .if x${:Uvalue} == "" @@ -73,8 +73,8 @@ .endif .if "${:Uvalue}" -# expect+1: A nonempty variable expression evaluates to true. -. info A nonempty variable expression evaluates to true. +# expect+1: A nonempty expression evaluates to true. +. info A nonempty expression evaluates to true. .else . error .endif @@ -87,7 +87,7 @@ .endif # A non-empty string evaluates to true, no matter if it's a literal string or -# if it contains variable expressions. The parentheses are not necessary for +# if it contains expressions. The parentheses are not necessary for # the parser, in this case their only purpose is to make the code harder to # read for humans. VAR= value Index: src/usr.bin/make/unit-tests/dep-var.mk diff -u src/usr.bin/make/unit-tests/dep-var.mk:1.8 src/usr.bin/make/unit-tests/dep-var.mk:1.9 --- src/usr.bin/make/unit-tests/dep-var.mk:1.8 Wed May 10 15:53:32 2023 +++ src/usr.bin/make/unit-tests/dep-var.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: dep-var.mk,v 1.8 2023/05/10 15:53:32 rillig Exp $ +# $NetBSD: dep-var.mk,v 1.9 2023/11/19 21:47:52 rillig Exp $ # # Tests for variable references in dependency declarations. # @@ -9,7 +9,7 @@ # expect: Var_Parse: ${UNDEF1} (eval-defined) # Even though undefined expressions should lead to errors, no error message is -# generated for this line. The variable expression ${UNDEF1} simply expands +# generated for this line. The expression ${UNDEF1} simply expands # to an empty string. all: ${UNDEF1} @@ -25,7 +25,7 @@ all: $${DEF2} a-$${DEF2}-b # XXX: The -dv log says later when expanding the sources of 'all': # Var_Parse: ${UNDEF3} (eval-defined) # but no error message is generated for this line, just like for UNDEF1. -# The variable expression ${UNDEF3} simply expands to an empty string. +# The expression ${UNDEF3} simply expands to an empty string. all: $${UNDEF3} # Try out how many levels of indirection are really expanded in dependency Index: src/usr.bin/make/unit-tests/directive-else.mk diff -u src/usr.bin/make/unit-tests/directive-else.mk:1.8 src/usr.bin/make/unit-tests/directive-else.mk:1.9 --- src/usr.bin/make/unit-tests/directive-else.mk:1.8 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/directive-else.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: directive-else.mk,v 1.8 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: directive-else.mk,v 1.9 2023/11/19 21:47:52 rillig Exp $ # # Tests for the .else directive. # @@ -45,7 +45,7 @@ .else # comment .endif -# A variable expression does count as an argument, even if it is empty. +# An expression does count as an argument, even if it is empty. .if 0 # expect+1: The .else directive does not take arguments .else ${:U} Index: src/usr.bin/make/unit-tests/parse-var.mk diff -u src/usr.bin/make/unit-tests/parse-var.mk:1.8 src/usr.bin/make/unit-tests/parse-var.mk:1.9 --- src/usr.bin/make/unit-tests/parse-var.mk:1.8 Sat Feb 18 11:16:09 2023 +++ src/usr.bin/make/unit-tests/parse-var.mk Sun Nov 19 21:47:52 2023 @@ -1,6 +1,6 @@ -# $NetBSD: parse-var.mk,v 1.8 2023/02/18 11:16:09 rillig Exp $ +# $NetBSD: parse-var.mk,v 1.9 2023/11/19 21:47:52 rillig Exp $ # -# Tests for parsing variable expressions. +# Tests for parsing expressions. # # TODO: Add systematic tests for all of the below combinations. # @@ -77,7 +77,7 @@ .MAKEFLAGS: -dL # In variable assignments, there may be spaces in the middle of the left-hand -# side of the assignment, but only if they occur inside variable expressions. +# side of the assignment, but only if they occur inside expressions. # Leading spaces (but not tabs) are possible but unusual. # Trailing spaces are common in some coding styles, others omit them. VAR.${:U param }= value Index: src/usr.bin/make/unit-tests/varmod-range.mk diff -u src/usr.bin/make/unit-tests/varmod-range.mk:1.8 src/usr.bin/make/unit-tests/varmod-range.mk:1.9 --- src/usr.bin/make/unit-tests/varmod-range.mk:1.8 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/varmod-range.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-range.mk,v 1.8 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: varmod-range.mk,v 1.9 2023/11/19 21:47:52 rillig Exp $ # # Tests for the :range variable modifier, which generates sequences # of integers from the given range. @@ -7,7 +7,7 @@ # modword.mk # The :range modifier generates a sequence of integers, one number per -# word of the variable expression's value. +# word of the expression's value. .if ${a b c:L:range} != "1 2 3" . error .endif @@ -19,14 +19,14 @@ .endif # The :range modifier takes the number of words from the value of the -# variable expression. If that expression is undefined, the range is +# expression. If that expression is undefined, the range is # undefined as well. This should not come as a surprise. .if "${:range}" != "" . error .endif # The :range modifier can be given a parameter, which makes the generated -# range independent from the value or the name of the variable expression. +# range independent from the value or the name of the expression. # # XXX: As of 2020-09-27, the :range=... modifier does not turn the undefined # expression into a defined one. This looks like an oversight. Index: src/usr.bin/make/unit-tests/varmod-undefined.mk diff -u src/usr.bin/make/unit-tests/varmod-undefined.mk:1.8 src/usr.bin/make/unit-tests/varmod-undefined.mk:1.9 --- src/usr.bin/make/unit-tests/varmod-undefined.mk:1.8 Sat Aug 6 21:26:05 2022 +++ src/usr.bin/make/unit-tests/varmod-undefined.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-undefined.mk,v 1.8 2022/08/06 21:26:05 rillig Exp $ +# $NetBSD: varmod-undefined.mk,v 1.9 2023/11/19 21:47:52 rillig Exp $ # # Tests for the :U variable modifier, which returns the given string # if the variable is undefined. @@ -19,14 +19,14 @@ .endif # .endfor -# The variable expressions in the text of the :U modifier may be arbitrarily +# The expressions in the text of the :U modifier may be arbitrarily # nested. .if ${:U${:Unested}${${${:Udeeply}}}} != nested . error .endif -# The nested variable expressions may contain braces, and these braces don't +# The nested expressions may contain braces, and these braces don't # need to match pairwise. In the following example, the :S modifier uses '{' # as delimiter, which confuses both editors and humans because the opening # and closing braces don't match anymore. It's syntactically valid though. Index: src/usr.bin/make/unit-tests/varmod.mk diff -u src/usr.bin/make/unit-tests/varmod.mk:1.8 src/usr.bin/make/unit-tests/varmod.mk:1.9 --- src/usr.bin/make/unit-tests/varmod.mk:1.8 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/varmod.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: varmod.mk,v 1.8 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: varmod.mk,v 1.9 2023/11/19 21:47:52 rillig Exp $ # # Tests for variable modifiers, such as :Q, :S,from,to or :Ufallback. # @@ -59,7 +59,7 @@ DOLLAR1= $$ DOLLAR2= ${:U\$} -# To get a single '$' sign in the value of a variable expression, it has to +# To get a single '$' sign in the value of an expression, it has to # be written as '$$' in a literal variable value. # # See Var_Parse, where it calls Var_Subst. @@ -107,7 +107,7 @@ DOLLAR2= ${:U\$} # The variable modifier :P does not fall back to the SysV modifier. # Therefore the modifier :P=RE generates a parse error. -# XXX: The .error should not be reached since the variable expression is +# XXX: The .error should not be reached since the expression is # malformed, and this error should be propagated up to Cond_EvalLine. VAR= STOP # expect+1: Missing delimiter ':' after modifier "P" Index: src/usr.bin/make/unit-tests/deptgt.mk diff -u src/usr.bin/make/unit-tests/deptgt.mk:1.14 src/usr.bin/make/unit-tests/deptgt.mk:1.15 --- src/usr.bin/make/unit-tests/deptgt.mk:1.14 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/deptgt.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: deptgt.mk,v 1.14 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: deptgt.mk,v 1.15 2023/11/19 21:47:52 rillig Exp $ # # Tests for special targets like .BEGIN or .SUFFIXES in dependency # declarations. @@ -30,7 +30,7 @@ VAR=value # targets := NULL : command3 # parse error, since targets == NULL # In a dependency declaration, the list of targets can be empty. -# It doesn't matter whether the empty string is generated by a variable +# It doesn't matter whether the empty string is generated by an # expression or whether it is just omitted. .MAKEFLAGS: -dp ${:U}: empty-source Index: src/usr.bin/make/unit-tests/directive-for-empty.mk diff -u src/usr.bin/make/unit-tests/directive-for-empty.mk:1.2 src/usr.bin/make/unit-tests/directive-for-empty.mk:1.3 --- src/usr.bin/make/unit-tests/directive-for-empty.mk:1.2 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/directive-for-empty.mk Sun Nov 19 21:47:52 2023 @@ -1,12 +1,12 @@ -# $NetBSD: directive-for-empty.mk,v 1.2 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: directive-for-empty.mk,v 1.3 2023/11/19 21:47:52 rillig Exp $ # # Tests for .for loops containing conditions of the form 'empty(var:...)'. # -# When a .for loop is expanded, variable expressions in the body of the loop +# When a .for loop is expanded, expressions in the body of the loop # are replaced with expressions containing the variable values. This # replacement is a bit naive but covers most of the practical cases. The one # popular exception is the condition 'empty(var:Modifiers)', which does not -# look like a variable expression and is thus not replaced. +# look like an expression and is thus not replaced. # # See also: # https://gnats.netbsd.org/43821 @@ -24,7 +24,7 @@ .endfor -# In conditions, the function call to 'empty' does not look like a variable +# In conditions, the function call to 'empty' does not look like an # expression, therefore it is not replaced. Since there is no global variable # named 'i', this expression makes for a leaky abstraction. If the .for # variables were real variables, calling 'empty' would work on them as well. @@ -51,8 +51,8 @@ # loop would be naive and require many special cases, as there are many cases # that need to be considered when deciding whether the token 'empty' is a # function call or not, as demonstrated by the following examples. For -# variable expressions like '${i:Modifiers}', this is simpler as a single -# dollar almost always starts a variable expression. For counterexamples and +# expressions like '${i:Modifiers}', this is simpler as a single +# dollar almost always starts an expression. For counterexamples and # edge cases, see directive-for-escape.mk. Adding another such tricky detail # is out of the question. .MAKEFLAGS: -df Index: src/usr.bin/make/unit-tests/directive-for-if.mk diff -u src/usr.bin/make/unit-tests/directive-for-if.mk:1.2 src/usr.bin/make/unit-tests/directive-for-if.mk:1.3 --- src/usr.bin/make/unit-tests/directive-for-if.mk:1.2 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/directive-for-if.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: directive-for-if.mk,v 1.2 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: directive-for-if.mk,v 1.3 2023/11/19 21:47:52 rillig Exp $ # # Test for a .for directive that contains an .if directive. # @@ -71,7 +71,7 @@ _!= echo "${var}" 1>&2; echo # In 2005, .endfor # Before for.c 1.39 from 2008-12-21, a common workaround was to surround the -# variable expression from the .for loop with '"'. Such a string literal +# expression from the .for loop with '"'. Such a string literal # has been allowed since cond.c 1.23 from 2004-04-13. Between that commit and # the one from 2008, the parser would still get confused if the value from the # .for loop contained '"', which was effectively a code injection. Index: src/usr.bin/make/unit-tests/opt-debug-var.mk diff -u src/usr.bin/make/unit-tests/opt-debug-var.mk:1.2 src/usr.bin/make/unit-tests/opt-debug-var.mk:1.3 --- src/usr.bin/make/unit-tests/opt-debug-var.mk:1.2 Sun Jan 23 16:09:38 2022 +++ src/usr.bin/make/unit-tests/opt-debug-var.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: opt-debug-var.mk,v 1.2 2022/01/23 16:09:38 rillig Exp $ +# $NetBSD: opt-debug-var.mk,v 1.3 2023/11/19 21:47:52 rillig Exp $ # # Tests for the -dv command line option, which adds debug logging about # variable assignment and evaluation. @@ -15,7 +15,7 @@ SUBST:= value .if defined(ASSIGNED) .endif -# The usual form of variable expressions is ${VAR}. The form $(VAR) is used +# The usual form of expressions is ${VAR}. The form $(VAR) is used # less often as it can be visually confused with the shell construct for # capturing the output of a subshell, which looks the same. # Index: src/usr.bin/make/unit-tests/directive-ifmake.mk diff -u src/usr.bin/make/unit-tests/directive-ifmake.mk:1.11 src/usr.bin/make/unit-tests/directive-ifmake.mk:1.12 --- src/usr.bin/make/unit-tests/directive-ifmake.mk:1.11 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/directive-ifmake.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: directive-ifmake.mk,v 1.11 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: directive-ifmake.mk,v 1.12 2023/11/19 21:47:52 rillig Exp $ # # Tests for the .ifmake directive, which provides a shortcut for asking # whether a certain target is requested to be made from the command line. @@ -75,7 +75,7 @@ . error .endif -# A condition that consists of a variable expression only (without any +# A condition that consists of an expression only (without any # comparison operator) can be used with .if and the other .ifxxx directives. .ifmake ${:Ufirst} # expect+1: ok Index: src/usr.bin/make/unit-tests/varmod-match-escape.mk diff -u src/usr.bin/make/unit-tests/varmod-match-escape.mk:1.11 src/usr.bin/make/unit-tests/varmod-match-escape.mk:1.12 --- src/usr.bin/make/unit-tests/varmod-match-escape.mk:1.11 Thu Nov 2 05:14:58 2023 +++ src/usr.bin/make/unit-tests/varmod-match-escape.mk Sun Nov 19 21:47:52 2023 @@ -1,7 +1,7 @@ -# $NetBSD: varmod-match-escape.mk,v 1.11 2023/11/02 05:14:58 rillig Exp $ +# $NetBSD: varmod-match-escape.mk,v 1.12 2023/11/19 21:47:52 rillig Exp $ # # As of 2020-08-01, the :M and :N modifiers interpret backslashes differently, -# depending on whether there was a variable expression somewhere before the +# depending on whether there was an expression somewhere before the # first backslash or not. See ParseModifier_Match, "copy = true". # # Apart from the different and possibly confusing debug output, there is no @@ -18,17 +18,17 @@ SPECIALS= \: : \\ * \* .endif # And now both cases combined: A single modifier with both an escaped ':' -# as well as a variable expression that expands to a ':'. +# as well as an expression that expands to a ':'. # -# XXX: As of 2020-11-01, when an escaped ':' occurs before the variable +# XXX: As of 2020-11-01, when an escaped ':' occurs before the # expression, the whole modifier text is subject to unescaping '\:' to ':', -# before the variable expression is expanded. This means that the '\:' in -# the variable expression is expanded as well, turning ${:U\:} into a simple +# before the expression is expanded. This means that the '\:' in +# the expression is expanded as well, turning ${:U\:} into a simple # ${:U:}, which silently expands to an empty string, instead of generating # an error message. # # XXX: As of 2020-11-01, the modifier on the right-hand side of the -# comparison is parsed differently though. First, the variable expression +# comparison is parsed differently though. First, the expression # is parsed, resulting in ':' and needSubst=true. After that, the escaped # ':' is seen, and this time, copy=true is not executed but stays copy=false. # Therefore the escaped ':' is kept as-is, and the final pattern becomes Index: src/usr.bin/make/unit-tests/opt-debug-lint.mk diff -u src/usr.bin/make/unit-tests/opt-debug-lint.mk:1.15 src/usr.bin/make/unit-tests/opt-debug-lint.mk:1.16 --- src/usr.bin/make/unit-tests/opt-debug-lint.mk:1.15 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/opt-debug-lint.mk Sun Nov 19 21:47:52 2023 @@ -1,7 +1,7 @@ -# $NetBSD: opt-debug-lint.mk,v 1.15 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: opt-debug-lint.mk,v 1.16 2023/11/19 21:47:52 rillig Exp $ # # Tests for the -dL command line option, which runs additional checks -# to catch common mistakes, such as unclosed variable expressions. +# to catch common mistakes, such as unclosed expressions. .MAKEFLAGS: -dL @@ -91,7 +91,7 @@ ${UNDEF}: ${UNDEF} # # Before var.c 1.856 from 2021-03-14, this regular expression was then # compiled even though that was not necessary for checking the syntax at the -# level of variable expressions. The unexpanded '$' then resulted in a wrong +# level of expressions. The unexpanded '$' then resulted in a wrong # error message. # # This only happened in lint mode since in default mode the early check for Index: src/usr.bin/make/unit-tests/varmod-assign.mk diff -u src/usr.bin/make/unit-tests/varmod-assign.mk:1.15 src/usr.bin/make/unit-tests/varmod-assign.mk:1.16 --- src/usr.bin/make/unit-tests/varmod-assign.mk:1.15 Wed Feb 9 21:09:24 2022 +++ src/usr.bin/make/unit-tests/varmod-assign.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-assign.mk,v 1.15 2022/02/09 21:09:24 rillig Exp $ +# $NetBSD: varmod-assign.mk,v 1.16 2023/11/19 21:47:52 rillig Exp $ # # Tests for the obscure ::= variable modifiers, which perform variable # assignments during evaluation, just like the = operator in C. @@ -116,7 +116,7 @@ APPEND.dollar= $${APPEND.indirect} .endif -# The assignment modifier can be used in a variable expression that is +# The assignment modifier can be used in an expression that is # enclosed in parentheses. In such a case, parsing stops at the first ')', # not at the first '}'. VAR= previous Index: src/usr.bin/make/unit-tests/varmod-defined.mk diff -u src/usr.bin/make/unit-tests/varmod-defined.mk:1.15 src/usr.bin/make/unit-tests/varmod-defined.mk:1.16 --- src/usr.bin/make/unit-tests/varmod-defined.mk:1.15 Thu Nov 2 05:40:49 2023 +++ src/usr.bin/make/unit-tests/varmod-defined.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-defined.mk,v 1.15 2023/11/02 05:40:49 rillig Exp $ +# $NetBSD: varmod-defined.mk,v 1.16 2023/11/19 21:47:52 rillig Exp $ # # Tests for the :D variable modifier, which returns the given string # if the variable is defined. It is closely related to the :U modifier. @@ -46,10 +46,10 @@ DEF= defined . error .endif -# Like in several other places in variable expressions, when +# Like in several other places in expressions, when # ApplyModifier_Defined calls Var_Parse, double dollars lead to a parse # error that is silently ignored. This makes all dollar signs disappear, -# except for the last, which is a well-formed variable expression. +# except for the last, which is a well-formed expression. # .if ${DEF:D$$$$$${DEF}} != "defined" . error Index: src/usr.bin/make/unit-tests/varmod-sysv.mk diff -u src/usr.bin/make/unit-tests/varmod-sysv.mk:1.15 src/usr.bin/make/unit-tests/varmod-sysv.mk:1.16 --- src/usr.bin/make/unit-tests/varmod-sysv.mk:1.15 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/varmod-sysv.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-sysv.mk,v 1.15 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: varmod-sysv.mk,v 1.16 2023/11/19 21:47:52 rillig Exp $ # # Tests for the variable modifier ':from=to', which replaces the suffix # "from" with "to". It can also use '%' as a wildcard. @@ -49,7 +49,7 @@ . error .endif -# In the modifier ':from=to', both parts can contain variable expressions. +# In the modifier ':from=to', both parts can contain expressions. .if ${one two:L:${:Uone}=${:U1}} != "1 two" . error .endif @@ -69,7 +69,7 @@ .endif # The replacement string can contain spaces, thereby changing the number -# of words in the variable expression. +# of words in the expression. .if ${In:L:%=% ${:Uthe Sun}} != "In the Sun" . error .endif @@ -206,7 +206,7 @@ . error .endif -# This is not a SysV modifier since the nested variable expression expands +# This is not a SysV modifier since the nested expression expands # to an empty string. The '=' in it should be irrelevant during parsing. # XXX: As of 2020-12-05, this expression generates an "Unfinished modifier" # error, while the correct error message would be "Unknown modifier" since @@ -221,7 +221,7 @@ # "fromto}...". The next modifier is a SysV modifier. ApplyModifier_SysV # parses the modifier as "from${:D=}to", ending at the '}'. Next, the two # parts of the modifier are parsed using ParseModifierPart, which scans -# differently, properly handling nested variable expressions. The two parts +# differently, properly handling nested expressions. The two parts # are now "fromto}..." and "replaced". .if "${:Ufromto\}...:from${:D=}to}...=replaced}" != "replaced" . error Index: src/usr.bin/make/unit-tests/varmod-gmtime.mk diff -u src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.20 src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.21 --- src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.20 Thu Oct 19 18:24:33 2023 +++ src/usr.bin/make/unit-tests/varmod-gmtime.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-gmtime.mk,v 1.20 2023/10/19 18:24:33 rillig Exp $ +# $NetBSD: varmod-gmtime.mk,v 1.21 2023/11/19 21:47:52 rillig Exp $ # # Tests for the :gmtime variable modifier, which formats a timestamp # using strftime(3) in UTC. @@ -45,7 +45,7 @@ # Before var.c 1.1050 from 2023-05-09, it was not possible to pass the -# seconds via a variable expression. +# seconds via an expression. .if ${%Y:L:gmtime=${:U1593536400}} != "2020" . error .endif Index: src/usr.bin/make/unit-tests/varmod-ifelse.mk diff -u src/usr.bin/make/unit-tests/varmod-ifelse.mk:1.24 src/usr.bin/make/unit-tests/varmod-ifelse.mk:1.25 --- src/usr.bin/make/unit-tests/varmod-ifelse.mk:1.24 Sat Nov 18 19:25:43 2023 +++ src/usr.bin/make/unit-tests/varmod-ifelse.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-ifelse.mk,v 1.24 2023/11/18 19:25:43 rillig Exp $ +# $NetBSD: varmod-ifelse.mk,v 1.25 2023/11/19 21:47:52 rillig Exp $ # # Tests for the ${cond:?then:else} variable modifier, which evaluates either # the then-expression or the else-expression, depending on the condition. @@ -13,19 +13,19 @@ # The variable name of the expression is expanded and then taken as the # condition. In the below example it becomes: # -# variable expression == "literal" +# bare words == "literal" # # This confuses the parser, which expects an operator instead of the bare # word "expression". If the name were expanded lazily, everything would be # fine since the condition would be: # -# ${:Uvariable expression} == "literal" +# ${:Ubare words} == "literal" # # Evaluating the variable name lazily would require additional code in # Var_Parse and ParseVarname, it would be more useful and predictable # though. -# expect+1: Malformed conditional (${${:Uvariable expression} == "literal":?bad:bad}) -.if ${${:Uvariable expression} == "literal":?bad:bad} +# expect+1: Malformed conditional (${${:Ubare words} == "literal":?bad:bad}) +.if ${${:Ubare words} == "literal":?bad:bad} . error .else . error @@ -61,7 +61,7 @@ COND:= ${${UNDEF} == "":?bad-assign:bad- # This line generates 2 error messages. The first comes from evaluating the # malformed conditional "1 == == 2", which is reported as "Bad conditional -# expression" by ApplyModifier_IfElse. The variable expression containing that +# expression" by ApplyModifier_IfElse. The expression containing that # conditional therefore returns a parse error from Var_Parse, and this parse # error propagates to CondEvalExpression, where the "Malformed conditional" # comes from. @@ -79,7 +79,7 @@ COND:= ${${UNDEF} == "":?bad-assign:bad- # XXX: The left-hand side is enclosed in quotes. This results in Var_Parse # being called without VARE_UNDEFERR. When ApplyModifier_IfElse # returns AMR_CLEANUP as result, Var_Parse returns varUndefined since the -# value of the variable expression is still undefined. CondParser_String is +# value of the expression is still undefined. CondParser_String is # then supposed to do proper error handling, but since varUndefined is local # to var.c, it cannot distinguish this return value from an ordinary empty # string. The left-hand side of the comparison is therefore just an empty @@ -98,7 +98,7 @@ COND:= ${${UNDEF} == "":?bad-assign:bad- .MAKEFLAGS: -d0 # As of 2020-12-10, the variable "VAR" is first expanded, and the result of -# this expansion is then taken as the condition. To force the variable +# this expansion is then taken as the condition. To force the # expression in the condition to be evaluated at exactly the right point, # the '$' of the intended '${VAR}' escapes from the parser in form of the # expression ${:U\$}. Because of this escaping, the variable "VAR" and thus Index: src/usr.bin/make/unit-tests/varmod-indirect.mk diff -u src/usr.bin/make/unit-tests/varmod-indirect.mk:1.12 src/usr.bin/make/unit-tests/varmod-indirect.mk:1.13 --- src/usr.bin/make/unit-tests/varmod-indirect.mk:1.12 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/varmod-indirect.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-indirect.mk,v 1.12 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: varmod-indirect.mk,v 1.13 2023/11/19 21:47:52 rillig Exp $ # # Tests for indirect variable modifiers, such as in ${VAR:${M_modifiers}}. # These can be used for very basic purposes like converting a string to either @@ -11,9 +11,9 @@ # To apply a modifier indirectly via another variable, the whole -# modifier must be put into a single variable expression. +# modifier must be put into a single expression. # The following expression generates a parse error since its indirect -# modifier contains more than a sole variable expression. +# modifier contains more than a sole expression. # # expect+1: Unknown modifier "${" .if ${value:L:${:US}${:U,value,replacement,}} != "S,value,replacement,}" @@ -71,20 +71,20 @@ .endif -# The nested variable expression expands to "tu", and this is interpreted as +# The nested expression expands to "tu", and this is interpreted as # a variable modifier for the value "Upper", resulting in "UPPER". .if ${Upper:L:${:Utu}} != "UPPER" . error .endif -# The nested variable expression expands to "tl", and this is interpreted as +# The nested expression expands to "tl", and this is interpreted as # a variable modifier for the value "Lower", resulting in "lower". .if ${Lower:L:${:Utl}} != "lower" . error .endif -# The nested variable expression is ${1 != 1:?Z:tl}, consisting of the +# The nested expression is ${1 != 1:?Z:tl}, consisting of the # condition "1 != 1", the then-branch "Z" and the else-branch "tl". Since # the condition evaluates to false, the then-branch is ignored (it would # have been an unknown modifier anyway) and the ":tl" modifier is applied. @@ -172,10 +172,10 @@ M_NoPrimes= ${PRIMES:${M_ListToSkip}} # a variable assignment using ':='. .MAKEFLAGS: -dpv -# The undefined variable expression is kept as-is. +# The undefined expression is kept as-is. _:= before ${UNDEF} after -# The undefined variable expression is kept as-is. +# The undefined expression is kept as-is. _:= before ${UNDEF:${:US,a,a,}} after # XXX: The subexpression ${:U} is fully defined, therefore it is expanded. @@ -189,7 +189,7 @@ _:= before ${UNDEF:${:US,a,a,}} after _:= before ${UNDEF:${:U}} after # XXX: This expands to ${UNDEF:Z}, which will behave differently if the -# variable '_' is used in a context where the variable expression ${_} is +# variable '_' is used in a context where the expression ${_} is # parsed but not evaluated. # expect+1: Unknown modifier "Z" _:= before ${UNDEF:${:UZ}} after @@ -201,7 +201,7 @@ _:= before ${UNDEF:${:UZ}} after # When evaluating indirect modifiers, these modifiers may expand to ':tW', # which modifies the interpretation of the expression value. This modified # interpretation only lasts until the end of the indirect modifier, it does -# not influence the outer variable expression. +# not influence the outer expression. .if ${1 2 3:L:tW:[#]} != 1 # direct :tW applies to the :[#] . error .endif @@ -213,7 +213,7 @@ _:= before ${UNDEF:${:UZ}} after # When evaluating indirect modifiers, these modifiers may expand to ':ts*', # which modifies the interpretation of the expression value. This modified # interpretation only lasts until the end of the indirect modifier, it does -# not influence the outer variable expression. +# not influence the outer expression. # # In this first expression, the direct ':ts*' has no effect since ':U' does not # treat the expression value as a list of words but as a single word. It has Index: src/usr.bin/make/unit-tests/varmod-to-separator.mk diff -u src/usr.bin/make/unit-tests/varmod-to-separator.mk:1.12 src/usr.bin/make/unit-tests/varmod-to-separator.mk:1.13 --- src/usr.bin/make/unit-tests/varmod-to-separator.mk:1.12 Thu Jun 1 20:56:35 2023 +++ src/usr.bin/make/unit-tests/varmod-to-separator.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-to-separator.mk,v 1.12 2023/06/01 20:56:35 rillig Exp $ +# $NetBSD: varmod-to-separator.mk,v 1.13 2023/11/19 21:47:52 rillig Exp $ # # Tests for the :ts variable modifier, which joins the words of the variable # using an arbitrary character as word separator. @@ -39,7 +39,7 @@ WORDS= one two three four five six # quote though, or other special characters like dollar or backslash. # # This example also demonstrates that the closing brace is not interpreted -# as a separator, but as the closing delimiter of the whole variable +# as a separator, but as the closing delimiter of the whole # expression. .if ${WORDS:tu:ts} != "ONETWOTHREEFOURFIVESIX" . warning Colon as separator does not work. Index: src/usr.bin/make/unit-tests/varmod-loop.mk diff -u src/usr.bin/make/unit-tests/varmod-loop.mk:1.23 src/usr.bin/make/unit-tests/varmod-loop.mk:1.24 --- src/usr.bin/make/unit-tests/varmod-loop.mk:1.23 Sat Feb 18 11:55:20 2023 +++ src/usr.bin/make/unit-tests/varmod-loop.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-loop.mk,v 1.23 2023/02/18 11:55:20 rillig Exp $ +# $NetBSD: varmod-loop.mk,v 1.24 2023/11/19 21:47:52 rillig Exp $ # # Tests for the expression modifier ':@var@body@', which replaces each word of # the expression with the expanded body, which may contain references to the @@ -52,7 +52,7 @@ mod-loop-dollar: # # As of 2020-10-18, the :@ modifier is implemented by actually setting a # variable in the scope of the expression and deleting it again after the -# loop. This is different from the .for loops, which substitute the variable +# loop. This is different from the .for loops, which substitute the # expression with ${:Uvalue}, leading to different unwanted side effects. # # To make the behavior more predictable, the :@ modifier should restore the @@ -111,7 +111,7 @@ SUBST_CONTAINING_LOOP:= ${USE_8_DOLLARS} # The variable SUBST_CONTAINING_LOOP therefore gets assigned the raw value # "$$$$ $$$$$$$$ $$$$$$$$". # -# The variable expression in the condition then expands this raw stored value +# The expression in the condition then expands this raw stored value # once, resulting in "$$ $$$$ $$$$". The effects from VARE_KEEP_DOLLAR no # longer take place since they had only been active during the evaluation of # the variable assignment. Index: src/usr.bin/make/unit-tests/varmod-match.mk diff -u src/usr.bin/make/unit-tests/varmod-match.mk:1.16 src/usr.bin/make/unit-tests/varmod-match.mk:1.17 --- src/usr.bin/make/unit-tests/varmod-match.mk:1.16 Thu Nov 2 05:14:58 2023 +++ src/usr.bin/make/unit-tests/varmod-match.mk Sun Nov 19 21:47:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-match.mk,v 1.16 2023/11/02 05:14:58 rillig Exp $ +# $NetBSD: varmod-match.mk,v 1.17 2023/11/19 21:47:52 rillig Exp $ # # Tests for the :M variable modifier, which filters words that match the # given pattern. @@ -285,7 +285,7 @@ WORDS= [x- x x- y yyyyy .endif -# The pattern can come from a variable expression. For single-letter +# The pattern can come from an expression. For single-letter # variables, either the short form or the long form can be used, just as # everywhere else. PRIMES= 2 3 5 7 11 Index: src/usr.bin/make/unit-tests/varparse-mod.mk diff -u src/usr.bin/make/unit-tests/varparse-mod.mk:1.1 src/usr.bin/make/unit-tests/varparse-mod.mk:1.2 --- src/usr.bin/make/unit-tests/varparse-mod.mk:1.1 Fri Oct 2 20:34:59 2020 +++ src/usr.bin/make/unit-tests/varparse-mod.mk Sun Nov 19 21:47:52 2023 @@ -1,6 +1,6 @@ -# $NetBSD: varparse-mod.mk,v 1.1 2020/10/02 20:34:59 rillig Exp $ +# $NetBSD: varparse-mod.mk,v 1.2 2023/11/19 21:47:52 rillig Exp $ -# Tests for parsing variable expressions with modifiers. +# Tests for parsing expressions with modifiers. # As of 2020-10-02, the below condition does not result in a parse error. # The condition contains two separate mistakes. The first mistake is that @@ -8,7 +8,7 @@ # there is a stray '}' at the end of the whole condition. # # As of 2020-10-02, the actual parse result of this condition is a single -# variable expression with 2 modifiers. The first modifier is +# expression with 2 modifiers. The first modifier is # ":!echo "\$VAR"} !". Afterwards, the parser optionally skips a ':' (at the # bottom of ApplyModifiers) and continues with the next modifier, in this case # "= "value"", which is interpreted as a SysV substitution modifier with an