diff options
author | jmallett <jmallett@FreeBSD.org> | 2002-07-28 03:52:41 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2002-07-28 03:52:41 +0000 |
commit | 5a6eb0ca5faa6cb454026bf21087d0fcc0947fff (patch) | |
tree | c4a1d525021dd7008a0f0286f63f3aeffef6cc3b /usr.bin/make/parse.c | |
parent | 67306baf36ea103e13fb9bb2a526bb5cecd3b13e (diff) | |
download | FreeBSD-src-5a6eb0ca5faa6cb454026bf21087d0fcc0947fff.zip FreeBSD-src-5a6eb0ca5faa6cb454026bf21087d0fcc0947fff.tar.gz |
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
Diffstat (limited to 'usr.bin/make/parse.c')
-rw-r--r-- | usr.bin/make/parse.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); } |