Home | History | Annotate | Line # | Download | only in execve
Makefile revision 1.9
      1  1.8    mjacob #	$NetBSD: Makefile,v 1.9 1999/01/10 02:54:12 castor 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.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.1       cgd all:	${PROG} goodaout truncaout
     21  1.1       cgd CLEANFILES+= goodaout truncaout
     22  1.1       cgd 
     23  1.1       cgd regress:	test-empty test-nonexist \
     24  1.1       cgd 		test-nonexistshell test-devnullscript test-badinterplen \
     25  1.1       cgd 		test-goodscript test-scriptarg test-scriptarg-nospace \
     26  1.1       cgd 		test-goodaout test-truncaout
     27  1.1       cgd 
     28  1.1       cgd test-empty:	${PROG} ${TD}/empty
     29  1.1       cgd 	${RP} ${TD}/empty | diff - ${OD}/empty
     30  1.1       cgd 
     31  1.1       cgd test-nonexist:	${PROG}
     32  1.1       cgd 	${RP} ${TD}/nonexistent | diff - ${OD}/nonexistent
     33  1.1       cgd 
     34  1.1       cgd test-nonexistshell: ${PROG} ${TD}/nonexistshell
     35  1.1       cgd 	${RP} ${TD}/nonexistshell | diff - ${OD}/nonexistshell
     36  1.1       cgd 
     37  1.1       cgd test-devnullscript: ${PROG} ${TD}/devnullscript
     38  1.1       cgd 	${RP} ${TD}/devnullscript | diff - ${OD}/devnullscript
     39  1.1       cgd 
     40  1.1       cgd test-badinterplen: ${PROG} ${TD}/badinterplen
     41  1.1       cgd 	${RP} ${TD}/badinterplen | diff - ${OD}/badinterplen
     42  1.1       cgd 
     43  1.1       cgd test-goodscript: ${PROG} ${TD}/goodscript
     44  1.1       cgd 	${RP} ${TD}/goodscript | diff - ${OD}/goodscript
     45  1.1       cgd 
     46  1.1       cgd test-scriptarg: ${PROG} ${TD}/scriptarg
     47  1.1       cgd 	${RP} ${TD}/scriptarg 2>&1 | diff - ${OD}/scriptarg
     48  1.1       cgd 
     49  1.1       cgd test-scriptarg-nospace: ${PROG} ${TD}/scriptarg-nospace
     50  1.1       cgd 	${RP} ${TD}/scriptarg-nospace 2>&1 | diff - ${OD}/scriptarg-nospace
     51  1.1       cgd 
     52  1.1       cgd goodaout: ${TD}/goodaout.c
     53  1.7  wrstuden 	${LINK.c} ${GOODAOUT_LIB} -o ${.TARGET} ${TD}/goodaout.c ${LDLIBS}
     54  1.1       cgd 
     55  1.1       cgd test-goodaout: ${PROG} goodaout
     56  1.1       cgd 	${RP} ${.OBJDIR}/goodaout | diff - ${OD}/goodaout
     57  1.1       cgd 
     58  1.1       cgd truncaout: goodaout
     59  1.1       cgd 	/bin/rm -rf truncaout
     60  1.1       cgd 	dd if=${.OBJDIR}/goodaout of=truncaout bs=16 count=1
     61  1.1       cgd 	chmod a+x truncaout
     62  1.3     glass 
     63  1.1       cgd test-truncaout: ${PROG} truncaout
     64  1.1       cgd 	${RP} ${.OBJDIR}/truncaout | diff - ${OD}/truncaout
     65  1.1       cgd 
     66  1.1       cgd .include <bsd.prog.mk>
     67