Module Name: src
Committed By: rillig
Date: Thu Nov 2 05:14:58 UTC 2023
Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: var-op-append.mk varmod-defined.mk
varmod-match-escape.mk varmod-match.mk
Log Message:
make: sync comments with the extracted ParseModifier_Match
No functional change.
To generate a diff of this commit:
cvs rdiff -u -r1.1064 -r1.1065 src/usr.bin/make/var.c
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/var-op-append.mk \
src/usr.bin/make/unit-tests/varmod-match-escape.mk
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/varmod-defined.mk
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/make/unit-tests/varmod-match.mk
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/var.c
diff -u src/usr.bin/make/var.c:1.1064 src/usr.bin/make/var.c:1.1065
--- src/usr.bin/make/var.c:1.1064 Sat Aug 19 19:59:17 2023
+++ src/usr.bin/make/var.c Thu Nov 2 05:14:58 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.1064 2023/08/19 19:59:17 rillig Exp $ */
+/* $NetBSD: var.c,v 1.1065 2023/11/02 05:14:58 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -139,7 +139,7 @@
#include "metachar.h"
/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.1064 2023/08/19 19:59:17 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1065 2023/11/02 05:14:58 rillig Exp $");
/*
* Variables are defined using one of the VAR=value assignments. Their
@@ -2457,7 +2457,7 @@ ParseModifier_Defined(const char **pp, M
/*
* XXX: This code is similar to the one in Var_Parse. See if
- * the code can be merged. See also ApplyModifier_Match and
+ * the code can be merged. See also ParseModifier_Match and
* ParseModifierPart.
*/
Index: src/usr.bin/make/unit-tests/var-op-append.mk
diff -u src/usr.bin/make/unit-tests/var-op-append.mk:1.10 src/usr.bin/make/unit-tests/var-op-append.mk:1.11
--- src/usr.bin/make/unit-tests/var-op-append.mk:1.10 Wed Jun 21 07:30:50 2023
+++ src/usr.bin/make/unit-tests/var-op-append.mk Thu Nov 2 05:14:58 2023
@@ -1,4 +1,4 @@
-# $NetBSD: var-op-append.mk,v 1.10 2023/06/21 07:30:50 rillig Exp $
+# $NetBSD: var-op-append.mk,v 1.11 2023/11/02 05:14:58 rillig Exp $
#
# Tests for the '+=' variable assignment operator, which appends to a
# variable, creating it if necessary.
@@ -39,7 +39,7 @@ VAR+= # empty
# '+=' assignment operator. As far as possible, the '+' is interpreted as
# part of the assignment operator.
#
-# See Parse_Var
+# See Parse_Var, AdjustVarassignOp.
C++= value
.if ${C+} != "value" || defined(C++)
. error
Index: src/usr.bin/make/unit-tests/varmod-match-escape.mk
diff -u src/usr.bin/make/unit-tests/varmod-match-escape.mk:1.10 src/usr.bin/make/unit-tests/varmod-match-escape.mk:1.11
--- src/usr.bin/make/unit-tests/varmod-match-escape.mk:1.10 Fri Jun 23 04:56:54 2023
+++ src/usr.bin/make/unit-tests/varmod-match-escape.mk Thu Nov 2 05:14:58 2023
@@ -1,8 +1,8 @@
-# $NetBSD: varmod-match-escape.mk,v 1.10 2023/06/23 04:56:54 rillig Exp $
+# $NetBSD: varmod-match-escape.mk,v 1.11 2023/11/02 05:14:58 rillig Exp $
#
# As of 2020-08-01, the :M and :N modifiers interpret backslashes differently,
# depending on whether there was a variable expression somewhere before the
-# first backslash or not. See ApplyModifier_Match, "copy = true".
+# first backslash or not. See ParseModifier_Match, "copy = true".
#
# Apart from the different and possibly confusing debug output, there is no
# difference in behavior. When parsing the modifier text, only \{, \} and \:
@@ -34,7 +34,7 @@ SPECIALS= \: : \\ * \*
# Therefore the escaped ':' is kept as-is, and the final pattern becomes
# ':\:'.
#
-# If ApplyModifier_Match had used the same parsing algorithm as Var_Subst,
+# If ParseModifier_Match had used the same parsing algorithm as Var_Subst,
# both patterns would end up as '::'.
#
VALUES= : :: :\:
@@ -53,7 +53,7 @@ VALUES= : :: :\:
.endif
# XXX: As of 2020-11-01, unlike all other variable modifiers, '\$' is not
-# parsed as an escaped '$'. Instead, ApplyModifier_Match first scans for
+# parsed as an escaped '$'. Instead, ParseModifier_Match first scans for
# the ':' at the end of the modifier, which results in the pattern '\$'.
# No unescaping takes place since the pattern neither contained '\:' nor
# '\{' nor '\}'. But the text is expanded, and a lonely '$' at the end
Index: src/usr.bin/make/unit-tests/varmod-defined.mk
diff -u src/usr.bin/make/unit-tests/varmod-defined.mk:1.13 src/usr.bin/make/unit-tests/varmod-defined.mk:1.14
--- src/usr.bin/make/unit-tests/varmod-defined.mk:1.13 Wed Aug 24 20:22:10 2022
+++ src/usr.bin/make/unit-tests/varmod-defined.mk Thu Nov 2 05:14:58 2023
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-defined.mk,v 1.13 2022/08/24 20:22:10 rillig Exp $
+# $NetBSD: varmod-defined.mk,v 1.14 2023/11/02 05:14:58 rillig Exp $
#
# Tests for the :D variable modifier, which returns the given string
# if the variable is defined. It is closely related to the :U modifier.
@@ -58,7 +58,7 @@ DEF= defined
# Any other text is written without any further escaping. In contrast
# to the :M modifier, parentheses and braces do not need to be nested.
# Instead, the :D modifier is implemented sanely by parsing nested
-# expressions as such, without trying any shortcuts. See ApplyModifier_Match
+# expressions as such, without trying any shortcuts. See ParseModifier_Match
# for an inferior variant.
#
.if ${DEF:D!&((((} != "!&(((("
Index: src/usr.bin/make/unit-tests/varmod-match.mk
diff -u src/usr.bin/make/unit-tests/varmod-match.mk:1.15 src/usr.bin/make/unit-tests/varmod-match.mk:1.16
--- src/usr.bin/make/unit-tests/varmod-match.mk:1.15 Fri Jun 23 04:56:54 2023
+++ src/usr.bin/make/unit-tests/varmod-match.mk Thu Nov 2 05:14:58 2023
@@ -1,9 +1,9 @@
-# $NetBSD: varmod-match.mk,v 1.15 2023/06/23 04:56:54 rillig Exp $
+# $NetBSD: varmod-match.mk,v 1.16 2023/11/02 05:14:58 rillig Exp $
#
# Tests for the :M variable modifier, which filters words that match the
# given pattern.
#
-# See ApplyModifier_Match and ModifyWord_Match for the implementation.
+# See ApplyModifier_Match, ParseModifier_Match and ModifyWord_Match.
.MAKEFLAGS: -dc