kern/76225: WITHOUT_MODULES option for sys/modules/Makefile

Edwin Groothuis edwin at mavetju.org
Thu Jan 13 23:30:28 PST 2005


The following reply was made to PR kern/76225; it has been noted by GNATS.

From: Edwin Groothuis <edwin at mavetju.org>
To: David Yeske <dyeske at yahoo.com>
Cc: freebsd-gnats-submit at FreeBSD.org
Subject: Re: kern/76225: WITHOUT_MODULES option for sys/modules/Makefile
Date: Fri, 14 Jan 2005 18:29:44 +1100

 On Thu, Jan 13, 2005 at 10:46:05PM +0000, David Yeske wrote:
 >       WITHOUT_MODULES is a list that can be set in /etc/make.conf
 > or per build so that the directorys in that list will be removed
 > from the list of directorys to build.  This vastly speeds up kernel
 > compile time by allowing the user to specify to not build certain
 > modules.  It is also useful to cherry pick a certain module and not
 > build it similar to the NO_PF and NO_IPFILTER options.  The NO_PF
 > and NO_IPFILTER options could in theory be removed and set via
 > WITHOUT_MODULES= pf ipfilter
 
 If you add this to the Makefile in every subdirectory (this is for
 netgraph, for each directory please replace the string netgraph
 with the name of the current directory):
 
  .if ${MACHINE_ARCH} == "i386"
  # Things that don't compile on alpha or are aout specific:
  SUBDIR+= bluetooth
  .endif
  
 +CURDIR:=${.CURDIR:C/^.*\/modules\///}
 +.for d in ${SUBDIR}
 +.if ${WITHOUT_MODULES:Mnetgraph/${d}}!=""
 +SUBDIR:= ${SUBDIR:N${d}}
 +.endif
 +.endfor
  
  .include <bsd.subdir.mk>
 
 you can do:
 
 WITHOUT_MODULES= netgraph/one2many syscons/fire
 
 and then the modules netgraph/one2man and syscons/fire are ignored,
 while the rest is happily made.
 
 Edwin
 
 -- 
 Edwin Groothuis      |            Personal website: http://www.mavetju.org
 edwin at mavetju.org    |          Weblog: http://weblog.barnet.com.au/edwin/


More information about the freebsd-bugs mailing list