Subject: make -v
To: None <tech-userlevel@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-userlevel
Date: 12/27/2003 20:11:08
--NextPart-20031227200702-0757000
Content-Type: Text/Plain; charset=us-ascii

hi,

is it ok to bring in make -v option from freebsd?
diffs are attached.  (and i'll take manpage part, of course.)

YAMAMOTO Takashi


--NextPart-20031227200702-0757000
Content-Type: Text/Plain; charset=us-ascii
Content-Disposition: attachment; filename="make.opt_v.diff"

Index: job.c
===================================================================
RCS file: /cvs/NetBSD/src/usr.bin/make/job.c,v
retrieving revision 1.82
diff -u -p -r1.82 job.c
--- job.c	2003/08/07 11:14:51	1.82
+++ job.c	2003/12/27 11:06:12
@@ -2630,7 +2630,7 @@ Job_Init(int maxproc, int maxlocal)
 
     lastNode =	  NILGNODE;
 
-    if (maxJobs == 1
+    if (maxJobs == 1 || beVerbose == 0
 #ifdef REMOTE
 	|| noMessages
 #endif
Index: main.c
===================================================================
RCS file: /cvs/NetBSD/src/usr.bin/make/main.c,v
retrieving revision 1.93
diff -u -p -r1.93 main.c
--- main.c	2003/09/10 18:04:22	1.93
+++ main.c	2003/12/27 11:06:12
@@ -167,6 +167,7 @@ Boolean			touchFlag;	/* -t flag */
 Boolean			usePipes;	/* !-P flag */
 Boolean			ignoreErrors;	/* -i flag */
 Boolean			beSilent;	/* -s flag */
+Boolean			beVerbose;	/* -v flag */
 Boolean			oldVars;	/* variable substitution style */
 Boolean			checkEnvFirst;	/* -e flag */
 Boolean			parseWarnFatal;	/* -W flag */
@@ -209,9 +210,9 @@ MainParseArgs(int argc, char **argv)
 
 	optind = 1;	/* since we're called more than once */
 #ifdef REMOTE
-# define OPTFLAGS "BD:I:J:L:NPST:V:WXd:ef:ij:km:nqrst"
+# define OPTFLAGS "BD:I:J:L:NPST:V:WXd:ef:ij:km:nqrstv"
 #else
-# define OPTFLAGS "BD:I:J:NPST:V:WXd:ef:ij:km:nqrst"
+# define OPTFLAGS "BD:I:J:NPST:V:WXd:ef:ij:km:nqrstv"
 #endif
 rearg:	while((c = getopt(argc, argv, OPTFLAGS)) != -1) {
 		switch(c) {
@@ -411,6 +412,10 @@ rearg:	while((c = getopt(argc, argv, OPT
 		case 't':
 			touchFlag = TRUE;
 			Var_Append(MAKEFLAGS, "-t", VAR_GLOBAL);
+			break;
+		case 'v':
+			beVerbose = TRUE;
+			Var_Append(MAKEFLAGS, "-v", VAR_GLOBAL);
 			break;
 		default:
 		case '?':
Index: make.h
===================================================================
RCS file: /cvs/NetBSD/src/usr.bin/make/make.h,v
retrieving revision 1.49
diff -u -p -r1.49 make.h
--- make.h	2003/09/27 21:29:37	1.49
+++ make.h	2003/12/27 11:06:12
@@ -344,6 +344,7 @@ extern Lst     	dirSearchPath; 	/* The l
 extern Boolean	compatMake;	/* True if we are make compatible */
 extern Boolean	ignoreErrors;  	/* True if should ignore all errors */
 extern Boolean  beSilent;    	/* True if should print no commands */
+extern Boolean  beVerbose;    	/* True if should print extra cruft */
 extern Boolean  noExecute;    	/* True if should execute nothing */
 extern Boolean  noRecursiveExecute;    	/* True if should execute nothing */
 extern Boolean  allPrecious;   	/* True if every target is precious */

--NextPart-20031227200702-0757000--