Mon Apr 5 13:27:30 2021 UTC ()
make: omit unnecessary details from -dv debug log

When an expression is based on a defined variable, it does not matter
whether the evaluation mode is "eval" or "eval-defined", therefore omit
these details to reduce confusion.


(rillig)
diff -r1.909 -r1.910 src/usr.bin/make/var.c
diff -r1.10 -r1.11 src/usr.bin/make/unit-tests/directive-export-impl.exp
diff -r1.8 -r1.9 src/usr.bin/make/unit-tests/directive-unexport-env.exp
diff -r1.21 -r1.22 src/usr.bin/make/unit-tests/vardebug.exp
diff -r1.13 -r1.14 src/usr.bin/make/unit-tests/varmod-assign.exp
diff -r1.11 -r1.12 src/usr.bin/make/unit-tests/varmod-match-escape.exp

cvs diff -r1.909 -r1.910 src/usr.bin/make/var.c (expand / switch to unified diff)

--- src/usr.bin/make/var.c 2021/04/05 13:14:54 1.909
+++ src/usr.bin/make/var.c 2021/04/05 13:27:30 1.910
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: var.c,v 1.909 2021/04/05 13:14:54 rillig Exp $ */ 1/* $NetBSD: var.c,v 1.910 2021/04/05 13:27:30 rillig Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1988, 1989, 1990, 1993 4 * Copyright (c) 1988, 1989, 1990, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * Adam de Boor. 8 * Adam de Boor.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -130,27 +130,27 @@ @@ -130,27 +130,27 @@
130#include <regex.h> 130#include <regex.h>
131#endif 131#endif
132#include <errno.h> 132#include <errno.h>
133#include <inttypes.h> 133#include <inttypes.h>
134#include <limits.h> 134#include <limits.h>
135#include <time.h> 135#include <time.h>
136 136
137#include "make.h" 137#include "make.h"
138#include "dir.h" 138#include "dir.h"
139#include "job.h" 139#include "job.h"
140#include "metachar.h" 140#include "metachar.h"
141 141
142/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */ 142/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */
143MAKE_RCSID("$NetBSD: var.c,v 1.909 2021/04/05 13:14:54 rillig Exp $"); 143MAKE_RCSID("$NetBSD: var.c,v 1.910 2021/04/05 13:27:30 rillig Exp $");
144 144
145/* 145/*
146 * Variables are defined using one of the VAR=value assignments. Their 146 * Variables are defined using one of the VAR=value assignments. Their
147 * value can be queried by expressions such as $V, ${VAR}, or with modifiers 147 * value can be queried by expressions such as $V, ${VAR}, or with modifiers
148 * such as ${VAR:S,from,to,g:Q}. 148 * such as ${VAR:S,from,to,g:Q}.
149 * 149 *
150 * There are 3 kinds of variables: scope variables, environment variables, 150 * There are 3 kinds of variables: scope variables, environment variables,
151 * undefined variables. 151 * undefined variables.
152 * 152 *
153 * Scope variables are stored in a GNode.scope. The only way to undefine 153 * Scope variables are stored in a GNode.scope. The only way to undefine
154 * a scope variable is using the .undef directive. In particular, it must 154 * a scope variable is using the .undef directive. In particular, it must
155 * not be possible to undefine a variable during the evaluation of an 155 * not be possible to undefine a variable during the evaluation of an
156 * expression, or Var.name might point nowhere. 156 * expression, or Var.name might point nowhere.
@@ -3662,31 +3662,39 @@ LogBeforeApply(const ModChain *ch, const @@ -3662,31 +3662,39 @@ LogBeforeApply(const ModChain *ch, const
3662 bool is_single_char = mod[0] != '\0' && IsDelimiter(mod[1], ch); 3662 bool is_single_char = mod[0] != '\0' && IsDelimiter(mod[1], ch);
3663 3663
3664 /* 3664 /*
3665 * At this point, only the first character of the modifier can 3665 * At this point, only the first character of the modifier can
3666 * be used since the end of the modifier is not yet known. 3666 * be used since the end of the modifier is not yet known.
3667 */ 3667 */
3668 3668
3669 if (!Expr_ShouldEval(expr)) { 3669 if (!Expr_ShouldEval(expr)) {
3670 debug_printf("Parsing modifier ${%s:%c%s}\n", 3670 debug_printf("Parsing modifier ${%s:%c%s}\n",
3671 expr->name, mod[0], is_single_char ? "" : "..."); 3671 expr->name, mod[0], is_single_char ? "" : "...");
3672 return; 3672 return;
3673 } 3673 }
3674 3674
 3675 if ((expr->emode == VARE_WANTRES || expr->emode == VARE_UNDEFERR) &&
 3676 expr->defined == DEF_REGULAR) {
 3677 debug_printf(
 3678 "Evaluating modifier ${%s:%c%s} on value \"%s\"\n",
 3679 expr->name, mod[0], is_single_char ? "" : "...",
 3680 expr->value.str);
 3681 return;
 3682 }
 3683
