Module Name: src Committed By: rillig Date: Mon Nov 9 22:36:44 UTC 2020
Modified Files: src/usr.bin/make/unit-tests: varname-makefile.exp varname-makefile.mk Log Message: make(1): add test for MAKEFILE after reading all files To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/varname-makefile.exp cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/varname-makefile.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/varname-makefile.exp diff -u src/usr.bin/make/unit-tests/varname-makefile.exp:1.1 src/usr.bin/make/unit-tests/varname-makefile.exp:1.2 --- src/usr.bin/make/unit-tests/varname-makefile.exp:1.1 Fri Sep 4 17:05:39 2020 +++ src/usr.bin/make/unit-tests/varname-makefile.exp Mon Nov 9 22:36:44 2020 @@ -1 +1,2 @@ +: In the end, MAKEFILE is /dev/null. exit status 0 Index: src/usr.bin/make/unit-tests/varname-makefile.mk diff -u src/usr.bin/make/unit-tests/varname-makefile.mk:1.2 src/usr.bin/make/unit-tests/varname-makefile.mk:1.3 --- src/usr.bin/make/unit-tests/varname-makefile.mk:1.2 Sat Sep 5 06:25:38 2020 +++ src/usr.bin/make/unit-tests/varname-makefile.mk Mon Nov 9 22:36:44 2020 @@ -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 @@ MAKEFILE= overwritten .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