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