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 trailing whitespace in -dg1 deb...



details:   https://anonhg.NetBSD.org/src/rev/c5a7a581c395
branches:  trunk
changeset: 943498:c5a7a581c395
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Sep 05 06:46:12 2020 +0000

description:
make(1): remove trailing whitespace in -dg1 debug output

diffstat:

 usr.bin/make/suff.c                          |   8 ++++----
 usr.bin/make/targ.c                          |  20 ++++++++++----------
 usr.bin/make/unit-tests/opt-debug-graph1.exp |   4 +++-
 usr.bin/make/unit-tests/opt-debug-graph1.mk  |   6 ++++--
 4 files changed, 21 insertions(+), 17 deletions(-)

diffs (143 lines):

diff -r 79870bc701e5 -r c5a7a581c395 usr.bin/make/suff.c
--- a/usr.bin/make/suff.c       Sat Sep 05 06:36:40 2020 +0000
+++ b/usr.bin/make/suff.c       Sat Sep 05 06:46:12 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: suff.c,v 1.142 2020/08/31 16:44:25 rillig Exp $        */
+/*     $NetBSD: suff.c,v 1.143 2020/09/05 06:46:12 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: suff.c,v 1.142 2020/08/31 16:44:25 rillig Exp $";
+static char rcsid[] = "$NetBSD: suff.c,v 1.143 2020/09/05 06:46:12 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)suff.c     8.4 (Berkeley) 3/21/94";
 #else
-__RCSID("$NetBSD: suff.c,v 1.142 2020/08/31 16:44:25 rillig Exp $");
+__RCSID("$NetBSD: suff.c,v 1.143 2020/09/05 06:46:12 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -2234,7 +2234,7 @@
 {
     GNode   *t = (GNode *)tp;
 
-    fprintf(debug_file, "%-16s: ", t->name);
+    fprintf(debug_file, "%-16s:", t->name);
     Targ_PrintType(t->type);
     fputc('\n', debug_file);
     Lst_ForEach(t->commands, Targ_PrintCmd, NULL);
diff -r 79870bc701e5 -r c5a7a581c395 usr.bin/make/targ.c
--- a/usr.bin/make/targ.c       Sat Sep 05 06:36:40 2020 +0000
+++ b/usr.bin/make/targ.c       Sat Sep 05 06:46:12 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: targ.c,v 1.81 2020/09/01 20:54:00 rillig Exp $ */
+/*     $NetBSD: targ.c,v 1.82 2020/09/05 06:46:12 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: targ.c,v 1.81 2020/09/01 20:54:00 rillig Exp $";
+static char rcsid[] = "$NetBSD: targ.c,v 1.82 2020/09/05 06:46:12 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)targ.c     8.2 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: targ.c,v 1.81 2020/09/01 20:54:00 rillig Exp $");
+__RCSID("$NetBSD: targ.c,v 1.82 2020/09/05 06:46:12 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -406,8 +406,8 @@
 {
     int    tbit;
 
-#define PRINTBIT(attr) case CONCAT(OP_,attr): fprintf(debug_file, "." #attr " "); break
-#define PRINTDBIT(attr) case CONCAT(OP_,attr): if (DEBUG(TARG))fprintf(debug_file, "." #attr " "); break
+#define PRINTBIT(attr) case CONCAT(OP_,attr): fprintf(debug_file, " ." #attr); break
+#define PRINTDBIT(attr) case CONCAT(OP_,attr): if (DEBUG(TARG))fprintf(debug_file, " ." #attr); break
 
     type &= ~OP_OPMASK;
 
@@ -428,7 +428,7 @@
            PRINTBIT(NOTMAIN);
            PRINTDBIT(LIB);
            /*XXX: MEMBER is defined, so CONCAT(OP_,MEMBER) gives OP_"%" */
-           case OP_MEMBER: if (DEBUG(TARG))fprintf(debug_file, ".MEMBER "); break;
+           case OP_MEMBER: if (DEBUG(TARG))fprintf(debug_file, " .MEMBER"); break;
            PRINTDBIT(ARCHV);
            PRINTDBIT(MADE);
            PRINTDBIT(PHONY);
@@ -515,11 +515,11 @@
        fprintf(debug_file, "%-16s", gn->name);
        switch (gn->type & OP_OPMASK) {
            case OP_DEPENDS:
-               fprintf(debug_file, ": "); break;
+               fprintf(debug_file, ":"); break;
            case OP_FORCE:
-               fprintf(debug_file, "! "); break;
+               fprintf(debug_file, "!"); break;
            case OP_DOUBLEDEP:
-               fprintf(debug_file, ":: "); break;
+               fprintf(debug_file, "::"); break;
        }
        Targ_PrintType(gn->type);
        Lst_ForEach(gn->children, TargPrintName, NULL);
@@ -542,7 +542,7 @@
     if (!OP_NOP(gn->type))
        return 0;
 
-    fprintf(debug_file, "#\t%s [%s] ",
+    fprintf(debug_file, "#\t%s [%s]",
            gn->name, gn->path ? gn->path : gn->name);
     Targ_PrintType(gn->type);
     fprintf(debug_file, "\n");
diff -r 79870bc701e5 -r c5a7a581c395 usr.bin/make/unit-tests/opt-debug-graph1.exp
--- a/usr.bin/make/unit-tests/opt-debug-graph1.exp      Sat Sep 05 06:36:40 2020 +0000
+++ b/usr.bin/make/unit-tests/opt-debug-graph1.exp      Sat Sep 05 06:46:12 2020 +0000
@@ -5,11 +5,13 @@
 # made-source, made UNMADE, type OP_DEPENDS, flags none
 # unmade-target, made UNMADE, type OP_DEPENDS, flags none
 # unmade-sources, made UNMADE, type none, flags none
+# unmade-silent-source, made UNMADE, type OP_SILENT, flags none
 # unmade-target-no-sources, made UNMADE, type OP_DEPENDS, flags none
 
 
 #
 #   Files that are only sources:
-#      unmade-sources [unmade-sources] 
+#      unmade-sources [unmade-sources]
+#      unmade-silent-source [unmade-silent-source] .SILENT
 #*** Transformations:
 exit status 0
diff -r 79870bc701e5 -r c5a7a581c395 usr.bin/make/unit-tests/opt-debug-graph1.mk
--- a/usr.bin/make/unit-tests/opt-debug-graph1.mk       Sat Sep 05 06:36:40 2020 +0000
+++ b/usr.bin/make/unit-tests/opt-debug-graph1.mk       Sat Sep 05 06:46:12 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: opt-debug-graph1.mk,v 1.2 2020/09/05 06:36:40 rillig Exp $
+# $NetBSD: opt-debug-graph1.mk,v 1.3 2020/09/05 06:46:12 rillig Exp $
 #
 # Tests for the -dg1 command line option, which prints the input
 # graph before making anything.
@@ -13,7 +13,9 @@
 
 made-target-no-sources:
 
-unmade-target: unmade-sources
+unmade-target: unmade-sources unmade-silent-source
+
+.SILENT: unmade-silent-source
 
 unmade-target-no-sources:
 



Home | Main Index | Thread Index | Old Index