1 # $NetBSD: varname-makefile.mk,v 1.2 2020/09/05 06:25:38 rillig Exp $
3 # Tests for the special MAKEFILE variable, which contains the current
4 # makefile from the -f command line option.
6 # When there are multiple -f options, the variable MAKEFILE is set
7 # again for each of these makefiles, before the file is parsed.
8 # Including a file via .include does not influence the MAKEFILE
11 .if ${MAKEFILE:T} != "varname-makefile.mk"
15 # This variable lives in the "Internal" namespace.
16 # TODO: Why does it do that, and what consequences does this have?
18 # Deleting the variable does not work since this variable does not live in
19 # the "Global" namespace but in "Internal", which is kind of a child
23 .if ${MAKEFILE:T} != "varname-makefile.mk"
27 # Overwriting this variable is possible since the "Internal" namespace
28 # serves as a fallback for the "Global" namespace (see VarFind).
31 .if ${MAKEFILE:T} != "overwritten"
35 # When the overwritten value is deleted, the fallback value becomes
39 .if ${MAKEFILE:T} != "varname-makefile.mk"