Module Name: src Committed By: rillig Date: Tue Apr 6 01:38:39 UTC 2021
Modified Files: src/usr.bin/make: var.c src/usr.bin/make/unit-tests: directive-export-impl.exp directive-unexport-env.exp vardebug.exp varmod-assign.exp varmod-match-escape.exp Log Message: make: reduce verbosity of the -dv debug logging for standard cases The verbosity was already removed from LogBeforeApply, now it is consistent between LogBeforeApply and LogAfterApply. To generate a diff of this commit: cvs rdiff -u -r1.911 -r1.912 src/usr.bin/make/var.c cvs rdiff -u -r1.12 -r1.13 \ src/usr.bin/make/unit-tests/directive-export-impl.exp cvs rdiff -u -r1.10 -r1.11 \ src/usr.bin/make/unit-tests/directive-unexport-env.exp cvs rdiff -u -r1.23 -r1.24 src/usr.bin/make/unit-tests/vardebug.exp cvs rdiff -u -r1.15 -r1.16 src/usr.bin/make/unit-tests/varmod-assign.exp cvs rdiff -u -r1.13 -r1.14 \ src/usr.bin/make/unit-tests/varmod-match-escape.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.911 src/usr.bin/make/var.c:1.912 --- src/usr.bin/make/var.c:1.911 Mon Apr 5 13:35:41 2021 +++ src/usr.bin/make/var.c Tue Apr 6 01:38:39 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.911 2021/04/05 13:35:41 rillig Exp $ */ +/* $NetBSD: var.c,v 1.912 2021/04/06 01:38:39 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.911 2021/04/05 13:35:41 rillig Exp $"); +MAKE_RCSID("$NetBSD: var.c,v 1.912 2021/04/06 01:38:39 rillig Exp $"); /* * Variables are defined using one of the VAR=value assignments. Their @@ -3694,6 +3694,15 @@ LogAfterApply(const ModChain *ch, const const char *value = expr->value.str; const char *quot = value == var_Error ? "" : "\""; + if ((expr->emode == VARE_WANTRES || expr->emode == VARE_UNDEFERR) && + expr->defined == DEF_REGULAR) { + + debug_printf("Result of ${%s:%.*s} is %s%s%s\n", + expr->name, (int)(p - mod), mod, + quot, value == var_Error ? "error" : value, quot); + return; + } + debug_printf("Result of ${%s:%.*s} is %s%s%s (%s, %s)\n", expr->name, (int)(p - mod), mod, quot, value == var_Error ? "error" : value, quot, Index: src/usr.bin/make/unit-tests/directive-export-impl.exp diff -u src/usr.bin/make/unit-tests/directive-export-impl.exp:1.12 src/usr.bin/make/unit-tests/directive-export-impl.exp:1.13 --- src/usr.bin/make/unit-tests/directive-export-impl.exp:1.12 Mon Apr 5 13:35:41 2021 +++ src/usr.bin/make/unit-tests/directive-export-impl.exp Tue Apr 6 01:38:39 2021 @@ -8,7 +8,7 @@ Var_Parse: ${REF}> (eval-defined) Evaluating modifier ${UT_VAR:N...} on value "<>" Pattern for ':N' is "*" ModifyWords: split "<>" into 1 words -Result of ${UT_VAR:N*} is "" (eval-defined, regular) +Result of ${UT_VAR:N*} is "" ParseDependency(: ) CondParser_Eval: ${:!echo "\$UT_VAR"!} != "<>" Var_Parse: ${:!echo "\$UT_VAR"!} != "<>" (eval-defined) @@ -16,9 +16,9 @@ Evaluating modifier ${:!...} on value "" Modifier part: "echo "$UT_VAR"" Var_Parse: ${.MAKE.EXPORTED:O:u} (eval) Evaluating modifier ${.MAKE.EXPORTED:O} on value "UT_VAR" -Result of ${.MAKE.EXPORTED:O} is "UT_VAR" (eval, regular) +Result of ${.MAKE.EXPORTED:O} is "UT_VAR" Evaluating modifier ${.MAKE.EXPORTED:u} on value "UT_VAR" -Result of ${.MAKE.EXPORTED:u} is "UT_VAR" (eval, regular) +Result of ${.MAKE.EXPORTED:u} is "UT_VAR" Var_Parse: ${UT_VAR} (eval) Var_Parse: ${REF}> (eval) Result of ${:!echo "\$UT_VAR"!} is "<>" (eval-defined, defined) @@ -29,7 +29,7 @@ Var_Parse: ${REF}> (eval-defined) Evaluating modifier ${UT_VAR:N...} on value "<>" Pattern for ':N' is "*" ModifyWords: split "<>" into 1 words -Result of ${UT_VAR:N*} is "" (eval-defined, regular) +Result of ${UT_VAR:N*} is "" ParseDependency(: ) ParseReadLine (54): 'REF= defined' Global: REF = defined @@ -39,9 +39,9 @@ Evaluating modifier ${:!...} on value "" Modifier part: "echo "$UT_VAR"" Var_Parse: ${.MAKE.EXPORTED:O:u} (eval) Evaluating modifier ${.MAKE.EXPORTED:O} on value "UT_VAR" -Result of ${.MAKE.EXPORTED:O} is "UT_VAR" (eval, regular) +Result of ${.MAKE.EXPORTED:O} is "UT_VAR" Evaluating modifier ${.MAKE.EXPORTED:u} on value "UT_VAR" -Result of ${.MAKE.EXPORTED:u} is "UT_VAR" (eval, regular) +Result of ${.MAKE.EXPORTED:u} is "UT_VAR" Var_Parse: ${UT_VAR} (eval) Var_Parse: ${REF}> (eval) Result of ${:!echo "\$UT_VAR"!} is "<defined>" (eval-defined, defined) Index: src/usr.bin/make/unit-tests/directive-unexport-env.exp diff -u src/usr.bin/make/unit-tests/directive-unexport-env.exp:1.10 src/usr.bin/make/unit-tests/directive-unexport-env.exp:1.11 --- src/usr.bin/make/unit-tests/directive-unexport-env.exp:1.10 Mon Apr 5 13:35:41 2021 +++ src/usr.bin/make/unit-tests/directive-unexport-env.exp Tue Apr 6 01:38:39 2021 @@ -6,9 +6,9 @@ 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} (eval) Evaluating modifier ${.MAKE.EXPORTED:O} on value "UT_EXPORTED" -Result of ${.MAKE.EXPORTED:O} is "UT_EXPORTED" (eval, regular) +Result of ${.MAKE.EXPORTED:O} is "UT_EXPORTED" Evaluating modifier ${.MAKE.EXPORTED:u} on value "UT_EXPORTED" -Result of ${.MAKE.EXPORTED:u} is "UT_EXPORTED" (eval, regular) +Result of ${.MAKE.EXPORTED:u} is "UT_EXPORTED" Unexporting "UT_EXPORTED" Global:delete .MAKE.EXPORTED Global: .MAKEFLAGS = -r -k -d v -d Index: src/usr.bin/make/unit-tests/vardebug.exp diff -u src/usr.bin/make/unit-tests/vardebug.exp:1.23 src/usr.bin/make/unit-tests/vardebug.exp:1.24 --- src/usr.bin/make/unit-tests/vardebug.exp:1.23 Mon Apr 5 13:35:41 2021 +++ src/usr.bin/make/unit-tests/vardebug.exp Tue Apr 6 01:38:39 2021 @@ -21,28 +21,28 @@ Var_Parse: ${VAR:M[2]} (eval-defined) Evaluating modifier ${VAR:M...} on value "1 2 3" Pattern for ':M' is "[2]" ModifyWords: split "1 2 3" into 3 words -Result of ${VAR:M[2]} is "2" (eval-defined, regular) +Result of ${VAR:M[2]} is "2" Var_Parse: ${VAR:N[2]} (eval-defined) Evaluating modifier ${VAR:N...} on value "1 2 3" Pattern for ':N' is "[2]" ModifyWords: split "1 2 3" into 3 words -Result of ${VAR:N[2]} is "1 3" (eval-defined, regular) +Result of ${VAR:N[2]} is "1 3" Var_Parse: ${VAR:S,2,two,} (eval-defined) Evaluating modifier ${VAR:S...} on value "1 2 3" Modifier part: "2" Modifier part: "two" ModifyWords: split "1 2 3" into 3 words -Result of ${VAR:S,2,two,} is "1 two 3" (eval-defined, regular) +Result of ${VAR:S,2,two,} is "1 two 3" Var_Parse: ${VAR:Q} (eval-defined) Evaluating modifier ${VAR:Q} on value "1 2 3" -Result of ${VAR:Q} is "1\ 2\ 3" (eval-defined, regular) +Result of ${VAR:Q} is "1\ 2\ 3" Var_Parse: ${VAR:tu:tl:Q} (eval-defined) Evaluating modifier ${VAR:t...} on value "1 2 3" -Result of ${VAR:tu} is "1 2 3" (eval-defined, regular) +Result of ${VAR:tu} is "1 2 3" Evaluating modifier ${VAR:t...} on value "1 2 3" -Result of ${VAR:tl} is "1 2 3" (eval-defined, regular) +Result of ${VAR:tl} is "1 2 3" Evaluating modifier ${VAR:Q} on value "1 2 3" -Result of ${VAR:Q} is "1\ 2\ 3" (eval-defined, regular) +Result of ${VAR:Q} is "1\ 2\ 3" Var_Parse: ${:Uvalue:${:UM*e}:Mvalu[e]} (eval-defined) Evaluating modifier ${:U...} on value "" (eval-defined, undefined) Result of ${:Uvalue} is "value" (eval-defined, defined) Index: src/usr.bin/make/unit-tests/varmod-assign.exp diff -u src/usr.bin/make/unit-tests/varmod-assign.exp:1.15 src/usr.bin/make/unit-tests/varmod-assign.exp:1.16 --- src/usr.bin/make/unit-tests/varmod-assign.exp:1.15 Mon Apr 5 13:35:41 2021 +++ src/usr.bin/make/unit-tests/varmod-assign.exp Tue Apr 6 01:38:39 2021 @@ -7,7 +7,7 @@ Var_Parse: ${VARNAME}::=assigned-value} Evaluating modifier ${VAR.${param}::...} on value "initial-value" Modifier part: "assigned-value" Global: VAR.${param} = assigned-value -Result of ${VAR.${param}::=assigned-value} is "" (eval-defined, regular) +Result of ${VAR.${param}::=assigned-value} is "" Var_Parse: ${${VARNAME}} != "assigned-value" (eval-defined) Var_Parse: ${VARNAME}} != "assigned-value" (eval-defined) Global: .MAKEFLAGS = -r -k -d v -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.13 src/usr.bin/make/unit-tests/varmod-match-escape.exp:1.14 --- src/usr.bin/make/unit-tests/varmod-match-escape.exp:1.13 Mon Apr 5 13:35:41 2021 +++ src/usr.bin/make/unit-tests/varmod-match-escape.exp Tue Apr 6 01:38:39 2021 @@ -7,7 +7,7 @@ Evaluating modifier ${:U} on value "" (e Result of ${:U} is "" (eval-defined, defined) Pattern for ':M' is "\:" ModifyWords: split "\: : \\ * \*" into 5 words -Result of ${SPECIALS:M${:U}\:} is ":" (eval-defined, regular) +Result of ${SPECIALS:M${:U}\:} is ":" Var_Parse: ${SPECIALS:M\:${:U}} (eval-defined) Evaluating modifier ${SPECIALS:M...} on value "\: : \\ * \*" Var_Parse: ${:U} (eval-defined) @@ -15,7 +15,7 @@ Evaluating modifier ${:U} on value "" (e Result of ${:U} is "" (eval-defined, defined) Pattern for ':M' is ":" ModifyWords: split "\: : \\ * \*" into 5 words -Result of ${SPECIALS:M\:${:U}} is ":" (eval-defined, regular) +Result of ${SPECIALS:M\:${:U}} is ":" lhs = ":", rhs = ":", op = != Global: VALUES = : :: :\: CondParser_Eval: ${VALUES:M\:${:U\:}} != ${VALUES:M${:U\:}\:} @@ -26,7 +26,7 @@ Evaluating modifier ${:U} on value "" (e Result of ${:U} is "" (eval-defined, defined) Pattern for ':M' is ":" ModifyWords: split ": :: :\:" into 3 words -Result of ${VALUES:M\:${:U\:}} is ":" (eval-defined, regular) +Result of ${VALUES:M\:${:U\:}} is ":" Var_Parse: ${VALUES:M${:U\:}\:} (eval-defined) Evaluating modifier ${VALUES:M...} on value ": :: :\:" Var_Parse: ${:U\:}\: (eval-defined) @@ -34,7 +34,7 @@ Evaluating modifier ${:U...} on value "" Result of ${:U\:} is ":" (eval-defined, defined) Pattern for ':M' is ":\:" ModifyWords: split ": :: :\:" into 3 words -Result of ${VALUES:M${:U\:}\:} is "::" (eval-defined, regular) +Result of ${VALUES:M${:U\:}\:} is "::" lhs = ":", rhs = "::", op = != make: "varmod-match-escape.mk" line 42: warning: XXX: Oops Global: .MAKEFLAGS = -r -k -d cv -d