Module Name: src
Committed By: rillig
Date: Sun Oct 25 22:13:53 UTC 2020
Modified Files:
src/usr.bin/make: suff.c
src/usr.bin/make/unit-tests: suff-lookup.exp
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.225 -r1.226 src/usr.bin/make/suff.c
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/suff-lookup.exp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/suff.c
diff -u src/usr.bin/make/suff.c:1.225 src/usr.bin/make/suff.c:1.226
--- src/usr.bin/make/suff.c:1.225 Sun Oct 25 21:51:49 2020
+++ src/usr.bin/make/suff.c Sun Oct 25 22:13:53 2020
@@ -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 @@ Suff_FindPath(GNode* gn)
}
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 */
}
}
Index: src/usr.bin/make/unit-tests/suff-lookup.exp
diff -u src/usr.bin/make/unit-tests/suff-lookup.exp:1.2 src/usr.bin/make/unit-tests/suff-lookup.exp:1.3
--- src/usr.bin/make/unit-tests/suff-lookup.exp:1.2 Sat Oct 24 03:18:22 2020
+++ src/usr.bin/make/unit-tests/suff-lookup.exp Sun Oct 25 22:13:53 2020
@@ -28,10 +28,12 @@ inserting ".sho" (5) at end of list
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 @@ Wildcard expanding "suff-lookup.cc"...su
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"...