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