Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make make: add space after colon in debug logging fo...
details: https://anonhg.NetBSD.org/src/rev/a9eda24fcefc
branches: trunk
changeset: 364464:a9eda24fcefc
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Mar 26 14:17:46 2022 +0000
description:
make: add space after colon in debug logging for variables
These log messages are intended for human interpretation, so don't make
them unnecessarily hard to read.
diffstat:
usr.bin/make/unit-tests/deptgt-makeflags.exp | 2 +-
usr.bin/make/unit-tests/directive-unexport-env.exp | 2 +-
usr.bin/make/unit-tests/vardebug.exp | 10 +++++-----
usr.bin/make/unit-tests/varmod-defined.exp | 2 +-
usr.bin/make/unit-tests/varname-dot-shell.exp | 4 ++--
usr.bin/make/unit-tests/varname-dot-suffixes.exp | 4 ++--
usr.bin/make/unit-tests/varname-empty.exp | 4 ++--
usr.bin/make/var.c | 11 +++++++----
8 files changed, 21 insertions(+), 18 deletions(-)
diffs (167 lines):
diff -r 499d2a41c2f9 -r a9eda24fcefc usr.bin/make/unit-tests/deptgt-makeflags.exp
--- a/usr.bin/make/unit-tests/deptgt-makeflags.exp Sat Mar 26 14:02:40 2022 +0000
+++ b/usr.bin/make/unit-tests/deptgt-makeflags.exp Sat Mar 26 14:17:46 2022 +0000
@@ -1,4 +1,4 @@
-Global:delete DOLLAR (not found)
+Global: delete DOLLAR (not found)
Command: DOLLAR = $$$$
Global: .MAKEOVERRIDES = VAR DOLLAR
CondParser_Eval: ${DOLLAR} != "\$\$"
diff -r 499d2a41c2f9 -r a9eda24fcefc usr.bin/make/unit-tests/directive-unexport-env.exp
--- a/usr.bin/make/unit-tests/directive-unexport-env.exp Sat Mar 26 14:02:40 2022 +0000
+++ b/usr.bin/make/unit-tests/directive-unexport-env.exp Sat Mar 26 14:17:46 2022 +0000
@@ -10,7 +10,7 @@
Evaluating modifier ${.MAKE.EXPORTED:u} on value "UT_EXPORTED"
Result of ${.MAKE.EXPORTED:u} is "UT_EXPORTED"
Unexporting "UT_EXPORTED"
-Global:delete .MAKE.EXPORTED
+Global: delete .MAKE.EXPORTED
Global: .MAKEFLAGS = -r -k -d v -d
Global: .MAKEFLAGS = -r -k -d v -d 0
make: Fatal errors encountered -- cannot continue
diff -r 499d2a41c2f9 -r a9eda24fcefc usr.bin/make/unit-tests/vardebug.exp
--- a/usr.bin/make/unit-tests/vardebug.exp Sat Mar 26 14:02:40 2022 +0000
+++ b/usr.bin/make/unit-tests/vardebug.exp Sat Mar 26 14:17:46 2022 +0000
@@ -1,10 +1,10 @@
-Global:delete FROM_CMDLINE (not found)
+Global: delete FROM_CMDLINE (not found)
Command: FROM_CMDLINE =
Global: .MAKEOVERRIDES = FROM_CMDLINE
Global: VAR = added
Global: VAR = overwritten
-Global:delete VAR
-Global:delete VAR (not found)
+Global: delete VAR
+Global: delete VAR (not found)
Var_SetExpand: variable name "${:U}" expands to empty string, with value "empty name" - ignored
Var_AppendExpand: variable name "${:U}" expands to empty string, with value "empty name" - ignored
Global: FROM_CMDLINE = overwritten ignored!
@@ -49,7 +49,7 @@
Pattern for ':M' is "valu[e]"
ModifyWords: split "value" into 1 word
Result of ${:Mvalu[e]} is "value" (eval-defined, defined)
-Global:delete VAR
+Global: delete VAR
Var_Parse: ${:Uvariable:unknown} (eval-defined)
Evaluating modifier ${:U...} on value "" (eval-defined, undefined)
Result of ${:Uvariable} is "variable" (eval-defined, defined)
@@ -59,7 +59,7 @@
make: "vardebug.mk" line 44: Malformed conditional (${:Uvariable:unknown})
Var_Parse: ${UNDEFINED} (eval-defined)
make: "vardebug.mk" line 53: Malformed conditional (${UNDEFINED})
-Global:delete .SHELL (not found)
+Global: delete .SHELL (not found)
Command: .SHELL = </path/to/shell>
Command: .SHELL = overwritten ignored (read-only)
Global: .MAKEFLAGS = -r -k -d v -d
diff -r 499d2a41c2f9 -r a9eda24fcefc usr.bin/make/unit-tests/varmod-defined.exp
--- a/usr.bin/make/unit-tests/varmod-defined.exp Sat Mar 26 14:02:40 2022 +0000
+++ b/usr.bin/make/unit-tests/varmod-defined.exp Sat Mar 26 14:17:46 2022 +0000
@@ -15,7 +15,7 @@
Global: var = $$$$$$$$
Var_Parse: ${8_DOLLARS} (eval-keep-undefined)
ModifyWord_Loop: in "$$$$$$$$", replace "var" with "${8_DOLLARS}" to "$$$$"
-Global:delete var
+Global: delete var
Result of ${VAR:@var@${8_DOLLARS}@} is "$$$$" (eval-keep-dollar-and-undefined, regular)
Global: VAR = $$$$
Global: .MAKEFLAGS = -r -k -d v -d
diff -r 499d2a41c2f9 -r a9eda24fcefc usr.bin/make/unit-tests/varname-dot-shell.exp
--- a/usr.bin/make/unit-tests/varname-dot-shell.exp Sat Mar 26 14:02:40 2022 +0000
+++ b/usr.bin/make/unit-tests/varname-dot-shell.exp Sat Mar 26 14:17:46 2022 +0000
@@ -1,7 +1,7 @@
Parsing line 10: ORIG_SHELL:= ${.SHELL}
Global: ORIG_SHELL =
Var_Parse: ${.SHELL} (eval-keep-dollar-and-undefined)
-Global:delete .SHELL (not found)
+Global: delete .SHELL (not found)
Command: .SHELL = (details omitted)
Global: ORIG_SHELL = (details omitted)
Parsing line 12: .SHELL= overwritten
@@ -18,7 +18,7 @@
Var_Parse: ${ORIG_SHELL} (eval-defined)
Comparing "(details omitted)" != "(details omitted)"
Parsing line 27: .undef .SHELL
-Global:delete .SHELL
+Global: delete .SHELL
Parsing line 28: .SHELL= newly overwritten
Global: .SHELL = newly overwritten
CondParser_Eval: ${.SHELL} != ${ORIG_SHELL}
diff -r 499d2a41c2f9 -r a9eda24fcefc usr.bin/make/unit-tests/varname-dot-suffixes.exp
--- a/usr.bin/make/unit-tests/varname-dot-suffixes.exp Sat Mar 26 14:02:40 2022 +0000
+++ b/usr.bin/make/unit-tests/varname-dot-suffixes.exp Sat Mar 26 14:17:46 2022 +0000
@@ -1,4 +1,4 @@
-Global:delete .SUFFIXES (not found)
+Global: delete .SUFFIXES (not found)
Global: .MAKEFLAGS = -r -k -d v -d
Global: .MAKEFLAGS = -r -k -d v -d 0
Global: .SUFFIXES = set ignored (read-only)
@@ -32,7 +32,7 @@
Command: .SUFFIXES = 2 ignored (read-only)
Var_Parse: ${.SUFFIXES} (eval-defined)
ModifyWord_Loop: in "2", replace ".SUFFIXES" with "${.SUFFIXES}" to ".c .o .1 .err .tar.gz"
-Command:delete .SUFFIXES (not found)
+Command: delete .SUFFIXES (not found)
Result of ${1 2:@.SUFFIXES@${.SUFFIXES}@} is ".c .o .1 .err .tar.gz .c .o .1 .err .tar.gz" (eval-defined, defined)
Global: .MAKEFLAGS = -r -k -d v -d 0 -d v -d 0 -d v -d
Global: .MAKEFLAGS = -r -k -d v -d 0 -d v -d 0 -d v -d 0
diff -r 499d2a41c2f9 -r a9eda24fcefc usr.bin/make/unit-tests/varname-empty.exp
--- a/usr.bin/make/unit-tests/varname-empty.exp Sat Mar 26 14:02:40 2022 +0000
+++ b/usr.bin/make/unit-tests/varname-empty.exp Sat Mar 26 14:17:46 2022 +0000
@@ -6,8 +6,8 @@
Internal: MAKEFILE = varname-empty.mk
Global: .MAKE.MAKEFILES = varname-empty.mk
Global: .PARSEFILE = varname-empty.mk
-Global:delete .INCLUDEDFROMDIR (not found)
-Global:delete .INCLUDEDFROMFILE (not found)
+Global: delete .INCLUDEDFROMDIR (not found)
+Global: delete .INCLUDEDFROMFILE (not found)
Var_SetExpand: variable name "" expands to empty string, with value "default" - ignored
Var_SetExpand: variable name "" expands to empty string, with value "assigned" - ignored
SetVar: variable name is empty - ignored
diff -r 499d2a41c2f9 -r a9eda24fcefc usr.bin/make/var.c
--- a/usr.bin/make/var.c Sat Mar 26 14:02:40 2022 +0000
+++ b/usr.bin/make/var.c Sat Mar 26 14:17:46 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.1016 2022/03/26 14:02:40 rillig Exp $ */
+/* $NetBSD: var.c,v 1.1017 2022/03/26 14:17:46 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.1016 2022/03/26 14:02:40 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1017 2022/03/26 14:17:46 rillig Exp $");
/*
* Variables are defined using one of the VAR=value assignments. Their
@@ -494,11 +494,12 @@
Var *v;
if (he == NULL) {
- DEBUG2(VAR, "%s:delete %s (not found)\n", scope->name, varname);
+ DEBUG2(VAR, "%s: delete %s (not found)\n",
+ scope->name, varname);
return;
}
- DEBUG2(VAR, "%s:delete %s\n", scope->name, varname);
+ DEBUG2(VAR, "%s: delete %s\n", scope->name, varname);
v = he->value;
if (v->inUse) {
Parse_Error(PARSE_FATAL,
@@ -506,10 +507,12 @@
v->name.str);
return;
}
+
if (v->exported)
unsetenv(v->name.str);
if (strcmp(v->name.str, MAKE_EXPORTED) == 0)
var_exportedVars = VAR_EXPORTED_NONE;
+
assert(v->name.freeIt == NULL);
HashTable_DeleteEntry(&scope->vars, he);
Buf_Done(&v->val);
Home |
Main Index |
Thread Index |
Old Index