Makefile revision 1.20
1# $OpenBSD: Makefile,v 1.20 2010/06/28 16:03:15 phessler 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. 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 usr.sbin misc gnu 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 34MAKE_FLAGS+= _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 You can set REGRESS_LOG to point to a file and mail it manually. 44 echo $$ make REGRESS_LOG=/var/log/regress-tests regress 45.else 46 echo Mailing regress results to ${REGRESS_MAIL} ... 47 echo If you want them to be also logged locally, you can set the 48 echo REGRESS_LOG make variable to the full path of a log file. 49 (sysctl -n kern.version && cat ${_REGRESS_TMP}) | /usr/bin/mail -s "Regress: `uname -a`" ${REGRESS_MAIL} 50.endif 51 echo ==================================================================== 52 ${_REGRESS_CLEAN} 53.endif 54 55.include <bsd.subdir.mk> 56