Home | History | Annotate | Line # | Download | only in mk
bsd.ioconf.mk revision 1.2
      1 #	$NetBSD: bsd.ioconf.mk,v 1.2 2010/03/22 14:42:01 pooka Exp $
      2 #
      3 
      4 # If IOCONF is defined, autocreate ioconf.[ch] and locators.h.
      5 # This is useful mainly for devices.
      6 .if !empty(IOCONF)
      7 
      8 # discourage direct inclusion.  bsd.ioconf.mk will hopefully go away
      9 # when the kernel build procedures are unified.
     10 .if defined(_BSD_IOCONF_MK_USER_)
     11 
     12 ioconf.c: ${IOCONF}
     13 	${TOOL_CONFIG} -b ${.OBJDIR} -s ${S} ${.CURDIR}/${IOCONF}
     14 	# config doesn't change the files if they're unchanged.  however,
     15 	# here we want to satisfy our make dependency, so force a
     16 	# timestamp update
     17 	touch ioconf.c ioconf.h locators.h
     18 
     19 .else # _BSD_IOCONF_MK_USER_
     20 
     21 ioconf.c:
     22 	@echo do not include bsd.ioconf.mk directly
     23 	@false
     24 
     25 .endif # _BSD_IOCONF_MK_USER_
     26 
     27 locators.h: ioconf.c
     28 ioconf.h: ioconf.c
     29 
     30 CLEANFILES+= ioconf.c ioconf.h locators.h
     31 DPSRCS+= ioconf.c ioconf.h locators.h
     32 .endif
     33