From 536dddacf1e5119178e4b076a17addb1a8705885 Mon Sep 17 00:00:00 2001 From: Juli Mallett Date: Thu, 20 Jun 2002 19:44:34 +0000 Subject: [PATCH] Provide a heuristic for RCS conflicts. Obtained from: NetBSD --- usr.bin/make/parse.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index c82bf3bea0e4..1828bc65d438 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -772,9 +772,16 @@ ParseDoDependency (line) if (!*cp) { /* * Ending a dependency line without an operator is a Bozo - * no-no + * no-no. As a heuristic, this is also often triggered by + * undetected conflicts from cvs/rcs merges. */ - Parse_Error (PARSE_FATAL, "Need an operator"); + if ((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"); return; } *cp = '\0';