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 regression and add test for empty ...



details:   https://anonhg.NetBSD.org/src/rev/c7b00dd59616
branches:  trunk
changeset: 936606:c7b00dd59616
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Jul 31 20:02:44 2020 +0000

description:
make(1): fix regression and add test for empty brace expansion

This had been broken in r1.80 of dir.c, a few minutes ago.

diffstat:

 usr.bin/make/dir.c              |  8 ++++----
 usr.bin/make/unit-tests/dir.exp |  4 ++++
 usr.bin/make/unit-tests/dir.mk  |  7 ++++++-
 3 files changed, 14 insertions(+), 5 deletions(-)

diffs (65 lines):

diff -r 87a03d3f5c6d -r c7b00dd59616 usr.bin/make/dir.c
--- a/usr.bin/make/dir.c        Fri Jul 31 20:01:42 2020 +0000
+++ b/usr.bin/make/dir.c        Fri Jul 31 20:02:44 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dir.c,v 1.80 2020/07/31 19:50:44 rillig Exp $  */
+/*     $NetBSD: dir.c,v 1.81 2020/07/31 20:02:44 rillig Exp $  */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: dir.c,v 1.80 2020/07/31 19:50:44 rillig Exp $";
+static char rcsid[] = "$NetBSD: dir.c,v 1.81 2020/07/31 20:02:44 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)dir.c      8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: dir.c,v 1.80 2020/07/31 19:50:44 rillig Exp $");
+__RCSID("$NetBSD: dir.c,v 1.81 2020/07/31 20:02:44 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -752,7 +752,7 @@
     /* Split the middle into pieces, separated by commas. */
 
     const char *piece = middle;
-    while (piece < middle_end) {
+    while (piece < middle_end + 1) {
        const char *piece_end = separator_comma(piece);
        size_t piece_len = (size_t)(piece_end - piece);
 
diff -r 87a03d3f5c6d -r c7b00dd59616 usr.bin/make/unit-tests/dir.exp
--- a/usr.bin/make/unit-tests/dir.exp   Fri Jul 31 20:01:42 2020 +0000
+++ b/usr.bin/make/unit-tests/dir.exp   Fri Jul 31 20:02:44 2020 +0000
@@ -6,4 +6,8 @@
 13
 14
 15
+pre-patch
+pre-configure
+patch
+configure
 exit status 0
diff -r 87a03d3f5c6d -r c7b00dd59616 usr.bin/make/unit-tests/dir.mk
--- a/usr.bin/make/unit-tests/dir.mk    Fri Jul 31 20:01:42 2020 +0000
+++ b/usr.bin/make/unit-tests/dir.mk    Fri Jul 31 20:02:44 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: dir.mk,v 1.1 2020/07/31 16:42:51 rillig Exp $
+# $NetBSD: dir.mk,v 1.2 2020/07/31 20:02:44 rillig Exp $
 #
 # Tests for dir.c.
 
@@ -31,3 +31,8 @@
        @echo 14
 fifteen:
        @echo 15
+
+all: {pre-,}{patch,configure}
+
+pre-patch patch pre-configure configure:
+       @echo $@



Home | Main Index | Thread Index | Old Index