]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bmake/unit-tests/directive-unexport.mk
Update to bmake-20201101
[FreeBSD/FreeBSD.git] / contrib / bmake / unit-tests / directive-unexport.mk
1 # $NetBSD: directive-unexport.mk,v 1.4 2020/10/30 23:54:42 sjg Exp $
2 #
3 # Tests for the .unexport directive.
4
5 # TODO: Implementation
6
7 # First, export 3 variables.
8 UT_A=   a
9 UT_B=   b
10 UT_C=   c
11 .export UT_A UT_B UT_C
12
13 # Show the exported variables and their values.
14 .info ${:!env|sort|grep '^UT_'!}
15 .info ${.MAKE.EXPORTED}
16
17 # XXX: Now try to unexport all of them.  The variables are still exported
18 # but not mentioned in .MAKE.EXPORTED anymore.
19 # See the ":N" in Var_UnExport for the implementation.
20 *=      asterisk
21 .unexport *
22
23 .info ${:!env|sort|grep '^UT_'!}
24 .info ${.MAKE.EXPORTED}
25
26 all:
27         @:;