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(1): fix unnecessary evaluation for :S :C :...
details: https://anonhg.NetBSD.org/src/rev/201cc6ecca9e
branches: trunk
changeset: 935432:201cc6ecca9e
user: rillig <rillig%NetBSD.org@localhost>
date: Thu Jul 02 16:46:57 2020 +0000
description:
make(1): fix unnecessary evaluation for :S :C := modifiers
diffstat:
usr.bin/make/unit-tests/cond-short.exp | 3 ---
usr.bin/make/var.c | 12 ++++++------
2 files changed, 6 insertions(+), 9 deletions(-)
diffs (59 lines):
diff -r e56f1a40b139 -r 201cc6ecca9e usr.bin/make/unit-tests/cond-short.exp
--- a/usr.bin/make/unit-tests/cond-short.exp Thu Jul 02 16:37:56 2020 +0000
+++ b/usr.bin/make/unit-tests/cond-short.exp Thu Jul 02 16:46:57 2020 +0000
@@ -4,9 +4,6 @@
expected U23 condition
expected VAR23
expected M pattern
-unexpected S modifier
-unexpected C modifier
-unexpected = modifier
unexpected @ modifier
unexpected @ modifier
unexpected @ modifier
diff -r e56f1a40b139 -r 201cc6ecca9e usr.bin/make/var.c
--- a/usr.bin/make/var.c Thu Jul 02 16:37:56 2020 +0000
+++ b/usr.bin/make/var.c Thu Jul 02 16:46:57 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.231 2020/07/02 16:14:50 rillig Exp $ */
+/* $NetBSD: var.c,v 1.232 2020/07/02 16:46:57 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.231 2020/07/02 16:14:50 rillig Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.232 2020/07/02 16:46:57 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: var.c,v 1.231 2020/07/02 16:14:50 rillig Exp $");
+__RCSID("$NetBSD: var.c,v 1.232 2020/07/02 16:46:57 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -2280,8 +2280,8 @@
* delimiter, assume it's a variable
* substitution and recurse.
*/
- cp2 = Var_Parse(cp, ctxt, errnum | VARF_WANTRES, &len,
- &freeIt);
+ cp2 = Var_Parse(cp, ctxt, errnum |
+ (flags & VARF_WANTRES), &len, &freeIt);
Buf_AddBytes(&buf, strlen(cp2), cp2);
free(freeIt);
cp += len - 1;
@@ -2292,7 +2292,7 @@
/*
* Find the end of this variable reference
* and suck it in without further ado.
- * It will be interperated later.
+ * It will be interpreted later.
*/
int have = *cp2;
int want = (*cp2 == PROPEN) ? PRCLOSE : BRCLOSE;
Home |
Main Index |
Thread Index |
Old Index