2023-01-28 00:23:54 +00:00
|
|
|
# $NetBSD: export.mk,v 1.12 2022/09/09 18:36:15 sjg Exp $
|
2012-06-08 21:57:36 +00:00
|
|
|
|
2020-11-07 19:39:21 +00:00
|
|
|
UT_TEST= export
|
|
|
|
UT_FOO= foo${BAR}
|
|
|
|
UT_FU= fubar
|
|
|
|
UT_ZOO= hoopie
|
|
|
|
UT_NO= all
|
2020-09-05 16:11:04 +00:00
|
|
|
# believe it or not, we expect this one to come out with $UT_FU unexpanded.
|
2020-11-07 19:39:21 +00:00
|
|
|
UT_DOLLAR= This is $$UT_FU
|
2012-06-08 21:57:36 +00:00
|
|
|
|
|
|
|
.export UT_FU UT_FOO
|
|
|
|
.export UT_DOLLAR
|
2020-09-05 16:11:04 +00:00
|
|
|
|
|
|
|
.if !defined(.MAKE.PID)
|
2020-11-07 19:39:21 +00:00
|
|
|
. error .MAKE.PID must be defined
|
2020-09-05 16:11:04 +00:00
|
|
|
.endif
|
|
|
|
@= at
|
|
|
|
%= percent
|
|
|
|
*= asterisk
|
|
|
|
${:U!}= exclamation # A direct != would try to run "exclamation"
|
|
|
|
# as a shell command and assign its output
|
|
|
|
# to the empty variable.
|
|
|
|
&= ampersand
|
|
|
|
|
|
|
|
# This is ignored because it is internal.
|
2012-06-08 21:57:36 +00:00
|
|
|
.export .MAKE.PID
|
2020-09-05 16:11:04 +00:00
|
|
|
# These are ignored because they are local to the target.
|
|
|
|
.export @
|
|
|
|
.export %
|
|
|
|
.export *
|
|
|
|
.export !
|
2020-11-07 19:39:21 +00:00
|
|
|
# This is exported (see the .rawout file) but not displayed since the dash
|
|
|
|
# shell filters it out. To reach consistent output for each shell, the
|
|
|
|
# ampersand is filtered out already by FILTER_CMD.
|
2020-09-05 16:11:04 +00:00
|
|
|
.export &
|
|
|
|
# This is ignored because it is undefined.
|
|
|
|
.export UNDEFINED
|
2012-06-08 21:57:36 +00:00
|
|
|
|
2020-11-07 19:39:21 +00:00
|
|
|
BAR= bar is ${UT_FU}
|
2012-06-08 21:57:36 +00:00
|
|
|
|
2020-11-07 19:39:21 +00:00
|
|
|
.MAKE.EXPORTED+= UT_ZOO UT_TEST
|
2012-06-08 21:57:36 +00:00
|
|
|
|
2023-01-28 00:23:54 +00:00
|
|
|
FILTER_CMD?= ${EGREP} -v '^(MAKEFLAGS|MALLOC_.*|PATH|PWD|SHLVL|_|&)='
|
2012-06-08 21:57:36 +00:00
|
|
|
|
2020-09-05 16:11:04 +00:00
|
|
|
all:
|
|
|
|
@env | ${FILTER_CMD} | sort
|