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): skip variable expansion in ParseDepend...



details:   https://anonhg.NetBSD.org/src/rev/83e1ef9fa393
branches:  trunk
changeset: 979393:83e1ef9fa393
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Dec 27 18:22:28 2020 +0000

description:
make(1): skip variable expansion in ParseDependencyTargetWord

The goal of the code is just to skip over the variable expression, thus
there is no need to evaluate it.

diffstat:

 usr.bin/make/parse.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (30 lines):

diff -r f71283286f13 -r 83e1ef9fa393 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Sun Dec 27 18:20:26 2020 +0000
+++ b/usr.bin/make/parse.c      Sun Dec 27 18:22:28 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.518 2020/12/27 11:47:04 rillig Exp $       */
+/*     $NetBSD: parse.c,v 1.519 2020/12/27 18:22:28 rillig Exp $       */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -117,7 +117,7 @@
 #include "pathnames.h"
 
 /*     "@(#)parse.c    8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.518 2020/12/27 11:47:04 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.519 2020/12/27 18:22:28 rillig Exp $");
 
 /* types and constants */
 
@@ -1084,9 +1084,8 @@
                        const char *nested_p = cp;
                        FStr nested_val;
 
-                       /* XXX: Why VARE_WANTRES? */
-                       (void)Var_Parse(&nested_p, VAR_CMDLINE,
-                           VARE_WANTRES | VARE_UNDEFERR, &nested_val);
+                       (void)Var_Parse(&nested_p, VAR_CMDLINE, VARE_NONE,
+                           &nested_val);
                        /* TODO: handle errors */
                        FStr_Done(&nested_val);
                        cp += nested_p - cp;



Home | Main Index | Thread Index | Old Index