Module Name:    src
Committed By:   rillig
Date:           Mon Mar 15 15:39:13 UTC 2021

Modified Files:
        src/usr.bin/make: nonints.h var.c
        src/usr.bin/make/unit-tests: deptgt-makeflags.exp
            directive-export-impl.exp directive-unexport-env.exp
            var-eval-short.exp var-op-append.exp vardebug.exp
            varmod-defined.exp varmod-indirect.exp varmod-match-escape.exp
            varname-dot-shell.exp varname-empty.exp varname.exp

Log Message:
make: change debug log for variable evaluation flags to lowercase

This makes them easier distinguishable from variable names since the
latter are usually uppercase.

No functional change outside debug mode.


To generate a diff of this commit:
cvs rdiff -u -r1.205 -r1.206 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.885 -r1.886 src/usr.bin/make/var.c
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/deptgt-makeflags.exp
cvs rdiff -u -r1.4 -r1.5 \
    src/usr.bin/make/unit-tests/directive-export-impl.exp \
    src/usr.bin/make/unit-tests/varmod-defined.exp
cvs rdiff -u -r1.5 -r1.6 \
    src/usr.bin/make/unit-tests/directive-unexport-env.exp \
    src/usr.bin/make/unit-tests/var-op-append.exp
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/var-eval-short.exp \
    src/usr.bin/make/unit-tests/varmod-match-escape.exp
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/make/unit-tests/vardebug.exp
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/varmod-indirect.exp \
    src/usr.bin/make/unit-tests/varname.exp
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/varname-dot-shell.exp \
    src/usr.bin/make/unit-tests/varname-empty.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/nonints.h
diff -u src/usr.bin/make/nonints.h:1.205 src/usr.bin/make/nonints.h:1.206
--- src/usr.bin/make/nonints.h:1.205	Mon Mar 15 12:15:03 2021
+++ src/usr.bin/make/nonints.h	Mon Mar 15 15:39:13 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: nonints.h,v 1.205 2021/03/15 12:15:03 rillig Exp $	*/
+/*	$NetBSD: nonints.h,v 1.206 2021/03/15 15:39:13 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -341,7 +341,7 @@ typedef struct VarEvalFlags {
 	 * int (since that is the default representation of Boolean in make),
 	 * even for initializers consisting entirely of constants.
 	 */
