Module Name:    src
Committed By:   rillig
Date:           Tue Dec 15 00:32:26 UTC 2020

Modified Files:
        src/usr.bin/make: parse.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.482 -r1.483 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.482 src/usr.bin/make/parse.c:1.483
--- src/usr.bin/make/parse.c:1.482	Mon Dec 14 23:48:03 2020
+++ src/usr.bin/make/parse.c	Tue Dec 15 00:32:26 2020
@@ -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 @@ ParseReadLine(void)
 			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;

Reply via email to