Module Name:    src
Committed By:   rillig
Date:           Sat Mar 26 14:17:47 UTC 2022

Modified Files:
        src/usr.bin/make: var.c
        src/usr.bin/make/unit-tests: deptgt-makeflags.exp
            directive-unexport-env.exp vardebug.exp varmod-defined.exp
            varname-dot-shell.exp varname-dot-suffixes.exp varname-empty.exp

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.1016 -r1.1017 src/usr.bin/make/var.c
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/deptgt-makeflags.exp
cvs rdiff -u -r1.11 -r1.12 \
    src/usr.bin/make/unit-tests/directive-unexport-env.exp
cvs rdiff -u -r1.27 -r1.28 src/usr.bin/make/unit-tests/vardebug.exp
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/varmod-defined.exp
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/make/unit-tests/varname-dot-shell.exp
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/varname-dot-suffixes.exp
cvs rdiff -u -r1.18 -r1.19 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/var.c
diff -u src/usr.bin/make/var.c:1.1016 src/usr.bin/make/var.c:1.1017
--- src/usr.bin/make/var.c:1.1016	Sat Mar 26 14:02:40 2022
+++ src/usr.bin/make/var.c	Sat Mar 26 14:17:46 2022
@@ -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_Delete(GNode *scope, const char *var
 	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 @@ Var_Delete(GNode *scope, const char *var
 		    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);

Index: src/usr.bin/make/unit-tests/deptgt-makeflags.exp
diff -u src/usr.bin/make/unit-tests/deptgt-makeflags.exp:1.6 src/usr.bin/make/unit-tests/deptgt-makeflags.exp:1.7
--- src/usr.bin/make/unit-tests/deptgt-makeflags.exp:1.6	Thu Mar  3 19:36:35 2022
+++ src/usr.bin/make/unit-tests/deptgt-makeflags.exp	Sat Mar 26 14:17:46 2022
@@ -1,4 +1,4 @@
-Global:delete DOLLAR (not found)
+Global: delete DOLLAR (not found)
 Command: DOLLAR = $$$$
 Global: .MAKEOVERRIDES =  VAR DOLLAR
 CondParser_Eval: ${DOLLAR} != "\$\$"

Index: src/usr.bin/make/unit-tests/directive-unexport-env.exp
diff -u src/usr.bin/make/unit-tests/directive-unexport-env.exp:1.11 src/usr.bin/make/unit-tests/directive-unexport-env.exp:1.12
--- src/usr.bin/make/unit-tests/directive-unexport-env.exp:1.11	Tue Apr  6 01:38:39 2021
+++ src/usr.bin/make/unit-tests/directive-unexport-env.exp	Sat Mar 26 14:17:46 2022
@@ -10,7 +10,7 @@ Result of ${.MAKE.EXPORTED:O} is "UT_EXP
 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

Index: src/usr.bin/make/unit-tests/vardebug.exp
diff -u src/usr.bin/make/unit-tests/vardebug.exp:1.27 src/usr.bin/make/unit-tests/vardebug.exp:1.28
--- src/usr.bin/make/unit-tests/vardebug.exp:1.27	Sat Nov 20 17:51:48 2021
+++ src/usr.bin/make/unit-tests/vardebug.exp	Sat Mar 26 14:17:46 2022
@@ -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 @@ Evaluating modifier ${:M...} on value "v
 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 @@ Result of ${:unknown} is error (eval-def
 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

Index: src/usr.bin/make/unit-tests/varmod-defined.exp
diff -u src/usr.bin/make/unit-tests/varmod-defined.exp:1.9 src/usr.bin/make/unit-tests/varmod-defined.exp:1.10
--- src/usr.bin/make/unit-tests/varmod-defined.exp:1.9	Sat Nov 20 17:51:48 2021
+++ src/usr.bin/make/unit-tests/varmod-defined.exp	Sat Mar 26 14:17:46 2022
@@ -15,7 +15,7 @@ ModifyWords: split "$$$$$$$$" into 1 wor
 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

Index: src/usr.bin/make/unit-tests/varname-dot-shell.exp
diff -u src/usr.bin/make/unit-tests/varname-dot-shell.exp:1.14 src/usr.bin/make/unit-tests/varname-dot-shell.exp:1.15
--- src/usr.bin/make/unit-tests/varname-dot-shell.exp:1.14	Thu Mar  3 19:36:35 2022
+++ src/usr.bin/make/unit-tests/varname-dot-shell.exp	Sat Mar 26 14:17:46 2022
@@ -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: ${.SHELL} != ${ORIG_SHELL} (e
 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}

Index: src/usr.bin/make/unit-tests/varname-dot-suffixes.exp
diff -u src/usr.bin/make/unit-tests/varname-dot-suffixes.exp:1.1 src/usr.bin/make/unit-tests/varname-dot-suffixes.exp:1.2
--- src/usr.bin/make/unit-tests/varname-dot-suffixes.exp:1.1	Sun Dec 12 22:16:48 2021
+++ src/usr.bin/make/unit-tests/varname-dot-suffixes.exp	Sat Mar 26 14:17:46 2022
@@ -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 @@ ModifyWord_Loop: in "1", replace ".SUFFI
 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

Index: src/usr.bin/make/unit-tests/varname-empty.exp
diff -u src/usr.bin/make/unit-tests/varname-empty.exp:1.18 src/usr.bin/make/unit-tests/varname-empty.exp:1.19
--- src/usr.bin/make/unit-tests/varname-empty.exp:1.18	Mon Jan 10 20:32:29 2022
+++ src/usr.bin/make/unit-tests/varname-empty.exp	Sat Mar 26 14:17:46 2022
@@ -6,8 +6,8 @@ Global: .TARGETS = 
 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

Reply via email to