-	Boolean : 1;
+	Boolean : 0;
 } VarEvalFlags;
 
 #define VARE_PARSE_ONLY	(VarEvalFlags) { FALSE, FALSE, FALSE, FALSE }

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.885 src/usr.bin/make/var.c:1.886
--- src/usr.bin/make/var.c:1.885	Mon Mar 15 12:15:03 2021
+++ src/usr.bin/make/var.c	Mon Mar 15 15:39:13 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.885 2021/03/15 12:15:03 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.886 2021/03/15 15:39:13 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.885 2021/03/15 12:15:03 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.886 2021/03/15 15:39:13 rillig Exp $");
 
 typedef enum VarFlags {
 	VFL_NONE	= 0,
@@ -267,37 +267,25 @@ typedef struct SepBuf {
 	char sep;
 } SepBuf;
 
-enum {
-	VarEvalFlags_ToStringSize = sizeof
-	    "VARE_UNDEFERR|VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF"
-};
-
-MAKE_INLINE char *
-str_append(char *dst, const char *src)
-{
-	size_t len = strlen(src);
-	memcpy(dst, src, len);
-	return dst + len;
-}
-
 static const char *
-VarEvalFlags_ToString(char *buf, VarEvalFlags eflags)
+VarEvalFlags_ToString(VarEvalFlags eflags)
 {
-	char *p = buf;
-
-	/* TODO: WANTRES should be mentioned before UNDEFERR */
-	if (eflags.undefErr)
-		p = str_append(p, "VARE_UNDEFERR|");
-	if (eflags.wantRes)
-		p = str_append(p, "VARE_WANTRES|");
+	if (!eflags.wantRes) {
+		assert(!eflags.undefErr);
+		assert(!eflags.keepDollar && !eflags.keepUndef);
+		return "parse-only";
+	}
+	if (eflags.undefErr) {
+		assert(!eflags.keepDollar && !eflags.keepUndef);
+		return "eval-defined";
+	}
+	if (eflags.keepDollar && eflags.keepUndef)
+		return "eval-keep-dollar-and-undefined";
 	if (eflags.keepDollar)
-		p = str_append(p, "VARE_KEEP_DOLLAR|");
+		return "eval-keep-dollar";
 	if (eflags.keepUndef)
-		p = str_append(p, "VARE_KEEP_UNDEF|");
-	if (p == buf)
-		return "none";
-	p[-1] = '\0';
-	return buf;
+		return "eval-keep-undefined";
+	return "eval";
 }
 
 /*
@@ -3618,7 +3606,6 @@ static void
 LogBeforeApply(const ApplyModifiersState *st, const char *mod)
 {
 	const Expr *expr = st->expr;
-	char eflags_str[VarEvalFlags_ToStringSize];
 	char vflags_str[VarFlags_ToStringSize];
 	Boolean is_single_char = mod[0] != '\0' && IsDelimiter(mod[1], st);
 
@@ -3627,7 +3614,7 @@ LogBeforeApply(const ApplyModifiersState
 	debug_printf("Applying ${%s:%c%s} to \"%s\" (%s, %s, %s)\n",
 	    expr->var->name.str, mod[0], is_single_char ? "" : "...",
 	    expr->value.str,
-	    VarEvalFlags_ToString(eflags_str, expr->eflags),
+	    VarEvalFlags_ToString(expr->eflags),
 	    VarFlags_ToString(vflags_str, expr->var->flags),
 	    ExprDefined_Name[expr->defined]);
 }
@@ -3637,14 +3624,13 @@ LogAfterApply(const ApplyModifiersState 
 {
 	const Expr *expr = st->expr;
 	const char *value = expr->value.str;
-	char eflags_str[VarEvalFlags_ToStringSize];
 	char vflags_str[VarFlags_ToStringSize];
 	const char *quot = value == var_Error ? "" : "\"";
 
 	debug_printf("Result of ${%s:%.*s} is %s%s%s (%s, %s, %s)\n",
 	    expr->var->name.str, (int)(p - mod), mod,
 	    quot, value == var_Error ? "error" : value, quot,
-	    VarEvalFlags_ToString(eflags_str, expr->eflags),
+	    VarEvalFlags_ToString(expr->eflags),
 	    VarFlags_ToString(vflags_str, expr->var->flags),
 	    ExprDefined_Name[expr->defined]);
 }
@@ -4338,7 +4324,6 @@ Var_Parse(const char **pp, GNode *scope,
 	 */
 	Boolean dynamic;
 	const char *extramodifiers;
-	char eflags_str[VarEvalFlags_ToStringSize];
 	Var *v;
 
 	Expr expr = {
@@ -4354,8 +4339,8 @@ Var_Parse(const char **pp, GNode *scope,
 		DEF_REGULAR
 	};
 
-	DEBUG2(VAR, "Var_Parse: %s with %s\n", start,
-	    VarEvalFlags_ToString(eflags_str, eflags));
+	DEBUG2(VAR, "Var_Parse: %s (%s)\n", start,
+	    VarEvalFlags_ToString(eflags));
 
 	*out_val = FStr_InitRefer(NULL);
 	extramodifiers = NULL;	/* extra modifiers to apply first */

Index: src/usr.bin/make/unit-tests/deptgt-makeflags.exp
diff -u src/usr.bin/make/unit-tests/deptgt-makeflags.exp:1.3 src/usr.bin/make/unit-tests/deptgt-makeflags.exp:1.4
--- src/usr.bin/make/unit-tests/deptgt-makeflags.exp:1.3	Sun Nov  8 02:31:24 2020
+++ src/usr.bin/make/unit-tests/deptgt-makeflags.exp	Mon Mar 15 15:39:13 2021
@@ -2,7 +2,7 @@ Global:delete DOLLAR (not found)
 Command:DOLLAR = $$$$
 Global:.MAKEOVERRIDES =  VAR DOLLAR
 CondParser_Eval: ${DOLLAR} != "\$\$"
-Var_Parse: ${DOLLAR} != "\$\$" with VARE_UNDEFERR|VARE_WANTRES
+Var_Parse: ${DOLLAR} != "\$\$" (eval-defined)
 lhs = "$$", rhs = "$$", op = !=
 Global:.MAKEFLAGS =  -r -k -D VAR -D VAR -d cv -d
 Global:.MAKEFLAGS =  -r -k -D VAR -D VAR -d cv -d 0

Index: src/usr.bin/make/unit-tests/directive-export-impl.exp
diff -u src/usr.bin/make/unit-tests/directive-export-impl.exp:1.4 src/usr.bin/make/unit-tests/directive-export-impl.exp:1.5
--- src/usr.bin/make/unit-tests/directive-export-impl.exp:1.4	Tue Feb 16 16:28:41 2021
+++ src/usr.bin/make/unit-tests/directive-export-impl.exp	Mon Mar 15 15:39:13 2021
@@ -3,48 +3,48 @@ Global:UT_VAR = <${REF}>
 ParseReadLine (28): '.export UT_VAR'
 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, VFL_EXPORTED|VFL_REEXPORT, regular)
+Var_Parse: ${UT_VAR:N*} (eval-defined)
+Var_Parse: ${REF}> (eval-defined)
+Applying ${UT_VAR:N...} to "<>" (eval-defined, VFL_EXPORTED|VFL_REEXPORT, regular)
 Pattern[UT_VAR] for [<>] is [*]
 ModifyWords: split "<>" into 1 words
-Result of ${UT_VAR:N*} is "" (VARE_UNDEFERR|VARE_WANTRES, VFL_EXPORTED|VFL_REEXPORT, regular)
+Result of ${UT_VAR:N*} is "" (eval-defined, VFL_EXPORTED|VFL_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, undefined)
+Var_Parse: ${:!echo "\$UT_VAR"!} != "<>" (eval-defined)
+Applying ${:!...} to "" (eval-defined, 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, 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, defined)
+Var_Parse: ${.MAKE.EXPORTED:O:u} (eval)
+Applying ${.MAKE.EXPORTED:O} to "UT_VAR" (eval, none, regular)
+Result of ${.MAKE.EXPORTED:O} is "UT_VAR" (eval, none, regular)
+Applying ${.MAKE.EXPORTED:u} to "UT_VAR" (eval, none, regular)
+Result of ${.MAKE.EXPORTED:u} is "UT_VAR" (eval, none, regular)
+Var_Parse: ${UT_VAR} (eval)
+Var_Parse: ${REF}> (eval)
+Result of ${:!echo "\$UT_VAR"!} is "<>" (eval-defined, 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, VFL_EXPORTED|VFL_REEXPORT, regular)
+Var_Parse: ${UT_VAR:N*} (eval-defined)
+Var_Parse: ${REF}> (eval-defined)
+Applying ${UT_VAR:N...} to "<>" (eval-defined, VFL_EXPORTED|VFL_REEXPORT, regular)
 Pattern[UT_VAR] for [<>] is [*]
 ModifyWords: split "<>" into 1 words
-Result of ${UT_VAR:N*} is "" (VARE_UNDEFERR|VARE_WANTRES, VFL_EXPORTED|VFL_REEXPORT, regular)
+Result of ${UT_VAR:N*} is "" (eval-defined, VFL_EXPORTED|VFL_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, undefined)
+Var_Parse: ${:!echo "\$UT_VAR"!} != "<defined>" (eval-defined)
+Applying ${:!...} to "" (eval-defined, 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, 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, defined)
+Var_Parse: ${.MAKE.EXPORTED:O:u} (eval)
+Applying ${.MAKE.EXPORTED:O} to "UT_VAR" (eval, none, regular)
+Result of ${.MAKE.EXPORTED:O} is "UT_VAR" (eval, none, regular)
+Applying ${.MAKE.EXPORTED:u} to "UT_VAR" (eval, none, regular)
+Result of ${.MAKE.EXPORTED:u} is "UT_VAR" (eval, none, regular)
+Var_Parse: ${UT_VAR} (eval)
+Var_Parse: ${REF}> (eval)
+Result of ${:!echo "\$UT_VAR"!} is "<defined>" (eval-defined, none, defined)
 lhs = "<defined>", rhs = "<defined>", op = !=
 ParseReadLine (61): 'all:'
 ParseDoDependency(all:)
Index: src/usr.bin/make/unit-tests/varmod-defined.exp
diff -u src/usr.bin/make/unit-tests/varmod-defined.exp:1.4 src/usr.bin/make/unit-tests/varmod-defined.exp:1.5
--- src/usr.bin/make/unit-tests/varmod-defined.exp:1.4	Mon Feb 15 18:23:32 2021
+++ src/usr.bin/make/unit-tests/varmod-defined.exp	Mon Mar 15 15:39:13 2021
@@ -1,22 +1,22 @@
 Global:8_DOLLARS = $$$$$$$$
 Global:VAR = 
-Var_Parse: ${8_DOLLARS} with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF
+Var_Parse: ${8_DOLLARS} (eval-keep-dollar-and-undefined)
 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, 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, regular)
