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): remove obsolete fix for PR bin/29985



details:   https://anonhg.NetBSD.org/src/rev/7176f1f0bd45
branches:  trunk
changeset: 944187:7176f1f0bd45
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Sep 22 19:08:47 2020 +0000

description:
make(1): remove obsolete fix for PR bin/29985

diffstat:

 usr.bin/make/unit-tests/directive-for.exp |   2 ++
 usr.bin/make/unit-tests/directive-for.mk  |   4 ++--
 usr.bin/make/var.c                        |  10 ++--------
 3 files changed, 6 insertions(+), 10 deletions(-)

diffs (74 lines):

diff -r 85cec40a876f -r 7176f1f0bd45 usr.bin/make/unit-tests/directive-for.exp
--- a/usr.bin/make/unit-tests/directive-for.exp Tue Sep 22 18:54:50 2020 +0000
+++ b/usr.bin/make/unit-tests/directive-for.exp Tue Sep 22 19:08:47 2020 +0000
@@ -1,3 +1,5 @@
 make: "directive-for.mk" line 100: outer
 make: "directive-for.mk" line 125: a:\ a:\file.txt
+make: "directive-for.mk" line 125: d:\\
+make: "directive-for.mk" line 125: d:\\file.txt
 exit status 0
diff -r 85cec40a876f -r 7176f1f0bd45 usr.bin/make/unit-tests/directive-for.mk
--- a/usr.bin/make/unit-tests/directive-for.mk  Tue Sep 22 18:54:50 2020 +0000
+++ b/usr.bin/make/unit-tests/directive-for.mk  Tue Sep 22 19:08:47 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: directive-for.mk,v 1.4 2020/09/22 18:54:51 rillig Exp $
+# $NetBSD: directive-for.mk,v 1.5 2020/09/22 19:08:48 rillig Exp $
 #
 # Tests for the .for directive.
 
@@ -121,7 +121,7 @@
 # interpreted as part of the code.  Because of this, the trailingBackslash
 # hack in Var_Subst is no longer needed and as of 2020-09-22, has been
 # removed.
-.for path in a:\ a:\file.txt
+.for path in a:\ a:\file.txt d:\\ d:\\file.txt
 .  info ${path}
 .endfor
 
diff -r 85cec40a876f -r 7176f1f0bd45 usr.bin/make/var.c
--- a/usr.bin/make/var.c        Tue Sep 22 18:54:50 2020 +0000
+++ b/usr.bin/make/var.c        Tue Sep 22 19:08:47 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.531 2020/09/22 18:07:58 rillig Exp $ */
+/*     $NetBSD: var.c,v 1.532 2020/09/22 19:08:47 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -121,7 +121,7 @@
 #include    "metachar.h"
 
 /*     "@(#)var.c      8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.531 2020/09/22 18:07:58 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.532 2020/09/22 19:08:47 rillig Exp $");
 
 #define VAR_DEBUG_IF(cond, fmt, ...)   \
     if (!(DEBUG(VAR) && (cond)))       \
@@ -3709,7 +3709,6 @@
 Var_Subst(const char *str, GNode *ctxt, VarEvalFlags eflags)
 {
     Buffer buf;                        /* Buffer for forming things */
-    Boolean trailingBackslash;
 
     /* Set true if an error has already been reported,
      * to prevent a plethora of messages when recursing */
@@ -3717,12 +3716,8 @@
 
     Buf_Init(&buf, 0);
     errorReported = FALSE;
-    trailingBackslash = FALSE; /* variable ends in \ */
 
     while (*str) {
-       if (*str == '\n' && trailingBackslash)
-           Buf_AddByte(&buf, ' ');
-
        if (*str == '$' && str[1] == '$') {
            /*
             * A dollar sign may be escaped with another dollar sign.
@@ -3782,7 +3777,6 @@
 
                val_len = strlen(val);
                Buf_AddBytes(&buf, val, val_len);
-               trailingBackslash = val_len > 0 && val[val_len - 1] == '\\';
            }
            free(freeIt);
            freeIt = NULL;



Home | Main Index | Thread Index | Old Index