# $Id: Makefile,v 1.9 2020/06/18 20:54:18 absc Exp $

REGRESS_FAIL_EARLY=	yes
REGRESS_SETUP_ONCE=	setup
REGRESS_CLEANUP=		cleanup

REGRESS_TARGETS=		t-out-str t-out-int t-out-bool
REGRESS_TARGETS+=	t-out-array t-out-null t-out-float
REGRESS_TARGETS+=	t-out-array-main

OUTFILE=			/tmp/t-out.out

setup:
	@${MAKE} -f Makefile.t-out-str >/dev/null
	@${MAKE} -f Makefile.t-out-int >/dev/null
	@${MAKE} -f Makefile.t-out-bool >/dev/null
	@${MAKE} -f Makefile.t-out-array >/dev/null
	@${MAKE} -f Makefile.t-out-null >/dev/null
	@${MAKE} -f Makefile.t-out-float >/dev/null
	@${MAKE} -f Makefile.t-out-array-main >/dev/null

t-out-str:
	@./t-out-str >${OUTFILE}
	@cmp ${OUTFILE} ./t-out-str.out
	@echo "${@}: OK"

t-out-int:
	@./t-out-int >${OUTFILE}
	@cmp ${OUTFILE} ./t-out-int.out
	@echo "${@}: OK"

t-out-bool:
	@./t-out-bool >${OUTFILE}
	@cmp ${OUTFILE} ./t-out-bool.out
	@echo "${@}: OK"

t-out-array:
	@./t-out-array >${OUTFILE}
	@cmp ${OUTFILE} ./t-out-array.out
	@echo "${@}: OK"

t-out-null:
	@./t-out-null >${OUTFILE}
	@cmp ${OUTFILE} ./t-out-null.out
	@echo "${@}: OK"

t-out-float:
	@./t-out-float >${OUTFILE}
	@cmp ${OUTFILE} ./t-out-float.out
	@echo "${@}: OK"

t-out-array-main:
	@./t-out-array-main >${OUTFILE}
	@cmp ${OUTFILE} ./t-out-array-main.out
	@echo "${@}: OK"

cleanup:
	@${MAKE} -f Makefile.t-out-str clean >/dev/null
	@${MAKE} -f Makefile.t-out-int clean >/dev/null
	@${MAKE} -f Makefile.t-out-bool clean >/dev/null
	@${MAKE} -f Makefile.t-out-array clean >/dev/null
	@${MAKE} -f Makefile.t-out-null clean >/dev/null
	@${MAKE} -f Makefile.t-out-float clean >/dev/null
	@${MAKE} -f Makefile.t-out-array-main clean >/dev/null
	@rm -f ${OUTFILE}

.include <bsd.regress.mk>
