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 Avoid reading unexpected makefiles



details:   https://anonhg.NetBSD.org/src/rev/082e884a92bc
branches:  trunk
changeset: 946064:082e884a92bc
user:      sjg <sjg%NetBSD.org@localhost>
date:      Sun Nov 15 06:06:19 2020 +0000

description:
Avoid reading unexpected makefiles

diffstat:

 usr.bin/make/unit-tests/opt.exp |  2 +-
 usr.bin/make/unit-tests/opt.mk  |  8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diffs (34 lines):

diff -r ba737a57f6c3 -r 082e884a92bc usr.bin/make/unit-tests/opt.exp
--- a/usr.bin/make/unit-tests/opt.exp   Sun Nov 15 05:48:17 2020 +0000
+++ b/usr.bin/make/unit-tests/opt.exp   Sun Nov 15 06:06:19 2020 +0000
@@ -5,7 +5,7 @@
             [-V variable] [-v variable] [variable=value] [target ...]
 *** Error code 2 (ignored)
 
-make -- -VAR=value -f /dev/null
+make -r -f /dev/null -- -VAR=value -f /dev/null
 make: don't know how to make -f (continuing)
 `/dev/null' is up to date.
 
diff -r ba737a57f6c3 -r 082e884a92bc usr.bin/make/unit-tests/opt.mk
--- a/usr.bin/make/unit-tests/opt.mk    Sun Nov 15 05:48:17 2020 +0000
+++ b/usr.bin/make/unit-tests/opt.mk    Sun Nov 15 06:06:19 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: opt.mk,v 1.3 2020/11/14 17:33:51 rillig Exp $
+# $NetBSD: opt.mk,v 1.4 2020/11/15 06:06:19 sjg Exp $
 #
 # Tests for the command line options.
 
@@ -14,9 +14,9 @@
        @echo
 
        # See whether a '--' stops handling of command line options, like in
-       # standard getopt programs.  Yes, it does, and it treats the '-f' as
-       # a target to be created.
-       ${MAKE} -- -VAR=value -f /dev/null
+       # standard getopt programs.  Yes, it does, and it treats the
+       # second '-f' as a target to be created.
+       ${MAKE} -r -f /dev/null -- -VAR=value -f /dev/null
        @echo
 
        # This is the normal way to print the usage of a command.



Home | Main Index | Thread Index | Old Index