Module Name: src
Committed By: rillig
Date: Sun Nov 19 22:32:44 UTC 2023
Modified Files:
src/usr.bin/make/unit-tests: cond-short.mk dep-var.mk
deptgt-makeflags.mk directive-for-escape.mk directive.mk
moderrs.exp moderrs.mk var-op-default.mk varmod-indirect.mk
varname-make_print_var_on_error-jobs.mk varparse-dynamic.mk
varparse-errors.mk
Log Message:
tests/make: replace 'variable expressions' with 'expressions'
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 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/dep-var.mk
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/deptgt-makeflags.mk \
src/usr.bin/make/unit-tests/directive.mk
cvs rdiff -u -r1.33 -r1.34 src/usr.bin/make/unit-tests/moderrs.exp
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/make/unit-tests/moderrs.mk
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/var-op-default.mk
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/varmod-indirect.mk
cvs rdiff -u -r1.3 -r1.4 \
src/usr.bin/make/unit-tests/varname-make_print_var_on_error-jobs.mk
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/varparse-dynamic.mk
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/varparse-errors.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/cond-short.mk
diff -u src/usr.bin/make/unit-tests/cond-short.mk:1.22 src/usr.bin/make/unit-tests/cond-short.mk:1.23
--- src/usr.bin/make/unit-tests/cond-short.mk:1.22 Sun Nov 19 21:47:52 2023
+++ src/usr.bin/make/unit-tests/cond-short.mk Sun Nov 19 22:32:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: cond-short.mk,v 1.22 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: cond-short.mk,v 1.23 2023/11/19 22:32:44 rillig Exp $
#
# Demonstrates that in conditions, the right-hand side of an && or ||
# is only evaluated if it can actually influence the result.
@@ -11,7 +11,7 @@
# Var_Parse got a new parameter named 'wantit'. Since then it would have been
# possible to skip evaluation of irrelevant expressions and only
# parse them. They were still evaluated though, the only difference to
-# relevant expressions was that in the irrelevant variable
+# relevant expressions was that in the irrelevant
# 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.22 src/usr.bin/make/unit-tests/directive-for-escape.mk:1.23
--- src/usr.bin/make/unit-tests/directive-for-escape.mk:1.22 Sun Nov 19 21:47:52 2023
+++ src/usr.bin/make/unit-tests/directive-for-escape.mk Sun Nov 19 22:32:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: directive-for-escape.mk,v 1.22 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: directive-for-escape.mk,v 1.23 2023/11/19 22:32:44 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
@@ -156,7 +156,7 @@ NUMBERS= one two three
.endfor
# Before for.c 1.173 from 2023-05-08, the name of the iteration variable
-# could contain braces, which allowed to replace sequences of variable
+# could contain braces, which allowed to replace sequences of
# expressions. This possibility was neither intended nor documented.
BASENAME= one
EXT= .c
Index: src/usr.bin/make/unit-tests/dep-var.mk
diff -u src/usr.bin/make/unit-tests/dep-var.mk:1.9 src/usr.bin/make/unit-tests/dep-var.mk:1.10
--- src/usr.bin/make/unit-tests/dep-var.mk:1.9 Sun Nov 19 21:47:52 2023
+++ src/usr.bin/make/unit-tests/dep-var.mk Sun Nov 19 22:32:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: dep-var.mk,v 1.9 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: dep-var.mk,v 1.10 2023/11/19 22:32:44 rillig Exp $
#
# Tests for variable references in dependency declarations.
#
@@ -63,7 +63,7 @@ INDIRECT_3= indirect
UNDEF1= undef1
DEF2= def2
-# Cover the code in SuffExpandChildren that deals with malformed variable
+# Cover the code in SuffExpandChildren that deals with malformed
# expressions.
#
# This seems to be an edge case that never happens in practice, and it would
Index: src/usr.bin/make/unit-tests/deptgt-makeflags.mk
diff -u src/usr.bin/make/unit-tests/deptgt-makeflags.mk:1.8 src/usr.bin/make/unit-tests/deptgt-makeflags.mk:1.9
--- src/usr.bin/make/unit-tests/deptgt-makeflags.mk:1.8 Sun Nov 19 21:47:52 2023
+++ src/usr.bin/make/unit-tests/deptgt-makeflags.mk Sun Nov 19 22:32:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: deptgt-makeflags.mk,v 1.8 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: deptgt-makeflags.mk,v 1.9 2023/11/19 22:32:44 rillig Exp $
#
# Tests for the special target .MAKEFLAGS in dependency declarations,
# which adds command line options later, at parse time.
@@ -67,7 +67,7 @@
# Next try at defining another newline variable. Since whitespace around 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
+# parsing. The ':=' assignment operator expands the empty
# expressions, leaving only the newline as the variable value.
#
# This is one of the very few ways (maybe even the only one) to inject literal
Index: src/usr.bin/make/unit-tests/directive.mk
diff -u src/usr.bin/make/unit-tests/directive.mk:1.8 src/usr.bin/make/unit-tests/directive.mk:1.9
--- src/usr.bin/make/unit-tests/directive.mk:1.8 Sat Aug 19 11:09:02 2023
+++ src/usr.bin/make/unit-tests/directive.mk Sun Nov 19 22:32:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: directive.mk,v 1.8 2023/08/19 11:09:02 rillig Exp $
+# $NetBSD: directive.mk,v 1.9 2023/11/19 22:32:44 rillig Exp $
#
# Tests for the preprocessing directives, such as .if or .info.
@@ -13,7 +13,7 @@
# expect+1: Unknown directive "indented"
. indented tab
-# Directives must be written directly, not indirectly via variable
+# Directives must be written directly, not indirectly via
# expressions.
# expect+1: Unknown directive ""
.${:Uinfo} directives cannot be indirect
Index: src/usr.bin/make/unit-tests/moderrs.exp
diff -u src/usr.bin/make/unit-tests/moderrs.exp:1.33 src/usr.bin/make/unit-tests/moderrs.exp:1.34
--- src/usr.bin/make/unit-tests/moderrs.exp:1.33 Sun Nov 19 22:06:15 2023
+++ src/usr.bin/make/unit-tests/moderrs.exp Sun Nov 19 22:32:44 2023
@@ -9,12 +9,12 @@ make: Unknown modifier "Z"
VAR:Z=before-inner}-after
unclosed-direct:
-want: Unclosed variable expression, expecting '}' for modifier "S,V,v," of variable "VAR" with value "Thevariable"
+want: Unclosed expression, expecting '}' for modifier "S,V,v," of variable "VAR" with value "Thevariable"
make: Unclosed expression, expecting '}' for modifier "S,V,v," of variable "VAR" with value "Thevariable"
VAR:S,V,v,=Thevariable
unclosed-indirect:
-want: Unclosed variable expression after indirect modifier, expecting '}' for variable "VAR"
+want: Unclosed expression after indirect modifier, expecting '}' for variable "VAR"
make: Unclosed expression after indirect modifier, expecting '}' for variable "VAR"
VAR:S,V,v,=Thevariable
Index: src/usr.bin/make/unit-tests/moderrs.mk
diff -u src/usr.bin/make/unit-tests/moderrs.mk:1.30 src/usr.bin/make/unit-tests/moderrs.mk:1.31
--- src/usr.bin/make/unit-tests/moderrs.mk:1.30 Mon Jun 21 08:28:37 2021
+++ src/usr.bin/make/unit-tests/moderrs.mk Sun Nov 19 22:32:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: moderrs.mk,v 1.30 2021/06/21 08:28:37 rillig Exp $
+# $NetBSD: moderrs.mk,v 1.31 2023/11/19 22:32:44 rillig Exp $
#
# various modifier error tests
@@ -34,11 +34,11 @@ mod-unknown-indirect: print-header print
@echo 'VAR:${MOD_UNKN}=before-${VAR:${MOD_UNKN}:inner}-after'
unclosed-direct: print-header print-footer
- @echo 'want: Unclosed variable expression, expecting $'}$' for modifier "S,V,v," of variable "VAR" with value "Thevariable"'
+ @echo 'want: Unclosed expression, expecting $'}$' for modifier "S,V,v," of variable "VAR" with value "Thevariable"'
@echo VAR:S,V,v,=${VAR:S,V,v,
unclosed-indirect: print-header print-footer
- @echo 'want: Unclosed variable expression after indirect modifier, expecting $'}$' for variable "VAR"'
+ @echo 'want: Unclosed expression after indirect modifier, expecting $'}$' for variable "VAR"'
@echo VAR:${MOD_TERM},=${VAR:${MOD_S}
unfinished-indirect: print-header print-footer
Index: src/usr.bin/make/unit-tests/var-op-default.mk
diff -u src/usr.bin/make/unit-tests/var-op-default.mk:1.4 src/usr.bin/make/unit-tests/var-op-default.mk:1.5
--- src/usr.bin/make/unit-tests/var-op-default.mk:1.4 Sun Nov 19 21:47:52 2023
+++ src/usr.bin/make/unit-tests/var-op-default.mk Sun Nov 19 22:32:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: var-op-default.mk,v 1.4 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: var-op-default.mk,v 1.5 2023/11/19 22:32:44 rillig Exp $
#
# Tests for the ?= variable assignment operator, which only assigns
# if the variable is still undefined.
@@ -45,7 +45,7 @@ i?= default
# and 'VAR.${param}' expand to 'VAR.param', and the second '?=' assignment
# has no effect.
#
-# Since 2000.05.11.07.43.42 it has been possible to use nested variable
+# Since 2000.05.11.07.43.42 it has been possible to use nested
# expressions in variable names, which made make much more versatile.
# On 2008.03.31.00.12.21, this particular case of the '?=' operator has been
# fixed. Before, the '?=' operator had not expanded the variable name
Index: src/usr.bin/make/unit-tests/varmod-indirect.mk
diff -u src/usr.bin/make/unit-tests/varmod-indirect.mk:1.13 src/usr.bin/make/unit-tests/varmod-indirect.mk:1.14
--- src/usr.bin/make/unit-tests/varmod-indirect.mk:1.13 Sun Nov 19 21:47:52 2023
+++ src/usr.bin/make/unit-tests/varmod-indirect.mk Sun Nov 19 22:32:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-indirect.mk,v 1.13 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: varmod-indirect.mk,v 1.14 2023/11/19 22:32:44 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
@@ -133,7 +133,7 @@ M_NoPrimes= ${PRIMES:${M_ListToSkip}}
.MAKEFLAGS: -d0
-# In contrast to the .if conditions, the .for loop allows undefined variable
+# In contrast to the .if conditions, the .for loop allows undefined
# expressions. These expressions expand to empty strings.
# An undefined expression without any modifiers expands to an empty string.
Index: src/usr.bin/make/unit-tests/varname-make_print_var_on_error-jobs.mk
diff -u src/usr.bin/make/unit-tests/varname-make_print_var_on_error-jobs.mk:1.3 src/usr.bin/make/unit-tests/varname-make_print_var_on_error-jobs.mk:1.4
--- src/usr.bin/make/unit-tests/varname-make_print_var_on_error-jobs.mk:1.3 Thu Feb 4 21:33:14 2021
+++ src/usr.bin/make/unit-tests/varname-make_print_var_on_error-jobs.mk Sun Nov 19 22:32:44 2023
@@ -1,9 +1,9 @@
-# $NetBSD: varname-make_print_var_on_error-jobs.mk,v 1.3 2021/02/04 21:33:14 rillig Exp $
+# $NetBSD: varname-make_print_var_on_error-jobs.mk,v 1.4 2023/11/19 22:32:44 rillig Exp $
#
# Tests for the special MAKE_PRINT_VAR_ON_ERROR variable, which prints the
# values of selected variables on error.
#
-# The variable .ERROR_CMD contains all commands of the target, with variable
+# The variable .ERROR_CMD contains all commands of the target, with
# expressions expanded, just as they were printed to the shell command file.
#
# The commands in .ERROR_CMD are space-separated. Since each command usually
Index: src/usr.bin/make/unit-tests/varparse-dynamic.mk
diff -u src/usr.bin/make/unit-tests/varparse-dynamic.mk:1.7 src/usr.bin/make/unit-tests/varparse-dynamic.mk:1.8
--- src/usr.bin/make/unit-tests/varparse-dynamic.mk:1.7 Thu Jun 1 20:56:35 2023
+++ src/usr.bin/make/unit-tests/varparse-dynamic.mk Sun Nov 19 22:32:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: varparse-dynamic.mk,v 1.7 2023/06/01 20:56:35 rillig Exp $
+# $NetBSD: varparse-dynamic.mk,v 1.8 2023/11/19 22:32:44 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.
@@ -24,7 +24,7 @@
.endif
# If a dynamic variable is expanded in a non-local scope, the expression
-# based on this variable is not expanded. But there may be nested variable
+# based on this variable is not expanded. But there may be nested
# expressions in the modifiers, and these are kept unexpanded as well.
.if ${.TARGET:M${:Ufallback}} != "\${.TARGET:M\${:Ufallback}}"
. error
Index: src/usr.bin/make/unit-tests/varparse-errors.mk
diff -u src/usr.bin/make/unit-tests/varparse-errors.mk:1.10 src/usr.bin/make/unit-tests/varparse-errors.mk:1.11
--- src/usr.bin/make/unit-tests/varparse-errors.mk:1.10 Sun Nov 19 21:47:52 2023
+++ src/usr.bin/make/unit-tests/varparse-errors.mk Sun Nov 19 22:32:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: varparse-errors.mk,v 1.10 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: varparse-errors.mk,v 1.11 2023/11/19 22:32:44 rillig Exp $
# Tests for parsing and evaluating all kinds of expressions.
#
@@ -17,7 +17,7 @@ INDIRECT= An ${:Uindirect} value.
REF_UNDEF= A reference to an ${UNDEF}undefined variable.
-ERR_UNCLOSED= An ${UNCLOSED variable expression.
+ERR_UNCLOSED= An ${UNCLOSED expression.
ERR_BAD_MOD= An ${:Uindirect:Z} expression with an unknown modifier.