diff options
| author | David E. O'Brien <obrien@FreeBSD.org> | 2012-06-08 21:57:36 +0000 |
|---|---|---|
| committer | David E. O'Brien <obrien@FreeBSD.org> | 2012-06-08 21:57:36 +0000 |
| commit | b379932fc0f836f9f3f5ac89ef7f6cd38377dff8 (patch) | |
| tree | 18db9ddd684d6278a8a49b3850dc7c757c7e8348 /unit-tests/modmatch | |
| parent | 3e4da6f5b3dfa3b4ff9caabcbc673d721a1a9bf0 (diff) | |
Import the 6-May-2012 release of the "Portable" BSD make tool (from NetBSD).vendor/NetBSD/bmake/20120606
Submitted by: sjg@juniper.net
Diffstat (limited to 'unit-tests/modmatch')
| -rw-r--r-- | unit-tests/modmatch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/unit-tests/modmatch b/unit-tests/modmatch new file mode 100644 index 000000000000..48a1befb58b6 --- /dev/null +++ b/unit-tests/modmatch @@ -0,0 +1,25 @@ + +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: + @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}"' |
