From ecb4f44224e1063c0020b78beae3c905db2283f7 Mon Sep 17 00:00:00 2001 From: rillig Date: Thu, 3 Sep 2020 17:16:01 +0000 Subject: [PATCH] make(1): document use of magic values in CondDoEmpty --- usr.bin/make/cond.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/usr.bin/make/cond.c b/usr.bin/make/cond.c index 7417f88cbb5a..18a5c83b00b6 100644 --- a/usr.bin/make/cond.c +++ b/usr.bin/make/cond.c @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.108 2020/09/03 16:14:58 rillig Exp $ */ +/* $NetBSD: cond.c,v 1.109 2020/09/03 17:16:01 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: cond.c,v 1.108 2020/09/03 16:14:58 rillig Exp $"; +static char rcsid[] = "$NetBSD: cond.c,v 1.109 2020/09/03 17:16:01 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: cond.c,v 1.108 2020/09/03 16:14:58 rillig Exp $"); +__RCSID("$NetBSD: cond.c,v 1.109 2020/09/03 17:16:01 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -719,6 +719,7 @@ get_mpt_arg(Boolean doEval, const char **linePtr, char **argPtr, static Boolean CondDoEmpty(int arglen, const char *arg MAKE_ATTR_UNUSED) { + /* Magic values ahead, see get_mpt_arg. */ return arglen == 1; } @@ -1232,7 +1233,7 @@ Cond_Eval(const char *line) } } - /* And evaluate the conditional expresssion */ + /* And evaluate the conditional expression */ if (Cond_EvalExpression(ifp, line, &value, 1, TRUE) == COND_INVALID) { /* Syntax error in conditional, error message already output. */ /* Skip everything to matching .endif */