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