Subject: Re: how to add arbitrary #defines into kernel driver code cleanly?
To: George Michaelson <ggm@apnic.net>
From: Robert Elz <kre@munnari.OZ.AU>
List: netbsd-help
Date: 03/11/2003 16:28:17
    Date:        Tue, 11 Mar 2003 09:49:08 +1000
    From:        George Michaelson <ggm@apnic.net>
    Message-ID:  <20030311094908.74610d80.ggm@apnic.net>

  | What I was hinting at was the possible need for a *generic* mechanism
  | to include local dependencies on params,

You can also just to it the way that seemed "too easy" and just add the
"options FOO value" to your config, and do nothing else at all.

Then the option (and value) get passed through the Makefile instead of
via .h files - which isn't good for auto-recompile on value change (the
depends stuff only knows a few files that depend upon Makefile - otherwise
everything would be recompiled every time you reconfigure) but is a real
easy way to add something local.

Even options like MAXUSERS still get handled that way ... (someone really
should defopt or defparam, or whatever is appropriate, that one ...)

  | I now get a CVS "M" message on files.i386 and it looks to be
  | able to merge my local diff in fine.

Yes, that mostly works.   I have a bunch of local mods in various places
in my tree that always always get merged - you do need to keep an eye
on them though.

kre