freebsd-src/unit-tests/make-exported.mk
Simon J. Gerraty 2e36ab2363 Import bmake-20230126
Relevant/interesting changes (see ChangeLog for more):

	o variables like .newline and .MAKE.{GID,PID,PPID,UID}
	should be read-only.
	o .[NO]READONLY: for control of read-only variables
	o .SYSPATH: for controlling the path searched for makefiles
	o allow for white-space between command specifiers @+-
	o add more details to warning 'Extra targets ignored'
	o make.1: sync list of built-in variables with reality
	sort list of built-in variables
	o cond.c: add more details to error message for numeric comparison
	o job.c: fix handling of null bytes in output
	o Allow .break to terminate a .for loop early
	o var.c: fix out-of-bounds errors when parsing
	o fix exit status for '-q' (since 1994)
2023-01-27 16:23:54 -08:00

26 lines
1,004 B
Makefile
Executable file

# $NetBSD: make-exported.mk,v 1.7 2022/09/09 18:36:15 sjg Exp $
#
# As of 2020-08-09, the code in Var_Export is shared between the .export
# directive and the .MAKE.EXPORTED variable. This leads to non-obvious
# behavior for certain variable assignments.
-env= make-exported-value-env
-literal= make-exported-value-literal
UT_VAR= ${UNEXPANDED}
# Before 2020-10-03, the following line took the code path of .export-env,
# which was surprising behavior. Since 2020-10-03 this line tries to
# export the variable named "-env", but that is rejected because the
# variable name starts with a hyphen.
.MAKE.EXPORTED= -env
# Before 2020-10-03, if the value of .MAKE.EXPORTED started with "-literal",
# make behaved like a mixture of .export-literal and a regular .export.
#
# Since 2020-10-03, the "variable" named "-literal" is not exported anymore,
# it is just ignored since its name starts with '-'.
.MAKE.EXPORTED= -literal UT_VAR
all:
@env | sort | ${EGREP} '^UT_|make-exported-value' || true