Home | History | Annotate | Line # | Download | only in unit-tests
depsrc-nopath.mk revision 1.3
      1  1.3  rillig # $NetBSD: depsrc-nopath.mk,v 1.3 2024/04/27 20:41:32 rillig Exp $
      2  1.1  rillig #
      3  1.2  rillig # Tests for the special source .NOPATH in dependency declarations.
      4  1.1  rillig 
      5  1.3  rillig .if !target(test-*)
      6  1.3  rillig _!=	rm -rf depsrc-nopath.dir
      7  1.3  rillig _!=	mkdir depsrc-nopath.dir
      8  1.3  rillig _!=	touch depsrc-nopath.dir/regular.file
      9  1.3  rillig _!=	touch depsrc-nopath.dir/nopath.file
     10  1.3  rillig .endif
     11  1.1  rillig 
     12  1.1  rillig all:
     13  1.3  rillig 	@${MAKE} -f ${MAKEFILE} test-regular
     14  1.3  rillig 	@${MAKE} -f ${MAKEFILE} test-nopath || echo "should have failed"
     15  1.3  rillig 	@rm -rf depsrc-nopath.dir
     16  1.3  rillig 
     17  1.3  rillig .PATH: depsrc-nopath.dir
     18  1.3  rillig 
     19  1.3  rillig test-regular: regular.file
     20  1.3  rillig 	: Making ${.TARGET} from ${.ALLSRC}
     21  1.3  rillig test-nopath: nopath.file
     22  1.3  rillig 	: Making ${.TARGET} from ${.ALLSRC}
     23  1.3  rillig 
     24  1.3  rillig nopath.file: .NOPATH
     25  1.3  rillig 
     26  1.3  rillig # expect: : Making test-regular from depsrc-nopath.dir/regular.file
     27  1.3  rillig # expect: : Making test-nopath from nopath.file
     28