Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make Remove previous variable expansion code; sjg ha...
details: https://anonhg.NetBSD.org/src/rev/27750bda5a86
branches: trunk
changeset: 354512:27750bda5a86
user: christos <christos%NetBSD.org@localhost>
date: Mon Jun 19 14:59:06 2017 +0000
description:
Remove previous variable expansion code; sjg had already added the code to
do it. Note that the manual page already documents this behavior and does
not need to change:
-dV -V VAR: prints the raw variable
-V VAR: prints the expanded variable
diffstat:
usr.bin/make/main.c | 16 +++++-----------
1 files changed, 5 insertions(+), 11 deletions(-)
diffs (51 lines):
diff -r fcedd6955925 -r 27750bda5a86 usr.bin/make/main.c
--- a/usr.bin/make/main.c Mon Jun 19 12:09:37 2017 +0000
+++ b/usr.bin/make/main.c Mon Jun 19 14:59:06 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.269 2017/06/17 19:59:28 christos Exp $ */
+/* $NetBSD: main.c,v 1.270 2017/06/19 14:59:06 christos Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.269 2017/06/17 19:59:28 christos Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.270 2017/06/19 14:59:06 christos Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
@@ -81,7 +81,7 @@
#if 0
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: main.c,v 1.269 2017/06/17 19:59:28 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.270 2017/06/19 14:59:06 christos Exp $");
#endif
#endif /* not lint */
#endif
@@ -855,7 +855,7 @@
if (debugVflag)
expandVars = FALSE;
else
- expandVars = getBoolean(".MAKE.EXPAND_VARIABLES", FALSE);
+ expandVars = getBoolean(".MAKE.EXPAND_VARIABLES", TRUE);
for (ln = Lst_First(variables); ln != NULL;
ln = Lst_Succ(ln)) {
@@ -880,13 +880,7 @@
value = p1 = Var_Subst(NULL, tmp, VAR_GLOBAL,
VARF_WANTRES);
} else {
- value = Var_Value(var, VAR_GLOBAL, &p1);
- if (!noExpand && value && *value == '$') {
- value = Var_Subst(NULL, value,
- VAR_GLOBAL, VARF_WANTRES);
- free(p1);
- p1 = value;
- }
+ value = p1 = Var_Value(var, VAR_GLOBAL, &p1);
}
printf("%s\n", value ? value : "");
free(p1);
Home |
Main Index |
Thread Index |
Old Index