]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bmake/unit-tests/modmatch.mk
Update to bmake-20201101
[FreeBSD/FreeBSD.git] / contrib / bmake / unit-tests / modmatch.mk
1 # $NetBSD: modmatch.mk,v 1.9 2020/10/24 08:50:17 rillig Exp $
2 #
3 # Tests for the :M and :S modifiers.
4
5 X=      a b c d e
6
7 .for x in $X
8 LIB${x:tu}=     /tmp/lib$x.a
9 .endfor
10
11 X_LIBS= ${LIBA} ${LIBD} ${LIBE}
12
13 LIB?=   a
14
15 var=    head
16 res=    no
17 .if !empty(var:M${:Uhead\:tail:C/:.*//})
18 res=    OK
19 .endif
20
21 all:    show-libs
22
23 show-libs:
24         @for x in $X; do ${.MAKE} -f ${MAKEFILE} show LIB=$$x; done
25         @echo "Mscanner=${res}"
26
27 show:
28         @echo 'LIB=${LIB} X_LIBS:M$${LIB$${LIB:tu}} is "${X_LIBS:M${LIB${LIB:tu}}}"'
29         @echo 'LIB=${LIB} X_LIBS:M*/lib$${LIB}.a is "${X_LIBS:M*/lib${LIB}.a}"'
30         @echo 'LIB=${LIB} X_LIBS:M*/lib$${LIB}.a:tu is "${X_LIBS:M*/lib${LIB}.a:tu}"'