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): properly terminate debug output with n...



details:   https://anonhg.NetBSD.org/src/rev/782366db264e
branches:  trunk
changeset: 945325:782366db264e
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Oct 25 22:13:53 2020 +0000

description:
make(1): properly terminate debug output with newline

Without this, NetBSD's sed adds the missing newline at the end of the
file, while other sed implementations don't do that.

diffstat:

 usr.bin/make/suff.c                     |  12 +++++-------
 usr.bin/make/unit-tests/suff-lookup.exp |  17 ++++++++++++-----
 2 files changed, 17 insertions(+), 12 deletions(-)

diffs (74 lines):

diff -r 8a916760feb6 -r 782366db264e usr.bin/make/suff.c
--- a/usr.bin/make/suff.c       Sun Oct 25 22:05:00 2020 +0000
+++ b/usr.bin/make/suff.c       Sun Oct 25 22:13:53 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: suff.c,v 1.225 2020/10/25 21:51:49 rillig Exp $        */
+/*     $NetBSD: suff.c,v 1.226 2020/10/25 22:13:53 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -129,7 +129,7 @@
 #include "dir.h"
 
 /*     "@(#)suff.c     8.4 (Berkeley) 3/21/94" */
-MAKE_RCSID("$NetBSD: suff.c,v 1.225 2020/10/25 21:51:49 rillig Exp $");
+MAKE_RCSID("$NetBSD: suff.c,v 1.226 2020/10/25 22:13:53 rillig Exp $");
 
 #define SUFF_DEBUG0(text) DEBUG0(SUFF, text)
 #define SUFF_DEBUG1(fmt, arg1) DEBUG1(SUFF, fmt, arg1)
@@ -1348,13 +1348,11 @@
     }
 
     if (suff != NULL) {
-       SUFF_DEBUG1("suffix is \"%s\"...", suff->name);
+       SUFF_DEBUG1("suffix is \"%s\"...\n", suff->name);
        return suff->searchPath;
     } else {
-       /*
-        * Use default search path
-        */
-       return dirSearchPath;
+        SUFF_DEBUG0("\n");
+       return dirSearchPath;   /* Use default search path */
     }
 }
 
diff -r 8a916760feb6 -r 782366db264e usr.bin/make/unit-tests/suff-lookup.exp
--- a/usr.bin/make/unit-tests/suff-lookup.exp   Sun Oct 25 22:05:00 2020 +0000
+++ b/usr.bin/make/unit-tests/suff-lookup.exp   Sun Oct 25 22:13:53 2020 +0000
@@ -28,10 +28,12 @@
 inserting ".c" (1) at end of list
 inserting ".dead-end" (6) at end of list
 inserting ".short" (4) at end of list
-Wildcard expanding "all"...SuffFindDeps (all)
+Wildcard expanding "all"...
+SuffFindDeps (all)
        No known suffix on all. Using .NULL suffix
 adding suffix rules
-Wildcard expanding "suff-lookup.cc"...suffix is ".cc"...SuffFindDeps (suff-lookup.cc)
+Wildcard expanding "suff-lookup.cc"...suffix is ".cc"...
+SuffFindDeps (suff-lookup.cc)
        trying suff-lookup.ccc...not there
        trying suff-lookup.c...not there
        trying suff-lookup.short...not there
@@ -39,12 +41,17 @@
        applying .sho -> .c to "suff-lookup.c"
        applying .c -> .ccc to "suff-lookup.ccc"
        applying .ccc -> .cc to "suff-lookup.cc"
-suffix is ".ccc"...suffix is ".c"...suffix is ".sho"...SuffFindDeps (suff-lookup.sho)
-suffix is ".sho"...: 'Making suff-lookup.sho out of nothing.'
+suffix is ".ccc"...
+suffix is ".c"...
+suffix is ".sho"...
+SuffFindDeps (suff-lookup.sho)
+suffix is ".sho"...
+: 'Making suff-lookup.sho out of nothing.'
 : 'Making suff-lookup.c from suff-lookup.sho.'
 : 'Making suff-lookup.ccc from suff-lookup.c.'
 : 'Making suff-lookup.cc from suff-lookup.ccc.'
-Wildcard expanding "all"...SuffFindDeps (.END)
+Wildcard expanding "all"...
+SuffFindDeps (.END)
        No known suffix on .END. Using .NULL suffix
 adding suffix rules
 Wildcard expanding ".END"...



Home | Main Index | Thread Index | Old Index