varmod-tail.mk revision 1.5 1 # $NetBSD: varmod-tail.mk,v 1.5 2024/06/01 18:44:05 rillig Exp $
2 #
3 # Tests for the :T variable modifier, which returns the basename of each of
4 # the words in the variable value.
5
6
7 # If the ':T' is not directly followed by a delimiting ':' or '}', the
8 # ':from=to' modifier is tried as a fallback.
9 .if ${:U Tail :Tail=replaced} != "replaced"
10 . error
11 .endif
12
13
14 all:
15 .for path in a/b/c def a.b.c a.b/c a a.a .gitignore a a.a trailing/
16 @echo "tail (basename) of '"${path:Q}"' is '"${path:T:Q}"'"
17 .endfor
18