diff options
Diffstat (limited to 'usr.bin/make/parse.c')
-rw-r--r-- | usr.bin/make/parse.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index 2c65164..134d905 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -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 */ @@ -802,13 +803,15 @@ ParseDoDependency(char *line) * merges. */ if (strncmp(line, "<<<<<<", 6) == 0 || + strncmp(line, "||||||", 6) == 0 || strncmp(line, "======", 6) == 0 || strncmp(line, ">>>>>>", 6) == 0) { Parse_Error(PARSE_FATAL, "Makefile appears to " "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'; @@ -1028,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; } |