+Var_Parse: ${VAR:D${8_DOLLARS}} (eval-keep-dollar-and-undefined)
+Applying ${VAR:D...} to "$$$$$$$$" (eval-keep-dollar-and-undefined, none, regular)
+Var_Parse: ${8_DOLLARS}} (eval-keep-dollar-and-undefined)
+Result of ${VAR:D${8_DOLLARS}} is "$$$$$$$$" (eval-keep-dollar-and-undefined, 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, regular)
+Var_Parse: ${VAR:@var@${8_DOLLARS}@} (eval-keep-dollar-and-undefined)
+Applying ${VAR:@...} to "$$$$$$$$" (eval-keep-dollar-and-undefined, none, regular)
 Modifier part: "var"
 Modifier part: "${8_DOLLARS}"
 ModifyWords: split "$$$$$$$$" into 1 words
 Global:var = $$$$$$$$
-Var_Parse: ${8_DOLLARS} with VARE_WANTRES|VARE_KEEP_UNDEF
+Var_Parse: ${8_DOLLARS} (eval-keep-undefined)
 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, regular)
+Result of ${VAR:@var@${8_DOLLARS}@} is "$$$$" (eval-keep-dollar-and-undefined, 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/directive-unexport-env.exp
diff -u src/usr.bin/make/unit-tests/directive-unexport-env.exp:1.5 src/usr.bin/make/unit-tests/directive-unexport-env.exp:1.6
--- src/usr.bin/make/unit-tests/directive-unexport-env.exp:1.5	Mon Feb 15 18:23:32 2021
+++ src/usr.bin/make/unit-tests/directive-unexport-env.exp	Mon Mar 15 15:39:13 2021
@@ -4,11 +4,11 @@ Global:UT_EXPORTED = value
 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, 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)
