Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make make(1): move debugVflag to CmdOpts



details:   https://anonhg.NetBSD.org/src/rev/069c34f542a8
branches:  trunk
changeset: 1015599:069c34f542a8
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Oct 27 07:03:55 2020 +0000

description:
make(1): move debugVflag to CmdOpts

diffstat:

 usr.bin/make/main.c |  11 +++++------
 usr.bin/make/make.h |   5 ++++-
 2 files changed, 9 insertions(+), 7 deletions(-)

diffs (72 lines):

diff -r 7f4402639fac -r 069c34f542a8 usr.bin/make/main.c
--- a/usr.bin/make/main.c       Tue Oct 27 06:59:20 2020 +0000
+++ b/usr.bin/make/main.c       Tue Oct 27 07:03:55 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.393 2020/10/27 06:59:20 rillig Exp $        */
+/*     $NetBSD: main.c,v 1.394 2020/10/27 07:03:55 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -118,7 +118,7 @@
 #include "trace.h"
 
 /*     "@(#)main.c     8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: main.c,v 1.393 2020/10/27 06:59:20 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.394 2020/10/27 07:03:55 rillig Exp $");
 #if defined(MAKE_NATIVE) && !defined(lint)
 __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
            "The Regents of the University of California.  "
@@ -136,7 +136,6 @@
 Boolean                        deleteOnError;  /* .DELETE_ON_ERROR: set */
 
 static int             maxJobTokens;   /* -j argument */
-Boolean                        debugVflag;     /* -dV */
 Boolean                        enterFlagObj;   /* -w and objdir != srcdir */
 
 Boolean                        oldVars;        /* variable substitution style */
@@ -310,7 +309,7 @@
                        opts.debug |= DEBUG_TARG;
                        break;
                case 'V':
-                       debugVflag = TRUE;
+                       opts.debugVflag = TRUE;
                        break;
                case 'v':
                        opts.debug |= DEBUG_VAR;
@@ -873,7 +872,7 @@
 
        if (opts.printVars == EXPAND_VARS)
                expandVars = TRUE;
-       else if (debugVflag)
+       else if (opts.debugVflag)
                expandVars = FALSE;
        else
                expandVars = getBoolean(".MAKE.EXPAND_VARIABLES", FALSE);
@@ -1159,7 +1158,7 @@
        opts.create = Lst_New();
        opts.makefiles = Lst_New();
        opts.printVars = 0;
-       debugVflag = FALSE;
+       opts.debugVflag = FALSE;
        opts.variables = Lst_New();
        opts.beSilent = FALSE;          /* Print commands as executed */
        opts.ignoreErrors = FALSE;      /* Pay attention to non-zero returns */
diff -r 7f4402639fac -r 069c34f542a8 usr.bin/make/make.h
--- a/usr.bin/make/make.h       Tue Oct 27 06:59:20 2020 +0000
+++ b/usr.bin/make/make.h       Tue Oct 27 07:03:55 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: make.h,v 1.173 2020/10/26 21:34:10 rillig Exp $        */
+/*     $NetBSD: make.h,v 1.174 2020/10/27 07:03:55 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -549,6 +549,9 @@
     /* -df: debug output is written here - default stderr */
     FILE *debug_file;
 
+    /* -dV: for the -V option, print unexpanded variable values */
+    Boolean debugVflag;
+
     /* -e: check environment variables before global variables */
     Boolean checkEnvFirst;
 



Home | Main Index | Thread Index | Old Index