]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bmake/unit-tests/forsubst.mk
Merge bmake-20201117
[FreeBSD/FreeBSD.git] / contrib / bmake / unit-tests / forsubst.mk
1 # $NetBSD: forsubst.mk,v 1.3 2020/11/03 17:59:27 rillig Exp $
2 #
3 # The parser used to break dependency lines at ';' without regard for
4 # substitution patterns.  Back then, the first ';' was interpreted as the
5 # separator between the dependency and its commands.  This (perhaps coupled
6 # with the new handling of .for variables in ${:U<value>...) caused
7 # interesting results for lines like:
8 #
9 # .for file in ${LIST}
10 #   for-subst:       ${file:S;^;${here}/;g}
11 # .endfor
12 #
13 # See the commit to unit-tests/forsubst (without the .mk) from 2009-10-07.
14
15 all: for-subst
16
17 here := ${.PARSEDIR}
18 # this should not run foul of the parser
19 .for file in ${.PARSEFILE}
20 for-subst:        ${file:S;^;${here}/;g}
21         @echo ".for with :S;... OK"
22 .endfor