Applied with some edits: retained "depends on" lines
for individual options (so that added lines can be later removed
without the need to figure out what "depends on"
need to be added).

Thanks!

On Thu, Jan 5, 2017 at 4:32 AM, Kang-Che Sung <explore...@gmail.com> wrote:
> (The patch diff is in mail attachment because I'm not sure if Gmail
> likes tab characters in mail messages.)
>
> This would makes all ash options indented inside "ash" in menuconfig.
> It appears that menuconfig has a limit at tracking multiple dependency
> lines like this (it looks like a "diamond problem" but I'm not sure if
> it is):
>
>                ---ASH <----------
>               /                  \       ASH_OPTIMIZE_FOR_SIZE
>     !NOMMU <-*----SH_IS_ASH <----[OR] <--ASH_INTERNAL_GLOB
>               \                  /       ASH_RANDOM_SUPPORT
>                ---BASH_IS_ASH <--        [...]
>
> The kconfig-language document [1] states that:
>
>> If a menu entry somehow depends on the previous entry, it can be
>> made a submenu of it. First, the previous (parent) symbol must be
>> part of the dependency list and then one of these two conditions
>> must be true:
>> - the child entry must become invisible, if the parent is set to 'n'
>
>     [BusyBox ash used to satisfy this, but no longer does]
>
>> - the child entry must only be visible, if the parent is visible
>
>     [BusyBox ash configs actually satisfy this, but because of
>      "diamond" above this might not be easily detected]
>
> So I found out a direct workaround: by making ash options explicitly
> depend on !NOMMU, we can tell menuconfig that rule 2 above is satisfied
> without any more tracking.
>
>                ---------------------
>               /                     \
>     !NOMMU <-*-----ASH <--------     \
>               \                 \     \        ASH_OPTIMIZE_FOR_SIZE
>                *---SH_IS_ASH <---[OR]-[AND] <--ASH_INTERNAL_GLOB
>                 \                /             ASH_RANDOM_SUPPORT
>                  --BASH_IS_ASH <-              [...]
>
> So all ash options would now be indented under "ash".
>
> [1] "Documentation/kbuild/kconfig-language.txt" in Linux kernel source
>
> Signed-off-by: Kang-Che Sung <explore...@gmail.com>
>
> _______________________________________________
> busybox mailing list
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to