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: clean up comments
details: https://anonhg.NetBSD.org/src/rev/e81c270524f1
branches: trunk
changeset: 364461:e81c270524f1
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Mar 26 13:32:31 2022 +0000
description:
make: clean up comments
diffstat:
usr.bin/make/unit-tests/opt-env.exp | 4 ++--
usr.bin/make/unit-tests/opt-env.mk | 8 ++++++--
usr.bin/make/unit-tests/opt-file.mk | 6 +++---
usr.bin/make/var.c | 14 +++++++-------
4 files changed, 18 insertions(+), 14 deletions(-)
diffs (96 lines):
diff -r a7f5cf0f6c81 -r e81c270524f1 usr.bin/make/unit-tests/opt-env.exp
--- a/usr.bin/make/unit-tests/opt-env.exp Sat Mar 26 12:44:57 2022 +0000
+++ b/usr.bin/make/unit-tests/opt-env.exp Sat Mar 26 13:32:31 2022 +0000
@@ -1,5 +1,5 @@
-make: "opt-env.mk" line 9: Malformed conditional (${FROM_ENV} != value-from-env)
-make: "opt-env.mk" line 16: value-from-mk
+make: "opt-env.mk" line 13: Malformed conditional (${FROM_ENV} != value-from-env)
+make: "opt-env.mk" line 20: value-from-mk
make: stopped in unit-tests
exit status 1
diff -r a7f5cf0f6c81 -r e81c270524f1 usr.bin/make/unit-tests/opt-env.mk
--- a/usr.bin/make/unit-tests/opt-env.mk Sat Mar 26 12:44:57 2022 +0000
+++ b/usr.bin/make/unit-tests/opt-env.mk Sat Mar 26 13:32:31 2022 +0000
@@ -1,6 +1,10 @@
-# $NetBSD: opt-env.mk,v 1.3 2022/01/23 16:09:38 rillig Exp $
+# $NetBSD: opt-env.mk,v 1.4 2022/03/26 13:32:31 rillig Exp $
#
-# Tests for the -e command line option.
+# Tests for the -e command line option, which looks up environment variables
+# before those from the global scope. It has no influence on variables from
+# the command line though.
+#
+# This option is required by POSIX.
# The variable FROM_ENV is defined in ./Makefile.
diff -r a7f5cf0f6c81 -r e81c270524f1 usr.bin/make/unit-tests/opt-file.mk
--- a/usr.bin/make/unit-tests/opt-file.mk Sat Mar 26 12:44:57 2022 +0000
+++ b/usr.bin/make/unit-tests/opt-file.mk Sat Mar 26 13:32:31 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: opt-file.mk,v 1.14 2021/12/09 20:47:33 rillig Exp $
+# $NetBSD: opt-file.mk,v 1.15 2022/03/26 13:32:31 rillig Exp $
#
# Tests for the -f command line option, which adds a makefile to the list of
# files that are parsed.
@@ -15,7 +15,7 @@
# possible.
#
# In the unlikely case where a file ends in a backslash instead of a newline,
-# that backslash is trimmed. See ParseGetLine.
+# that backslash is trimmed. See ReadLowLevelLine.
#
# make-2014.01.01.00.00.00 invoked undefined behavior, reading text from
# outside of the file buffer.
@@ -52,7 +52,7 @@
# Since parse.c 1.511 from 2020-12-22, an assertion in ParseGetLine failed
# for lines that contained trailing whitespace. Worked around in parse.c
-# 1.513, properly fixed in parse.c 1.514.
+# 1.513, properly fixed in parse.c 1.514 from 2020-12-22.
line-with-trailing-whitespace: .PHONY
@printf '%s' 'VAR=$@ ' > opt-file-trailing-whitespace
@${MAKE} -r -f opt-file-trailing-whitespace -V VAR
diff -r a7f5cf0f6c81 -r e81c270524f1 usr.bin/make/var.c
--- a/usr.bin/make/var.c Sat Mar 26 12:44:57 2022 +0000
+++ b/usr.bin/make/var.c Sat Mar 26 13:32:31 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.1014 2022/03/26 12:44:57 rillig Exp $ */
+/* $NetBSD: var.c,v 1.1015 2022/03/26 13:32:31 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.1014 2022/03/26 12:44:57 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1015 2022/03/26 13:32:31 rillig Exp $");
/*
* Variables are defined using one of the VAR=value assignments. Their
@@ -4016,9 +4016,9 @@
/*
* TODO: Use p + strlen(p) instead, to stop parsing immediately.
*
- * In the unit tests, this generates a few unterminated strings in the
- * shell commands though. Instead of producing these unfinished
- * strings, commands with evaluation errors should not be run at all.
+ * In the unit tests, this generates a few shell commands with
+ * unbalanced quotes. Instead of producing these incomplete strings,
+ * commands with evaluation errors should not be run at all.
*
* To make that happen, Var_Subst must report the actual errors
* instead of returning VPR_OK unconditionally.
@@ -4028,8 +4028,8 @@
}
/*
- * Only 4 of the 7 local variables are treated specially as they are the only
- * ones that will be set when dynamic sources are expanded.
+ * Only 4 of the 7 built-in local variables are treated specially as they are
+ * the only ones that will be set when dynamic sources are expanded.
*/
static bool
VarnameIsDynamic(Substring varname)
Home |
Main Index |
Thread Index |
Old Index