aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKang-Che Sung <explorer09@gmail.com>2017-01-06 17:02:03 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2017-01-06 17:03:18 +0100
commit6cd0294725cf40a3ef0bb0a1dcc7a7044a85cbf5 (patch)
treeedb6f1db0698b723ecef508c93e325ec62fd8639
parentb62ea34afed7d3bf60a6c8ef5a030fea52f55b10 (diff)
downloadbusybox-w32-6cd0294725cf40a3ef0bb0a1dcc7a7044a85cbf5.tar.gz
busybox-w32-6cd0294725cf40a3ef0bb0a1dcc7a7044a85cbf5.tar.bz2
busybox-w32-6cd0294725cf40a3ef0bb0a1dcc7a7044a85cbf5.zip
ash: explicltly group ash options
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 <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/Config.src4
-rw-r--r--shell/ash.c7
2 files changed, 11 insertions, 0 deletions
diff --git a/shell/Config.src b/shell/Config.src
index 9bd493fed..3545f05dd 100644
--- a/shell/Config.src
+++ b/shell/Config.src
@@ -80,6 +80,9 @@ endchoice
80INSERT 80INSERT
81 81
82 82
83comment "Options common to all shells"
84if ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
85
83config FEATURE_SH_MATH 86config FEATURE_SH_MATH
84 bool "POSIX math support" 87 bool "POSIX math support"
85 default y 88 default y
@@ -163,5 +166,6 @@ config FEATURE_SH_HISTFILESIZE
163 to set shell history size. Note that its max value is capped 166 to set shell history size. Note that its max value is capped
164 by "History size" setting in library tuning section. 167 by "History size" setting in library tuning section.
165 168
169endif # Options common to all shells
166 170
167endmenu 171endmenu
diff --git a/shell/ash.c b/shell/ash.c
index 7c53946ce..aee3d419c 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -26,6 +26,11 @@
26//config: shell (by Herbert Xu), which was created by porting the 'ash' shell 26//config: shell (by Herbert Xu), which was created by porting the 'ash' shell
27//config: (written by Kenneth Almquist) from NetBSD. 27//config: (written by Kenneth Almquist) from NetBSD.
28//config: 28//config:
29//config:# ash options
30//config:# note: Don't remove !NOMMU part in the next line; it would break
31//config:# menuconfig's indenting.
32//config:if !NOMMU && (ASH || SH_IS_ASH || BASH_IS_ASH)
33//config:
29//config:config ASH_OPTIMIZE_FOR_SIZE 34//config:config ASH_OPTIMIZE_FOR_SIZE
30//config: bool "Optimize for size instead of speed" 35//config: bool "Optimize for size instead of speed"
31//config: default y 36//config: default y
@@ -140,6 +145,8 @@
140//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH 145//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH
141//config: help 146//config: help
142//config: Enable "check for new mail" function in the ash shell. 147//config: Enable "check for new mail" function in the ash shell.
148//config:
149//config:endif # ash options
143 150
144//applet:IF_ASH(APPLET(ash, BB_DIR_BIN, BB_SUID_DROP)) 151//applet:IF_ASH(APPLET(ash, BB_DIR_BIN, BB_SUID_DROP))
145//applet:IF_SH_IS_ASH(APPLET_ODDNAME(sh, ash, BB_DIR_BIN, BB_SUID_DROP, ash)) 152//applet:IF_SH_IS_ASH(APPLET_ODDNAME(sh, ash, BB_DIR_BIN, BB_SUID_DROP, ash))