Simplify Kyuafile generation logic with KYUAFILE == auto and
related complexity with variables MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D4406 (part of a larger diff) Reviewed by: emaste, Evan Cramer <eccramer@gmail.com> Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
c4aa7d7701
commit
c4835f11d0
@ -52,24 +52,20 @@ KYUAFILE?= auto
|
||||
# hierarchy specified by this variable.
|
||||
KYUA_PREFIX?= /usr/local
|
||||
|
||||
.if ${KYUAFILE:tl} == "yes"
|
||||
.if ${KYUAFILE:tl} != "no"
|
||||
FILES+= Kyuafile
|
||||
FILESDIR_Kyuafile= ${TESTSDIR}
|
||||
.endif
|
||||
|
||||
CLEANFILES+= Kyuafile.auto Kyuafile.auto.tmp
|
||||
.elif ${KYUAFILE:tl} == "auto"
|
||||
FILES+= Kyuafile.auto
|
||||
FILESDIR_Kyuafile.auto= ${TESTSDIR}
|
||||
FILESNAME_Kyuafile.auto= Kyuafile
|
||||
|
||||
CLEANFILES+= Kyuafile.auto Kyuafile.auto.tmp
|
||||
.if ${KYUAFILE:tl} == "auto"
|
||||
CLEANFILES+= Kyuafile Kyuafile.auto.tmp
|
||||
.endif
|
||||
|
||||
.for _T in ${_TESTS}
|
||||
_TEST_METADATA.${_T}= ${TEST_METADATA} ${TEST_METADATA.${_T}}
|
||||
.endfor
|
||||
|
||||
.NOPATH: Kyuafile.auto
|
||||
Kyuafile.auto: Makefile
|
||||
Kyuafile: Makefile
|
||||
@{ \
|
||||
echo '-- Automatically generated by bsd.test.mk.'; \
|
||||
echo; \
|
||||
@ -77,15 +73,15 @@ Kyuafile.auto: Makefile
|
||||
echo; \
|
||||
echo 'test_suite("${TESTSUITE}")'; \
|
||||
echo; \
|
||||
} >Kyuafile.auto.tmp
|
||||
} > ${.TARGET}.tmp
|
||||
.for _T in ${_TESTS}
|
||||
@echo '${TEST_INTERFACE.${_T}}_test_program{name="${_T}"${_TEST_METADATA.${_T}:C/$/,/:tW:C/^/, /W:C/,$//W}}' \
|
||||
>>Kyuafile.auto.tmp
|
||||
>>${.TARGET}.tmp
|
||||
.endfor
|
||||
.for _T in ${TESTS_SUBDIRS:N.WAIT}
|
||||
@echo "include(\"${_T}/Kyuafile\")" >>Kyuafile.auto.tmp
|
||||
@echo "include(\"${_T}/Kyuafile\")" >>${.TARGET}.tmp
|
||||
.endfor
|
||||
@mv Kyuafile.auto.tmp Kyuafile.auto
|
||||
@mv ${.TARGET}.tmp ${.TARGET}
|
||||
.endif
|
||||
|
||||
KYUA?= ${KYUA_PREFIX}/bin/kyua
|
||||
|
Loading…
x
Reference in New Issue
Block a user