opnsense-src/contrib/bmake/unit-tests/sysv.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

48 lines
765 B
Makefile

# $Id: sysv.mk,v 1.5 2020/07/04 18:16:55 sjg Exp $
FOO ?=
FOOBAR = ${FOO:=bar}
_this := ${.PARSEDIR}/${.PARSEFILE}
B = /b
S = /
FUN = ${B}${S}fun
SUN = the Sun
# we expect nothing when FOO is empty
all: foo fun sam bla words
foo:
@echo FOOBAR = ${FOOBAR}
.if empty(FOO)
@FOO="foo fu" ${.MAKE} -f ${_this} foo
.endif
fun:
@echo ${FUN:T}
@echo ${FUN:${B}${S}fun=fun}
@echo ${FUN:${B}${S}%=%}
@echo ${In:L:%=% ${SUN}}
SAM=sam.c
sam:
@echo ${SAM:s%.c=acme}
@echo ${SAM:s%.c=a%.d}
@echo ${SAM:s.c=a%.d}
@echo ${SAM:sam.c=a%.c}
@echo ${SAM:%=a%.c}
@echo ${SAM:%.c=a%.c}
@echo ${SAM:sam%=a%.c}
BLA=
bla:
@echo $(BLA:%=foo/%x)
# The :Q looks like a modifier but isn't.
# It is part of the replacement string.
words:
@echo a${a b c d e:L:%a=x:Q}b