make(1): clean up debug logging

This commit is contained in:
rillig 2020-12-07 23:59:59 +00:00
parent b75505322d
commit 2125e11bfd
2 changed files with 7 additions and 9 deletions

View File

@ -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);

View File

@ -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");