+Var_Parse: ${.MAKE.EXPORTED:O:u} (eval)
+Applying ${.MAKE.EXPORTED:O} to "UT_EXPORTED" (eval, none, regular)
+Result of ${.MAKE.EXPORTED:O} is "UT_EXPORTED" (eval, none, regular)
+Applying ${.MAKE.EXPORTED:u} to "UT_EXPORTED" (eval, none, regular)
+Result of ${.MAKE.EXPORTED:u} is "UT_EXPORTED" (eval, 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.5 src/usr.bin/make/unit-tests/var-op-append.exp:1.6
--- src/usr.bin/make/unit-tests/var-op-append.exp:1.5	Mon Feb 15 18:23:32 2021
+++ src/usr.bin/make/unit-tests/var-op-append.exp	Mon Mar 15 15:39:13 2021
@@ -1,6 +1,6 @@
-Var_Parse: ${:U\$\$\$\$\$\$\$\$} with VARE_WANTRES
-Applying ${:U...} to "" (VARE_WANTRES, none, undefined)
-Result of ${:U\$\$\$\$\$\$\$\$} is "$$$$$$$$" (VARE_WANTRES, none, defined)
+Var_Parse: ${:U\$\$\$\$\$\$\$\$} (eval)
+Applying ${:U...} to "" (eval, none, undefined)
+Result of ${:U\$\$\$\$\$\$\$\$} is "$$$$$$$$" (eval, 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/var-eval-short.exp
diff -u src/usr.bin/make/unit-tests/var-eval-short.exp:1.7 src/usr.bin/make/unit-tests/var-eval-short.exp:1.8
--- src/usr.bin/make/unit-tests/var-eval-short.exp:1.7	Sun Mar 14 20:41:39 2021
+++ src/usr.bin/make/unit-tests/var-eval-short.exp	Mon Mar 15 15:39:13 2021
@@ -3,21 +3,21 @@ make: "var-eval-short.mk" line 77: Malfo
 make: "var-eval-short.mk" line 91: Invalid time value: ${FAIL}}
 make: "var-eval-short.mk" line 91: Malformed conditional (0 && ${:Uword:localtime=${FAIL}})
 CondParser_Eval: 0 && ${0:?${FAIL}then:${FAIL}else}
-Var_Parse: ${0:?${FAIL}then:${FAIL}else} with none
-Applying ${0:?...} to "" (none, none, undefined)
+Var_Parse: ${0:?${FAIL}then:${FAIL}else} (parse-only)
+Applying ${0:?...} to "" (parse-only, none, undefined)
 Modifier part: "${FAIL}then"
 Modifier part: "${FAIL}else"
-Result of ${0:?${FAIL}then:${FAIL}else} is "" (none, none, defined)
+Result of ${0:?${FAIL}then:${FAIL}else} is "" (parse-only, none, defined)
 ParseReadLine (156): 'DEFINED=	defined'
 Global:DEFINED = defined
 CondParser_Eval: 0 && ${DEFINED:L:?${FAIL}then:${FAIL}else}
-Var_Parse: ${DEFINED:L:?${FAIL}then:${FAIL}else} with none
-Applying ${DEFINED:L} to "defined" (none, none, regular)
-Result of ${DEFINED:L} is "defined" (none, none, regular)
-Applying ${DEFINED:?...} to "defined" (none, none, regular)
+Var_Parse: ${DEFINED:L:?${FAIL}then:${FAIL}else} (parse-only)
+Applying ${DEFINED:L} to "defined" (parse-only, none, regular)
+Result of ${DEFINED:L} is "defined" (parse-only, none, regular)
+Applying ${DEFINED:?...} to "defined" (parse-only, none, regular)
 Modifier part: "${FAIL}then"
 Modifier part: "${FAIL}else"
-Result of ${DEFINED:?${FAIL}then:${FAIL}else} is "defined" (none, none, regular)
+Result of ${DEFINED:?${FAIL}then:${FAIL}else} is "defined" (parse-only, none, regular)
 ParseReadLine (159): '.MAKEFLAGS: -d0'
 ParseDoDependency(.MAKEFLAGS: -d0)
 Global:.MAKEFLAGS =  -r -k -d cpv -d
Index: src/usr.bin/make/unit-tests/varmod-match-escape.exp
diff -u src/usr.bin/make/unit-tests/varmod-match-escape.exp:1.7 src/usr.bin/make/unit-tests/varmod-match-escape.exp:1.8
--- src/usr.bin/make/unit-tests/varmod-match-escape.exp:1.7	Mon Feb 15 18:23:32 2021
+++ src/usr.bin/make/unit-tests/varmod-match-escape.exp	Mon Mar 15 15:39:13 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, regular)
-Var_Parse: ${:U}\: with VARE_UNDEFERR|VARE_WANTRES
-Applying ${:U} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined)
-Result of ${:U} is "" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
+Var_Parse: ${SPECIALS:M${:U}\:} != ${SPECIALS:M\:${:U}} (eval-defined)
+Applying ${SPECIALS:M...} to "\: : \\ * \*" (eval-defined, none, regular)
+Var_Parse: ${:U}\: (eval-defined)
+Applying ${:U} to "" (eval-defined, none, undefined)
+Result of ${:U} is "" (eval-defined, 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, regular)
-Var_Parse: ${SPECIALS:M\:${:U}} with VARE_UNDEFERR|VARE_WANTRES
-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, undefined)
-Result of ${:U} is "" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
+Result of ${SPECIALS:M${:U}\:} is ":" (eval-defined, none, regular)
+Var_Parse: ${SPECIALS:M\:${:U}} (eval-defined)
+Applying ${SPECIALS:M...} to "\: : \\ * \*" (eval-defined, none, regular)
+Var_Parse: ${:U} (eval-defined)
+Applying ${:U} to "" (eval-defined, none, undefined)
+Result of ${:U} is "" (eval-defined, 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, regular)
+Result of ${SPECIALS:M\:${:U}} is ":" (eval-defined, 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, regular)
-Var_Parse: ${:U:} with VARE_UNDEFERR|VARE_WANTRES
-Applying ${:U} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined)
-Result of ${:U} is "" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
+Var_Parse: ${VALUES:M\:${:U\:}} != ${VALUES:M${:U\:}\:} (eval-defined)
+Applying ${VALUES:M...} to ": :: :\:" (eval-defined, none, regular)
+Var_Parse: ${:U:} (eval-defined)
+Applying ${:U} to "" (eval-defined, none, undefined)
+Result of ${:U} is "" (eval-defined, 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, regular)
-Var_Parse: ${VALUES:M${:U\:}\:} with VARE_UNDEFERR|VARE_WANTRES
-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, undefined)
-Result of ${:U\:} is ":" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
+Result of ${VALUES:M\:${:U\:}} is ":" (eval-defined, none, regular)
+Var_Parse: ${VALUES:M${:U\:}\:} (eval-defined)
+Applying ${VALUES:M...} to ": :: :\:" (eval-defined, none, regular)
+Var_Parse: ${:U\:}\: (eval-defined)
+Applying ${:U...} to "" (eval-defined, none, undefined)
+Result of ${:U\:} is ":" (eval-defined, 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, regular)
+Result of ${VALUES:M${:U\:}\:} is "::" (eval-defined, 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/vardebug.exp
diff -u src/usr.bin/make/unit-tests/vardebug.exp:1.17 src/usr.bin/make/unit-tests/vardebug.exp:1.18
--- src/usr.bin/make/unit-tests/vardebug.exp:1.17	Tue Feb 23 15:19:41 2021
+++ src/usr.bin/make/unit-tests/vardebug.exp	Mon Mar 15 15:39:13 2021
@@ -5,76 +5,76 @@ Global:VAR = added
 Global:VAR = overwritten
 Global:delete VAR
 Global:delete VAR (not found)
-Var_Parse: ${:U} with VARE_WANTRES
-Applying ${:U} to "" (VARE_WANTRES, none, undefined)
-Result of ${:U} is "" (VARE_WANTRES, none, defined)
+Var_Parse: ${:U} (eval)
+Applying ${:U} to "" (eval, none, undefined)
+Result of ${:U} is "" (eval, 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, undefined)
-Result of ${:U} is "" (VARE_WANTRES, none, defined)
+Var_Parse: ${:U} (eval)
+Applying ${:U} to "" (eval, none, undefined)
+Result of ${:U} is "" (eval, 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, regular)
+Var_Parse: ${VAR:M[2]} (eval-defined)
+Applying ${VAR:M...} to "1 2 3" (eval-defined, 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, regular)
-Var_Parse: ${VAR:N[2]} with VARE_UNDEFERR|VARE_WANTRES
-Applying ${VAR:N...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
+Result of ${VAR:M[2]} is "2" (eval-defined, none, regular)
+Var_Parse: ${VAR:N[2]} (eval-defined)
+Applying ${VAR:N...} to "1 2 3" (eval-defined, 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, regular)
-Var_Parse: ${VAR:S,2,two,} with VARE_UNDEFERR|VARE_WANTRES
-Applying ${VAR:S...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular)
+Result of ${VAR:N[2]} is "1 3" (eval-defined, none, regular)
+Var_Parse: ${VAR:S,2,two,} (eval-defined)
+Applying ${VAR:S...} to "1 2 3" (eval-defined, 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, regular)
-Var_Parse: ${VAR:Q} with VARE_UNDEFERR|VARE_WANTRES
-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, 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, 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, undefined)
-Result of ${:UM*e} is "M*e" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
+Result of ${VAR:S,2,two,} is "1 two 3" (eval-defined, none, regular)
+Var_Parse: ${VAR:Q} (eval-defined)
+Applying ${VAR:Q} to "1 2 3" (eval-defined, none, regular)
+Result of ${VAR:Q} is "1\ 2\ 3" (eval-defined, none, regular)
+Var_Parse: ${VAR:tu:tl:Q} (eval-defined)
+Applying ${VAR:t...} to "1 2 3" (eval-defined, none, regular)
+Result of ${VAR:tu} is "1 2 3" (eval-defined, none, regular)
+Applying ${VAR:t...} to "1 2 3" (eval-defined, none, regular)
+Result of ${VAR:tl} is "1 2 3" (eval-defined, none, regular)
+Applying ${VAR:Q} to "1 2 3" (eval-defined, none, regular)
+Result of ${VAR:Q} is "1\ 2\ 3" (eval-defined, none, regular)
+Var_Parse: ${:Uvalue:${:UM*e}:Mvalu[e]} (eval-defined)
+Applying ${:U...} to "" (eval-defined, none, undefined)
+Result of ${:Uvalue} is "value" (eval-defined, none, defined)
+Var_Parse: ${:UM*e}:Mvalu[e]} (eval-defined)
+Applying ${:U...} to "" (eval-defined, none, undefined)
+Result of ${:UM*e} is "M*e" (eval-defined, none, defined)
 Indirect modifier "M*e" from "${:UM*e}"
