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