Makefile revision 1.8
1# $OpenBSD: Makefile,v 1.8 2019/02/12 22:26:15 bluhm Exp $
2
3WARNINGS=	yes
4
5DEVICES=	wskbd0 wsmouse0 wskbd
6.for d in ${DEVICES}
7HAVE_${d} ?!= if dd if=/dev/${d} count=0 status=none; \
8    then echo yes; else echo no; fi
9MAKE := HAVE_${d}="${HAVE_${d}}" ${MAKE}
10.endfor
11
12PROG_sigio=	sigio
13PROGS+=		${PROG_sigio}
14SRCS_sigio=	sigio.c util.c
15
16TESTS_sigio+=	getown-fcntl
17TESTS_sigio+=	getown-ioctl
18TESTS_sigio+=	gpgrp
19TESTS_sigio+=	setown-fcntl
20TESTS_sigio+=	setown-ioctl
21TESTS_sigio+=	spgrp
22TESTS_sigio+=	sigio
23
24# SIGIO using event injection is limited to wsmux devices.
25IGNORE_sigio+=	wskbd0-sigio
26IGNORE_sigio+=	wsmouse0-sigio
27
28.for d in ${DEVICES}
29.  for t in ${TESTS_sigio}
30.    if empty(IGNORE_sigio:M$d-$t)
31REGRESS_TARGETS+=	${PROG_sigio}-$d-$t
32${PROG_sigio}-$d-$t: ${PROG_sigio}
33	@echo "\n======== ${@} ========"
34.      if ${HAVE_${d}:L} == "yes"
35	./${PROG_sigio} -d /dev/$d $t
36.      else
37	# no access to device ${d} on this machine
38	@echo SKIPPED
39.      endif
40.    endif
41.  endfor
42.endfor
43
44PROG_wscons=	wscons
45PROGS+=		${PROG_wscons}
46SRCS_wscons=	wscons.c util.c
47
48TESTS_wscons+=	ioctl-unknown
49
50.for d in ${DEVICES}
51.  for t in ${TESTS_wscons}
52REGRESS_TARGETS+=	${PROG_wscons}-$d-$t
53${PROG_wscons}-$d-$t: ${PROG_wscons}
54	@echo "\n======== ${@} ========"
55.    if ${HAVE_${d}:L} == "yes"
56	./${PROG_wscons} -d /dev/$d $t
57.    else
58	# device ${d} does not exists on this machine
59	@echo SKIPPED
60.    endif
61.  endfor
62.endfor
63
64.include <bsd.regress.mk>
65