Home | History | Annotate | Line # | Download | only in mk
bsd.ioconf.mk revision 1.3
      1 #	$NetBSD: bsd.ioconf.mk,v 1.3 2010/03/25 20:37:36 pooka 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} -b ${.OBJDIR} -s ${S} ${.CURDIR}/${IOCONF}
     22 	# config doesn't change the files if they're unchanged.  however,
     23 	# here we want to satisfy our make dependency, so force a
     24 	# timestamp update
     25 	touch ioconf.c ioconf.h locators.h
     26 
     27 .else # _BSD_IOCONF_MK_USER_
     28 
     29 ioconf.c:
     30 	@echo do not include bsd.ioconf.mk directly
     31 	@false
     32 
     33 .endif # _BSD_IOCONF_MK_USER_
     34 
     35 locators.h: ioconf.c
     36 ioconf.h: ioconf.c
     37 
     38 CLEANFILES+= ioconf.c ioconf.h locators.h
     39 DPSRCS+= ioconf.c ioconf.h locators.h
     40 .endif
     41