-Applying ${:M...} to "value" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
+Applying ${:M...} to "value" (eval-defined, 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, defined)
-Applying ${:M...} to "value" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
+Result of ${:M*e} is "value" (eval-defined, none, defined)
+Applying ${:M...} to "value" (eval-defined, 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, defined)
-Var_Parse: ${:UVAR} with VARE_WANTRES
-Applying ${:U...} to "" (VARE_WANTRES, none, undefined)
-Result of ${:UVAR} is "VAR" (VARE_WANTRES, none, defined)
+Result of ${:Mvalu[e]} is "value" (eval-defined, none, defined)
+Var_Parse: ${:UVAR} (eval)
+Applying ${:U...} to "" (eval, none, undefined)
+Result of ${:UVAR} is "VAR" (eval, none, defined)
 Global:delete VAR
-Var_Parse: ${:Uvariable:unknown} with VARE_UNDEFERR|VARE_WANTRES
-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)
+Var_Parse: ${:Uvariable:unknown} (eval-defined)
+Applying ${:U...} to "" (eval-defined, none, undefined)
+Result of ${:Uvariable} is "variable" (eval-defined, none, defined)
+Applying ${:u...} to "variable" (eval-defined, none, defined)
 make: "vardebug.mk" line 44: Unknown modifier "unknown"
