1 # $NetBSD: bsd.ioconf.mk,v 1.5 2014/11/30 15:53:29 uebayasi Exp $ 2 # 3 4 .include <bsd.own.mk> 5 6 # If IOCONF is defined, autocreate ioconf.[ch] and locators.h. 7 # This is useful mainly for devices. 8 .if !empty(IOCONF) 9 10 # discourage direct inclusion. bsd.ioconf.mk will hopefully go away 11 # when the kernel build procedures are unified. 12 .if defined(_BSD_IOCONF_MK_USER_) 13 14 # XXX: ioconf.c doesn't need to depend on TOOL_CONFIG, but that helps 15 # keep builds working while hashing out some of the experimental 16 # features related to ioconf. 17 .if ${USETOOLS} == "yes" 18 CONFIGDEP=${TOOL_CONFIG} 19 .endif 20 ioconf.c: ${IOCONF} ${CONFIGDEP} 21 ${TOOL_CONFIG} ${CONFIGOPTS} -b ${.OBJDIR} -s ${S} \ 22 ${IOCONFDIR:U${.CURDIR}}/${IOCONF} 23 # config doesn't change the files if they're unchanged. however, 24 # here we want to satisfy our make dependency, so force a 25 # timestamp update 26 touch ioconf.c ioconf.h locators.h 27 28 .else # _BSD_IOCONF_MK_USER_ 29 30 ioconf.c: 31 @echo do not include bsd.ioconf.mk directly 32 @false 33 34 .endif # _BSD_IOCONF_MK_USER_ 35 36 locators.h: ioconf.c 37 ioconf.h: ioconf.c 38 39 CLEANFILES+= ioconf.c ioconf.h locators.h 40 DPSRCS+= ioconf.c ioconf.h locators.h 41 .endif 42