1 # $NetBSD: Makefile,v 1.17 2002/09/18 05:41:53 lukem Exp $
4 LDSTATIC
= -static
# only static compilation makes sense here
8 .
include <bsd.own.mk
> # May define DESTDIR in mk.conf..
10 LDLIBS
+= -lgcc
-lc
-lgcc
${LIBCRTEND}
11 GOODAOUT_LIB
= -nostdlib
-L
${DESTDIR}/usr
/lib
${LDSTATIC} \
12 ${LIBCRT0} ${LIBCRTBEGIN}
14 GOODAOUT_LIB
= ${LDSTATIC}
21 TESTSCRIPTS
= empty nonexistshell devnullscript badinterplen goodscript \
22 scriptarg scriptarg-nospace
24 all: ${PROG} goodaout truncaout
${TESTSCRIPTS}
26 .for x in
${TESTSCRIPTS}
32 CLEANFILES
+= goodaout truncaout
${TESTSCRIPTS}
34 regress
: test-empty test-nonexist \
35 test-nonexistshell test-devnullscript test-badinterplen \
36 test-goodscript test-scriptarg test-scriptarg-nospace \
37 test-goodaout test-truncaout
39 test-empty
: ${PROG} empty
40 ${RP} empty | diff
${OD}/empty
-
42 test-nonexist
: ${PROG}
43 ${RP} ${TD}/nonexistent | diff
${OD}/nonexistent
-
45 test-nonexistshell
: ${PROG} nonexistshell
46 ${RP} nonexistshell | diff
${OD}/nonexistshell
-
48 test-devnullscript
: ${PROG} devnullscript
49 ${RP} devnullscript | diff
${OD}/devnullscript
-
51 test-badinterplen
: ${PROG} badinterplen
52 ${RP} badinterplen | diff
${OD}/badinterplen
-
54 test-goodscript
: ${PROG} goodscript
55 ${RP} goodscript | diff
${OD}/goodscript
-
57 test-scriptarg
: ${PROG} scriptarg
58 ${RP} scriptarg
2>&1 | diff
${OD}/scriptarg
-
60 test-scriptarg-nospace
: ${PROG} scriptarg-nospace
61 ${RP} scriptarg-nospace
2>&1 | diff
${OD}/scriptarg-nospace
-
63 goodaout
: ${TD}/goodaout.c
64 ${LINK.c
} ${GOODAOUT_LIB} -o
${.TARGET
} ${TD}/goodaout.c
${LDLIBS}
66 test-goodaout
: ${PROG} goodaout
67 ${RP} goodaout | diff
${OD}/goodaout
-
71 dd if
=goodaout of
=truncaout bs
=16 count
=1
74 test-truncaout
: ${PROG} truncaout
75 ${RP} truncaout | diff
${OD}/truncaout
-
77 .
include <bsd.prog.mk
>