Module Name: src
Committed By: sjg
Date: Sun Nov 15 06:06:20 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: opt.exp opt.mk
Log Message:
Avoid reading unexpected makefiles
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/opt.exp
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/opt.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/opt.exp
diff -u src/usr.bin/make/unit-tests/opt.exp:1.4 src/usr.bin/make/unit-tests/opt.exp:1.5
--- src/usr.bin/make/unit-tests/opt.exp:1.4 Sat Nov 14 22:19:13 2020
+++ src/usr.bin/make/unit-tests/opt.exp Sun Nov 15 06:06:19 2020
@@ -5,7 +5,7 @@ usage: make [-BeikNnqrSstWwX]
[-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.
Index: src/usr.bin/make/unit-tests/opt.mk
diff -u src/usr.bin/make/unit-tests/opt.mk:1.3 src/usr.bin/make/unit-tests/opt.mk:1.4
--- src/usr.bin/make/unit-tests/opt.mk:1.3 Sat Nov 14 17:33:51 2020
+++ src/usr.bin/make/unit-tests/opt.mk Sun Nov 15 06:06:19 2020
@@ -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 @@ all: .IGNORE
@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.