Re: [RFC] Extending kbuild syntax

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Sam Ravnborg <sam@...>
Cc: kbuild devel <kbuild-devel@...>, LKML <linux-kernel@...>
Date: Saturday, September 29, 2007 - 11:02 pm

On Sat, Sep 29, 2007 at 10:11:45PM +0200, Sam Ravnborg wrote:

IMHO for people who are not kbuild junkies the pattern is more clear 
with the current syntax.

But you should better ask some guinea pigs who have not already seen as 
many kernel Makefiles as I have...


Some of the cases have the following pattern:

config X86_POWERNOW_K8_ACPI
        bool
        depends on X86_POWERNOW_K8 && ACPI_PROCESSOR
        depends on !(X86_POWERNOW_K8 = y && ACPI_PROCESSOR = m)
        default y

Your suggested syntax has to be enhanced with three additional
variables for handling such cases.


The complicated cases can be handled either in kconfig or in kbuild,
and I think kconfig is the better place for them:

Handling it in kconfig has the advantage that we also get a variable we 
can use in C code.

For all the *-if-m and *-m-if{,n}-* cases this is a huge advantage over 
having to express the whole dependency in each #if.

Compare
  #if defined(CONFIG_ACPI_PROCESSOR) || (defined(CONFIG_ACPI_PROCESSOR_MODULE && defined(MODULE))
with
  #ifdef CONFIG_X86_POWERNOW_K8_ACPI


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] Extending kbuild syntax, Sam Ravnborg, (Sat Sep 29, 4:11 pm)
Re: [RFC] Extending kbuild syntax, Andreas Gruenbacher, (Mon Oct 1, 6:57 pm)
Re: [RFC] Extending kbuild syntax, Ingo Oeser, (Sun Sep 30, 9:36 am)
Re: [RFC] Extending kbuild syntax, Jan Engelhardt, (Mon Oct 1, 4:35 pm)
Re: [RFC] Extending kbuild syntax, Adrian Bunk, (Sat Sep 29, 11:02 pm)
Re: [RFC] Extending kbuild syntax, Sam Ravnborg, (Sun Sep 30, 6:29 am)