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 make(1): document why the ampersand ...



details:   https://anonhg.NetBSD.org/src/rev/49f19f7ee159
branches:  trunk
changeset: 977165:49f19f7ee159
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Oct 17 16:53:26 2020 +0000

description:
make(1): document why the ampersand is not listed in export.exp

diffstat:

 usr.bin/make/unit-tests/Makefile  |  8 +-------
 usr.bin/make/unit-tests/export.mk |  7 +++++--
 2 files changed, 6 insertions(+), 9 deletions(-)

diffs (50 lines):

diff -r 7ed391983127 -r 49f19f7ee159 usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile  Sat Oct 17 16:25:24 2020 +0000
+++ b/usr.bin/make/unit-tests/Makefile  Sat Oct 17 16:53:26 2020 +0000
@@ -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-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' \
diff -r 7ed391983127 -r 49f19f7ee159 usr.bin/make/unit-tests/export.mk
--- a/usr.bin/make/unit-tests/export.mk Sat Oct 17 16:25:24 2020 +0000
+++ b/usr.bin/make/unit-tests/export.mk Sat Oct 17 16:53:26 2020 +0000
@@ -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 @@
 .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 @@
 
 .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



Home | Main Index | Thread Index | Old Index