Makefile revision 1.10
1# $OpenBSD: Makefile,v 1.10 2020/12/16 22:59:55 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+= run-${PROG_sigio}-$d-$t 34run-${PROG_sigio}-$d-$t: ${PROG_sigio} 35. if ${HAVE_${d}:L} == "yes" 36 ./${PROG_sigio} -d /dev/$d $t 37. else 38 # no access to device ${d} on this machine 39 @echo SKIPPED 40. endif 41. endif 42. endfor 43.endfor 44 45PROG_wscons= wscons 46PROGS+= ${PROG_wscons} 47SRCS_wscons= wscons.c util.c 48 49TESTS_wscons+= ioctl-unknown 50 51.for d in ${DEVICES} 52. for t in ${TESTS_wscons} 53REGRESS_TARGETS+= run-${PROG_wscons}-$d-$t 54run-${PROG_wscons}-$d-$t: ${PROG_wscons} 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