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