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): add test for passing MAKEFL...
details: https://anonhg.NetBSD.org/src/rev/41a3e8e2bef3
branches: trunk
changeset: 942700:41a3e8e2bef3
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Nov 15 06:19:34 2020 +0000
description:
make(1): add test for passing MAKEFLAGS to sub-makes
diffstat:
usr.bin/make/unit-tests/opt.exp | 3 +++
usr.bin/make/unit-tests/opt.mk | 10 +++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r 031d9e4d43e1 -r 41a3e8e2bef3 usr.bin/make/unit-tests/opt.exp
--- a/usr.bin/make/unit-tests/opt.exp Sun Nov 15 06:06:19 2020 +0000
+++ b/usr.bin/make/unit-tests/opt.exp Sun Nov 15 06:19:34 2020 +0000
@@ -1,3 +1,6 @@
+make -V MAKEFLAGS
+ -r -k -d 0
+
make -:
usage: make [-BeikNnqrSstWwX]
[-C directory] [-D variable] [-d flags] [-f makefile]
diff -r 031d9e4d43e1 -r 41a3e8e2bef3 usr.bin/make/unit-tests/opt.mk
--- a/usr.bin/make/unit-tests/opt.mk Sun Nov 15 06:06:19 2020 +0000
+++ b/usr.bin/make/unit-tests/opt.mk Sun Nov 15 06:19:34 2020 +0000
@@ -1,12 +1,16 @@
-# $NetBSD: opt.mk,v 1.4 2020/11/15 06:06:19 sjg Exp $
+# $NetBSD: opt.mk,v 1.5 2020/11/15 06:19:34 rillig Exp $
#
# Tests for the command line options.
-# TODO: Implementation
-
.MAKEFLAGS: -d0 # make stdout line-buffered
all: .IGNORE
+ # The options from the top-level make are passed to the sub-makes via
+ # the environment variable MAKEFLAGS. This is where the " -r -k -d 0"
+ # comes from. See MainParseArg.
+ ${MAKE} -V MAKEFLAGS
+ @echo
+
# Just to see how the custom argument parsing code reacts to a syntax
# error. The colon is used in the options string, marking an option
# that takes arguments. It is not an option by itself, though.
Home |
Main Index |
Thread Index |
Old Index