Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make Recognize -- (dash dash) and apply the usual in...
details: https://anonhg.NetBSD.org/src/rev/3f8a811cf1f9
branches: trunk
changeset: 565891:3f8a811cf1f9
user: ross <ross%NetBSD.org@localhost>
date: Thu Apr 22 21:19:02 2004 +0000
description:
Recognize -- (dash dash) and apply the usual interpretation.
Notes:
* The immediately previous version of make errored out on --,
which is what needs fixing.
* Historic bsd make silently ate -- and continued to process
options, so this is a behavior change from that, too, but presumably
there is more to gain in fixing it than in being bug-compatible.
diffstat:
usr.bin/make/main.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diffs (64 lines):
diff -r 3888a2699e98 -r 3f8a811cf1f9 usr.bin/make/main.c
--- a/usr.bin/make/main.c Thu Apr 22 18:01:47 2004 +0000
+++ b/usr.bin/make/main.c Thu Apr 22 21:19:02 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.100 2004/03/27 00:17:08 enami Exp $ */
+/* $NetBSD: main.c,v 1.101 2004/04/22 21:19:02 ross Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
*/
#ifdef MAKE_BOOTSTRAP
-static char rcsid[] = "$NetBSD: main.c,v 1.100 2004/03/27 00:17:08 enami Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.101 2004/04/22 21:19:02 ross 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.100 2004/03/27 00:17:08 enami Exp $");
+__RCSID("$NetBSD: main.c,v 1.101 2004/04/22 21:19:02 ross Exp $");
#endif
#endif /* not lint */
#endif
@@ -210,7 +210,7 @@
char *argvalue;
const char *getopt_def;
char *optscan;
- Boolean inOption;
+ Boolean inOption, dashDash = FALSE;
char found_path[MAXPATHLEN + 1]; /* for searching for sys.mk */
#ifdef REMOTE
@@ -239,7 +239,7 @@
continue;
}
} else {
- if (c != '-')
+ if (c != '-' || dashDash)
break;
inOption = TRUE;
c = *optscan++;
@@ -478,6 +478,9 @@
touchFlag = TRUE;
Var_Append(MAKEFLAGS, "-t", VAR_GLOBAL);
break;
+ case '-':
+ dashDash = TRUE;
+ break;
default:
case '?':
usage();
@@ -499,7 +502,7 @@
} else {
if (!*argv[1])
Punt("illegal (null) argument.");
- if (*argv[1] == '-')
+ if (*argv[1] == '-' && !dashDash)
goto rearg;
(void)Lst_AtEnd(create, (ClientData)estrdup(argv[1]));
}
Home |
Main Index |
Thread Index |
Old Index