]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bmake/unit-tests/export.mk
Update to bmake-20200902
[FreeBSD/FreeBSD.git] / contrib / bmake / unit-tests / export.mk
1 # $Id: export.mk,v 1.1.1.4 2020/08/08 22:34:25 sjg Exp $
2
3 UT_TEST=export
4 UT_FOO=foo${BAR}
5 UT_FU=fubar
6 UT_ZOO=hoopie
7 UT_NO=all
8 # believe it or not, we expect this one to come out with $UT_FU unexpanded.
9 UT_DOLLAR= This is $$UT_FU
10
11 .export UT_FU UT_FOO
12 .export UT_DOLLAR
13
14 .if !defined(.MAKE.PID)
15 .error .MAKE.PID must be defined
16 .endif
17 @=      at
18 %=      percent
19 *=      asterisk
20 ${:U!}= exclamation             # A direct != would try to run "exclamation"
21                                 # as a shell command and assign its output
22                                 # to the empty variable.
23 &=      ampersand
24
25 # This is ignored because it is internal.
26 .export .MAKE.PID
27 # These are ignored because they are local to the target.
28 .export @
29 .export %
30 .export *
31 .export !
32 .export &
33 # This is ignored because it is undefined.
34 .export UNDEFINED
35
36 BAR=bar is ${UT_FU}
37
38 .MAKE.EXPORTED+= UT_ZOO UT_TEST
39
40 FILTER_CMD?=    egrep -v '^(MAKEFLAGS|PATH|PWD|SHLVL|_)='
41
42 all:
43         @env | ${FILTER_CMD} | sort