Re: [RFC] Extending kbuild syntax

2007-10-01 Thread Andreas Gruenbacher
On Saturday 29 September 2007 22:11, Sam Ravnborg wrote: > The second is the more controversial suggestion. > In several Makefile we have simple if expression of the variants: > if ($(CONFIG_FOO),y) > obj-$(CONFIG_BAR) += fubar.o > endif Sometimes substitution looks acceptable: > -nfsd-$(CONFIG

Re: [RFC] Extending kbuild syntax

2007-10-01 Thread Jan Engelhardt
On Sep 30 2007 15:36, Ingo Oeser wrote: > >> 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). Perhaps this would work? ifeq (${CONFIG_NO_MMU},) obj-m += magic_mmu.o endif >But again this can be done wi

Re: [RFC] Extending kbuild syntax

2007-09-30 Thread Ingo Oeser
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 fo

Re: [RFC] Extending kbuild syntax

2007-09-30 Thread Sam Ravnborg
On Sun, Sep 30, 2007 at 05:02:58AM +0200, Adrian Bunk wrote: > On Sat, Sep 29, 2007 at 10:11:45PM +0200, Sam Ravnborg wrote: > >... > > The second is the more controversial suggestion. > > In several Makefile we have simple if expression of the variants: > > if ($(CONFIG_FOO),y) > > obj-$(CONFIG_

Re: [RFC] Extending kbuild syntax

2007-09-29 Thread Adrian Bunk
On Sat, Sep 29, 2007 at 10:11:45PM +0200, Sam Ravnborg wrote: >... > The second is the more controversial suggestion. > In several Makefile we have simple if expression of the variants: > if ($(CONFIG_FOO),y) > obj-$(CONFIG_BAR) += fubar.o > endif > > The pattern varies over this theme. > The su

[RFC] Extending kbuild syntax

2007-09-29 Thread Sam Ravnborg
Over the last few weeks I have pondered with the idea to extend the current kbuild syntax. The idea have existed for long but only recently I started to think how to do this in a truely flexible manner. Two areas are in need for a bit of attention to improve current kbuild files in the kernel. Th