Module Name: src
Committed By: rillig
Date: Sat Nov 14 18:47:21 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: varmod-to-abs.exp varmod-to-abs.mk
Log Message:
make(1): add test for undocumented path-to-abspath mapping for :tA
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/varmod-to-abs.exp
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/varmod-to-abs.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/unit-tests/varmod-to-abs.exp
diff -u src/usr.bin/make/unit-tests/varmod-to-abs.exp:1.1 src/usr.bin/make/unit-tests/varmod-to-abs.exp:1.2
--- src/usr.bin/make/unit-tests/varmod-to-abs.exp:1.1 Sun Aug 16 12:07:51 2020
+++ src/usr.bin/make/unit-tests/varmod-to-abs.exp Sat Nov 14 18:47:21 2020
@@ -1 +1,2 @@
+make: "varmod-to-abs.mk" line 17: /dev/null
exit status 0
Index: src/usr.bin/make/unit-tests/varmod-to-abs.mk
diff -u src/usr.bin/make/unit-tests/varmod-to-abs.mk:1.2 src/usr.bin/make/unit-tests/varmod-to-abs.mk:1.3
--- src/usr.bin/make/unit-tests/varmod-to-abs.mk:1.2 Sun Aug 16 14:25:16 2020
+++ src/usr.bin/make/unit-tests/varmod-to-abs.mk Sat Nov 14 18:47:21 2020
@@ -1,9 +1,20 @@
-# $NetBSD: varmod-to-abs.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $
+# $NetBSD: varmod-to-abs.mk,v 1.3 2020/11/14 18:47:21 rillig Exp $
#
# Tests for the :tA variable modifier, which returns the absolute path for
# each of the words in the variable value.
# TODO: Implementation
+# Since 2016-06-03, it is possible to trick the :tA modifier into resolving
+# completely unrelated absolute paths by defining a global variable that has
+# the same name as the path that is to be resolved. There are a few
+# restrictions though: The "redirected" path must start with a slash, and it
+# must exist. (See ModifyWord_Realpath).
+#
+# XXX: This is probably not intended. It is caused by cached_realpath using
+# a GNode for keeping the cache, instead of a simple HashTable.
+does-not-exist.c= /dev/null
+.info ${does-not-exist.c:L:tA}
+
all:
@:;