aboutsummaryrefslogtreecommitdiff
path: root/share/mk/bsd.test.mk
diff options
context:
space:
mode:
authorJulio Merino <jmmv@FreeBSD.org>2014-01-10 10:36:14 +0000
committerJulio Merino <jmmv@FreeBSD.org>2014-01-10 10:36:14 +0000
commitd7efee230d547e18675348e20eb131c10e8246ff (patch)
treebeda898604d6b6d8fa6d03db0f62031ae640300c /share/mk/bsd.test.mk
parent569dfed32c1a51105b854c3a2f2f50a51d50fa40 (diff)
downloadsrc-d7efee230d547e18675348e20eb131c10e8246ff.tar.gz
src-d7efee230d547e18675348e20eb131c10e8246ff.zip
Allow tests to provide a Kyuafile when they relied on auto-generation.
When generating a Kyuafile in the KYUAFILE=auto case, use a filename that is unlikely to clash with the filename used by explicitly-provided Kyuafiles. This allows a Makefile to set KYUAFILE=yes and provide a Kyuafile in the same directory when such Makefile was previously relying on KYUAFILE=auto. Fixes issues with new Kyuafiles not being picked up in NO_CLEAN builds (although manual intervention is required once, unfortunately, as described in UPDATING). Reviewed by: sjg MFC after: 1 week
Notes
Notes: svn path=/head/; revision=260505
Diffstat (limited to 'share/mk/bsd.test.mk')
-rw-r--r--share/mk/bsd.test.mk23
1 files changed, 14 insertions, 9 deletions
diff --git a/share/mk/bsd.test.mk b/share/mk/bsd.test.mk
index 8cdf91448e3a..01d74b538901 100644
--- a/share/mk/bsd.test.mk
+++ b/share/mk/bsd.test.mk
@@ -79,14 +79,20 @@ WITHOUT_MAN=yes
PROG_VARS+= BINDIR
PROGS_TARGETS+= install
-.if ${KYUAFILE:tl} != "no"
+.if ${KYUAFILE:tl} == "yes"
FILES+= Kyuafile
FILESDIR_Kyuafile= ${TESTSDIR}
-.if ${KYUAFILE:tl} == "auto"
-CLEANFILES+= Kyuafile Kyuafile.tmp
+CLEANFILES+= Kyuafile.auto Kyuafile.auto.tmp
+.elif ${KYUAFILE:tl} == "auto"
+FILES+= Kyuafile.auto
+FILESDIR_Kyuafile.auto= ${TESTSDIR}
+FILESNAME_Kyuafile.auto= Kyuafile
-Kyuafile: Makefile
+CLEANFILES+= Kyuafile.auto Kyuafile.auto.tmp
+
+.NOPATH: Kyuafile.auto
+Kyuafile.auto: Makefile
@{ \
echo '-- Automatically generated by bsd.test.mk.'; \
echo; \
@@ -94,16 +100,15 @@ Kyuafile: Makefile
echo; \
echo 'test_suite("${TESTSUITE}")'; \
echo; \
- } >Kyuafile.tmp
+ } >Kyuafile.auto.tmp
.for _T in ${_TESTS}
@echo "${TEST_INTERFACE.${_T}}_test_program{name=\"${_T}\"}" \
- >>Kyuafile.tmp
+ >>Kyuafile.auto.tmp
.endfor
.for _T in ${TESTS_SUBDIRS:N.WAIT}
- @echo "include(\"${_T}/Kyuafile\")" >>Kyuafile.tmp
+ @echo "include(\"${_T}/Kyuafile\")" >>Kyuafile.auto.tmp
.endfor
- @mv Kyuafile.tmp Kyuafile
-.endif
+ @mv Kyuafile.auto.tmp Kyuafile.auto
.endif
KYUA?= ${KYUA_PREFIX}/bin/kyua