2020-11-07 19:39:21 +00:00
|
|
|
# $NetBSD: modmatch.mk,v 1.9 2020/10/24 08:50:17 rillig Exp $
|
2020-09-05 16:11:04 +00:00
|
|
|
#
|
|
|
|
# Tests for the :M and :S modifiers.
|
2012-06-08 21:57:36 +00:00
|
|
|
|
2020-11-07 19:39:21 +00:00
|
|
|
X= a b c d e
|
2012-06-08 21:57:36 +00:00
|
|
|
|
|
|
|
.for x in $X
|
2020-11-07 19:39:21 +00:00
|
|
|
LIB${x:tu}= /tmp/lib$x.a
|
2012-06-08 21:57:36 +00:00
|
|
|
.endfor
|
|
|
|
|
2020-11-07 19:39:21 +00:00
|
|
|
X_LIBS= ${LIBA} ${LIBD} ${LIBE}
|
2012-06-08 21:57:36 +00:00
|
|
|
|
2020-11-07 19:39:21 +00:00
|
|
|
LIB?= a
|
2012-06-08 21:57:36 +00:00
|
|
|
|
2020-11-07 19:39:21 +00:00
|
|
|
var= head
|
|
|
|
res= no
|
2012-06-08 21:57:36 +00:00
|
|
|
.if !empty(var:M${:Uhead\:tail:C/:.*//})
|
2020-11-07 19:39:21 +00:00
|
|
|
res= OK
|
2012-06-08 21:57:36 +00:00
|
|
|
.endif
|
|
|
|
|
2020-09-05 16:11:04 +00:00
|
|
|
all: show-libs
|
2017-04-15 00:51:18 +00:00
|
|
|
|
|
|
|
show-libs:
|
2012-06-08 21:57:36 +00:00
|
|
|
@for x in $X; do ${.MAKE} -f ${MAKEFILE} show LIB=$$x; done
|
|
|
|
@echo "Mscanner=${res}"
|
|
|
|
|
|
|
|
show:
|
|
|
|
@echo 'LIB=${LIB} X_LIBS:M$${LIB$${LIB:tu}} is "${X_LIBS:M${LIB${LIB:tu}}}"'
|
|
|
|
@echo 'LIB=${LIB} X_LIBS:M*/lib$${LIB}.a is "${X_LIBS:M*/lib${LIB}.a}"'
|
|
|
|
@echo 'LIB=${LIB} X_LIBS:M*/lib$${LIB}.a:tu is "${X_LIBS:M*/lib${LIB}.a:tu}"'
|