Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make(1): clean up comment for ParseDirective



details:   https://anonhg.NetBSD.org/src/rev/52b27cb32098
branches:  trunk
changeset: 947192:52b27cb32098
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Dec 13 01:51:08 2020 +0000

description:
make(1): clean up comment for ParseDirective

diffstat:

 usr.bin/make/parse.c |  18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diffs (46 lines):

diff -r cff5c1f74535 -r 52b27cb32098 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Sun Dec 13 01:41:12 2020 +0000
+++ b/usr.bin/make/parse.c      Sun Dec 13 01:51:08 2020 +0000
@@ -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 @@
 }
 
 /*
- * 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 @@
 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;
 



Home | Main Index | Thread Index | Old Index