| 1 |
CLEANFILES += test.mk |
| 2 |
|
| 3 |
tests = \ |
| 4 |
MKC_REQUIRE_HEADER_FILES=bad_header.h \ |
| 5 |
MKC_REQUIRE_HEADERS=bad_header.h \ |
| 6 |
MKC_REQUIRE_FUNCLIBS=bad_func \ |
| 7 |
MKC_REQUIRE_DEFINES=ZZZZ:string.h \ |
| 8 |
MKC_REQUIRE_TYPES=zzzz_t:sys/cdefs.h \ |
| 9 |
MKC_REQUIRE_VARS=zzzz:string.h \ |
| 10 |
MKC_REQUIRE_MEMBERS=struct-stat.st_atimespec:foo.h \ |
| 11 |
MKC_REQUIRE_FUNCS9=zzzz:unistd.h \ |
| 12 |
MKC_REQUIRE_PROGS=zzz_tool \ |
| 13 |
MKC_REQUIRE_PROTOTYPES=proto |
| 14 |
|
| 15 |
.for t in ${tests} |
| 16 |
command += printf "MKC_PROTOTYPE_FUNC.proto=void proto(void)\n" > ${.OBJDIR}/test.mk; |
| 17 |
command += printf "MKC_PROTOTYPE_HEADERS.proto=err.h\n" >> ${.OBJDIR}/test.mk; |
| 18 |
command += printf "${t}\n" >> ${.OBJDIR}/test.mk; |
| 19 |
command += printf ".include <mkc.mk>\n" >> ${.OBJDIR}/test.mk; |
| 20 |
command += ${MAKE} -f ${.OBJDIR}/test.mk ${MAKEFLAGS} all 2>&1 || true; |
| 21 |
.endfor |
| 22 |
|
| 23 |
.PHONY : test_output |
| 24 |
test_output: |
| 25 |
@set -e; \ |
| 26 |
echo =========== all ============; \ |
| 27 |
{ ${command} } | grep ERROR:; \ |
| 28 |
true _______ cleandir _______ %%; \ |
| 29 |
${MAKE} ${MAKEFLAGS} cleandir > /dev/null |
| 30 |
|
| 31 |
.include <mkc.minitest.mk> |
| 32 |
.include <mkc.mk> |