Makefile revision 1.13
1# $OpenBSD: Makefile,v 1.13 2002/09/02 19:56:55 avsm Exp $ 2 3# 4# To run full regression tests you just need two steps: 5# 1. make depend 6# 2. make regress 7# 8# A normal "make" is not necessary and will simply do the same thing 9# as "regress" (possibly with more bugs). This allows us to include 10# compilation as a part of the regression test. 11# 12# To get a log of test results set the REGRESS_LOG make variable to 13# a log file, use an absolute path. 14# To mail the test results set the REGRESS_MAIL make variable to an 15# email address, preferably 'regress@openbsd.org'. 16# To skip the really slow tests, set the REGRESS_SKIP_SLOW variable. 17 18SUBDIR+= etc bin include lib libexec sbin sys share usr.bin 19 20install: 21 22REGRESS_MAIL?= 23 24.if !empty(REGRESS_MAIL) 25_REGRESS_TMP!=/usr/bin/mktemp 26.endif 27 28.if empty(REGRESS_MAIL) || empty(_REGRESS_TMP) 29_REGRESS_TMP= 30_REGRESS_CLEAN=exit 0 31.else 32_REGRESS_CLEAN=rm -f ${_REGRESS_TMP} 33.endif 34.MAKEFLAGS+= _REGRESS_TMP=${_REGRESS_TMP} 35 36.INTERRUPT: 37 ${_REGRESS_CLEAN} 38 39.END: .SILENT 40.if ${.TARGETS:Mall} || ${.TARGETS:Mregress} 41 echo ==================================================================== 42.if empty(REGRESS_MAIL) || empty(_REGRESS_TMP) 43 echo Please mail a copy of these regression tests to regress@openbsd.org 44 echo to help with future development. 45 echo 46 echo You can do this automatically by setting the REGRESS_MAIL variable 47 echo $$ make REGRESS_MAIL=regress@openbsd.org regress 48 echo 49 echo You can also set REGRESS_LOG to point to a file and mail it manually. 50 echo $$ make REGRESS_LOG=/var/log/regress-tests regress 51.else 52 echo Mailing regress results to ${REGRESS_MAIL} ... 53 echo If you want them to be also logged locally, you can set the 54 echo REGRESS_LOG make variable to the full path of a log file. 55 (sysctl -n kern.version && cat ${_REGRESS_TMP}) | /usr/bin/mail -s "Regress: `uname -a`" ${REGRESS_MAIL} 56.endif 57 echo ==================================================================== 58 ${_REGRESS_CLEAN} 59.endif 60 61.include <bsd.subdir.mk> 62