Makefile revision 1.8
1# $NetBSD: Makefile,v 1.8 1998/12/21 07:58:52 mjacob Exp $ 2 3PROG= doexec 4NOMAN= noman, no way, man 5 6LDSTATIC= -static # only static compilation makes sense here 7 8.if (defined(DESTDIR)) 9LDLIBS+= ${LIBCRT0} -lgcc -lc ${LIBCRTBEGIN} ${LIBCRTENT} 10GOODAOUT_LIB= -nostdlib -L${DESTDIR}/usr/lib ${LDSTATIC} 11.else 12GOODAOUT_LIB= ${LDSTATIC} 13.endif 14 15RP= ${.OBJDIR}/${PROG} 16TD= ${.CURDIR}/tests 17OD= ${.CURDIR}/good 18 19all: ${PROG} goodaout truncaout 20CLEANFILES+= goodaout truncaout 21 22regress: test-empty test-nonexist \ 23 test-nonexistshell test-devnullscript test-badinterplen \ 24 test-goodscript test-scriptarg test-scriptarg-nospace \ 25 test-goodaout test-truncaout 26 27test-empty: ${PROG} ${TD}/empty 28 ${RP} ${TD}/empty | diff - ${OD}/empty 29 30test-nonexist: ${PROG} 31 ${RP} ${TD}/nonexistent | diff - ${OD}/nonexistent 32 33test-nonexistshell: ${PROG} ${TD}/nonexistshell 34 ${RP} ${TD}/nonexistshell | diff - ${OD}/nonexistshell 35 36test-devnullscript: ${PROG} ${TD}/devnullscript 37 ${RP} ${TD}/devnullscript | diff - ${OD}/devnullscript 38 39test-badinterplen: ${PROG} ${TD}/badinterplen 40 ${RP} ${TD}/badinterplen | diff - ${OD}/badinterplen 41 42test-goodscript: ${PROG} ${TD}/goodscript 43 ${RP} ${TD}/goodscript | diff - ${OD}/goodscript 44 45test-scriptarg: ${PROG} ${TD}/scriptarg 46 ${RP} ${TD}/scriptarg 2>&1 | diff - ${OD}/scriptarg 47 48test-scriptarg-nospace: ${PROG} ${TD}/scriptarg-nospace 49 ${RP} ${TD}/scriptarg-nospace 2>&1 | diff - ${OD}/scriptarg-nospace 50 51goodaout: ${TD}/goodaout.c 52 ${LINK.c} ${GOODAOUT_LIB} -o ${.TARGET} ${TD}/goodaout.c ${LDLIBS} 53 54test-goodaout: ${PROG} goodaout 55 ${RP} ${.OBJDIR}/goodaout | diff - ${OD}/goodaout 56 57truncaout: goodaout 58 /bin/rm -rf truncaout 59 dd if=${.OBJDIR}/goodaout of=truncaout bs=16 count=1 60 chmod a+x truncaout 61 62test-truncaout: ${PROG} truncaout 63 ${RP} ${.OBJDIR}/truncaout | diff - ${OD}/truncaout 64 65.include <bsd.prog.mk> 66