aboutsummaryrefslogtreecommitdiff
path: root/unit-tests/make-exported.mk
diff options
context:
space:
mode:
Diffstat (limited to 'unit-tests/make-exported.mk')
-rwxr-xr-xunit-tests/make-exported.mk16
1 files changed, 16 insertions, 0 deletions
diff --git a/unit-tests/make-exported.mk b/unit-tests/make-exported.mk
new file mode 100755
index 000000000000..36f4b356ae53
--- /dev/null
+++ b/unit-tests/make-exported.mk
@@ -0,0 +1,16 @@
+# $NetBSD: make-exported.mk,v 1.1 2020/08/09 12:59:16 rillig 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
+-literal= make-exported-value
+UT_VAR= ${UNEXPANDED}
+
+# The following behavior is probably not intended.
+.MAKE.EXPORTED= -env # like .export-env
+.MAKE.EXPORTED= -literal UT_VAR # like .export-literal PATH
+
+all:
+ @env | sort | grep -E '^UT_|make-exported-value' || true