From 5a6eb0ca5faa6cb454026bf21087d0fcc0947fff Mon Sep 17 00:00:00 2001 From: jmallett Date: Sun, 28 Jul 2002 03:52:41 +0000 Subject: Print a warning when we are given two scripts for one target. This is neither as wide-reaching nor intensive as NetBSD's similar, but the warning uses the same text. Inspired by: NetBSD --- usr.bin/make/parse.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'usr.bin') diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index e549bb3..213bc3e 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -1499,6 +1499,10 @@ ParseAddCmd(gnp, cmd) /* if target already supplied, ignore commands */ if (!(gn->type & OP_HAS_COMMANDS)) (void)Lst_AtEnd(gn->commands, cmd); + else + Parse_Error(PARSE_WARNING, + "duplicate script for target \"%s\" ignored", + gn->name); return(0); } -- cgit v1.1