-Result of ${:unknown} is error (VARE_UNDEFERR|VARE_WANTRES, none, defined)
+Result of ${:unknown} is error (eval-defined, none, defined)
 make: "vardebug.mk" line 44: Malformed conditional (${:Uvariable:unknown})
-Var_Parse: ${UNDEFINED} with VARE_UNDEFERR|VARE_WANTRES
+Var_Parse: ${UNDEFINED} (eval-defined)
 make: "vardebug.mk" line 53: Malformed conditional (${UNDEFINED})
 Global:delete .SHELL (not found)
 Command:.SHELL = </path/to/shell>

Index: src/usr.bin/make/unit-tests/varmod-indirect.exp
diff -u src/usr.bin/make/unit-tests/varmod-indirect.exp:1.12 src/usr.bin/make/unit-tests/varmod-indirect.exp:1.13
--- src/usr.bin/make/unit-tests/varmod-indirect.exp:1.12	Tue Feb 23 15:19:41 2021
+++ src/usr.bin/make/unit-tests/varmod-indirect.exp	Mon Mar 15 15:39:13 2021
@@ -12,45 +12,45 @@ make: "varmod-indirect.mk" line 157: bef
 make: "varmod-indirect.mk" line 157: after
 ParseReadLine (166): '_:=	before ${UNDEF} after'
 Global:_ = 
-Var_Parse: ${UNDEF} after with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF
+Var_Parse: ${UNDEF} after (eval-keep-dollar-and-undefined)
 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, undefined)
-Result of ${:US,a,a,} is "S,a,a," (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, defined)
+Var_Parse: ${UNDEF:${:US,a,a,}} after (eval-keep-dollar-and-undefined)
+Var_Parse: ${:US,a,a,}} after (eval-keep-dollar-and-undefined)
+Applying ${:U...} to "" (eval-keep-dollar-and-undefined, none, undefined)
+Result of ${:US,a,a,} is "S,a,a," (eval-keep-dollar-and-undefined, none, defined)
 Indirect modifier "S,a,a," from "${:US,a,a,}"
-Applying ${UNDEF:S...} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, undefined)
+Applying ${UNDEF:S...} to "" (eval-keep-dollar-and-undefined, 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, 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, undefined)
-Result of ${:US,a,a,} is "S,a,a," (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, defined)
+Result of ${UNDEF:S,a,a,} is "" (eval-keep-dollar-and-undefined, none, undefined)
+Var_Parse: ${:US,a,a,}} after (eval-keep-dollar-and-undefined)
+Applying ${:U...} to "" (eval-keep-dollar-and-undefined, none, undefined)
+Result of ${:US,a,a,} is "S,a,a," (eval-keep-dollar-and-undefined, 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, undefined)
-Result of ${:U} is "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, defined)
+Var_Parse: ${UNDEF:${:U}} after (eval-keep-dollar-and-undefined)
+Var_Parse: ${:U}} after (eval-keep-dollar-and-undefined)
+Applying ${:U} to "" (eval-keep-dollar-and-undefined, none, undefined)
+Result of ${:U} is "" (eval-keep-dollar-and-undefined, 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, undefined)
-Result of ${:U} is "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, defined)
+Var_Parse: ${:U}} after (eval-keep-dollar-and-undefined)
+Applying ${:U} to "" (eval-keep-dollar-and-undefined, none, undefined)
+Result of ${:U} is "" (eval-keep-dollar-and-undefined, 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, undefined)
-Result of ${:UZ} is "Z" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, defined)
+Var_Parse: ${UNDEF:${:UZ}} after (eval-keep-dollar-and-undefined)
+Var_Parse: ${:UZ}} after (eval-keep-dollar-and-undefined)
+Applying ${:U...} to "" (eval-keep-dollar-and-undefined, none, undefined)
+Result of ${:UZ} is "Z" (eval-keep-dollar-and-undefined, none, defined)
 Indirect modifier "Z" from "${:UZ}"
