Module Name: src
Committed By: rillig
Date: Sat Sep 12 19:41:20 UTC 2020
Modified Files:
src/usr.bin/make: parse.c suff.c var.c
Log Message:
make(1): reword variable invocation to variable expression
Variables are a passive thing. They cannot be invoked, they can only be
evaluated.
To generate a diff of this commit:
cvs rdiff -u -r1.294 -r1.295 src/usr.bin/make/parse.c
cvs rdiff -u -r1.152 -r1.153 src/usr.bin/make/suff.c
cvs rdiff -u -r1.502 -r1.503 src/usr.bin/make/var.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.294 src/usr.bin/make/parse.c:1.295
--- src/usr.bin/make/parse.c:1.294 Sat Sep 12 18:19:50 2020
+++ src/usr.bin/make/parse.c Sat Sep 12 19:41:20 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.294 2020/09/12 18:19:50 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.295 2020/09/12 19:41:20 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.294 2020/09/12 18:19:50 rillig Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.295 2020/09/12 19:41:20 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: parse.c,v 1.294 2020/09/12 18:19:50 rillig Exp $");
+__RCSID("$NetBSD: parse.c,v 1.295 2020/09/12 19:41:20 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -1927,7 +1927,7 @@ Parse_DoVar(char *line, GNode *ctxt)
} else if (type == VAR_SUBST) {
/*
* Allow variables in the old value to be undefined, but leave their
- * invocation alone -- this is done by forcing oldVars to be false.
+ * expressions alone -- this is done by forcing oldVars to be false.
* XXX: This can cause recursive variables, but that's not hard to do,
* and this allows someone to do something like
*
Index: src/usr.bin/make/suff.c
diff -u src/usr.bin/make/suff.c:1.152 src/usr.bin/make/suff.c:1.153
--- src/usr.bin/make/suff.c:1.152 Sat Sep 12 18:19:50 2020
+++ src/usr.bin/make/suff.c Sat Sep 12 19:41:20 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: suff.c,v 1.152 2020/09/12 18:19:50 rillig Exp $ */
+/* $NetBSD: suff.c,v 1.153 2020/09/12 19:41:20 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: suff.c,v 1.152 2020/09/12 18:19:50 rillig Exp $";
+static char rcsid[] = "$NetBSD: suff.c,v 1.153 2020/09/12 19:41:20 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)suff.c 8.4 (Berkeley) 3/21/94";
#else
-__RCSID("$NetBSD: suff.c,v 1.152 2020/09/12 18:19:50 rillig Exp $");
+__RCSID("$NetBSD: suff.c,v 1.153 2020/09/12 19:41:20 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -1241,7 +1241,7 @@ SuffFindCmds(Src *targ, Lst slst)
}
/* Expand the names of any children of a given node that contain variable
- * invocations or file wildcards into actual targets.
+ * expressions or file wildcards into actual targets.
*
* The expanded node is removed from the parent's list of children, and the
* parent's unmade counter is decremented, but other nodes may be added.
Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.502 src/usr.bin/make/var.c:1.503
--- src/usr.bin/make/var.c:1.502 Sat Sep 12 19:33:02 2020
+++ src/usr.bin/make/var.c Sat Sep 12 19:41:20 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.502 2020/09/12 19:33:02 rillig Exp $ */
+/* $NetBSD: var.c,v 1.503 2020/09/12 19:41:20 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.502 2020/09/12 19:33:02 rillig Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.503 2020/09/12 19:41:20 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: var.c,v 1.502 2020/09/12 19:33:02 rillig Exp $");
+__RCSID("$NetBSD: var.c,v 1.503 2020/09/12 19:41:20 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -3364,7 +3364,7 @@ ParseVarname(const char **pp, char start
/*-
*-----------------------------------------------------------------------
* Var_Parse --
- * Given the start of a variable invocation (such as $v, $(VAR),
+ * Given the start of a variable expression (such as $v, $(VAR),
* ${VAR:Mpattern}), extract the variable name, possibly some
* modifiers and find its value by applying the modifiers to the
* original value.
@@ -3416,7 +3416,7 @@ Var_Parse(const char **pp, GNode *ctxt,
Boolean dynamic; /* TRUE if the variable is local and we're
* expanding it in a non-local context. This
* is done to support dynamic sources. The
- * result is just the invocation, unaltered */
+ * result is just the expression, unaltered */
const char *extramodifiers;
Var *v;
char *nstr;
@@ -3685,7 +3685,7 @@ Var_Subst(const char *str, GNode *ctxt,
} else if (*str != '$') {
/*
* Skip as many characters as possible -- either to the end of
- * the string or to the next dollar sign (variable invocation).
+ * the string or to the next dollar sign (variable expression).
*/
const char *cp;