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): clean up debug logging



details:   https://anonhg.NetBSD.org/src/rev/88e4a8ff65d7
branches:  trunk
changeset: 957714:88e4a8ff65d7
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Dec 07 23:59:59 2020 +0000

description:
make(1): clean up debug logging

diffstat:

 usr.bin/make/job.c  |  10 ++++------
 usr.bin/make/targ.c |   6 +++---
 2 files changed, 7 insertions(+), 9 deletions(-)

diffs (65 lines):

diff -r 9ed669dbd38a -r 88e4a8ff65d7 usr.bin/make/job.c
--- a/usr.bin/make/job.c        Mon Dec 07 23:53:09 2020 +0000
+++ b/usr.bin/make/job.c        Mon Dec 07 23:59:59 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: job.c,v 1.342 2020/12/07 23:53:09 rillig Exp $ */
+/*     $NetBSD: job.c,v 1.343 2020/12/07 23:59:59 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -143,7 +143,7 @@
 #include "trace.h"
 
 /*     "@(#)job.c      8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: job.c,v 1.342 2020/12/07 23:53:09 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.343 2020/12/07 23:59:59 rillig Exp $");
 
 /*
  * A shell defines how the commands are run.  All commands for a target are
@@ -626,8 +626,7 @@
        act.sa_flags = 0;
        (void)sigaction(signo, &act, NULL);
 
-       if (DEBUG(JOB))
-               debug_printf("JobPassSig passing signal %d to self.\n", signo);
+       DEBUG1(JOB, "JobPassSig passing signal %d to self.\n", signo);
 
        (void)kill(getpid(), signo);
 
@@ -719,8 +718,7 @@
 static void
 JobPrintf(Job *job, const char *fmt, const char *arg)
 {
-       if (DEBUG(JOB))
-               debug_printf(fmt, arg);
+       DEBUG1(JOB, fmt, arg);
 
        (void)fprintf(job->cmdFILE, fmt, arg);
        (void)fflush(job->cmdFILE);
diff -r 9ed669dbd38a -r 88e4a8ff65d7 usr.bin/make/targ.c
--- a/usr.bin/make/targ.c       Mon Dec 07 23:53:09 2020 +0000
+++ b/usr.bin/make/targ.c       Mon Dec 07 23:59:59 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: targ.c,v 1.153 2020/12/06 10:49:02 rillig Exp $        */
+/*     $NetBSD: targ.c,v 1.154 2020/12/07 23:59:59 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -119,7 +119,7 @@
 #include "dir.h"
 
 /*     "@(#)targ.c     8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: targ.c,v 1.153 2020/12/06 10:49:02 rillig Exp $");
+MAKE_RCSID("$NetBSD: targ.c,v 1.154 2020/12/07 23:59:59 rillig Exp $");
 
 /*
  * All target nodes that appeared on the left-hand side of one of the
@@ -452,7 +452,7 @@
 
                switch (tbit) {
 #define PRINTBIT(bit, attr) case bit: debug_printf(" " attr); break
-#define PRINTDBIT(bit, attr) case bit: if (DEBUG(TARG)) debug_printf(" " attr); break
+#define PRINTDBIT(bit, attr) case bit: DEBUG0(TARG, " " attr); break
                PRINTBIT(OP_OPTIONAL, ".OPTIONAL");
                PRINTBIT(OP_USE, ".USE");
                PRINTBIT(OP_EXEC, ".EXEC");



Home | Main Index | Thread Index | Old Index