diff options
Diffstat (limited to 'contrib/bmake/unit-tests/depsrc-nopath.mk')
-rw-r--r-- | contrib/bmake/unit-tests/depsrc-nopath.mk | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/contrib/bmake/unit-tests/depsrc-nopath.mk b/contrib/bmake/unit-tests/depsrc-nopath.mk index 052c6f10db66..8d9ce93c16b9 100644 --- a/contrib/bmake/unit-tests/depsrc-nopath.mk +++ b/contrib/bmake/unit-tests/depsrc-nopath.mk @@ -1,8 +1,27 @@ -# $NetBSD: depsrc-nopath.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $ +# $NetBSD: depsrc-nopath.mk,v 1.3 2024/04/27 20:41:32 rillig Exp $ # # Tests for the special source .NOPATH in dependency declarations. -# TODO: Implementation +.if !target(test-*) +_!= rm -rf depsrc-nopath.dir +_!= mkdir depsrc-nopath.dir +_!= touch depsrc-nopath.dir/regular.file +_!= touch depsrc-nopath.dir/nopath.file +.endif all: - @:; + @${MAKE} -f ${MAKEFILE} test-regular + @${MAKE} -f ${MAKEFILE} test-nopath || echo "should have failed" + @rm -rf depsrc-nopath.dir + +.PATH: depsrc-nopath.dir + +test-regular: regular.file + : Making ${.TARGET} from ${.ALLSRC} +test-nopath: nopath.file + : Making ${.TARGET} from ${.ALLSRC} + +nopath.file: .NOPATH + +# expect: : Making test-regular from depsrc-nopath.dir/regular.file +# expect: : Making test-nopath from nopath.file |