1 1.11 is # $NetBSD: Makefile,v 1.11 1999/02/18 11:59:06 is Exp $ 2 1.1 cgd 3 1.1 cgd PROG= doexec 4 1.10 lukem MKMAN= no 5 1.1 cgd 6 1.6 cgd LDSTATIC= -static # only static compilation makes sense here 7 1.1 cgd 8 1.7 wrstuden .if (defined(DESTDIR)) 9 1.9 castor LDLIBS+= -lgcc -lc ${LIBCRTEND} 10 1.9 castor GOODAOUT_LIB= -nostdlib -L${DESTDIR}/usr/lib ${LDSTATIC} 11 1.9 castor GOODAOUT_LIB+= ${LIBCRT0} ${LIBCRTBEGIN} 12 1.7 wrstuden .else 13 1.7 wrstuden GOODAOUT_LIB= ${LDSTATIC} 14 1.7 wrstuden .endif 15 1.7 wrstuden 16 1.1 cgd RP= ${.OBJDIR}/${PROG} 17 1.1 cgd TD= ${.CURDIR}/tests 18 1.1 cgd OD= ${.CURDIR}/good 19 1.1 cgd 20 1.11 is TESTSCRIPTS=empty nonexistshell devnullscript badinterplen goodscript \ 21 1.11 is scriptarg scriptarg-nospace 22 1.11 is 23 1.11 is all: ${PROG} goodaout truncaout ${TESTSCRIPTS} 24 1.11 is 25 1.11 is .for x in ${TESTSCRIPTS} 26 1.11 is ${x}: ${TD}/${x} 27 1.11 is cp ${TD}/${x} ${.OBJDIR} 28 1.11 is chmod +x ${.OBJDIR}/${x} 29 1.11 is .endfor 30 1.11 is 31 1.11 is CLEANFILES+= goodaout truncaout ${TESTSCRIPTS} 32 1.1 cgd 33 1.1 cgd regress: test-empty test-nonexist \ 34 1.1 cgd test-nonexistshell test-devnullscript test-badinterplen \ 35 1.1 cgd test-goodscript test-scriptarg test-scriptarg-nospace \ 36 1.1 cgd test-goodaout test-truncaout 37 1.1 cgd 38 1.11 is empty: ${TD}/empty 39 1.11 is cp ${TD}/empty ${.OBJDIR}/empty 40 1.11 is chmod +x ${.OBJDIR}/empty 41 1.11 is 42 1.11 is test-empty: ${PROG} empty 43 1.11 is ${RP} ${.OBJDIR}/empty | diff - ${OD}/empty 44 1.1 cgd 45 1.1 cgd test-nonexist: ${PROG} 46 1.1 cgd ${RP} ${TD}/nonexistent | diff - ${OD}/nonexistent 47 1.1 cgd 48 1.11 is test-nonexistshell: ${PROG} nonexistshell 49 1.11 is ${RP} ${.OBJDIR}/nonexistshell | diff - ${OD}/nonexistshell 50 1.1 cgd 51 1.11 is test-devnullscript: ${PROG} devnullscript 52 1.11 is ${RP} ${.OBJDIR}/devnullscript | diff - ${OD}/devnullscript 53 1.1 cgd 54 1.11 is test-badinterplen: ${PROG} badinterplen 55 1.11 is ${RP} ${.OBJDIR}/badinterplen | diff - ${OD}/badinterplen 56 1.1 cgd 57 1.11 is test-goodscript: ${PROG} goodscript 58 1.11 is ${RP} ${.OBJDIR}/goodscript | diff - ${OD}/goodscript 59 1.1 cgd 60 1.11 is test-scriptarg: ${PROG} scriptarg 61 1.11 is ${RP} ${.OBJDIR}/scriptarg 2>&1 | diff - ${OD}/scriptarg 62 1.1 cgd 63 1.11 is test-scriptarg-nospace: ${PROG} scriptarg-nospace 64 1.11 is ${RP} ${.OBJDIR}/scriptarg-nospace 2>&1 | diff - ${OD}/scriptarg-nospace 65 1.1 cgd 66 1.1 cgd goodaout: ${TD}/goodaout.c 67 1.7 wrstuden ${LINK.c} ${GOODAOUT_LIB} -o ${.TARGET} ${TD}/goodaout.c ${LDLIBS} 68 1.1 cgd 69 1.1 cgd test-goodaout: ${PROG} goodaout 70 1.1 cgd ${RP} ${.OBJDIR}/goodaout | diff - ${OD}/goodaout 71 1.1 cgd 72 1.1 cgd truncaout: goodaout 73 1.1 cgd /bin/rm -rf truncaout 74 1.1 cgd dd if=${.OBJDIR}/goodaout of=truncaout bs=16 count=1 75 1.1 cgd chmod a+x truncaout 76 1.3 glass 77 1.1 cgd test-truncaout: ${PROG} truncaout 78 1.1 cgd ${RP} ${.OBJDIR}/truncaout | diff - ${OD}/truncaout 79 1.1 cgd 80 1.1 cgd .include <bsd.prog.mk> 81