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: remove unnecessary modifier ':U' for cert...



details:   https://anonhg.NetBSD.org/src/rev/fa251fde03f1
branches:  trunk
changeset: 961655:fa251fde03f1
user:      rillig <rillig%NetBSD.org@localhost>
date:      Wed Apr 14 17:20:48 2021 +0000

description:
make: remove unnecessary modifier ':U' for certain fixed expressions

No functional change, since the expression is evaluated using
VARE_WANTRES, not using VARE_UNDEFERR.

diffstat:

 usr.bin/make/main.c                       |  6 +++---
 usr.bin/make/unit-tests/varname-empty.exp |  4 +---
 2 files changed, 4 insertions(+), 6 deletions(-)

diffs (41 lines):

diff -r 1239636c6d3f -r fa251fde03f1 usr.bin/make/main.c
--- a/usr.bin/make/main.c       Wed Apr 14 16:59:34 2021 +0000
+++ b/usr.bin/make/main.c       Wed Apr 14 17:20:48 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.536 2021/04/04 10:13:09 rillig Exp $        */
+/*     $NetBSD: main.c,v 1.537 2021/04/14 17:20:48 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -111,7 +111,7 @@
 #include "trace.h"
 
 /*     "@(#)main.c     8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: main.c,v 1.536 2021/04/04 10:13:09 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.537 2021/04/14 17:20:48 rillig Exp $");
 #if defined(MAKE_NATIVE) && !defined(lint)
 __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
            "The Regents of the University of California.  "
@@ -871,7 +871,7 @@
 static bool
 GetBooleanVar(const char *varname, bool fallback)
 {
-       char *expr = str_concat3("${", varname, ":U}");
+       char *expr = str_concat3("${", varname, "}");
        char *value;
        bool res;
 
diff -r 1239636c6d3f -r fa251fde03f1 usr.bin/make/unit-tests/varname-empty.exp
--- a/usr.bin/make/unit-tests/varname-empty.exp Wed Apr 14 16:59:34 2021 +0000
+++ b/usr.bin/make/unit-tests/varname-empty.exp Wed Apr 14 17:20:48 2021 +0000
@@ -1,9 +1,7 @@
 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)
-Result of ${MAKE_OBJDIR_CHECK_WRITABLE:U} is "" (eval, defined)
+Var_Parse: ${MAKE_OBJDIR_CHECK_WRITABLE} (eval)
 Global: .OBJDIR = <curdir>
 Global:delete .PATH (not found)
 Global: .PATH = .



Home | Main Index | Thread Index | Old Index