Module Name: src
Committed By: rillig
Date: Sat Oct 17 16:53:26 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: Makefile export.mk
Log Message:
make(1): document why the ampersand is not listed in export.exp
To generate a diff of this commit:
cvs rdiff -u -r1.165 -r1.166 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/export.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/unit-tests/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.165 src/usr.bin/make/unit-tests/Makefile:1.166
--- src/usr.bin/make/unit-tests/Makefile:1.165 Sat Oct 10 19:25:19 2020
+++ src/usr.bin/make/unit-tests/Makefile Sat Oct 17 16:53:26 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.165 2020/10/10 19:25:19 sjg Exp $
+# $NetBSD: Makefile,v 1.166 2020/10/17 16:53:26 rillig Exp $
#
# Unit tests for make(1)
#
@@ -393,12 +393,6 @@ FLAGS.varname-dot-shell= -dpv
FLAGS.varname-empty= -dv '$${:U}=cmdline-u' '=cmline-plain'
# Some tests need extra postprocessing.
-SED_CMDS.export= \
- -e '/^[^=_A-Za-z0-9]*=/d'
-# these all share the same requirement
-.for t in export-all export-env
-SED_CMDS.$t= ${SED_CMDS.export}
-.endfor
SED_CMDS.job-output-long-lines= \
${:D Job separators on their own line are ok. } \
-e '/^--- job-[ab] ---$$/d' \
Index: src/usr.bin/make/unit-tests/export.mk
diff -u src/usr.bin/make/unit-tests/export.mk:1.6 src/usr.bin/make/unit-tests/export.mk:1.7
--- src/usr.bin/make/unit-tests/export.mk:1.6 Sun Sep 27 13:18:30 2020
+++ src/usr.bin/make/unit-tests/export.mk Sat Oct 17 16:53:26 2020
@@ -1,4 +1,4 @@
-# $Id: export.mk,v 1.6 2020/09/27 13:18:30 rillig Exp $
+# $Id: export.mk,v 1.7 2020/10/17 16:53:26 rillig Exp $
UT_TEST=export
UT_FOO=foo${BAR}
@@ -29,6 +29,9 @@ ${:U!}= exclamation # A direct != would
.export %
.export *
.export !
+# This is exported (see the .rawout file) but not displayed since the dash
+# shell filters it out. To reach consistent output for each shell, the
+# ampersand is filtered out already by FILTER_CMD.
.export &
# This is ignored because it is undefined.
.export UNDEFINED
@@ -37,7 +40,7 @@ BAR=bar is ${UT_FU}
.MAKE.EXPORTED+= UT_ZOO UT_TEST
-FILTER_CMD?= egrep -v '^(MAKEFLAGS|MALLOC_OPTIONS|PATH|PWD|SHLVL|_)='
+FILTER_CMD?= egrep -v '^(MAKEFLAGS|MALLOC_OPTIONS|PATH|PWD|SHLVL|_|&)='
all:
@env | ${FILTER_CMD} | sort