2008-05-01 19:36:36 +04:00
|
|
|
# $NetBSD: bsd.test.mk,v 1.7 2008/05/01 15:36:36 jmmv Exp $
|
2007-11-12 18:05:15 +03:00
|
|
|
#
|
|
|
|
|
2008-02-05 20:50:47 +03:00
|
|
|
.include <bsd.init.mk>
|
|
|
|
|
2007-11-12 18:05:15 +03:00
|
|
|
TESTSBASE= /usr/tests
|
|
|
|
|
|
|
|
_TESTS= # empty
|
|
|
|
|
2008-05-01 19:36:36 +04:00
|
|
|
.if defined(TESTS_C)
|
|
|
|
PROGS+= ${TESTS_C}
|
|
|
|
LDADD+= -latf-c
|
|
|
|
. for _T in ${TESTS_C}
|
|
|
|
BINDIR.${_T}= ${TESTSDIR}
|
|
|
|
MAN.${_T}?= # empty
|
|
|
|
_TESTS+= ${_T}
|
|
|
|
. endfor
|
|
|
|
.endif
|
|
|
|
|
2007-11-12 18:05:15 +03:00
|
|
|
.if defined(TESTS_CXX)
|
|
|
|
PROGS_CXX+= ${TESTS_CXX}
|
2008-05-01 19:36:36 +04:00
|
|
|
LDADD+= -latf-c++ -latf-c
|
2007-11-12 18:05:15 +03:00
|
|
|
. 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
|
2008-02-04 17:15:57 +03:00
|
|
|
${_T}: ${TESTS_SH_SRC_${_T}} atf-compile-cookie
|
2007-11-12 18:05:15 +03:00
|
|
|
${_MKTARGET_BUILD}
|
|
|
|
${TOOL_ATF_COMPILE} -o ${.TARGET}.tmp ${.ALLSRC}
|
|
|
|
mv ${.TARGET}.tmp ${.TARGET}
|
|
|
|
. endfor
|
|
|
|
.endif
|
|
|
|
|
2008-03-02 14:31:42 +03:00
|
|
|
CLEANFILES+= atf-compile-cookie
|
2008-02-04 17:15:57 +03:00
|
|
|
.if ${USETOOLS} == "yes"
|
|
|
|
atf-compile-cookie: ${TOOL_ATF_COMPILE}
|
|
|
|
touch atf-compile-cookie
|
|
|
|
.else
|
|
|
|
atf-compile-cookie:
|
2008-03-02 14:31:42 +03:00
|
|
|
test -f atf-compile-cookie || touch atf-compile-cookie
|
2008-02-04 17:15:57 +03:00
|
|
|
.endif
|
|
|
|
|
2008-02-10 15:28:54 +03:00
|
|
|
.if !defined(NOATFFILE)
|
2007-11-12 18:05:15 +03:00
|
|
|
FILES+= Atffile
|
|
|
|
FILESDIR_Atffile= ${TESTSDIR}
|
|
|
|
.include <bsd.files.mk>
|
2008-02-10 15:28:54 +03:00
|
|
|
.endif
|
2007-11-12 18:05:15 +03:00
|
|
|
|
2008-05-01 19:36:36 +04:00
|
|
|
.if !empty(SCRIPTS) || !empty(PROGS) || !empty(PROGS_CXX)
|
2007-11-12 18:05:15 +03:00
|
|
|
. include <bsd.prog.mk>
|
|
|
|
.endif
|