xref: /netbsd-src/regress/sys/kern/execve/Makefile (revision 037708cbd4616ccd0d7d0381ebd3964d6696c188)
1#	$NetBSD: Makefile,v 1.4 1995/04/20 22:43:03 cgd 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
15install:
16
17regress:	test-empty test-nonexist \
18		test-nonexistshell test-devnullscript test-badinterplen \
19		test-goodscript test-scriptarg test-scriptarg-nospace \
20		test-goodaout test-truncaout
21
22test-empty:	${PROG} ${TD}/empty
23	${RP} ${TD}/empty | diff - ${OD}/empty
24
25test-nonexist:	${PROG}
26	${RP} ${TD}/nonexistent | diff - ${OD}/nonexistent
27
28test-nonexistshell: ${PROG} ${TD}/nonexistshell
29	${RP} ${TD}/nonexistshell | diff - ${OD}/nonexistshell
30
31test-devnullscript: ${PROG} ${TD}/devnullscript
32	${RP} ${TD}/devnullscript | diff - ${OD}/devnullscript
33
34test-badinterplen: ${PROG} ${TD}/badinterplen
35	${RP} ${TD}/badinterplen | diff - ${OD}/badinterplen
36
37test-goodscript: ${PROG} ${TD}/goodscript
38	${RP} ${TD}/goodscript | diff - ${OD}/goodscript
39
40test-scriptarg: ${PROG} ${TD}/scriptarg
41	${RP} ${TD}/scriptarg 2>&1 | diff - ${OD}/scriptarg
42
43test-scriptarg-nospace: ${PROG} ${TD}/scriptarg-nospace
44	${RP} ${TD}/scriptarg-nospace 2>&1 | diff - ${OD}/scriptarg-nospace
45
46goodaout: ${TD}/goodaout.c
47	${LINK.c} ${LDSTATIC} -o ${.TARGET} ${TD}/goodaout.c ${LDLIBS}
48
49test-goodaout: ${PROG} goodaout
50	${RP} ${.OBJDIR}/goodaout | diff - ${OD}/goodaout
51
52truncaout: goodaout
53	/bin/rm -rf truncaout
54	dd if=${.OBJDIR}/goodaout of=truncaout bs=16 count=1
55	chmod a+x truncaout
56
57test-truncaout: ${PROG} truncaout
58	${RP} ${.OBJDIR}/truncaout | diff - ${OD}/truncaout
59
60.include <bsd.prog.mk>
61