Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make/unit-tests tests/make: clean up comments in tes...
details: https://anonhg.NetBSD.org/src/rev/669808fff960
branches: trunk
changeset: 365985:669808fff960
user: rillig <rillig%NetBSD.org@localhost>
date: Sat May 07 12:40:40 2022 +0000
description:
tests/make: clean up comments in test for .POSIX
diffstat:
usr.bin/make/unit-tests/deptgt-posix.mk | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diffs (42 lines):
diff -r 58e060cb6d1b -r 669808fff960 usr.bin/make/unit-tests/deptgt-posix.mk
--- a/usr.bin/make/unit-tests/deptgt-posix.mk Sat May 07 10:05:49 2022 +0000
+++ b/usr.bin/make/unit-tests/deptgt-posix.mk Sat May 07 12:40:40 2022 +0000
@@ -1,16 +1,19 @@
-# $NetBSD: deptgt-posix.mk,v 1.2 2022/04/18 15:59:39 sjg Exp $
+# $NetBSD: deptgt-posix.mk,v 1.3 2022/05/07 12:40:40 rillig Exp $
#
# Tests for the special target '.POSIX', which enables POSIX mode.
#
-# As of 2022-04-18, this only means that the variable '%POSIX' is defined and
-# that the variables and rules specified by POSIX replace the default ones.
-# This is done by loading <posix.mk>, if available. That file is not included
-# in NetBSD, but only in the bmake distribution. As of 2022-04-18, POSIX
-# support is not complete.
+# As of 2022-04-18, when parsing the dependency line '.POSIX', the variable
+# '%POSIX' is defined and <posix.mk> is included, if it exists. Other than
+# that, POSIX support is still incomplete, the exact set of supported features
+# needs to be cross-checked with the POSIX specification.
#
-# Implementation node: this test needs to be isolated from the usual test
-# to prevent unit-tests/posix.mk from interfering with the posix.mk from the
-# system directory that this test uses.
+# At the point of '.POSIX:', <sys.mk> has been loaded already, unless the
+# option '-r' was given. This means that an implementation of <posix.mk> must
+# work both with and without the system rules from <sys.mk> being in effect.
+#
+# Implementation note: this test needs to run isolated from the usual tests
+# directory to prevent unit-tests/posix.mk from interfering with the posix.mk
+# from the system directory that this test uses.
#
# See also:
# https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html
@@ -99,7 +102,8 @@
'.POSIX:'
# The only allowed lines before switching to POSIX mode are comment lines.
-# POSIX defines that empty and blank lines are called comment lines as well.
+# POSIX defines comment lines as "blank lines, empty lines, and lines with
+# <number-sign> ('#') as the first character".
all: after-comment-lines
after-comment-lines: .PHONY set-up-sysdir check-is-posix run
printf '%s\n' > ${MAIN_MK} \
Home |
Main Index |
Thread Index |
Old Index