]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bmake/unit-tests/varmod-to-abs.mk
Merge bmake-20201117
[FreeBSD/FreeBSD.git] / contrib / bmake / unit-tests / varmod-to-abs.mk
1 # $NetBSD: varmod-to-abs.mk,v 1.5 2020/11/15 05:48:17 rillig Exp $
2 #
3 # Tests for the :tA variable modifier, which returns the absolute path for
4 # each of the words in the variable value.
5
6 # TODO: Implementation
7
8 # Between 2016-06-03 and 2020-11-14, it was possible to trick the :tA modifier
9 # into resolving completely unrelated absolute paths by defining a global
10 # variable with the same name as the path that is to be resolved.  There were
11 # a few restrictions though: The "redirected" path had to start with a slash,
12 # and it had to exist (see ModifyWord_Realpath).
13 #
14 # This unintended behavior was caused by cached_realpath using a GNode for
15 # keeping the cache, just like the GNode for global variables.
16 .MAKEFLAGS: -dd
17 does-not-exist.c=       /dev/null
18 .info ${does-not-exist.c:L:tA}
19 .info ${does-not-exist.c:L:tA}
20
21 # The output of the following line is modified by the global _SED_CMDS in
22 # unit-tests/Makefile.  See the .rawout file for the truth.
23 .info ${MAKEFILE:tA}
24
25 .MAKEFLAGS: -d0
26
27 all:
28         @:;