Subject: Re: config(5) ifdef usage (was: CVS commit: src/usr.bin/config)
To: None <current-users@NetBSD.org>
From: Quentin Garnier <firstname.lastname@example.org>
Date: 11/10/2007 08:17:25
Content-Type: text/plain; charset=us-ascii
On Sat, Nov 10, 2007 at 07:54:05AM +0100, Bernd Ernesti wrote:
> Hi Quentin,
> On Fri, Nov 09, 2007 at 11:41:09PM +0000, Quentin Garnier wrote:
> > Module Name: src
> > Committed By: cube
> > Date: Fri Nov 9 23:41:09 UTC 2007
> > Modified Files:
> > src/usr.bin/config: config.5 defs.h scan.l
> > Log Message:
> > Add support for "ifdef <attribute>" blocks. It goes like this:
> > ifdef <attr> / ifndef <attr>
> > elifdef <attr>
> > elifndef <attr>
> > else
> > endif
> Hmm, can you give some example about how <attr> can be used right now?
It's not really meant for the end-user... It will be used mostly in
files.*, e.g. for Xen to share more stuff with x86 in order to avoid
> The manpage mentions something about 'define' where I only see a few
> in e.g. files.i386.
> The other usage is about 'any other statement that implicitely defines
> attributes such as device' which I don't know how to use in this context.
"machine" now implicitely defines attributes, too.
The only potential use in the kernel option selection file (i.e.,
GENERIC as opposed to kernel option definition files such as
sys/conf/files) is if I ever come up with a config(1) flag that defines
the "debug" attribute so you could do e.g.:
But that's far-streched. Although you could also have a DEBUG config
that only does:
and MYNORMALCONFIG would contain the ifdef block above.
Actually that wouldn't work because you can't use define before machine.
Well, that could be arranged. But really it wasn't the initial intent.
I tricked someone into reviewing config(5) in order to correct my bad
english and hopefully make it less obscure. [hi bjs!]
Quentin Garnier - email@example.com - cube@NetBSD.org
"See the look on my face from staying too long in one place
[...] every time the morning breaks I know I'm closer to falling"
KT Tunstall, Saving My Face, Drastic Fantastic, 2007.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (NetBSD)
-----END PGP SIGNATURE-----