From 17b80016d68e8bbedfe3006cfd75f0b6ac6a269c Mon Sep 17 00:00:00 2001 From: will Date: Sun, 14 May 2000 22:24:28 +0000 Subject: Add loud debugging facility (-dl option) which allows programmers/developers to override @-prefixed commands in Makefiles. It is especially useful for debugging ports and/or complex Makefiles in such a manner that is basically a last resort, but is quite effective if the output is well-handled. I'll update the manpage after dinner. ;-) Better patch submitted by: steve Reviewed by: phk, steve, chuckr, obrien, Lyndon Nerenberg --- usr.bin/make/compat.c | 2 +- usr.bin/make/job.c | 2 +- usr.bin/make/main.c | 3 +++ usr.bin/make/make.h | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) (limited to 'usr.bin/make') diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c index f9f7e79..4e14429 100644 --- a/usr.bin/make/compat.c +++ b/usr.bin/make/compat.c @@ -240,7 +240,7 @@ CompatRunCommand (cmdp, gnp) while ((*cmd == '@') || (*cmd == '-')) { if (*cmd == '@') { - silent = TRUE; + silent = DEBUG(LOUD) ? FALSE : TRUE; } else { errCheck = FALSE; } diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c index 2fa1e0c..5e318e7 100644 --- a/usr.bin/make/job.c +++ b/usr.bin/make/job.c @@ -555,7 +555,7 @@ JobPrintCommand(cmdp, jobp) */ while (*cmd == '@' || *cmd == '-') { if (*cmd == '@') { - shutUp = TRUE; + shutUp = DEBUG(LOUD) ? FALSE : TRUE; } else { errOff = TRUE; } diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index ae3f820..3fe39ed 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -262,6 +262,9 @@ rearg: while((c = getopt(argc, argv, OPTFLAGS)) != -1) { case 'j': debug |= DEBUG_JOB; break; + case 'l': + debug |= DEBUG_LOUD; + break; case 'm': debug |= DEBUG_MAKE; break; diff --git a/usr.bin/make/make.h b/usr.bin/make/make.h index 874eaa6..5d7eb3d 100644 --- a/usr.bin/make/make.h +++ b/usr.bin/make/make.h @@ -360,6 +360,7 @@ extern int debug; #define DEBUG_TARG 0x0100 #define DEBUG_VAR 0x0200 #define DEBUG_FOR 0x0400 +#define DEBUG_LOUD 0x0800 #ifdef __STDC__ #define CONCAT(a,b) a##b -- cgit v1.1