xref: /minix3/usr.bin/make/unit-tests/modmatch.mk (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc
2*0a6a1f1dSLionel SambucX=a b c d e
3*0a6a1f1dSLionel Sambuc
4*0a6a1f1dSLionel Sambuc.for x in $X
5*0a6a1f1dSLionel SambucLIB${x:tu}=/tmp/lib$x.a
6*0a6a1f1dSLionel Sambuc.endfor
7*0a6a1f1dSLionel Sambuc
8*0a6a1f1dSLionel SambucX_LIBS= ${LIBA} ${LIBD} ${LIBE}
9*0a6a1f1dSLionel Sambuc
10*0a6a1f1dSLionel SambucLIB?=a
11*0a6a1f1dSLionel Sambuc
12*0a6a1f1dSLionel Sambucvar = head
13*0a6a1f1dSLionel Sambucres = no
14*0a6a1f1dSLionel Sambuc.if !empty(var:M${:Uhead\:tail:C/:.*//})
15*0a6a1f1dSLionel Sambucres = OK
16*0a6a1f1dSLionel Sambuc.endif
17*0a6a1f1dSLionel Sambuc
18*0a6a1f1dSLionel Sambucall:
19*0a6a1f1dSLionel Sambuc	@for x in $X; do ${.MAKE} -f ${MAKEFILE} show LIB=$$x; done
20*0a6a1f1dSLionel Sambuc	@echo "Mscanner=${res}"
21*0a6a1f1dSLionel Sambuc
22*0a6a1f1dSLionel Sambucshow:
23*0a6a1f1dSLionel Sambuc	@echo 'LIB=${LIB} X_LIBS:M$${LIB$${LIB:tu}} is "${X_LIBS:M${LIB${LIB:tu}}}"'
24*0a6a1f1dSLionel Sambuc	@echo 'LIB=${LIB} X_LIBS:M*/lib$${LIB}.a is "${X_LIBS:M*/lib${LIB}.a}"'
25*0a6a1f1dSLionel Sambuc	@echo 'LIB=${LIB} X_LIBS:M*/lib$${LIB}.a:tu is "${X_LIBS:M*/lib${LIB}.a:tu}"'
26