1# $NetBSD: directive-unexport.mk,v 1.7 2020/12/13 01:07:54 rillig Exp $
2#
3# Tests for the .unexport directive.
4#
5# Before 2020-12-13, misspelled directives like ".unexporting" or
6# ".unexport-en" had not been detected properly.
7#
8# See also:
9#	directive-misspellings.mk
10
11# First, export 3 variables.
12UT_A=	a
13UT_B=	b
14UT_C=	c
15.export UT_A UT_B UT_C
16
17# Show the exported variables and their values.
18.info ${:!env|sort|grep '^UT_'!}
19.info ${.MAKE.EXPORTED}
20
21# XXX: Now try to unexport all of them.  The variables are still exported
22# but not mentioned in .MAKE.EXPORTED anymore.
23# See the ":N" in Var_UnExport for the implementation.
24*=	asterisk
25.unexport *
26
27.info ${:!env|sort|grep '^UT_'!}
28.info ${.MAKE.EXPORTED}
29
30.unexport			# oops: missing argument
31
32all:
33	@:;
34