1# $NetBSD: Makefile,v 1.3 2016/03/27 14:57:50 christos Exp $ 2# 3 4.include <bsd.own.mk> 5 6TESTSDIR = ${TESTSBASE}/bin/sh/dotcmd 7 8TESTS_SH = t_dotcmd 9 10.if !defined(TEST_SH) 11TEST_SH = ${HOST_SH} 12.endif 13 14FILESDIR = ${TESTSDIR}/out 15 16# Testing scripts: dotcmd in various scopes includes a file with 17# return / break / continue in various scopes. 18# 19.for cmd_scope in case compound file for func subshell until while 20. for cmd in return break continue 21FILES += ${cmd}_${cmd_scope} 22FILESDIR_${cmd}_${cmd_scope} = ${TESTSDIR} 23FILESBUILD_${cmd}_${cmd_scope} = yes 24 25${cmd}_${cmd_scope}: scoped_command 26 ${TEST_SH} ${.CURDIR}/scoped_command '${cmd_scope}' '${cmd}' '${cmd}' \ 27 >'${.TARGET}' 28 29. for dot_scope in case compound file for func subshell until while 30FILES += \ 31 ${dot_scope}_${cmd}_${cmd_scope} \ 32 out/${dot_scope}_${cmd}_${cmd_scope}.out 33FILESDIR_${dot_scope}_${cmd}_${cmd_scope} = ${TESTSDIR} 34FILESBUILD_${dot_scope}_${cmd}_${cmd_scope} = yes 35FILESMODE_${dot_scope}_${cmd}_${cmd_scope} = ${BINMODE} 36 37${dot_scope}_${cmd}_${cmd_scope}: scoped_command 38 ${TEST_SH} ${.CURDIR}/scoped_command '${dot_scope}' \ 39 '. "${cmd}_${cmd_scope}"' 'dotcmd' 'dotcmd' >'${.TARGET}' 40. endfor 41. endfor 42.endfor 43 44.include <bsd.test.mk> 45