-Applying ${UNDEF:Z} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, undefined)
+Applying ${UNDEF:Z} to "" (eval-keep-dollar-and-undefined, 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, 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, undefined)
-Result of ${:UZ} is "Z" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, defined)
+Result of ${UNDEF:Z} is error (eval-keep-dollar-and-undefined, none, undefined)
+Var_Parse: ${:UZ}} after (eval-keep-dollar-and-undefined)
+Applying ${:U...} to "" (eval-keep-dollar-and-undefined, none, undefined)
+Result of ${:UZ} is "Z" (eval-keep-dollar-and-undefined, none, defined)
 Global:_ = before ${UNDEF:Z} after
 ParseReadLine (186): '.MAKEFLAGS: -d0'
 ParseDoDependency(.MAKEFLAGS: -d0)
Index: src/usr.bin/make/unit-tests/varname.exp
diff -u src/usr.bin/make/unit-tests/varname.exp:1.12 src/usr.bin/make/unit-tests/varname.exp:1.13
--- src/usr.bin/make/unit-tests/varname.exp:1.12	Mon Feb 15 18:23:32 2021
+++ src/usr.bin/make/unit-tests/varname.exp	Mon Mar 15 15:39:13 2021
@@ -1,21 +1,21 @@
 Global:VAR{{{}}} = 3 braces
