opnsense-src/contrib/bmake/unit-tests/modmatch.mk
Simon J. Gerraty 3841c28717 Update to bmake-20200710
Key changes include reduced noise at end of failed build log
and avoid evaluation of unnecessary terms in conditionals.
In META MODE; a target flagged .META is out-of-date if meta file
is missing

MFC after:      1 week
2020-07-12 01:11:48 +00:00

39 lines
881 B
Makefile

X=a b c d e
.for x in $X
LIB${x:tu}=/tmp/lib$x.a
.endfor
X_LIBS= ${LIBA} ${LIBD} ${LIBE}
LIB?=a
var = head
res = no
.if !empty(var:M${:Uhead\:tail:C/:.*//})
res = OK
.endif
all: show-libs check-cclass slow
show-libs:
@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}"'
LIST= One Two Three Four five six seven
check-cclass:
@echo Upper=${LIST:M[A-Z]*}
@echo Lower=${LIST:M[^A-Z]*}
@echo nose=${LIST:M[^s]*[ex]}
# Before 2020-06-13, this expression took quite a long time in Str_Match,
# calling itself 601080390 times for 16 asterisks.
slow: .PHONY
@:;: ${:U****************:M****************b:Q}