[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / src / regress

File: [local] / src / regress / Makefile (download)

Revision 1.19, Sat Feb 5 10:39:50 2005 UTC (19 years, 3 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.18: +2 -2 lines

introduce explicit MAKE_FLAGS variable, which has no surprising behavior
dependent on make, and fixes the regress problem reported by David Krause.

#	$OpenBSD: Makefile,v 1.19 2005/02/05 10:39:50 espie Exp $

#
# To run full regression tests you just need two steps:
# 1. make depend
# 2. make regress
#
# A normal "make" is not necessary and will simply do the same thing
# as "regress" (possibly with more bugs). This allows us to include
# compilation as a part of the regression test.
#
# To get a log of test results set the REGRESS_LOG make variable to
# a log file, use an absolute path.
# To mail the test results set the REGRESS_MAIL make variable to an
# email address, preferably 'regress@openbsd.org'.
# To skip the really slow tests, set the REGRESS_SKIP_SLOW variable.

SUBDIR+= etc bin include lib libexec sbin sys share usr.bin usr.sbin misc gnu

install:

REGRESS_MAIL?=

.if !empty(REGRESS_MAIL)
_REGRESS_TMP!=/usr/bin/mktemp
.endif

.if empty(REGRESS_MAIL) || empty(_REGRESS_TMP)
_REGRESS_TMP=
_REGRESS_CLEAN=exit 0
.else
_REGRESS_CLEAN=rm -f ${_REGRESS_TMP}
.endif
MAKE_FLAGS+= _REGRESS_TMP=${_REGRESS_TMP}

.INTERRUPT:
	${_REGRESS_CLEAN}

.END: .SILENT
.if ${.TARGETS:Mall} || ${.TARGETS:Mregress} 
	echo ====================================================================
.if empty(REGRESS_MAIL) || empty(_REGRESS_TMP)
#	echo Please mail a copy of these regression tests to regress@openbsd.org
#	echo to help with future development.
#	echo
#	echo You can do this automatically by setting the REGRESS_MAIL variable
#	echo $$ make REGRESS_MAIL=regress@openbsd.org regress
#	echo
	echo You can set REGRESS_LOG to point to a file and mail it manually.
	echo $$ make REGRESS_LOG=/var/log/regress-tests regress
.else
	echo Mailing regress results to ${REGRESS_MAIL} ...
	echo If you want them to be also logged locally, you can set the
	echo REGRESS_LOG make variable to the full path of a log file.
	(sysctl -n kern.version && cat ${_REGRESS_TMP}) | /usr/bin/mail -s "Regress: `uname -a`" ${REGRESS_MAIL}
.endif
	echo ====================================================================
	${_REGRESS_CLEAN}
.endif

.include <bsd.subdir.mk>