3675 debug_printf( 3684 debug_printf(
3676 "Evaluating modifier ${%s:%c%s} on value \"%s\" (%s, %s)\n", 3685 "Evaluating modifier ${%s:%c%s} on value \"%s\" (%s, %s)\n",
3677 expr->name, mod[0], is_single_char ? "" : "...", expr->value.str, 3686 expr->name, mod[0], is_single_char ? "" : "...", expr->value.str,
3678 VarEvalMode_Name[expr->emode], 3687 VarEvalMode_Name[expr->emode], ExprDefined_Name[expr->defined]);
3679 ExprDefined_Name[expr->defined]); 
3680} 3688}
3681 3689
3682static void 3690static void
3683LogAfterApply(const ModChain *ch, const char *p, const char *mod) 3691LogAfterApply(const ModChain *ch, const char *p, const char *mod)
3684{ 3692{
3685 const Expr *expr = ch->expr; 3693 const Expr *expr = ch->expr;
3686 const char *value = expr->value.str; 3694 const char *value = expr->value.str;
3687 const char *quot = value == var_Error ? "" : "\""; 3695 const char *quot = value == var_Error ? "" : "\"";
3688 3696
3689 debug_printf("Result of ${%s:%.*s} is %s%s%s (%s, %s)\n", 3697 debug_printf("Result of ${%s:%.*s} is %s%s%s (%s, %s)\n",
3690 expr->name, (int)(p - mod), mod, 3698 expr->name, (int)(p - mod), mod,
3691 quot, value == var_Error ? "error" : value, quot, 3699 quot, value == var_Error ? "error" : value, quot,
3692 VarEvalMode_Name[expr->emode], 3700 VarEvalMode_Name[expr->emode],

cvs diff -r1.10 -r1.11 src/usr.bin/make/unit-tests/directive-export-impl.exp (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/directive-export-impl.exp 2021/04/05 13:14:55 1.10
+++ src/usr.bin/make/unit-tests/directive-export-impl.exp 2021/04/05 13:27:30 1.11
@@ -1,56 +1,56 @@ @@ -1,56 +1,56 @@
1ParseReadLine (21): 'UT_VAR= <${REF}>' 1ParseReadLine (21): 'UT_VAR= <${REF}>'
2Global:UT_VAR = <${REF}> 2Global:UT_VAR = <${REF}>
3ParseReadLine (28): '.export UT_VAR' 3ParseReadLine (28): '.export UT_VAR'
4Global:.MAKE.EXPORTED = UT_VAR 4Global:.MAKE.EXPORTED = UT_VAR
5ParseReadLine (32): ': ${UT_VAR:N*}' 5ParseReadLine (32): ': ${UT_VAR:N*}'
6Var_Parse: ${UT_VAR:N*} (eval-defined) 6Var_Parse: ${UT_VAR:N*} (eval-defined)
7Var_Parse: ${REF}> (eval-defined) 7Var_Parse: ${REF}> (eval-defined)
8Evaluating modifier ${UT_VAR:N...} on value "<>" (eval-defined, regular) 8Evaluating modifier ${UT_VAR:N...} on value "<>"
9Pattern for ':N' is "*" 9Pattern for ':N' is "*"
10ModifyWords: split "<>" into 1 words 10ModifyWords: split "<>" into 1 words
11Result of ${UT_VAR:N*} is "" (eval-defined, regular) 11Result of ${UT_VAR:N*} is "" (eval-defined, regular)
12ParseDependency(: ) 12ParseDependency(: )
13CondParser_Eval: ${:!echo "\$UT_VAR"!} != "<>" 13CondParser_Eval: ${:!echo "\$UT_VAR"!} != "<>"
14Var_Parse: ${:!echo "\$UT_VAR"!} != "<>" (eval-defined) 14Var_Parse: ${:!echo "\$UT_VAR"!} != "<>" (eval-defined)
15Evaluating modifier ${:!...} on value "" (eval-defined, undefined) 15Evaluating modifier ${:!...} on value "" (eval-defined, undefined)
16Modifier part: "echo "$UT_VAR"" 16Modifier part: "echo "$UT_VAR""
17Var_Parse: ${.MAKE.EXPORTED:O:u} (eval) 17Var_Parse: ${.MAKE.EXPORTED:O:u} (eval)
18Evaluating modifier ${.MAKE.EXPORTED:O} on value "UT_VAR" (eval, regular) 18Evaluating modifier ${.MAKE.EXPORTED:O} on value "UT_VAR"
19Result of ${.MAKE.EXPORTED:O} is "UT_VAR" (eval, regular) 19Result of ${.MAKE.EXPORTED:O} is "UT_VAR" (eval, regular)
20Evaluating modifier ${.MAKE.EXPORTED:u} on value "UT_VAR" (eval, regular) 20Evaluating modifier ${.MAKE.EXPORTED:u} on value "UT_VAR"
21Result of ${.MAKE.EXPORTED:u} is "UT_VAR" (eval, regular) 21Result of ${.MAKE.EXPORTED:u} is "UT_VAR" (eval, regular)
22Var_Parse: ${UT_VAR} (eval) 22Var_Parse: ${UT_VAR} (eval)
23Var_Parse: ${REF}> (eval) 23Var_Parse: ${REF}> (eval)
24Result of ${:!echo "\$UT_VAR"!} is "<>" (eval-defined, defined) 24Result of ${:!echo "\$UT_VAR"!} is "<>" (eval-defined, defined)
25lhs = "<>", rhs = "<>", op = != 25lhs = "<>", rhs = "<>", op = !=
26ParseReadLine (50): ': ${UT_VAR:N*}' 26ParseReadLine (50): ': ${UT_VAR:N*}'
27Var_Parse: ${UT_VAR:N*} (eval-defined) 27Var_Parse: ${UT_VAR:N*} (eval-defined)
28Var_Parse: ${REF}> (eval-defined) 28Var_Parse: ${REF}> (eval-defined)
29Evaluating modifier ${UT_VAR:N...} on value "<>" (eval-defined, regular) 29Evaluating modifier ${UT_VAR:N...} on value "<>"
30Pattern for ':N' is "*" 30Pattern for ':N' is "*"
31ModifyWords: split "<>" into 1 words 31ModifyWords: split "<>" into 1 words
32Result of ${UT_VAR:N*} is "" (eval-defined, regular) 32Result of ${UT_VAR:N*} is "" (eval-defined, regular)
33ParseDependency(: ) 33ParseDependency(: )
34ParseReadLine (54): 'REF= defined' 34ParseReadLine (54): 'REF= defined'
35Global:REF = defined 35Global:REF = defined
36CondParser_Eval: ${:!echo "\$UT_VAR"!} != "<defined>" 36CondParser_Eval: ${:!echo "\$UT_VAR"!} != "<defined>"
37Var_Parse: ${:!echo "\$UT_VAR"!} != "<defined>" (eval-defined) 37Var_Parse: ${:!echo "\$UT_VAR"!} != "<defined>" (eval-defined)
38Evaluating modifier ${:!...} on value "" (eval-defined, undefined) 38Evaluating modifier ${:!...} on value "" (eval-defined, undefined)
39Modifier part: "echo "$UT_VAR"" 39Modifier part: "echo "$UT_VAR""
40Var_Parse: ${.MAKE.EXPORTED:O:u} (eval) 40Var_Parse: ${.MAKE.EXPORTED:O:u} (eval)
41Evaluating modifier ${.MAKE.EXPORTED:O} on value "UT_VAR" (eval, regular) 41Evaluating modifier ${.MAKE.EXPORTED:O} on value "UT_VAR"
42Result of ${.MAKE.EXPORTED:O} is "UT_VAR" (eval, regular) 42Result of ${.MAKE.EXPORTED:O} is "UT_VAR" (eval, regular)
43Evaluating modifier ${.MAKE.EXPORTED:u} on value "UT_VAR" (eval, regular) 43Evaluating modifier ${.MAKE.EXPORTED:u} on value "UT_VAR"
44Result of ${.MAKE.EXPORTED:u} is "UT_VAR" (eval, regular) 44Result of ${.MAKE.EXPORTED:u} is "UT_VAR" (eval, regular)
45Var_Parse: ${UT_VAR} (eval) 45Var_Parse: ${UT_VAR} (eval)
46Var_Parse: ${REF}> (eval) 46Var_Parse: ${REF}> (eval)
47Result of ${:!echo "\$UT_VAR"!} is "<defined>" (eval-defined, defined) 47Result of ${:!echo "\$UT_VAR"!} is "<defined>" (eval-defined, defined)
48lhs = "<defined>", rhs = "<defined>", op = != 48lhs = "<defined>", rhs = "<defined>", op = !=
49ParseReadLine (62): 'all:' 49ParseReadLine (62): 'all:'
50ParseDependency(all:) 50ParseDependency(all:)
51Global:.ALLTARGETS = all 51Global:.ALLTARGETS = all
52ParseReadLine (63): '.MAKEFLAGS: -d0' 52ParseReadLine (63): '.MAKEFLAGS: -d0'
53ParseDependency(.MAKEFLAGS: -d0) 53ParseDependency(.MAKEFLAGS: -d0)
54Global:.MAKEFLAGS = -r -k -d cpv -d 54Global:.MAKEFLAGS = -r -k -d cpv -d
55Global:.MAKEFLAGS = -r -k -d cpv -d 0 55Global:.MAKEFLAGS = -r -k -d cpv -d 0
56exit status 0 56exit status 0

cvs diff -r1.8 -r1.9 src/usr.bin/make/unit-tests/directive-unexport-env.exp (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/directive-unexport-env.exp 2021/04/05 13:14:55 1.8
+++ src/usr.bin/make/unit-tests/directive-unexport-env.exp 2021/04/05 13:27:30 1.9
@@ -1,18 +1,18 @@ @@ -1,18 +1,18 @@
1make: "directive-unexport-env.mk" line 13: Unknown directive "unexport-en" 1make: "directive-unexport-env.mk" line 13: Unknown directive "unexport-en"
2make: "directive-unexport-env.mk" line 15: Unknown directive "unexport-environment" 2make: "directive-unexport-env.mk" line 15: Unknown directive "unexport-environment"
3Global:UT_EXPORTED = value 3Global:UT_EXPORTED = value
4Global:UT_UNEXPORTED = value 4Global:UT_UNEXPORTED = value
5Global:.MAKE.EXPORTED = UT_EXPORTED 5Global:.MAKE.EXPORTED = UT_EXPORTED
6make: "directive-unexport-env.mk" line 21: The directive .unexport-env does not take arguments 6make: "directive-unexport-env.mk" line 21: The directive .unexport-env does not take arguments
7Var_Parse: ${.MAKE.EXPORTED:O:u} (eval) 7Var_Parse: ${.MAKE.EXPORTED:O:u} (eval)
8Evaluating modifier ${.MAKE.EXPORTED:O} on value "UT_EXPORTED" (eval, regular) 8Evaluating modifier ${.MAKE.EXPORTED:O} on value "UT_EXPORTED"
9Result of ${.MAKE.EXPORTED:O} is "UT_EXPORTED" (eval, regular) 9Result of ${.MAKE.EXPORTED:O} is "UT_EXPORTED" (eval, regular)
10Evaluating modifier ${.MAKE.EXPORTED:u} on value "UT_EXPORTED" (eval, regular) 10Evaluating modifier ${.MAKE.EXPORTED:u} on value "UT_EXPORTED"
11Result of ${.MAKE.EXPORTED:u} is "UT_EXPORTED" (eval, regular) 11Result of ${.MAKE.EXPORTED:u} is "UT_EXPORTED" (eval, regular)
12Unexporting "UT_EXPORTED" 12Unexporting "UT_EXPORTED"
13Global:delete .MAKE.EXPORTED 13Global:delete .MAKE.EXPORTED
14Global:.MAKEFLAGS = -r -k -d v -d 14Global:.MAKEFLAGS = -r -k -d v -d
15Global:.MAKEFLAGS = -r -k -d v -d 0 15Global:.MAKEFLAGS = -r -k -d v -d 0
16make: Fatal errors encountered -- cannot continue 16make: Fatal errors encountered -- cannot continue
17make: stopped in unit-tests 17make: stopped in unit-tests
18exit status 1 18exit status 1

cvs diff -r1.21 -r1.22 src/usr.bin/make/unit-tests/vardebug.exp (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/vardebug.exp 2021/04/05 13:14:55 1.21
+++ src/usr.bin/make/unit-tests/vardebug.exp 2021/04/05 13:27:30 1.22
@@ -8,50 +8,50 @@ Global:delete VAR (not found) @@ -8,50 +8,50 @@ Global:delete VAR (not found)
8Var_Parse: ${:U} (eval) 8Var_Parse: ${:U} (eval)
9Evaluating modifier ${:U} on value "" (eval, undefined) 9Evaluating modifier ${:U} on value "" (eval, undefined)
10Result of ${:U} is "" (eval, defined) 10Result of ${:U} is "" (eval, defined)
11Var_Set("${:U}", "empty name", ...) name expands to empty string - ignored 11Var_Set("${:U}", "empty name", ...) name expands to empty string - ignored
12Var_Parse: ${:U} (eval) 12Var_Parse: ${:U} (eval)
13Evaluating modifier ${:U} on value "" (eval, undefined) 13Evaluating modifier ${:U} on value "" (eval, undefined)
14Result of ${:U} is "" (eval, defined) 14Result of ${:U} is "" (eval, defined)
15Var_Append("${:U}", "empty name", ...) name expands to empty string - ignored 15Var_Append("${:U}", "empty name", ...) name expands to empty string - ignored
16Global:FROM_CMDLINE = overwritten ignored! 16Global:FROM_CMDLINE = overwritten ignored!
17Global:VAR = 1 17Global:VAR = 1
18Global:VAR = 1 2 18Global:VAR = 1 2
19Global:VAR = 1 2 3 19Global:VAR = 1 2 3
20Var_Parse: ${VAR:M[2]} (eval-defined) 20Var_Parse: ${VAR:M[2]} (eval-defined)
21Evaluating modifier ${VAR:M...} on value "1 2 3" (eval-defined, regular) 21Evaluating modifier ${VAR:M...} on value "1 2 3"
22Pattern for ':M' is "[2]" 22Pattern for ':M' is "[2]"
23ModifyWords: split "1 2 3" into 3 words 23ModifyWords: split "1 2 3" into 3 words
24Result of ${VAR:M[2]} is "2" (eval-defined, regular) 24Result of ${VAR:M[2]} is "2" (eval-defined, regular)
25Var_Parse: ${VAR:N[2]} (eval-defined) 25Var_Parse: ${VAR:N[2]} (eval-defined)
26Evaluating modifier ${VAR:N...} on value "1 2 3" (eval-defined, regular) 26Evaluating modifier ${VAR:N...} on value "1 2 3"
27Pattern for ':N' is "[2]" 27Pattern for ':N' is "[2]"
28ModifyWords: split "1 2 3" into 3 words 28ModifyWords: split "1 2 3" into 3 words
29Result of ${VAR:N[2]} is "1 3" (eval-defined, regular) 29Result of ${VAR:N[2]} is "1 3" (eval-defined, regular)
30Var_Parse: ${VAR:S,2,two,} (eval-defined) 30Var_Parse: ${VAR:S,2,two,} (eval-defined)
31Evaluating modifier ${VAR:S...} on value "1 2 3" (eval-defined, regular) 31Evaluating modifier ${VAR:S...} on value "1 2 3"
32Modifier part: "2" 32Modifier part: "2"
33Modifier part: "two" 33Modifier part: "two"
34ModifyWords: split "1 2 3" into 3 words 34ModifyWords: split "1 2 3" into 3 words
35Result of ${VAR:S,2,two,} is "1 two 3" (eval-defined, regular) 35Result of ${VAR:S,2,two,} is "1 two 3" (eval-defined, regular)
36Var_Parse: ${VAR:Q} (eval-defined) 36Var_Parse: ${VAR:Q} (eval-defined)
37Evaluating modifier ${VAR:Q} on value "1 2 3" (eval-defined, regular) 37Evaluating modifier ${VAR:Q} on value "1 2 3"
38Result of ${VAR:Q} is "1\ 2\ 3" (eval-defined, regular) 38Result of ${VAR:Q} is "1\ 2\ 3" (eval-defined, regular)
39Var_Parse: ${VAR:tu:tl:Q} (eval-defined) 39Var_Parse: ${VAR:tu:tl:Q} (eval-defined)
40Evaluating modifier ${VAR:t...} on value "1 2 3" (eval-defined, regular) 40Evaluating modifier ${VAR:t...} on value "1 2 3"
41Result of ${VAR:tu} is "1 2 3" (eval-defined, regular) 41Result of ${VAR:tu} is "1 2 3" (eval-defined, regular)
42Evaluating modifier ${VAR:t...} on value "1 2 3" (eval-defined, regular) 42Evaluating modifier ${VAR:t...} on value "1 2 3"
43Result of ${VAR:tl} is "1 2 3" (eval-defined, regular) 43Result of ${VAR:tl} is "1 2 3" (eval-defined, regular)
44Evaluating modifier ${VAR:Q} on value "1 2 3" (eval-defined, regular) 44Evaluating modifier ${VAR:Q} on value "1 2 3"
45Result of ${VAR:Q} is "1\ 2\ 3" (eval-defined, regular) 45Result of ${VAR:Q} is "1\ 2\ 3" (eval-defined, regular)
46Var_Parse: ${:Uvalue:${:UM*e}:Mvalu[e]} (eval-defined) 46Var_Parse: ${:Uvalue:${:UM*e}:Mvalu[e]} (eval-defined)
47Evaluating modifier ${:U...} on value "" (eval-defined, undefined) 47Evaluating modifier ${:U...} on value "" (eval-defined, undefined)
48Result of ${:Uvalue} is "value" (eval-defined, defined) 48Result of ${:Uvalue} is "value" (eval-defined, defined)
49Var_Parse: ${:UM*e}:Mvalu[e]} (eval-defined) 49Var_Parse: ${:UM*e}:Mvalu[e]} (eval-defined)
50Evaluating modifier ${:U...} on value "" (eval-defined, undefined) 50Evaluating modifier ${:U...} on value "" (eval-defined, undefined)
51Result of ${:UM*e} is "M*e" (eval-defined, defined) 51Result of ${:UM*e} is "M*e" (eval-defined, defined)
52Indirect modifier "M*e" from "${:UM*e}" 52Indirect modifier "M*e" from "${:UM*e}"
53Evaluating modifier ${:M...} on value "value" (eval-defined, defined) 53Evaluating modifier ${:M...} on value "value" (eval-defined, defined)
54Pattern for ':M' is "*e" 54Pattern for ':M' is "*e"
55ModifyWords: split "value" into 1 words 55ModifyWords: split "value" into 1 words
56Result of ${:M*e} is "value" (eval-defined, defined) 56Result of ${:M*e} is "value" (eval-defined, defined)
57Evaluating modifier ${:M...} on value "value" (eval-defined, defined) 57Evaluating modifier ${:M...} on value "value" (eval-defined, defined)

cvs diff -r1.13 -r1.14 src/usr.bin/make/unit-tests/varmod-assign.exp (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/varmod-assign.exp 2021/04/05 13:14:55 1.13
+++ src/usr.bin/make/unit-tests/varmod-assign.exp 2021/04/05 13:27:30 1.14
@@ -1,20 +1,20 @@ @@ -1,20 +1,20 @@
1Global:param = twice 1Global:param = twice
2Global:VARNAME = VAR.$${param} 2Global:VARNAME = VAR.$${param}
3Var_Parse: ${VARNAME} (eval) 3Var_Parse: ${VARNAME} (eval)
4Global:VAR.${param} = initial-value 4Global:VAR.${param} = initial-value
5Var_Parse: ${${VARNAME}::=assigned-value} (eval-defined) 5Var_Parse: ${${VARNAME}::=assigned-value} (eval-defined)
6Var_Parse: ${VARNAME}::=assigned-value} (eval-defined) 6Var_Parse: ${VARNAME}::=assigned-value} (eval-defined)
7Evaluating modifier ${VAR.${param}::...} on value "initial-value" (eval-defined, regular) 7Evaluating modifier ${VAR.${param}::...} on value "initial-value"
8Modifier part: "assigned-value" 8Modifier part: "assigned-value"
9Global:VAR.${param} = assigned-value 9Global:VAR.${param} = assigned-value
10Result of ${VAR.${param}::=assigned-value} is "" (eval-defined, regular) 10Result of ${VAR.${param}::=assigned-value} is "" (eval-defined, regular)
11Var_Parse: ${${VARNAME}} != "assigned-value" (eval-defined) 11Var_Parse: ${${VARNAME}} != "assigned-value" (eval-defined)
12Var_Parse: ${VARNAME}} != "assigned-value" (eval-defined) 12Var_Parse: ${VARNAME}} != "assigned-value" (eval-defined)
13Global:.MAKEFLAGS = -r -k -d v -d 13Global:.MAKEFLAGS = -r -k -d v -d
14Global:.MAKEFLAGS = -r -k -d v -d 0 14Global:.MAKEFLAGS = -r -k -d v -d 0
15mod-assign: first=1. 15mod-assign: first=1.
16mod-assign: last=3. 16mod-assign: last=3.
17mod-assign: appended=1 2 3. 17mod-assign: appended=1 2 3.
181 181
192 192
203 203

cvs diff -r1.11 -r1.12 src/usr.bin/make/unit-tests/varmod-match-escape.exp (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/varmod-match-escape.exp 2021/04/05 13:14:55 1.11
+++ src/usr.bin/make/unit-tests/varmod-match-escape.exp 2021/04/05 13:27:30 1.12
@@ -1,44 +1,44 @@ @@ -1,44 +1,44 @@
1Global:SPECIALS = \: : \\ * \* 1Global:SPECIALS = \: : \\ * \*
2CondParser_Eval: ${SPECIALS:M${:U}\:} != ${SPECIALS:M\:${:U}} 2CondParser_Eval: ${SPECIALS:M${:U}\:} != ${SPECIALS:M\:${:U}}
3Var_Parse: ${SPECIALS:M${:U}\:} != ${SPECIALS:M\:${:U}} (eval-defined) 3Var_Parse: ${SPECIALS:M${:U}\:} != ${SPECIALS:M\:${:U}} (eval-defined)
4Evaluating modifier ${SPECIALS:M...} on value "\: : \\ * \*" (eval-defined, regular) 4Evaluating modifier ${SPECIALS:M...} on value "\: : \\ * \*"
5Var_Parse: ${:U}\: (eval-defined) 5Var_Parse: ${:U}\: (eval-defined)
6Evaluating modifier ${:U} on value "" (eval-defined, undefined) 6Evaluating modifier ${:U} on value "" (eval-defined, undefined)
7Result of ${:U} is "" (eval-defined, defined) 7Result of ${:U} is "" (eval-defined, defined)
8Pattern for ':M' is "\:" 8Pattern for ':M' is "\:"
9ModifyWords: split "\: : \\ * \*" into 5 words 9ModifyWords: split "\: : \\ * \*" into 5 words
10Result of ${SPECIALS:M${:U}\:} is ":" (eval-defined, regular) 10Result of ${SPECIALS:M${:U}\:} is ":" (eval-defined, regular)
11Var_Parse: ${SPECIALS:M\:${:U}} (eval-defined) 11Var_Parse: ${SPECIALS:M\:${:U}} (eval-defined)
12Evaluating modifier ${SPECIALS:M...} on value "\: : \\ * \*" (eval-defined, regular) 12Evaluating modifier ${SPECIALS:M...} on value "\: : \\ * \*"
13Var_Parse: ${:U} (eval-defined) 13Var_Parse: ${:U} (eval-defined)
14Evaluating modifier ${:U} on value "" (eval-defined, undefined) 14Evaluating modifier ${:U} on value "" (eval-defined, undefined)
15Result of ${:U} is "" (eval-defined, defined) 15Result of ${:U} is "" (eval-defined, defined)
16Pattern for ':M' is ":" 16Pattern for ':M' is ":"
17ModifyWords: split "\: : \\ * \*" into 5 words 17ModifyWords: split "\: : \\ * \*" into 5 words
18Result of ${SPECIALS:M\:${:U}} is ":" (eval-defined, regular) 18Result of ${SPECIALS:M\:${:U}} is ":" (eval-defined, regular)
19lhs = ":", rhs = ":", op = != 19lhs = ":", rhs = ":", op = !=
20Global:VALUES = : :: :\: 20Global:VALUES = : :: :\:
21CondParser_Eval: ${VALUES:M\:${:U\:}} != ${VALUES:M${:U\:}\:} 21CondParser_Eval: ${VALUES:M\:${:U\:}} != ${VALUES:M${:U\:}\:}
22Var_Parse: ${VALUES:M\:${:U\:}} != ${VALUES:M${:U\:}\:} (eval-defined) 22Var_Parse: ${VALUES:M\:${:U\:}} != ${VALUES:M${:U\:}\:} (eval-defined)
23Evaluating modifier ${VALUES:M...} on value ": :: :\:" (eval-defined, regular) 23Evaluating modifier ${VALUES:M...} on value ": :: :\:"
24Var_Parse: ${:U:} (eval-defined) 24Var_Parse: ${:U:} (eval-defined)
25Evaluating modifier ${:U} on value "" (eval-defined, undefined) 25Evaluating modifier ${:U} on value "" (eval-defined, undefined)
26Result of ${:U} is "" (eval-defined, defined) 26Result of ${:U} is "" (eval-defined, defined)
27Pattern for ':M' is ":" 27Pattern for ':M' is ":"
28ModifyWords: split ": :: :\:" into 3 words 28ModifyWords: split ": :: :\:" into 3 words
29Result of ${VALUES:M\:${:U\:}} is ":" (eval-defined, regular) 29Result of ${VALUES:M\:${:U\:}} is ":" (eval-defined, regular)
30Var_Parse: ${VALUES:M${:U\:}\:} (eval-defined) 30Var_Parse: ${VALUES:M${:U\:}\:} (eval-defined)
31Evaluating modifier ${VALUES:M...} on value ": :: :\:" (eval-defined, regular) 31Evaluating modifier ${VALUES:M...} on value ": :: :\:"
32Var_Parse: ${:U\:}\: (eval-defined) 32Var_Parse: ${:U\:}\: (eval-defined)
33Evaluating modifier ${:U...} on value "" (eval-defined, undefined) 33Evaluating modifier ${:U...} on value "" (eval-defined, undefined)
34Result of ${:U\:} is ":" (eval-defined, defined) 34Result of ${:U\:} is ":" (eval-defined, defined)
35Pattern for ':M' is ":\:" 35Pattern for ':M' is ":\:"
36ModifyWords: split ": :: :\:" into 3 words 36ModifyWords: split ": :: :\:" into 3 words
37Result of ${VALUES:M${:U\:}\:} is "::" (eval-defined, regular) 37Result of ${VALUES:M${:U\:}\:} is "::" (eval-defined, regular)
38lhs = ":", rhs = "::", op = != 38lhs = ":", rhs = "::", op = !=
39make: "varmod-match-escape.mk" line 42: warning: XXX: Oops 39make: "varmod-match-escape.mk" line 42: warning: XXX: Oops
40Global:.MAKEFLAGS = -r -k -d cv -d 40Global:.MAKEFLAGS = -r -k -d cv -d
41Global:.MAKEFLAGS = -r -k -d cv -d 0 41Global:.MAKEFLAGS = -r -k -d cv -d 0
42make: "varmod-match-escape.mk" line 67: Dollar followed by nothing 42make: "varmod-match-escape.mk" line 67: Dollar followed by nothing
43make: Fatal errors encountered -- cannot continue 43make: Fatal errors encountered -- cannot continue
44make: stopped in unit-tests 44make: stopped in unit-tests