Module Name: src
Committed By: rillig
Date: Sun Dec 13 01:51:08 UTC 2020
Modified Files:
src/usr.bin/make: parse.c
Log Message:
make(1): clean up comment for ParseDirective
To generate a diff of this commit:
cvs rdiff -u -r1.476 -r1.477 src/usr.bin/make/parse.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.476 src/usr.bin/make/parse.c:1.477
--- src/usr.bin/make/parse.c:1.476 Sun Dec 13 01:41:12 2020
+++ src/usr.bin/make/parse.c Sun Dec 13 01:51:08 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.476 2020/12/13 01:41:12 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.477 2020/12/13 01:51:08 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -117,7 +117,7 @@
#include "pathnames.h"
/* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.476 2020/12/13 01:41:12 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.477 2020/12/13 01:51:08 rillig Exp $");
/* types and constants */
@@ -2950,11 +2950,8 @@ IsDirective(const char *dir, size_t dirl
}
/*
- * Lines that begin with '.' can be pretty much anything:
- * - directives like '.include' or '.if',
- * - suffix rules like '.c.o:',
- * - dependencies for filenames that start with '.',
- * - variable assignments like '.tmp=value'.
+ * See if the line starts with one of the known directives, and if so, handle
+ * the directive.
*/
static Boolean
ParseDirective(char *line)
@@ -3121,6 +3118,13 @@ ParseDependency(char *line)
static void
ParseLine(char *line)
{
+ /*
+ * Lines that begin with '.' can be pretty much anything:
+ * - directives like '.include' or '.if',
+ * - suffix rules like '.c.o:',
+ * - dependencies for filenames that start with '.',
+ * - variable assignments like '.tmp=value'.
+ */
if (line[0] == '.' && ParseDirective(line))
return;