Add a -Dg3 which outputs the 'input graph' only on error exit.

Lets you see the wood for the trees...
This commit is contained in:
dsl 2003-12-07 20:30:28 +00:00
parent 1edf98ec41
commit 7da2fe51b3
3 changed files with 13 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.93 2003/09/10 18:04:22 jmmv Exp $ */
/* $NetBSD: main.c,v 1.94 2003/12/07 20:30:28 dsl Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -69,7 +69,7 @@
*/
#ifdef MAKE_BOOTSTRAP
static char rcsid[] = "$NetBSD: main.c,v 1.93 2003/09/10 18:04:22 jmmv Exp $";
static char rcsid[] = "$NetBSD: main.c,v 1.94 2003/12/07 20:30:28 dsl Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993\n\
#if 0
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
#else
__RCSID("$NetBSD: main.c,v 1.93 2003/09/10 18:04:22 jmmv Exp $");
__RCSID("$NetBSD: main.c,v 1.94 2003/12/07 20:30:28 dsl Exp $");
#endif
#endif /* not lint */
#endif
@ -328,6 +328,10 @@ rearg: while((c = getopt(argc, argv, OPTFLAGS)) != -1) {
debug |= DEBUG_GRAPH2;
++modules;
}
else if (modules[1] == '3') {
debug |= DEBUG_GRAPH3;
++modules;
}
break;
case 'j':
debug |= DEBUG_JOB;
@ -1423,7 +1427,7 @@ Fatal(const char *fmt, ...)
PrintOnError(NULL);
if (DEBUG(GRAPH2))
if (DEBUG(GRAPH2) || DEBUG(GRAPH3))
Targ_PrintGraph(2);
Trace_Log(MAKEERROR, 0);
exit(2); /* Not 1 so -q can distinguish error */

View File

@ -1,4 +1,4 @@
.\" $NetBSD: make.1,v 1.91 2003/11/07 01:01:46 lukem Exp $
.\" $NetBSD: make.1,v 1.92 2003/12/07 20:30:28 dsl Exp $
.\"
.\" Copyright (c) 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@ -124,7 +124,8 @@ Print debugging information about loop evaluation.
Print the input graph before making anything.
.It Ar "g2"
Print the input graph after making everything, or before exiting
on error.
.It Ar "g3"
Print the input graph before exiting on error.
.It Ar j
Print debugging information about running multiple shells.
.It Ar m

View File

@ -1,4 +1,4 @@
/* $NetBSD: make.h,v 1.49 2003/09/27 21:29:37 sjg Exp $ */
/* $NetBSD: make.h,v 1.50 2003/12/07 20:30:28 dsl Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -413,6 +413,7 @@ extern int debug;
#define DEBUG_FOR 0x0400
#define DEBUG_SHELL 0x0800
#define DEBUG_ERROR 0x1000
#define DEBUG_GRAPH3 0x10000
#define CONCAT(a,b) a##b