xref: /freebsd/contrib/bmake/unit-tests/export-env.mk (revision 89e3d5671ba13dceca272d5b159c9bd805f3f504)
1# $NetBSD: export-env.mk,v 1.4 2020/10/24 08:50:17 rillig Exp $
2
3# our normal .export, subsequent changes affect the environment
4UT_TEST=	this
5.export UT_TEST
6UT_TEST:=	${.PARSEFILE}
7
8# not so with .export-env
9UT_ENV=	exported
10.export-env UT_ENV
11UT_ENV=	not-exported
12
13# gmake style export goes further; affects nothing but the environment
14UT_EXP=before-export
15export UT_EXP=exported
16UT_EXP=not-exported
17
18UT_LIT= literal ${UT_TEST}
19.export-literal UT_LIT
20
21all:
22	@echo make:; ${UT_TEST UT_ENV UT_EXP UT_LIT:L:@v@echo $v=${$v};@}
23	@echo env:; ${UT_TEST UT_ENV UT_EXP UT_LIT:L:@v@echo $v=$${$v};@}
24
25
26
27
28