mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 02:06:37 +00:00
![Simon J. Gerraty](/assets/img/avatar_default.png)
from ChangeLog: o cond.c: do not eval unnecessary terms of conditionals. o meta.c: report error if lseek in filemon_read fails o str.c: performance improvement for Str_Match for multiple '*' o dieQuietly: supress the failure output from make when failing node is a sub-make or a sibling failed. This cuts down greatly on unhelpful noise at the end of build log. Disabled by -dj or .MAKE.DIE_QUIETLY=no o unit test for :Or
40 lines
881 B
Makefile
40 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}
|