Annotation of src/share/mk/bsd.regress.mk, Revision 1.2
1.1 art 1: # No man pages for regression tests.
2: NOMAN=
3:
4: # No installation.
5: install:
6:
1.2 ! art 7: # If REGRESSTARGETS is defined and PROG is not defined, set NOPROG
1.1 art 8: .if defined(REGRESSTARGETS) && !defined(PROG)
1.2 ! art 9: NOPROG=
1.1 art 10: .endif
11:
12: .include <bsd.prog.mk>
13:
14: # XXX - Need full path to REGRESSLOG, otherwise there will be much pain.
15:
16: REGRESSLOG?=/dev/null
17: REGRESSNAME=${.CURDIR:S/${BSDSRCDIR}\/regress\///}
18:
19: .if defined(PROG) && !empty(PROG)
20: run-regress-${PROG}: ./${PROG}
21: ./${PROG}
22: .endif
23:
24: .if !defined(REGRESSTARGETS)
25: REGRESSTARGETS=run-regress-${PROG}
26: . if defined(REGRESSSKIP)
27: REGRESSSKIPTARGETS=run-regress-${PROG}
28: . endif
29: .endif
30:
31: REGRESSSKIPTARGETS?=
32:
33: regress:
34: .for RT in ${REGRESSTARGETS}
35: . if ${REGRESSSKIPTARGETS:M${RT}}
36: @echo -n "SKIP " >> ${REGRESSLOG}
37: . else
38: @if cd ${.CURDIR} && ${MAKE} ${RT}; then \
39: echo -n "SUCCESS " >> ${REGRESSLOG} ; \
40: else \
41: echo -n "FAIL " >> ${REGRESSLOG} ; \
42: echo FAILED ; \
43: fi
44: . endif
45: @echo ${REGRESSNAME}/${RT:S/^run-regress-//} >> ${REGRESSLOG}
46: .endfor
47:
48: .PHONY: regress