summaryrefslogtreecommitdiff
path: root/usr.bin/make/parse.c
diff options
context:
space:
mode:
authorjdolecek <jdolecek@NetBSD.org>2001-01-12 09:27:44 +0000
committerjdolecek <jdolecek@NetBSD.org>2001-01-12 09:27:44 +0000
commitf68d9de78d1c8ed186253fba72a609eca2f79a40 (patch)
treedebce1a4b72f0d9fe2e504a64c89f6a03ab6d661 /usr.bin/make/parse.c
parentf0d2eff22a06e5586995d079f23686fd38eb3b44 (diff)
only print the 'duplicate script for target' warning if
parseWarnFatal is on
Diffstat (limited to 'usr.bin/make/parse.c')
-rw-r--r--usr.bin/make/parse.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index fd5d39d732c..62222b6323e 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.56 2001/01/10 15:54:00 christos Exp $ */
+/* $NetBSD: parse.c,v 1.57 2001/01/12 09:27:44 jdolecek Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -39,14 +39,14 @@
*/
#ifdef MAKE_BOOTSTRAP
-static char rcsid[] = "$NetBSD: parse.c,v 1.56 2001/01/10 15:54:00 christos Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.57 2001/01/12 09:27:44 jdolecek Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: parse.c,v 1.56 2001/01/10 15:54:00 christos Exp $");
+__RCSID("$NetBSD: parse.c,v 1.57 2001/01/12 09:27:44 jdolecek Exp $");
#endif
#endif /* not lint */
#endif
@@ -1596,10 +1596,12 @@ ParseAddCmd(gnp, cmd)
gn = (GNode *) Lst_Datum (Lst_Last (gn->cohorts));
if (!(gn->type & OP_HAS_COMMANDS))
(void)Lst_AtEnd(gn->commands, cmd);
- else
+ else if (parseWarnFatal) {
Parse_Error (PARSE_WARNING,
"duplicate script for target \"%s\" ignored",
gn->name);
+ }
+
return(0);
}