Module Name: src
Committed By: rillig
Date: Mon Feb 15 18:23:32 UTC 2021
Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: directive-export-impl.exp
directive-unexport-env.exp var-op-append.exp vardebug.exp
varmod-defined.exp varmod-indirect.exp varmod-match-escape.exp
varname-empty.exp varname.exp
Log Message:
make: rename ExprDefined constants for debug logging
To generate a diff of this commit:
cvs rdiff -u -r1.825 -r1.826 src/usr.bin/make/var.c
cvs rdiff -u -r1.2 -r1.3 \
src/usr.bin/make/unit-tests/directive-export-impl.exp
cvs rdiff -u -r1.4 -r1.5 \
src/usr.bin/make/unit-tests/directive-unexport-env.exp \
src/usr.bin/make/unit-tests/var-op-append.exp
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/make/unit-tests/vardebug.exp
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/varmod-defined.exp
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/varmod-indirect.exp
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/varmod-match-escape.exp
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/varname-empty.exp
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/make/unit-tests/varname.exp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.825 src/usr.bin/make/var.c:1.826
--- src/usr.bin/make/var.c:1.825 Mon Feb 15 18:21:13 2021
+++ src/usr.bin/make/var.c Mon Feb 15 18:23:32 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.825 2021/02/15 18:21:13 rillig Exp $ */
+/* $NetBSD: var.c,v 1.826 2021/02/15 18:23:32 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -139,7 +139,7 @@
#include "metachar.h"
/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.825 2021/02/15 18:21:13 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.826 2021/02/15 18:23:32 rillig Exp $");
typedef enum VarFlags {
VAR_NONE = 0,
@@ -2015,9 +2015,9 @@ typedef enum ExprDefined {
} ExprDefined;
static const char *const ExprDefined_Name[] = {
- "none", /* TODO: rename */
- "VES_UNDEF", /* TODO: rename */
- "VES_DEF" /* TODO: rename */
+ "regular",
+ "undefined",
+ "defined"
};
/* A variable expression such as $@ or ${VAR:Mpattern:Q}. */
Index: src/usr.bin/make/unit-tests/directive-export-impl.exp
diff -u src/usr.bin/make/unit-tests/directive-export-impl.exp:1.2 src/usr.bin/make/unit-tests/directive-export-impl.exp:1.3
--- src/usr.bin/make/unit-tests/directive-export-impl.exp:1.2 Tue Feb 2 16:18:16 2021
+++ src/usr.bin/make/unit-tests/directive-export-impl.exp Mon Feb 15 18:23:32 2021
@@ -5,46 +5,46 @@ Global:.MAKE.EXPORTED = UT_VAR
ParseReadLine (32): ': ${UT_VAR:N*}'
Var_Parse: ${UT_VAR:N*} with VARE_UNDEFERR|VARE_WANTRES
Var_Parse: ${REF}> with VARE_UNDEFERR|VARE_WANTRES
-Applying ${UT_VAR:N...} to "<>" (VARE_UNDEFERR|VARE_WANTRES, VAR_EXPORTED|VAR_REEXPORT, none)
+Applying ${UT_VAR:N...} to "<>" (VARE_UNDEFERR|VARE_WANTRES, VAR_EXPORTED|VAR_REEXPORT, regular)
Pattern[UT_VAR] for [<>] is [*]
ModifyWords: split "<>" into 1 words
-Result of ${UT_VAR:N*} is "" (VARE_UNDEFERR|VARE_WANTRES, VAR_EXPORTED|VAR_REEXPORT, none)
+Result of ${UT_VAR:N*} is "" (VARE_UNDEFERR|VARE_WANTRES, VAR_EXPORTED|VAR_REEXPORT, regular)
ParseDoDependency(: )
CondParser_Eval: ${:!echo "\$UT_VAR"!} != "<>"
Var_Parse: ${:!echo "\$UT_VAR"!} != "<>" with VARE_UNDEFERR|VARE_WANTRES
-Applying ${:!...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, VES_UNDEF)
+Applying ${:!...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined)
Modifier part: "echo "$UT_VAR""
Var_Parse: ${.MAKE.EXPORTED:O:u} with VARE_WANTRES
-Applying ${.MAKE.EXPORTED:O} to "UT_VAR" (VARE_WANTRES, none, none)
-Result of ${.MAKE.EXPORTED:O} is "UT_VAR" (VARE_WANTRES, none, none)
-Applying ${.MAKE.EXPORTED:u} to "UT_VAR" (VARE_WANTRES, none, none)
-Result of ${.MAKE.EXPORTED:u} is "UT_VAR" (VARE_WANTRES, none, none)
+Applying ${.MAKE.EXPORTED:O} to "UT_VAR" (VARE_WANTRES, none, regular)
+Result of ${.MAKE.EXPORTED:O} is "UT_VAR" (VARE_WANTRES, none, regular)
+Applying ${.MAKE.EXPORTED:u} to "UT_VAR" (VARE_WANTRES, none, regular)
+Result of ${.MAKE.EXPORTED:u} is "UT_VAR" (VARE_WANTRES, none, regular)
Var_Parse: ${UT_VAR} with VARE_WANTRES
Var_Parse: ${REF}> with VARE_WANTRES
-Result of ${:!echo "\$UT_VAR"!} is "<>" (VARE_UNDEFERR|VARE_WANTRES, none, VES_DEF)
+Result of ${:!echo "\$UT_VAR"!} is "<>" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
lhs = "<>", rhs = "<>", op = !=
ParseReadLine (49): ': ${UT_VAR:N*}'
Var_Parse: ${UT_VAR:N*} with VARE_UNDEFERR|VARE_WANTRES
Var_Parse: ${REF}> with VARE_UNDEFERR|VARE_WANTRES
-Applying ${UT_VAR:N...} to "<>" (VARE_UNDEFERR|VARE_WANTRES, VAR_EXPORTED|VAR_REEXPORT, none)
+Applying ${UT_VAR:N...} to "<>" (VARE_UNDEFERR|VARE_WANTRES, VAR_EXPORTED|VAR_REEXPORT, regular)
Pattern[UT_VAR] for [<>] is [*]
ModifyWords: split "<>" into 1 words
-Result of ${UT_VAR:N*} is "" (VARE_UNDEFERR|VARE_WANTRES, VAR_EXPORTED|VAR_REEXPORT, none)
+Result of ${UT_VAR:N*} is "" (VARE_UNDEFERR|VARE_WANTRES, VAR_EXPORTED|VAR_REEXPORT, regular)
ParseDoDependency(: )
ParseReadLine (53): 'REF= defined'
Global:REF = defined
CondParser_Eval: ${:!echo "\$UT_VAR"!} != "<defined>"
Var_Parse: ${:!echo "\$UT_VAR"!} != "<defined>" with VARE_UNDEFERR|VARE_WANTRES
-Applying ${:!...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, VES_UNDEF)
+Applying ${:!...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined)
Modifier part: "echo "$UT_VAR""
Var_Parse: ${.MAKE.EXPORTED:O:u} with VARE_WANTRES
-Applying ${.MAKE.EXPORTED:O} to "UT_VAR" (VARE_WANTRES, none, none)
-Result of ${.MAKE.EXPORTED:O} is "UT_VAR" (VARE_WANTRES, none, none)
-Applying ${.MAKE.EXPORTED:u} to "UT_VAR" (VARE_WANTRES, none, none)
-Result of ${.MAKE.EXPORTED:u} is "UT_VAR" (VARE_WANTRES, none, none)
+Applying ${.MAKE.EXPORTED:O} to "UT_VAR" (VARE_WANTRES, none, regular)
+Result of ${.MAKE.EXPORTED:O} is "UT_VAR" (VARE_WANTRES, none, regular)
+Applying ${.MAKE.EXPORTED:u} to "UT_VAR" (VARE_WANTRES, none, regular)
+Result of ${.MAKE.EXPORTED:u} is "UT_VAR" (VARE_WANTRES, none, regular)
Var_Parse: ${UT_VAR} with VARE_WANTRES
Var_Parse: ${REF}> with VARE_WANTRES
-Result of ${:!echo "\$UT_VAR"!} is "<defined>" (VARE_UNDEFERR|VARE_WANTRES, none, VES_DEF)
+Result of ${:!echo "\$UT_VAR"!} is "<defined>" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
lhs = "<defined>", rhs = "<defined>", op = !=
ParseReadLine (61): 'all:'
ParseDoDependency(all:)
Index: src/usr.bin/make/unit-tests/directive-unexport-env.exp
diff -u src/usr.bin/make/unit-tests/directive-unexport-env.exp:1.4 src/usr.bin/make/unit-tests/directive-unexport-env.exp:1.5
--- src/usr.bin/make/unit-tests/directive-unexport-env.exp:1.4 Sat Dec 12 18:11:42 2020
+++ src/usr.bin/make/unit-tests/directive-unexport-env.exp Mon Feb 15 18:23:32 2021
@@ -5,10 +5,10 @@ Global:UT_UNEXPORTED = value
Global:.MAKE.EXPORTED = UT_EXPORTED
make: "directive-unexport-env.mk" line 21: The directive .unexport-env does not take arguments
Var_Parse: ${.MAKE.EXPORTED:O:u} with VARE_WANTRES
-Applying ${.MAKE.EXPORTED:O} to "UT_EXPORTED" (VARE_WANTRES, none, none)
-Result of ${.MAKE.EXPORTED:O} is "UT_EXPORTED" (VARE_WANTRES, none, none)
-Applying ${.MAKE.EXPORTED:u} to "UT_EXPORTED" (VARE_WANTRES, none, none)
-Result of ${.MAKE.EXPORTED:u} is "UT_EXPORTED" (VARE_WANTRES, none, none)
+Applying ${.MAKE.EXPORTED:O} to "UT_EXPORTED" (VARE_WANTRES, none, regular)
+Result of ${.MAKE.EXPORTED:O} is "UT_EXPORTED" (VARE_WANTRES, none, regular)
+Applying ${.MAKE.EXPORTED:u} to "UT_EXPORTED" (VARE_WANTRES, none, regular)
+Result of ${.MAKE.EXPORTED:u} is "UT_EXPORTED" (VARE_WANTRES, none, regular)
Unexporting "UT_EXPORTED"
Global:delete .MAKE.EXPORTED
Global:.MAKEFLAGS = -r -k -d v -d
Index: src/usr.bin/make/unit-tests/var-op-append.exp
diff -u src/usr.bin/make/unit-tests/var-op-append.exp:1.4 src/usr.bin/make/unit-tests/var-op-append.exp:1.5
--- src/usr.bin/make/unit-tests/var-op-append.exp:1.4 Wed Feb 3 08:40:47 2021
+++ src/usr.bin/make/unit-tests/var-op-append.exp Mon Feb 15 18:23:32 2021
@@ -1,6 +1,6 @@
Var_Parse: ${:U\$\$\$\$\$\$\$\$} with VARE_WANTRES
-Applying ${:U...} to "" (VARE_WANTRES, none, VES_UNDEF)
-Result of ${:U\$\$\$\$\$\$\$\$} is "$$$$$$$$" (VARE_WANTRES, none, VES_DEF)
+Applying ${:U...} to "" (VARE_WANTRES, none, undefined)
+Result of ${:U\$\$\$\$\$\$\$\$} is "$$$$$$$$" (VARE_WANTRES, none, defined)
Global:VAR.$$$$$$$$ = dollars
Global:.MAKEFLAGS = -r -k -d v -d
Global:.MAKEFLAGS = -r -k -d v -d 0
Index: src/usr.bin/make/unit-tests/vardebug.exp
diff -u src/usr.bin/make/unit-tests/vardebug.exp:1.15 src/usr.bin/make/unit-tests/vardebug.exp:1.16
--- src/usr.bin/make/unit-tests/vardebug.exp:1.15 Tue Feb 2 16:18:16 2021
+++ src/usr.bin/make/unit-tests/vardebug.exp Mon Feb 15 18:23:32 2021
@@ -6,73 +6,73 @@ Global:VAR = overwritten
Global:delete VAR
Global:delete VAR (not found)
Var_Parse: ${:U} with VARE_WANTRES
-Applying ${:U} to "" (VARE_WANTRES, none, VES_UNDEF)
-Result of ${:U} is "" (VARE_WANTRES, none, VES_DEF)
+Applying ${:U} to "" (VARE_WANTRES, none, undefined)
+Result of ${:U} is "" (VARE_WANTRES, none, defined)
Var_Set("${:U}", "empty name", ...) name expands to empty string - ignored
Var_Parse: ${:U} with VARE_WANTRES
-Applying ${:U} to "" (VARE_WANTRES, none, VES_UNDEF)
-Result of ${:U} is "" (VARE_WANTRES, none, VES_DEF)
+Applying ${:U} to "" (VARE_WANTRES, none, undefined)
+Result of ${:U} is "" (VARE_WANTRES, none, defined)
Var_Append("${:U}", "empty name", ...) name expands to empty string - ignored
Global:FROM_CMDLINE = overwritten ignored!
Global:VAR = 1
Global:VAR = 1 2
Global:VAR = 1 2 3
Var_Parse: ${VAR:M[2]} with VARE_UNDEFERR|VARE_WANTRES
-Applying ${VAR:M...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
+Applying ${VAR:M...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
Pattern[VAR] for [1 2 3] is [[2]]
ModifyWords: split "1 2 3" into 3 words
VarMatch [1] [[2]]
VarMatch [2] [[2]]
VarMatch [3] [[2]]
-Result of ${VAR:M[2]} is "2" (VARE_UNDEFERR|VARE_WANTRES, none, none)
+Result of ${VAR:M[2]} is "2" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
Var_Parse: ${VAR:N[2]} with VARE_UNDEFERR|VARE_WANTRES
-Applying ${VAR:N...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
+Applying ${VAR:N...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
Pattern[VAR] for [1 2 3] is [[2]]
ModifyWords: split "1 2 3" into 3 words
-Result of ${VAR:N[2]} is "1 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
+Result of ${VAR:N[2]} is "1 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
Var_Parse: ${VAR:S,2,two,} with VARE_UNDEFERR|VARE_WANTRES
-Applying ${VAR:S...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
+Applying ${VAR:S...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
Modifier part: "2"
Modifier part: "two"
ModifyWords: split "1 2 3" into 3 words
-Result of ${VAR:S,2,two,} is "1 two 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
+Result of ${VAR:S,2,two,} is "1 two 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
Var_Parse: ${VAR:Q} with VARE_UNDEFERR|VARE_WANTRES
-Applying ${VAR:Q} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
-Result of ${VAR:Q} is "1\ 2\ 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
+Applying ${VAR:Q} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
+Result of ${VAR:Q} is "1\ 2\ 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
Var_Parse: ${VAR:tu:tl:Q} with VARE_UNDEFERR|VARE_WANTRES
-Applying ${VAR:t...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
-Result of ${VAR:tu} is "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
-Applying ${VAR:t...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
-Result of ${VAR:tl} is "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
-Applying ${VAR:Q} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
-Result of ${VAR:Q} is "1\ 2\ 3" (VARE_UNDEFERR|VARE_WANTRES, none, none)
+Applying ${VAR:t...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
+Result of ${VAR:tu} is "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
+Applying ${VAR:t...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
+Result of ${VAR:tl} is "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
+Applying ${VAR:Q} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
+Result of ${VAR:Q} is "1\ 2\ 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
Var_Parse: ${:Uvalue:${:UM*e}:Mvalu[e]} with VARE_UNDEFERR|VARE_WANTRES
-Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, VES_UNDEF)
-Result of ${:Uvalue} is "value" (VARE_UNDEFERR|VARE_WANTRES, none, VES_DEF)
+Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined)
+Result of ${:Uvalue} is "value" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
Var_Parse: ${:UM*e}:Mvalu[e]} with VARE_UNDEFERR|VARE_WANTRES
-Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, VES_UNDEF)
-Result of ${:UM*e} is "M*e" (VARE_UNDEFERR|VARE_WANTRES, none, VES_DEF)
+Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined)
+Result of ${:UM*e} is "M*e" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
Indirect modifier "M*e" from "${:UM*e}"
-Applying ${:M...} to "value" (VARE_UNDEFERR|VARE_WANTRES, none, VES_DEF)
+Applying ${:M...} to "value" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
Pattern[] for [value] is [*e]
ModifyWords: split "value" into 1 words
VarMatch [value] [*e]
-Result of ${:M*e} is "value" (VARE_UNDEFERR|VARE_WANTRES, none, VES_DEF)
-Applying ${:M...} to "value" (VARE_UNDEFERR|VARE_WANTRES, none, VES_DEF)
+Result of ${:M*e} is "value" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
+Applying ${:M...} to "value" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
Pattern[] for [value] is [valu[e]]
ModifyWords: split "value" into 1 words
VarMatch [value] [valu[e]]
-Result of ${:Mvalu[e]} is "value" (VARE_UNDEFERR|VARE_WANTRES, none, VES_DEF)
+Result of ${:Mvalu[e]} is "value" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
Var_Parse: ${:UVAR} with VARE_WANTRES
-Applying ${:U...} to "" (VARE_WANTRES, none, VES_UNDEF)
-Result of ${:UVAR} is "VAR" (VARE_WANTRES, none, VES_DEF)
+Applying ${:U...} to "" (VARE_WANTRES, none, undefined)
+Result of ${:UVAR} is "VAR" (VARE_WANTRES, none, defined)
Global:delete VAR
Var_Parse: ${:Uvariable:unknown} with VARE_UNDEFERR|VARE_WANTRES
-Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, VES_UNDEF)
-Result of ${:Uvariable} is "variable" (VARE_UNDEFERR|VARE_WANTRES, none, VES_DEF)
-Applying ${:u...} to "variable" (VARE_UNDEFERR|VARE_WANTRES, none, VES_DEF)
+Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined)
+Result of ${:Uvariable} is "variable" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
+Applying ${:u...} to "variable" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
make: "vardebug.mk" line 44: Unknown modifier 'u'
-Result of ${:unknown} is error (VARE_UNDEFERR|VARE_WANTRES, none, VES_DEF)
+Result of ${:unknown} is error (VARE_UNDEFERR|VARE_WANTRES, none, defined)
make: "vardebug.mk" line 44: Malformed conditional (${:Uvariable:unknown})
Var_Parse: ${UNDEFINED} with VARE_UNDEFERR|VARE_WANTRES
make: "vardebug.mk" line 53: Malformed conditional (${UNDEFINED})
Index: src/usr.bin/make/unit-tests/varmod-defined.exp
diff -u src/usr.bin/make/unit-tests/varmod-defined.exp:1.3 src/usr.bin/make/unit-tests/varmod-defined.exp:1.4
--- src/usr.bin/make/unit-tests/varmod-defined.exp:1.3 Mon Dec 28 00:46:24 2020
+++ src/usr.bin/make/unit-tests/varmod-defined.exp Mon Feb 15 18:23:32 2021
@@ -3,12 +3,12 @@ Global:VAR =
Var_Parse: ${8_DOLLARS} with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF
Global:VAR = $$$$$$$$
Var_Parse: ${VAR:D${8_DOLLARS}} with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF
-Applying ${VAR:D...} to "$$$$$$$$" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, none)
+Applying ${VAR:D...} to "$$$$$$$$" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, regular)
Var_Parse: ${8_DOLLARS}} with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF
-Result of ${VAR:D${8_DOLLARS}} is "$$$$$$$$" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, none)
+Result of ${VAR:D${8_DOLLARS}} is "$$$$$$$$" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, regular)
Global:VAR = $$$$$$$$
Var_Parse: ${VAR:@var@${8_DOLLARS}@} with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF
-Applying ${VAR:@...} to "$$$$$$$$" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, none)
+Applying ${VAR:@...} to "$$$$$$$$" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, regular)
Modifier part: "var"
Modifier part: "${8_DOLLARS}"
ModifyWords: split "$$$$$$$$" into 1 words
@@ -16,7 +16,7 @@ Global:var = $$$$$$$$
Var_Parse: ${8_DOLLARS} with VARE_WANTRES|VARE_KEEP_UNDEF
ModifyWord_Loop: in "$$$$$$$$", replace "var" with "${8_DOLLARS}" to "$$$$"
Global:delete var
-Result of ${VAR:@var@${8_DOLLARS}@} is "$$$$" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, none)
+Result of ${VAR:@var@${8_DOLLARS}@} is "$$$$" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, regular)
Global:VAR = $$$$
Global:.MAKEFLAGS = -r -k -d v -d
Global:.MAKEFLAGS = -r -k -d v -d 0
Index: src/usr.bin/make/unit-tests/varmod-indirect.exp
diff -u src/usr.bin/make/unit-tests/varmod-indirect.exp:1.10 src/usr.bin/make/unit-tests/varmod-indirect.exp:1.11
--- src/usr.bin/make/unit-tests/varmod-indirect.exp:1.10 Sun Feb 14 17:24:47 2021
+++ src/usr.bin/make/unit-tests/varmod-indirect.exp Mon Feb 15 18:23:32 2021
@@ -17,40 +17,40 @@ Global:_ = before ${UNDEF} after
ParseReadLine (169): '_:= before ${UNDEF:${:US,a,a,}} after'
Var_Parse: ${UNDEF:${:US,a,a,}} after with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF
Var_Parse: ${:US,a,a,}} after with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF
-Applying ${:U...} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, VES_UNDEF)
-Result of ${:US,a,a,} is "S,a,a," (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, VES_DEF)
+Applying ${:U...} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, undefined)
+Result of ${:US,a,a,} is "S,a,a," (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, defined)
Indirect modifier "S,a,a," from "${:US,a,a,}"
-Applying ${UNDEF:S...} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, VES_UNDEF)
+Applying ${UNDEF:S...} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, undefined)
Modifier part: "a"
Modifier part: "a"
ModifyWords: split "" into 1 words
-Result of ${UNDEF:S,a,a,} is "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, VES_UNDEF)
+Result of ${UNDEF:S,a,a,} is "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, undefined)
Var_Parse: ${:US,a,a,}} after with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF
-Applying ${:U...} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, VES_UNDEF)
-Result of ${:US,a,a,} is "S,a,a," (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, VES_DEF)
+Applying ${:U...} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, undefined)
+Result of ${:US,a,a,} is "S,a,a," (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, defined)
Global:_ = before ${UNDEF:S,a,a,} after
ParseReadLine (179): '_:= before ${UNDEF:${:U}} after'
Var_Parse: ${UNDEF:${:U}} after with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF
Var_Parse: ${:U}} after with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF
-Applying ${:U} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, VES_UNDEF)
-Result of ${:U} is "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, VES_DEF)
+Applying ${:U} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, undefined)
+Result of ${:U} is "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, defined)
Indirect modifier "" from "${:U}"
Var_Parse: ${:U}} after with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF
-Applying ${:U} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, VES_UNDEF)
-Result of ${:U} is "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, VES_DEF)
+Applying ${:U} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, undefined)
+Result of ${:U} is "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, defined)
Global:_ = before ${UNDEF:} after
ParseReadLine (184): '_:= before ${UNDEF:${:UZ}} after'
Var_Parse: ${UNDEF:${:UZ}} after with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF
Var_Parse: ${:UZ}} after with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF
-Applying ${:U...} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, VES_UNDEF)
-Result of ${:UZ} is "Z" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, VES_DEF)
+Applying ${:U...} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, undefined)
+Result of ${:UZ} is "Z" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, defined)
Indirect modifier "Z" from "${:UZ}"
-Applying ${UNDEF:Z} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, VES_UNDEF)
+Applying ${UNDEF:Z} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, undefined)
make: "varmod-indirect.mk" line 184: Unknown modifier 'Z'
-Result of ${UNDEF:Z} is error (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, VES_UNDEF)
+Result of ${UNDEF:Z} is error (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, undefined)
Var_Parse: ${:UZ}} after with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF
-Applying ${:U...} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, VES_UNDEF)
-Result of ${:UZ} is "Z" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, VES_DEF)
+Applying ${:U...} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, undefined)
+Result of ${:UZ} is "Z" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, defined)
Global:_ = before ${UNDEF:Z} after
ParseReadLine (186): '.MAKEFLAGS: -d0'
ParseDoDependency(.MAKEFLAGS: -d0)
Index: src/usr.bin/make/unit-tests/varmod-match-escape.exp
diff -u src/usr.bin/make/unit-tests/varmod-match-escape.exp:1.6 src/usr.bin/make/unit-tests/varmod-match-escape.exp:1.7
--- src/usr.bin/make/unit-tests/varmod-match-escape.exp:1.6 Tue Feb 2 16:18:16 2021
+++ src/usr.bin/make/unit-tests/varmod-match-escape.exp Mon Feb 15 18:23:32 2021
@@ -1,10 +1,10 @@
Global:SPECIALS = \: : \\ * \*
CondParser_Eval: ${SPECIALS:M${:U}\:} != ${SPECIALS:M\:${:U}}
Var_Parse: ${SPECIALS:M${:U}\:} != ${SPECIALS:M\:${:U}} with VARE_UNDEFERR|VARE_WANTRES
-Applying ${SPECIALS:M...} to "\: : \\ * \*" (VARE_UNDEFERR|VARE_WANTRES, none, none)
+Applying ${SPECIALS:M...} to "\: : \\ * \*" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
Var_Parse: ${:U}\: with VARE_UNDEFERR|VARE_WANTRES
-Applying ${:U} to "" (VARE_UNDEFERR|VARE_WANTRES, none, VES_UNDEF)
-Result of ${:U} is "" (VARE_UNDEFERR|VARE_WANTRES, none, VES_DEF)
+Applying ${:U} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined)
+Result of ${:U} is "" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
Pattern[SPECIALS] for [\: : \\ * \*] is [\:]
ModifyWords: split "\: : \\ * \*" into 5 words
VarMatch [\:] [\:]
@@ -12,12 +12,12 @@ VarMatch [:] [\:]
VarMatch [\\] [\:]
VarMatch [*] [\:]
VarMatch [\*] [\:]
-Result of ${SPECIALS:M${:U}\:} is ":" (VARE_UNDEFERR|VARE_WANTRES, none, none)
+Result of ${SPECIALS:M${:U}\:} is ":" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
Var_Parse: ${SPECIALS:M\:${:U}} with VARE_UNDEFERR|VARE_WANTRES
-Applying ${SPECIALS:M...} to "\: : \\ * \*" (VARE_UNDEFERR|VARE_WANTRES, none, none)
+Applying ${SPECIALS:M...} to "\: : \\ * \*" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
Var_Parse: ${:U} with VARE_UNDEFERR|VARE_WANTRES
-Applying ${:U} to "" (VARE_UNDEFERR|VARE_WANTRES, none, VES_UNDEF)
-Result of ${:U} is "" (VARE_UNDEFERR|VARE_WANTRES, none, VES_DEF)
+Applying ${:U} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined)
+Result of ${:U} is "" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
Pattern[SPECIALS] for [\: : \\ * \*] is [:]
ModifyWords: split "\: : \\ * \*" into 5 words
VarMatch [\:] [:]
@@ -25,32 +25,32 @@ VarMatch [:] [:]
VarMatch [\\] [:]
VarMatch [*] [:]
VarMatch [\*] [:]
-Result of ${SPECIALS:M\:${:U}} is ":" (VARE_UNDEFERR|VARE_WANTRES, none, none)
+Result of ${SPECIALS:M\:${:U}} is ":" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
lhs = ":", rhs = ":", op = !=
Global:VALUES = : :: :\:
CondParser_Eval: ${VALUES:M\:${:U\:}} != ${VALUES:M${:U\:}\:}
Var_Parse: ${VALUES:M\:${:U\:}} != ${VALUES:M${:U\:}\:} with VARE_UNDEFERR|VARE_WANTRES
-Applying ${VALUES:M...} to ": :: :\:" (VARE_UNDEFERR|VARE_WANTRES, none, none)
+Applying ${VALUES:M...} to ": :: :\:" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
Var_Parse: ${:U:} with VARE_UNDEFERR|VARE_WANTRES
-Applying ${:U} to "" (VARE_UNDEFERR|VARE_WANTRES, none, VES_UNDEF)
-Result of ${:U} is "" (VARE_UNDEFERR|VARE_WANTRES, none, VES_DEF)
+Applying ${:U} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined)
+Result of ${:U} is "" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
Pattern[VALUES] for [: :: :\:] is [:]
ModifyWords: split ": :: :\:" into 3 words
VarMatch [:] [:]
VarMatch [::] [:]
VarMatch [:\:] [:]
-Result of ${VALUES:M\:${:U\:}} is ":" (VARE_UNDEFERR|VARE_WANTRES, none, none)
+Result of ${VALUES:M\:${:U\:}} is ":" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
Var_Parse: ${VALUES:M${:U\:}\:} with VARE_UNDEFERR|VARE_WANTRES
-Applying ${VALUES:M...} to ": :: :\:" (VARE_UNDEFERR|VARE_WANTRES, none, none)
+Applying ${VALUES:M...} to ": :: :\:" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
Var_Parse: ${:U\:}\: with VARE_UNDEFERR|VARE_WANTRES
-Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, VES_UNDEF)
-Result of ${:U\:} is ":" (VARE_UNDEFERR|VARE_WANTRES, none, VES_DEF)
+Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined)
+Result of ${:U\:} is ":" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
Pattern[VALUES] for [: :: :\:] is [:\:]
ModifyWords: split ": :: :\:" into 3 words
VarMatch [:] [:\:]
VarMatch [::] [:\:]
VarMatch [:\:] [:\:]
-Result of ${VALUES:M${:U\:}\:} is "::" (VARE_UNDEFERR|VARE_WANTRES, none, none)
+Result of ${VALUES:M${:U\:}\:} is "::" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
lhs = ":", rhs = "::", op = !=
make: "varmod-match-escape.mk" line 42: warning: XXX: Oops
Global:.MAKEFLAGS = -r -k -d cv -d
Index: src/usr.bin/make/unit-tests/varname-empty.exp
diff -u src/usr.bin/make/unit-tests/varname-empty.exp:1.8 src/usr.bin/make/unit-tests/varname-empty.exp:1.9
--- src/usr.bin/make/unit-tests/varname-empty.exp:1.8 Thu Feb 4 00:16:03 2021
+++ src/usr.bin/make/unit-tests/varname-empty.exp Mon Feb 15 18:23:32 2021
@@ -1,12 +1,12 @@
Var_Parse: ${:U} with VARE_WANTRES
-Applying ${:U} to "" (VARE_WANTRES, none, VES_UNDEF)
-Result of ${:U} is "" (VARE_WANTRES, none, VES_DEF)
+Applying ${:U} to "" (VARE_WANTRES, none, undefined)
+Result of ${:U} is "" (VARE_WANTRES, none, defined)
Var_Set("${:U}", "cmdline-u", ...) name expands to empty string - ignored
Var_Set("", "cmdline-plain", ...) name expands to empty string - ignored
Global:.CURDIR = <curdir>
Var_Parse: ${MAKE_OBJDIR_CHECK_WRITABLE:U} with VARE_WANTRES
-Applying ${MAKE_OBJDIR_CHECK_WRITABLE:U} to "" (VARE_WANTRES, none, VES_UNDEF)
-Result of ${MAKE_OBJDIR_CHECK_WRITABLE:U} is "" (VARE_WANTRES, none, VES_DEF)
+Applying ${MAKE_OBJDIR_CHECK_WRITABLE:U} to "" (VARE_WANTRES, none, undefined)
+Result of ${MAKE_OBJDIR_CHECK_WRITABLE:U} is "" (VARE_WANTRES, none, defined)
Global:.OBJDIR = <curdir>
Global:delete .PATH (not found)
Global:.PATH = .
@@ -24,22 +24,22 @@ Var_Set("", "", ...) name expands to emp
Var_Set("", "subst", ...) name expands to empty string - ignored
Var_Set("", "shell-output", ...) name expands to empty string - ignored
Var_Parse: ${:Ufallback} != "fallback" with VARE_UNDEFERR|VARE_WANTRES
-Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, VES_UNDEF)
-Result of ${:Ufallback} is "fallback" (VARE_UNDEFERR|VARE_WANTRES, none, VES_DEF)
+Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined)
+Result of ${:Ufallback} is "fallback" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
Var_Parse: ${:U} with VARE_WANTRES
-Applying ${:U} to "" (VARE_WANTRES, none, VES_UNDEF)
-Result of ${:U} is "" (VARE_WANTRES, none, VES_DEF)
+Applying ${:U} to "" (VARE_WANTRES, none, undefined)
+Result of ${:U} is "" (VARE_WANTRES, none, defined)
Var_Set("${:U}", "assigned indirectly", ...) name expands to empty string - ignored
Var_Parse: ${:Ufallback} != "fallback" with VARE_UNDEFERR|VARE_WANTRES
-Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, VES_UNDEF)
-Result of ${:Ufallback} is "fallback" (VARE_UNDEFERR|VARE_WANTRES, none, VES_DEF)
+Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined)
+Result of ${:Ufallback} is "fallback" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
Var_Parse: ${:U} with VARE_WANTRES
-Applying ${:U} to "" (VARE_WANTRES, none, VES_UNDEF)
-Result of ${:U} is "" (VARE_WANTRES, none, VES_DEF)
+Applying ${:U} to "" (VARE_WANTRES, none, undefined)
+Result of ${:U} is "" (VARE_WANTRES, none, defined)
Var_Append("${:U}", "appended indirectly", ...) name expands to empty string - ignored
Var_Parse: ${:Ufallback} != "fallback" with VARE_UNDEFERR|VARE_WANTRES
-Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, VES_UNDEF)
-Result of ${:Ufallback} is "fallback" (VARE_UNDEFERR|VARE_WANTRES, none, VES_DEF)
+Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined)
+Result of ${:Ufallback} is "fallback" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
Global:.MAKEFLAGS = -r -d v -d
Global:.MAKEFLAGS = -r -d v -d 0
out: fallback
Index: src/usr.bin/make/unit-tests/varname.exp
diff -u src/usr.bin/make/unit-tests/varname.exp:1.11 src/usr.bin/make/unit-tests/varname.exp:1.12
--- src/usr.bin/make/unit-tests/varname.exp:1.11 Tue Feb 2 16:18:16 2021
+++ src/usr.bin/make/unit-tests/varname.exp Mon Feb 15 18:23:32 2021
@@ -5,14 +5,14 @@ Var_Parse: ${VARNAME} with VARE_WANTRES
Global:VAR((( = 3 open parentheses
Var_Parse: ${VAR(((}}}}" != "3 open parentheses}}}" with VARE_WANTRES
Var_Parse: ${:UVAR(((}= try1 with VARE_UNDEFERR|VARE_WANTRES
-Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, VES_UNDEF)
-Result of ${:UVAR(((} is "VAR(((" (VARE_UNDEFERR|VARE_WANTRES, none, VES_DEF)
+Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined)
+Result of ${:UVAR(((} is "VAR(((" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
Global:.ALLTARGETS = VAR(((=)
make: "varname.mk" line 30: No closing parenthesis in archive specification
make: "varname.mk" line 30: Error in archive specification: "VAR"
Var_Parse: ${:UVAR\(\(\(}= try2 with VARE_UNDEFERR|VARE_WANTRES
-Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, VES_UNDEF)
-Result of ${:UVAR\(\(\(} is "VAR\(\(\(" (VARE_UNDEFERR|VARE_WANTRES, none, VES_DEF)
+Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined)
+Result of ${:UVAR\(\(\(} is "VAR\(\(\(" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
Global:.ALLTARGETS = VAR(((=) VAR\(\(\(=
make: "varname.mk" line 35: Invalid line type
Var_Parse: ${VARNAME} with VARE_WANTRES