-Var_Parse: ${VAR{{{}}}}" != "3 braces" with VARE_WANTRES
+Var_Parse: ${VAR{{{}}}}" != "3 braces" (eval)
 Global:VARNAME = VAR(((
-Var_Parse: ${VARNAME} with VARE_WANTRES
+Var_Parse: ${VARNAME} (eval)
 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, undefined)
-Result of ${:UVAR(((} is "VAR(((" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
+Var_Parse: ${VAR(((}}}}" != "3 open parentheses}}}" (eval)
+Var_Parse: ${:UVAR(((}=	try1 (eval-defined)
+Applying ${:U...} to "" (eval-defined, none, undefined)
+Result of ${:UVAR(((} is "VAR(((" (eval-defined, 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, undefined)
-Result of ${:UVAR\(\(\(} is "VAR\(\(\(" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
+Var_Parse: ${:UVAR\(\(\(}=	try2 (eval-defined)
+Applying ${:U...} to "" (eval-defined, none, undefined)
+Result of ${:UVAR\(\(\(} is "VAR\(\(\(" (eval-defined, none, defined)
 Global:.ALLTARGETS =  VAR(((=) VAR\(\(\(=
 make: "varname.mk" line 35: Invalid line type
-Var_Parse: ${VARNAME} with VARE_WANTRES
+Var_Parse: ${VARNAME} (eval)
 Global:VAR((( = try3
 Global:.MAKEFLAGS =  -r -k -d v -d
 Global:.MAKEFLAGS =  -r -k -d v -d 0

Index: src/usr.bin/make/unit-tests/varname-dot-shell.exp
diff -u src/usr.bin/make/unit-tests/varname-dot-shell.exp:1.9 src/usr.bin/make/unit-tests/varname-dot-shell.exp:1.10
--- src/usr.bin/make/unit-tests/varname-dot-shell.exp:1.9	Mon Dec 28 00:46:24 2020
+++ src/usr.bin/make/unit-tests/varname-dot-shell.exp	Mon Mar 15 15:39:13 2021
@@ -1,29 +1,29 @@
 ParseReadLine (10): 'ORIG_SHELL:=	${.SHELL}'
 Global:ORIG_SHELL = 
-Var_Parse: ${.SHELL} with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF
+Var_Parse: ${.SHELL} (eval-keep-dollar-and-undefined)
 Global:delete .SHELL (not found)
 Command:.SHELL = (details omitted)
 Global:ORIG_SHELL = (details omitted)
 ParseReadLine (12): '.SHELL=		overwritten'
 Global:.SHELL = overwritten
 CondParser_Eval: ${.SHELL} != ${ORIG_SHELL}
-Var_Parse: ${.SHELL} != ${ORIG_SHELL} with VARE_UNDEFERR|VARE_WANTRES
-Var_Parse: ${ORIG_SHELL} with VARE_UNDEFERR|VARE_WANTRES
+Var_Parse: ${.SHELL} != ${ORIG_SHELL} (eval-defined)
+Var_Parse: ${ORIG_SHELL} (eval-defined)
 lhs = "(details omitted)", rhs = "(details omitted)", op = !=
 ParseReadLine (19): '.MAKEFLAGS: .SHELL+=appended'
 ParseDoDependency(.MAKEFLAGS: .SHELL+=appended)
 Ignoring append to .SHELL since it is read-only
 CondParser_Eval: ${.SHELL} != ${ORIG_SHELL}
-Var_Parse: ${.SHELL} != ${ORIG_SHELL} with VARE_UNDEFERR|VARE_WANTRES
-Var_Parse: ${ORIG_SHELL} with VARE_UNDEFERR|VARE_WANTRES
+Var_Parse: ${.SHELL} != ${ORIG_SHELL} (eval-defined)
+Var_Parse: ${ORIG_SHELL} (eval-defined)
 lhs = "(details omitted)", rhs = "(details omitted)", op = !=
 ParseReadLine (27): '.undef .SHELL'
 Global:delete .SHELL
 ParseReadLine (28): '.SHELL=		newly overwritten'
 Global:.SHELL = newly overwritten
 CondParser_Eval: ${.SHELL} != ${ORIG_SHELL}
-Var_Parse: ${.SHELL} != ${ORIG_SHELL} with VARE_UNDEFERR|VARE_WANTRES
-Var_Parse: ${ORIG_SHELL} with VARE_UNDEFERR|VARE_WANTRES
+Var_Parse: ${.SHELL} != ${ORIG_SHELL} (eval-defined)
+Var_Parse: ${ORIG_SHELL} (eval-defined)
 lhs = "(details omitted)", rhs = "(details omitted)", op = !=
 ParseReadLine (33): '.MAKEFLAGS: -d0'
 ParseDoDependency(.MAKEFLAGS: -d0)
Index: src/usr.bin/make/unit-tests/varname-empty.exp
diff -u src/usr.bin/make/unit-tests/varname-empty.exp:1.9 src/usr.bin/make/unit-tests/varname-empty.exp:1.10
--- src/usr.bin/make/unit-tests/varname-empty.exp:1.9	Mon Feb 15 18:23:32 2021
+++ src/usr.bin/make/unit-tests/varname-empty.exp	Mon Mar 15 15:39:13 2021
@@ -1,12 +1,12 @@
-Var_Parse: ${:U} with VARE_WANTRES
-Applying ${:U} to "" (VARE_WANTRES, none, undefined)
-Result of ${:U} is "" (VARE_WANTRES, none, defined)
+Var_Parse: ${:U} (eval)
+Applying ${:U} to "" (eval, none, undefined)
+Result of ${:U} is "" (eval, 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, undefined)
-Result of ${MAKE_OBJDIR_CHECK_WRITABLE:U} is "" (VARE_WANTRES, none, defined)
+Var_Parse: ${MAKE_OBJDIR_CHECK_WRITABLE:U} (eval)
+Applying ${MAKE_OBJDIR_CHECK_WRITABLE:U} to "" (eval, none, undefined)
+Result of ${MAKE_OBJDIR_CHECK_WRITABLE:U} is "" (eval, none, defined)
 Global:.OBJDIR = <curdir>
 Global:delete .PATH (not found)
 Global:.PATH = .
@@ -23,23 +23,23 @@ SetVar: variable name is empty - ignored
 Var_Set("", "", ...) name expands to empty string - ignored
 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, undefined)
-Result of ${:Ufallback} is "fallback" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
-Var_Parse: ${:U} with VARE_WANTRES
-Applying ${:U} to "" (VARE_WANTRES, none, undefined)
-Result of ${:U} is "" (VARE_WANTRES, none, defined)
+Var_Parse: ${:Ufallback} != "fallback" (eval-defined)
+Applying ${:U...} to "" (eval-defined, none, undefined)
+Result of ${:Ufallback} is "fallback" (eval-defined, none, defined)
+Var_Parse: ${:U} (eval)
+Applying ${:U} to "" (eval, none, undefined)
+Result of ${:U} is "" (eval, 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, undefined)
-Result of ${:Ufallback} is "fallback" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
-Var_Parse: ${:U} with VARE_WANTRES
-Applying ${:U} to "" (VARE_WANTRES, none, undefined)
-Result of ${:U} is "" (VARE_WANTRES, none, defined)
+Var_Parse: ${:Ufallback} != "fallback" (eval-defined)
+Applying ${:U...} to "" (eval-defined, none, undefined)
+Result of ${:Ufallback} is "fallback" (eval-defined, none, defined)
+Var_Parse: ${:U} (eval)
+Applying ${:U} to "" (eval, none, undefined)
+Result of ${:U} is "" (eval, 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, undefined)
-Result of ${:Ufallback} is "fallback" (VARE_UNDEFERR|VARE_WANTRES, none, defined)
+Var_Parse: ${:Ufallback} != "fallback" (eval-defined)
+Applying ${:U...} to "" (eval-defined, none, undefined)
+Result of ${:Ufallback} is "fallback" (eval-defined, none, defined)
 Global:.MAKEFLAGS =  -r -d v -d
 Global:.MAKEFLAGS =  -r -d v -d 0
 out: fallback

Reply via email to