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