Module Name: src Committed By: rillig Date: Wed Apr 14 17:20:48 UTC 2021
Modified Files: src/usr.bin/make: main.c src/usr.bin/make/unit-tests: varname-empty.exp Log Message: make: remove unnecessary modifier ':U' for certain fixed expressions No functional change, since the expression is evaluated using VARE_WANTRES, not using VARE_UNDEFERR. To generate a diff of this commit: cvs rdiff -u -r1.536 -r1.537 src/usr.bin/make/main.c cvs rdiff -u -r1.15 -r1.16 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/main.c diff -u src/usr.bin/make/main.c:1.536 src/usr.bin/make/main.c:1.537 --- src/usr.bin/make/main.c:1.536 Sun Apr 4 10:13:09 2021 +++ src/usr.bin/make/main.c Wed Apr 14 17:20:48 2021 @@ -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 @@ PrintVar(const char *varname, bool expan static bool GetBooleanVar(const char *varname, bool fallback) { - char *expr = str_concat3("${", varname, ":U}"); + char *expr = str_concat3("${", varname, "}"); char *value; bool res; Index: src/usr.bin/make/unit-tests/varname-empty.exp diff -u src/usr.bin/make/unit-tests/varname-empty.exp:1.15 src/usr.bin/make/unit-tests/varname-empty.exp:1.16 --- src/usr.bin/make/unit-tests/varname-empty.exp:1.15 Sat Apr 10 22:35:02 2021 +++ src/usr.bin/make/unit-tests/varname-empty.exp Wed Apr 14 17:20:48 2021 @@ -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 = .