svn commit: r201456 - head/usr.bin/make
David E. O'Brien
obrien at FreeBSD.org
Mon Jan 4 00:49:05 UTC 2010
Author: obrien
Date: Mon Jan 4 00:49:04 2010
New Revision: 201456
URL: http://svn.freebsd.org/changeset/base/201456
Log:
Report lines that ought to contain a ':' operator but start with a '.'
as "Unknown directive" sinze they are more likely to be .elseif (etc).
(NetBSD PR 37222).
Obtained from: NetBSD
Modified:
head/usr.bin/make/parse.c
Modified: head/usr.bin/make/parse.c
==============================================================================
--- head/usr.bin/make/parse.c Mon Jan 4 00:32:22 2010 (r201455)
+++ head/usr.bin/make/parse.c Mon Jan 4 00:49:04 2010 (r201456)
@@ -699,6 +699,7 @@ static void
ParseDoDependency(char *line)
{
char *cp; /* our current position */
+ char *lstart = line; /* original input line */
GNode *gn; /* a general purpose temporary node */
int op; /* the operator on the line */
char savec; /* a place to save a character */
@@ -809,7 +810,8 @@ ParseDoDependency(char *line)
"contain unresolved cvs/rcs/??? merge "
"conflicts");
} else
- Parse_Error(PARSE_FATAL, "Need an operator");
+ Parse_Error(PARSE_FATAL, lstart[0] == '.' ?
+ "Unknown directive" : "Need an operator");
return;
}
*cp = '\0';
@@ -1029,7 +1031,8 @@ ParseDoDependency(char *line)
op = OP_DEPENDS;
}
} else {
- Parse_Error(PARSE_FATAL, "Missing dependency operator");
+ Parse_Error(PARSE_FATAL, lstart[0] == '.' ?
+ "Unknown directive" : "Missing dependency operator");
return;
}
More information about the svn-src-head
mailing list