Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make Report lines that ought to contain a ':' operat...
details: https://anonhg.NetBSD.org/src/rev/2fe98e20b6a0
branches: trunk
changeset: 748839:2fe98e20b6a0
user: dsl <dsl%NetBSD.org@localhost>
date: Fri Nov 06 20:20:56 2009 +0000
description:
Report lines that ought to contain a ':' operator but start with a '.'
as "Unknown directive" sinze they are more likely to be .elseif (etc).
Lets me close PR/37222!
diffstat:
usr.bin/make/parse.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diffs (58 lines):
diff -r 7b12d1eb03d9 -r 2fe98e20b6a0 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c Fri Nov 06 19:44:06 2009 +0000
+++ b/usr.bin/make/parse.c Fri Nov 06 20:20:56 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.158 2009/10/07 16:40:30 sjg Exp $ */
+/* $NetBSD: parse.c,v 1.159 2009/11/06 20:20:56 dsl Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.158 2009/10/07 16:40:30 sjg Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.159 2009/11/06 20:20:56 dsl Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: parse.c,v 1.158 2009/10/07 16:40:30 sjg Exp $");
+__RCSID("$NetBSD: parse.c,v 1.159 2009/11/06 20:20:56 dsl Exp $");
#endif
#endif /* not lint */
#endif
@@ -925,7 +925,8 @@
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");
goto out;
}
*cp = '\0';
@@ -1148,7 +1149,8 @@
op = OP_DEPENDS;
}
} else {
- Parse_Error(PARSE_FATAL, "Missing dependency operator");
+ Parse_Error(PARSE_FATAL, lstart[0] == '.' ? "Unknown directive"
+ : "Missing dependency operator");
goto out;
}
@@ -2479,8 +2481,10 @@
curFile->lineno, line);
if (*line == '.') {
/*
- * Lines that begin with the special character are either
+ * Lines that begin with the special character may be
* include or undef directives.
+ * On the other hand they can be suffix rules (.c.o: ...)
+ * or just dependencies for filenames that start '.'.
*/
for (cp = line + 1; isspace((unsigned char)*cp); cp++) {
continue;
Home |
Main Index |
Thread Index |
Old Index