xref: /netbsd-src/regress/sys/kern/execve/Makefile (revision fdecd6a253f999ae92b139670d9e15cc9df4497c)
1#	$NetBSD: Makefile,v 1.5 1997/05/07 16:01:49 mycroft Exp $
2
3PROG=	doexec
4NOMAN=	noman, no way, man
5
6LDSTATIC= -static
7
8RP=	${.OBJDIR}/${PROG}
9TD=	${.CURDIR}/tests
10OD=	${.CURDIR}/good
11
12all:	${PROG} goodaout truncaout
13CLEANFILES+= goodaout truncaout
14
15regress:	test-empty test-nonexist \
16		test-nonexistshell test-devnullscript test-badinterplen \
17		test-goodscript test-scriptarg test-scriptarg-nospace \
18		test-goodaout test-truncaout
19
20test-empty:	${PROG} ${TD}/empty
21	${RP} ${TD}/empty | diff - ${OD}/empty
22
23test-nonexist:	${PROG}
24	${RP} ${TD}/nonexistent | diff - ${OD}/nonexistent
25
26test-nonexistshell: ${PROG} ${TD}/nonexistshell
27	${RP} ${TD}/nonexistshell | diff - ${OD}/nonexistshell
28
29test-devnullscript: ${PROG} ${TD}/devnullscript
30	${RP} ${TD}/devnullscript | diff - ${OD}/devnullscript
31
32test-badinterplen: ${PROG} ${TD}/badinterplen
33	${RP} ${TD}/badinterplen | diff - ${OD}/badinterplen
34
35test-goodscript: ${PROG} ${TD}/goodscript
36	${RP} ${TD}/goodscript | diff - ${OD}/goodscript
37
38test-scriptarg: ${PROG} ${TD}/scriptarg
39	${RP} ${TD}/scriptarg 2>&1 | diff - ${OD}/scriptarg
40
41test-scriptarg-nospace: ${PROG} ${TD}/scriptarg-nospace
42	${RP} ${TD}/scriptarg-nospace 2>&1 | diff - ${OD}/scriptarg-nospace
43
44goodaout: ${TD}/goodaout.c
45	${LINK.c} ${LDSTATIC} -o ${.TARGET} ${TD}/goodaout.c ${LDLIBS}
46
47test-goodaout: ${PROG} goodaout
48	${RP} ${.OBJDIR}/goodaout | diff - ${OD}/goodaout
49
50truncaout: goodaout
51	/bin/rm -rf truncaout
52	dd if=${.OBJDIR}/goodaout of=truncaout bs=16 count=1
53	chmod a+x truncaout
54
55test-truncaout: ${PROG} truncaout
56	${RP} ${.OBJDIR}/truncaout | diff - ${OD}/truncaout
57
58.include <bsd.prog.mk>
59