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): document how to detect typos in .elif ...



details:   https://anonhg.NetBSD.org/src/rev/a6d2e27ed3b8
branches:  trunk
changeset: 947526:a6d2e27ed3b8
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Dec 15 00:32:26 2020 +0000

description:
make(1): document how to detect typos in .elif directives

diffstat:

 usr.bin/make/parse.c |  17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diffs (38 lines):

diff -r b158290ef15f -r a6d2e27ed3b8 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Mon Dec 14 23:48:03 2020 +0000
+++ b/usr.bin/make/parse.c      Tue Dec 15 00:32:26 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.482 2020/12/14 23:48:03 rillig Exp $       */
+/*     $NetBSD: parse.c,v 1.483 2020/12/15 00:32:26 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.482 2020/12/14 23:48:03 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.483 2020/12/15 00:32:26 rillig Exp $");
 
 /* types and constants */
 
@@ -2857,6 +2857,19 @@
                        while ((line = ParseGetLine(PARSE_SKIP)) != NULL) {
                                if (Cond_EvalLine(line) == COND_PARSE)
                                        break;
+                               /*
+                                * TODO: Check for typos in .elif directives
+                                * such as .elsif or .elseif.
+                                *
+                                * This check will probably duplicate some of
+                                * the code in ParseLine.  Most of the code
+                                * there cannot apply, only ParseVarassign and
+                                * ParseDependency can, and to prevent code
+                                * duplication, these would need to be called
+                                * with a flag called onlyCheckSyntax.
+                                *
+                                * See directive-elif.mk for details.
+                                */
                        }
                        if (line == NULL)
                                return NULL;



Home | Main Index | Thread Index | Old Index