diff options
| author | dholland <dholland@NetBSD.org> | 2010-02-06 20:37:13 +0000 |
|---|---|---|
| committer | dholland <dholland@NetBSD.org> | 2010-02-06 20:37:13 +0000 |
| commit | 607923e4cabef4f476be4bc54d2f82d3dcb91580 (patch) | |
| tree | b0da71c575b116391e1bb152e6717359bad7c48d /usr.bin/make | |
| parent | 572b649d58243eaab0acc9cea771b48dd3f272cc (diff) | |
Improve the error message that results when you have a multi-variable .for
and the substitution list doesn't divide evenly.
Diffstat (limited to 'usr.bin/make')
| -rw-r--r-- | usr.bin/make/for.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/make/for.c b/usr.bin/make/for.c index 62f483d7254..4a320a38a8f 100644 --- a/usr.bin/make/for.c +++ b/usr.bin/make/for.c @@ -1,4 +1,4 @@ -/* $NetBSD: for.c,v 1.46 2009/01/17 13:29:37 dsl Exp $ */ +/* $NetBSD: for.c,v 1.47 2010/02/06 20:37:13 dholland Exp $ */ /* * Copyright (c) 1992, The Regents of the University of California. @@ -30,14 +30,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: for.c,v 1.46 2009/01/17 13:29:37 dsl Exp $"; +static char rcsid[] = "$NetBSD: for.c,v 1.47 2010/02/06 20:37:13 dholland Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)for.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: for.c,v 1.46 2009/01/17 13:29:37 dsl Exp $"); +__RCSID("$NetBSD: for.c,v 1.47 2010/02/06 20:37:13 dholland Exp $"); #endif #endif /* not lint */ #endif @@ -237,7 +237,8 @@ For_Eval(char *line) if (strlist_num(&new_for->items) % strlist_num(&new_for->vars)) { Parse_Error(PARSE_FATAL, - "Wrong number of words in .for substitution list %d %d", + "Wrong number of words (%d) in .for substitution list" + " with %d vars", strlist_num(&new_for->items), strlist_num(&new_for->vars)); /* * Return 'success' so that the body of the .for loop is accumulated. |
