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