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/2d8bae23f9ab
branches:  trunk
changeset: 955941:2d8bae23f9ab
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 477ca26e326a -r 2d8bae23f9ab 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 477ca26e326a -r 2d8bae23f9ab 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