Re: [RFC] Extending kbuild syntax

From: Ingo Oeser
Date: Sun Sep 30 2007 - 09:37:26 EST

Hi Sam,

On Saturday 29 September 2007, Sam Ravnborg wrote:
> Introducing the following new variable could make this a oneliner:
> ccflags-y
> ccflags-$(DEBUG) := -DDEBUG
> grep -r -C 1 -B 1 EXTRA_CFLAGS shows that the above is a
> very common pattern especially in drivers/

ACK. Also ACK for asflags, if done the same way :-)

> The second is the more controversial suggestion.

Yes, but please bear in mind, what the developers are trying
to express in these cases.

> In several Makefile we have simple if expression of the variants:
> if ($(CONFIG_FOO),y)
> obj-$(CONFIG_BAR) += fubar.o
> endif

This is "feature FOO of module BAR" where the feature itself
cannot be a module. The composition scheme described in
section 3.3 is at least equally useful. And that is used today.
Maybe the documentation of that scheme is not prominent enough :-)

> obj-y-ifn-

This is the only one needed, because it is cumbersome to express
negative rules in kbuild to include stubs (e.g. nommu stuff).
But again this can be done with composition rules right now, but
is order dependent. If we could get rid of this requirement,
I would be happy already. So kbuild is just lacking an "else"
clause here.

Best Regards

Ingo Oeser
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at