xref: /freebsd/contrib/bmake/unit-tests/depsrc-nopath.mk (revision 548bfc56eb0b2cefa0fb8dc2478240bfef610309)
1*548bfc56SSimon J. Gerraty# $NetBSD: depsrc-nopath.mk,v 1.3 2024/04/27 20:41:32 rillig Exp $
22c3632d1SSimon J. Gerraty#
32c3632d1SSimon J. Gerraty# Tests for the special source .NOPATH in dependency declarations.
42c3632d1SSimon J. Gerraty
5*548bfc56SSimon J. Gerraty.if !target(test-*)
6*548bfc56SSimon J. Gerraty_!=	rm -rf depsrc-nopath.dir
7*548bfc56SSimon J. Gerraty_!=	mkdir depsrc-nopath.dir
8*548bfc56SSimon J. Gerraty_!=	touch depsrc-nopath.dir/regular.file
9*548bfc56SSimon J. Gerraty_!=	touch depsrc-nopath.dir/nopath.file
10*548bfc56SSimon J. Gerraty.endif
112c3632d1SSimon J. Gerraty
122c3632d1SSimon J. Gerratyall:
13*548bfc56SSimon J. Gerraty	@${MAKE} -f ${MAKEFILE} test-regular
14*548bfc56SSimon J. Gerraty	@${MAKE} -f ${MAKEFILE} test-nopath || echo "should have failed"
15*548bfc56SSimon J. Gerraty	@rm -rf depsrc-nopath.dir
16*548bfc56SSimon J. Gerraty
17*548bfc56SSimon J. Gerraty.PATH: depsrc-nopath.dir
18*548bfc56SSimon J. Gerraty
19*548bfc56SSimon J. Gerratytest-regular: regular.file
20*548bfc56SSimon J. Gerraty	: Making ${.TARGET} from ${.ALLSRC}
21*548bfc56SSimon J. Gerratytest-nopath: nopath.file
22*548bfc56SSimon J. Gerraty	: Making ${.TARGET} from ${.ALLSRC}
23*548bfc56SSimon J. Gerraty
24*548bfc56SSimon J. Gerratynopath.file: .NOPATH
25*548bfc56SSimon J. Gerraty
26*548bfc56SSimon J. Gerraty# expect: : Making test-regular from depsrc-nopath.dir/regular.file
27*548bfc56SSimon J. Gerraty# expect: : Making test-nopath from nopath.file
28