Re: [RFC PATCH 1/2] Kconfig: Introduce "uses" keyword

From: Randy Dunlap
Date: Wed Apr 22 2020 - 18:38:00 EST

On 4/22/20 2:13 PM, Nicolas Pitre wrote:
> On Wed, 22 Apr 2020, Jani Nikula wrote:
>> On Tue, 21 Apr 2020, Nicolas Pitre <nico@xxxxxxxxxxx> wrote:
>>> This is really a conditional dependency. That's all this is about.
>>> So why not simply making it so rather than fooling ourselves? All that
>>> is required is an extension that would allow:
>>> depends on (expression) if (expression)
>>> This construct should be obvious even without reading the doc, is
>>> already used extensively for other things already, and is flexible
>>> enough to cover all sort of cases in addition to this particular one.
>> Okay, you convinced me. Now you only need to convince whoever is doing
>> the actual work of implementing this stuff. ;)
> What about this:
> ----- >8
> Subject: [PATCH] kconfig: allow for conditional dependencies
> This might appear to be a strange concept, but sometimes we want
> a dependency to be conditionally applied. One such case is currently
> expressed with:
> depends on FOO || !FOO
> This pattern is strange enough to give one's pause. Given that it is
> also frequent, let's make the intent more obvious with some syntaxic
> sugar by effectively making dependencies optionally conditional.
> This also makes the kconfig language more uniform.
> Signed-off-by: Nicolas Pitre <nico@xxxxxxxxxxx>


If we must do something here, I prefer this one.

Nicolas, would you do another example, specifically for
CRAMFS_MTD in fs/cramfs/Kconfig, please?