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/71e5b6c785ef
branches:  trunk
changeset: 979081:71e5b6c785ef
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 c2f86effd912 -r 71e5b6c785ef 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