mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-29 08:08:37 +00:00
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
This commit is contained in:
parent
6100e6c2c9
commit
bfc4c0cf08
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=201456
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user