-# $OpenBSD: Makefile,v 1.1 2023/08/12 13:43:22 gnezdo Exp $
+# $OpenBSD: Makefile,v 1.2 2023/08/13 18:34:49 anton Exp $
-.include <bsd.own.mk>
+REGRESS_TARGETS+= empty
+REGRESS_TARGETS+= short
-REGRESS_TARGETS = test
-
-.include <bsd.regress.mk>
-
-CLEANFILES+=empty short
-
-.PHONY: test
-test: empty short
- ${SHELL} ${.CURDIR}/test.sh
+CLEANFILES+= *.in *.out
empty:
- touch empty
+ : >$@.in
+ ldd $@.in 2>&1 | tee $@.out | grep -q 'incomplete ELF header'
short:
- dd if=/usr/bin/ldd of=short count=128 bs=1
+ dd if=/usr/bin/ldd of=$@.in count=128 bs=1 status=none
+ ldd $@.in 2>&1 | tee $@.out | grep -q 'incomplete program header'
+
+.include <bsd.regress.mk>