Fix mdoc(7)/man(7) mix up.
[netbsd-mini2440.git] / share / mk / bsd.test.mk
blobe5aec7f16986d41859aad20d9aaa524bbab634b2
1 # $NetBSD: bsd.test.mk,v 1.6 2008/03/02 11:31:42 jmmv Exp $
4 .include <bsd.init.mk>
6 TESTSBASE= /usr/tests
8 _TESTS= # empty
10 .if defined(TESTS_C)
11 PROGS+= ${TESTS_C}
12 LDADD+= -latf-c
13 . for _T in ${TESTS_C}
14 BINDIR.${_T}= ${TESTSDIR}
15 MAN.${_T}?= # empty
16 _TESTS+= ${_T}
17 . endfor
18 .endif
20 .if defined(TESTS_CXX)
21 PROGS_CXX+= ${TESTS_CXX}
22 LDADD+= -latf-c++ -latf-c
23 . for _T in ${TESTS_CXX}
24 BINDIR.${_T}= ${TESTSDIR}
25 MAN.${_T}?= # empty
26 _TESTS+= ${_T}
27 . endfor
28 .endif
30 .if defined(TESTS_SH)
32 . for _T in ${TESTS_SH}
33 SCRIPTS+= ${_T}
34 SCRIPTSDIR_${_T}= ${TESTSDIR}
36 _TESTS+= ${_T}
37 CLEANFILES+= ${_T} ${_T}.tmp
39 TESTS_SH_SRC_${_T}?= ${_T}.sh
40 ${_T}: ${TESTS_SH_SRC_${_T}} atf-compile-cookie
41 ${_MKTARGET_BUILD}
42 ${TOOL_ATF_COMPILE} -o ${.TARGET}.tmp ${.ALLSRC}
43 mv ${.TARGET}.tmp ${.TARGET}
44 . endfor
45 .endif
47 CLEANFILES+= atf-compile-cookie
48 .if ${USETOOLS} == "yes"
49 atf-compile-cookie: ${TOOL_ATF_COMPILE}
50 touch atf-compile-cookie
51 .else
52 atf-compile-cookie:
53 test -f atf-compile-cookie || touch atf-compile-cookie
54 .endif
56 .if !defined(NOATFFILE)
57 FILES+= Atffile
58 FILESDIR_Atffile= ${TESTSDIR}
59 .include <bsd.files.mk>
60 .endif
62 .if !empty(SCRIPTS) || !empty(PROGS) || !empty(PROGS_CXX)
63 . include <bsd.prog.mk>
64 .endif