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: reword debug log message for empty variab...
details: https://anonhg.NetBSD.org/src/rev/b9f177f1d495
branches: trunk
changeset: 378346:b9f177f1d495
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Apr 10 22:35:02 2021 +0000
description:
make: reword debug log message for empty variable name
The function names did not match anymore, after one of the many
refactorings in the last few months.
diffstat:
usr.bin/make/unit-tests/vardebug.exp | 4 ++--
usr.bin/make/unit-tests/varname-empty.exp | 18 +++++++++---------
usr.bin/make/var.c | 15 ++++++++-------
3 files changed, 19 insertions(+), 18 deletions(-)
diffs (90 lines):
diff -r 7e7299cfd258 -r b9f177f1d495 usr.bin/make/unit-tests/vardebug.exp
--- a/usr.bin/make/unit-tests/vardebug.exp Sat Apr 10 22:09:55 2021 +0000
+++ b/usr.bin/make/unit-tests/vardebug.exp Sat Apr 10 22:35:02 2021 +0000
@@ -5,8 +5,8 @@ Global: VAR = added
Global: VAR = overwritten
Global:delete VAR
Global:delete VAR (not found)
-Var_Set("${:U}", "empty name", ...) name expands to empty string - ignored
-Var_Append("${:U}", "empty name", ...) name expands to empty string - ignored
+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!
Global: VAR = 1
Global: VAR = 1 2
diff -r 7e7299cfd258 -r b9f177f1d495 usr.bin/make/unit-tests/varname-empty.exp
--- a/usr.bin/make/unit-tests/varname-empty.exp Sat Apr 10 22:09:55 2021 +0000
+++ b/usr.bin/make/unit-tests/varname-empty.exp Sat Apr 10 22:35:02 2021 +0000
@@ -1,5 +1,5 @@
-Var_Set("${:U}", "cmdline-u", ...) name expands to empty string - ignored
-Var_Set("", "cmdline-plain", ...) name expands to empty string - ignored
+Var_SetExpand: variable name "${:U}" expands to empty string, with value "cmdline-u" - ignored
+Var_SetExpand: variable name "" expands to empty string, with value "cmdline-plain" - ignored
Global: .CURDIR = <curdir>
Var_Parse: ${MAKE_OBJDIR_CHECK_WRITABLE:U} (eval)
Evaluating modifier ${MAKE_OBJDIR_CHECK_WRITABLE:U} on value "" (eval, undefined)
@@ -14,14 +14,14 @@ Global: .MAKE.MAKEFILES = varname-empty.
Global: .PARSEFILE = varname-empty.mk
Global:delete .INCLUDEDFROMDIR (not found)
Global:delete .INCLUDEDFROMFILE (not found)
-Var_Set("", "default", ...) name expands to empty string - ignored
-Var_Set("", "assigned", ...) name expands to empty string - ignored
+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
-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_Set("${:U}", "assigned indirectly", ...) name expands to empty string - ignored
-Var_Append("${:U}", "appended indirectly", ...) name expands to empty string - ignored
+Var_SetExpand: variable name "" expands to empty string, with value "" - ignored
+Var_SetExpand: variable name "" expands to empty string, with value "subst" - ignored
+Var_SetExpand: variable name "" expands to empty string, with value "shell-output" - ignored
+Var_SetExpand: variable name "${:U}" expands to empty string, with value "assigned indirectly" - ignored
+Var_AppendExpand: variable name "${:U}" expands to empty string, with value "appended indirectly" - ignored
Global: .MAKEFLAGS = -r -d v -d
Global: .MAKEFLAGS = -r -d v -d 0
out: fallback
diff -r 7e7299cfd258 -r b9f177f1d495 usr.bin/make/var.c
--- a/usr.bin/make/var.c Sat Apr 10 22:09:55 2021 +0000
+++ b/usr.bin/make/var.c Sat Apr 10 22:35:02 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.913 2021/04/10 22:09:53 rillig Exp $ */
+/* $NetBSD: var.c,v 1.914 2021/04/10 22:35:02 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.913 2021/04/10 22:09:53 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.914 2021/04/10 22:35:02 rillig Exp $");
/*
* Variables are defined using one of the VAR=value assignments. Their
@@ -1040,8 +1040,9 @@ Var_SetExpandWithFlags(GNode *scope, con
}
if (varname.str[0] == '\0') {
- DEBUG2(VAR, "Var_Set(\"%s\", \"%s\", ...) "
- "name expands to empty string - ignored\n",
+ DEBUG2(VAR,
+ "Var_SetExpand: variable name \"%s\" expands "
+ "to empty string, with value \"%s\" - ignored\n",
unexpanded_name, val);
} else
Var_SetWithFlags(scope, varname.str, val, flags);
@@ -1165,9 +1166,9 @@ Var_AppendExpand(GNode *scope, const cha
/* TODO: handle errors */
xname = FStr_InitOwn(expanded);
if (expanded[0] == '\0') {
- /* TODO: update function name in the debug message */
- DEBUG2(VAR, "Var_Append(\"%s\", \"%s\", ...) "
- "name expands to empty string - ignored\n",
+ DEBUG2(VAR,
+ "Var_AppendExpand: variable name \"%s\" expands "
+ "to empty string, with value \"%s\" - ignored\n",
name, val);
FStr_Done(&xname);
return;
Home |
Main Index |
Thread Index |
Old Index