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 MAKEFILE after...
details: https://anonhg.NetBSD.org/src/rev/c4d047044526
branches: trunk
changeset: 956904:c4d047044526
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Nov 09 22:36:44 2020 +0000
description:
make(1): add test for MAKEFILE after reading all files
diffstat:
usr.bin/make/unit-tests/varname-makefile.exp | 1 +
usr.bin/make/unit-tests/varname-makefile.mk | 9 +++++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 99849596aaee -r c4d047044526 usr.bin/make/unit-tests/varname-makefile.exp
--- a/usr.bin/make/unit-tests/varname-makefile.exp Mon Nov 09 20:57:36 2020 +0000
+++ b/usr.bin/make/unit-tests/varname-makefile.exp Mon Nov 09 22:36:44 2020 +0000
@@ -1,1 +1,2 @@
+: In the end, MAKEFILE is /dev/null.
exit status 0
diff -r 99849596aaee -r c4d047044526 usr.bin/make/unit-tests/varname-makefile.mk
--- a/usr.bin/make/unit-tests/varname-makefile.mk Mon Nov 09 20:57:36 2020 +0000
+++ b/usr.bin/make/unit-tests/varname-makefile.mk Mon Nov 09 22:36:44 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: varname-makefile.mk,v 1.2 2020/09/05 06:25:38 rillig Exp $
+# $NetBSD: varname-makefile.mk,v 1.3 2020/11/09 22:36:44 rillig Exp $
#
# Tests for the special MAKEFILE variable, which contains the current
# makefile from the -f command line option.
@@ -41,4 +41,9 @@
.endif
all:
- @:;
+ # MAKEFILE is the file that appeared last in the command line.
+ : In the end, MAKEFILE is ${MAKEFILE}.
+
+# Additional makefiles can be added while reading a makefile. They will be
+# read in order.
+.MAKEFLAGS: -f /dev/null
Home |
Main Index |
Thread Index |
Old Index