[coreboot] kbuild troubles

Patrick Georgi patrick at georgi-clan.de
Sun Oct 11 19:47:55 CEST 2009

Am Sonntag, den 11.10.2009, 18:36 +0200 schrieb Peter Stuge:
> > Ron convinced me that #if is better than #ifdef, for such nice
> > things like
> > 
> > if (CONFIG_FOO) {
> > }
> > 
> > which fit in more nicely than the separate layer of preprocessing
> > statements
> Why is this more nice? Since it's not really common I would be
> surprised (and slightly annoyed) to not find CONFIG_FOO declared in
> any source code. OK, the prefix helps, but it still looks a little
> strange to me.
It's defined in config.h, and yes, the prefix helps.

> > (among other things).
> What are the other things?
No need to do that "#ifdef CONFIG_FOO && CONFIG_FOO == 1" stuff, but
even if we're consistent in defining symbols or not, it's also more
regular to have



#if defined(CONFIG_FOO) && defined(CONFIG_BAR)

and writing
#if defined(CONFIG_FOO)
all the time is ugly, too.

But no matter what we decide on, it's got to be regular. The coreboot
tree isn't (due to newconfig's flexibility - I have no idea why this was
ever considered a good idea)


More information about the coreboot mailing list