xref: /freebsd/contrib/bmake/unit-tests/varname-dot-makeoverrides.mk (revision dd4f32ae62426a10a84b4322756d82c06c202c4e)
1# $NetBSD: varname-dot-makeoverrides.mk,v 1.5 2023/02/25 06:54:08 rillig Exp $
2#
3# Tests for the special .MAKEOVERRIDES variable, which lists the names of the
4# variables that are passed on to child processes via the MAKEFLAGS
5# environment variable.
6#
7# See also:
8#	varname-dot-makeflags.mk
9
10all:
11	@echo '$@: overrides=<'${.MAKEOVERRIDES:Uundefined:Q}'>'
12	${MAKE} -f ${MAKEFILE} stage_1 VAR=value
13
14stage_1:
15	@echo '$@: overrides=<'${.MAKEOVERRIDES:Q}'>'
16	${MAKE} -f ${MAKEFILE} stage_2
17
18stage_2:
19	@echo '$@: overrides=<'${.MAKEOVERRIDES:Q}'>'
20	${MAKE} -f ${MAKEFILE} stage_3
21
22stage_3:
23	@echo '$@: overrides=<'${.MAKEOVERRIDES:Q}'>'
24