[BACK]Return to bsd.test.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / mk

File: [cvs.NetBSD.org] / src / share / mk / bsd.test.mk (download)

Revision 1.6, Sun Mar 2 11:31:42 2008 UTC (12 years, 9 months ago) by jmmv
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base
Branch point for: yamt-pf42, mjf-devfs2
Changes since 1.5: +3 -1 lines

Fix build of tests when USETOOLS=no.  Reported by veego@ in current-users
and notified to me by martin@.

# $NetBSD: bsd.test.mk,v 1.6 2008/03/02 11:31:42 jmmv Exp $
#

.include <bsd.init.mk>

TESTSBASE=	/usr/tests

_TESTS=		# empty

.if defined(TESTS_CXX)
PROGS_CXX+=	${TESTS_CXX}
LDADD+=		-latf
.  for _T in ${TESTS_CXX}
BINDIR.${_T}=	${TESTSDIR}
MAN.${_T}?=	# empty
_TESTS+=	${_T}
.  endfor
.endif

.if defined(TESTS_SH)

.  for _T in ${TESTS_SH}
SCRIPTS+=		${_T}
SCRIPTSDIR_${_T}=	${TESTSDIR}

_TESTS+=		${_T}
CLEANFILES+=		${_T} ${_T}.tmp

TESTS_SH_SRC_${_T}?=	${_T}.sh
${_T}: ${TESTS_SH_SRC_${_T}} atf-compile-cookie
	${_MKTARGET_BUILD}
	${TOOL_ATF_COMPILE} -o ${.TARGET}.tmp ${.ALLSRC}
	mv ${.TARGET}.tmp ${.TARGET}
.  endfor
.endif

CLEANFILES+= atf-compile-cookie
.if ${USETOOLS} == "yes"
atf-compile-cookie: ${TOOL_ATF_COMPILE}
	touch atf-compile-cookie
.else
atf-compile-cookie:
	test -f atf-compile-cookie || touch atf-compile-cookie
.endif

.if !defined(NOATFFILE)
FILES+=			Atffile
FILESDIR_Atffile=	${TESTSDIR}
.include <bsd.files.mk>
.endif

.if !empty(SCRIPTS) || !empty(PROGS_CXX)
.  include <bsd.prog.mk>
.endif