Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make Add a -Dg3 which outputs the 'input graph' only...



details:   https://anonhg.NetBSD.org/src/rev/da3bafd0d2bd
branches:  trunk
changeset: 556123:da3bafd0d2bd
user:      dsl <dsl%NetBSD.org@localhost>
date:      Sun Dec 07 20:30:28 2003 +0000

description:
Add a -Dg3 which outputs the 'input graph' only on error exit.
Lets you see the wood for the trees...

diffstat:

 usr.bin/make/main.c |  12 ++++++++----
 usr.bin/make/make.1 |   5 +++--
 usr.bin/make/make.h |   3 ++-
 3 files changed, 13 insertions(+), 7 deletions(-)

diffs (83 lines):

diff -r 35acf523a36f -r da3bafd0d2bd usr.bin/make/main.c
--- a/usr.bin/make/main.c       Sun Dec 07 20:29:07 2003 +0000
+++ b/usr.bin/make/main.c       Sun Dec 07 20:30:28 2003 +0000
@@ -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 @@
 #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 @@
                                                debug |= DEBUG_GRAPH2;
                                                ++modules;
                                        }
+                                       else if (modules[1] == '3') {
+                                               debug |= DEBUG_GRAPH3;
+                                               ++modules;
+                                       }
                                        break;
                                case 'j':
                                        debug |= DEBUG_JOB;
@@ -1423,7 +1427,7 @@
 
        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 */
diff -r 35acf523a36f -r da3bafd0d2bd usr.bin/make/make.1
--- a/usr.bin/make/make.1       Sun Dec 07 20:29:07 2003 +0000
+++ b/usr.bin/make/make.1       Sun Dec 07 20:30:28 2003 +0000
@@ -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 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
diff -r 35acf523a36f -r da3bafd0d2bd usr.bin/make/make.h
--- a/usr.bin/make/make.h       Sun Dec 07 20:29:07 2003 +0000
+++ b/usr.bin/make/make.h       Sun Dec 07 20:30:28 2003 +0000
@@ -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 @@
 #define DEBUG_FOR      0x0400
 #define DEBUG_SHELL    0x0800
 #define DEBUG_ERROR    0x1000
+#define        DEBUG_GRAPH3    0x10000
 
 #define CONCAT(a,b)    a##b
 



Home | Main Index | Thread Index | Old Index