Module Name:    src
Committed By:   rillig
Date:           Mon Dec  7 23:59:59 UTC 2020

Modified Files:
        src/usr.bin/make: job.c targ.c

Log Message:
make(1): clean up debug logging


To generate a diff of this commit:
cvs rdiff -u -r1.342 -r1.343 src/usr.bin/make/job.c
cvs rdiff -u -r1.153 -r1.154 src/usr.bin/make/targ.c

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/job.c
diff -u src/usr.bin/make/job.c:1.342 src/usr.bin/make/job.c:1.343
--- src/usr.bin/make/job.c:1.342	Mon Dec  7 23:53:09 2020
+++ src/usr.bin/make/job.c	Mon Dec  7 23:59:59 2020
@@ -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 @@ JobPassSig_suspend(int signo)
 	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 @@ EscapeShellDblQuot(const char *cmd)
 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);

Index: src/usr.bin/make/targ.c
diff -u src/usr.bin/make/targ.c:1.153 src/usr.bin/make/targ.c:1.154
--- src/usr.bin/make/targ.c:1.153	Sun Dec  6 10:49:02 2020
+++ src/usr.bin/make/targ.c	Mon Dec  7 23:59:59 2020
@@ -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 @@ Targ_PrintType(int type)
 
 		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");

Reply via email to