In generated choice menus, move the selection options outside the choice menu.
/trunk/kconfig/kconfig.mk | 60 35 25 0 +++++++++++++++++++++++++++++++----------------------
/trunk/config/kernel.in | 6 0 6 0 -----
/trunk/config/target.in | 6 0 6 0 -----
3 files changed, 35 insertions(+), 37 deletions(-)
1.1 --- a/config/kernel.in Sun Oct 12 11:09:57 2008 +0000
1.2 +++ b/config/kernel.in Sun Oct 12 11:22:46 2008 +0000
1.3 @@ -14,12 +14,6 @@
1.4 config KERNEL_VERSION
1.5 string
1.6
1.7 -choice
1.8 - bool
1.9 - prompt "Target OS"
1.10 -
1.11 source config.gen/kernel.in
1.12
1.13 -endchoice
1.14 -
1.15 endmenu
2.1 --- a/config/target.in Sun Oct 12 11:09:57 2008 +0000
2.2 +++ b/config/target.in Sun Oct 12 11:22:46 2008 +0000
2.3 @@ -28,14 +28,8 @@
2.4
2.5 comment "General target options"
2.6
2.7 -choice
2.8 - bool
2.9 - prompt "Target architecture:"
2.10 -
2.11 source config.gen/arch.in
2.12
2.13 -endchoice
2.14 -
2.15 config ARCH_SUPPORTS_BOTH_ENDIAN
2.16 bool
2.17 default n
3.1 --- a/kconfig/kconfig.mk Sun Oct 12 11:09:57 2008 +0000
3.2 +++ b/kconfig/kconfig.mk Sun Oct 12 11:22:46 2008 +0000
3.3 @@ -52,39 +52,49 @@
3.4 # $5 : list of config entries (eg. for architectures: "alpha arm ia64"...,
3.5 # and for kernels: "bare-metal linux"...)
3.6 # Example to build the kernels generated config file:
3.7 -# $(call build_gen_choice_in,config.gen/kernel.in,Kernel,KERNEL,config/kernel,$(KERNELS))
3.8 +# $(call build_gen_choice_in,config.gen/kernel.in,Target OS,KERNEL,config/kernel,$(KERNELS))
3.9 define build_gen_choice_in
3.10 @echo ' IN $(1)'
3.11 - @(echo "# $(2) menu"; \
3.12 - echo "# Generated file, do not edit!!!"; \
3.13 - echo ""; \
3.14 - for entry in $(5); do \
3.15 - file="$(4)/$${entry}.in"; \
3.16 - _entry=$$(echo "$${entry}" |sed -r -s -e 's/[-.+]/_/g;'); \
3.17 - echo "config $(3)_$${_entry}"; \
3.18 - echo " bool"; \
3.19 - printf " prompt \"$${entry}"; \
3.20 - if grep -E '^# +EXPERIMENTAL$$' $${file} >/dev/null 2>&1; then \
3.21 - echo " (EXPERIMENTAL)\""; \
3.22 - echo " depends on EXPERIMENTAL"; \
3.23 - else \
3.24 - echo "\""; \
3.25 - fi; \
3.26 - echo "if $(3)_$${_entry}"; \
3.27 - echo "config $(3)"; \
3.28 - echo " default \"$${entry}\" if $(3)_$${_entry}"; \
3.29 - echo "source $${file}"; \
3.30 - echo "endif"; \
3.31 - echo ""; \
3.32 - done; \
3.33 + @(echo "# $(2) menu"; \
3.34 + echo "# Generated file, do not edit!!!"; \
3.35 + echo ""; \
3.36 + echo "choice"; \
3.37 + echo " bool"; \
3.38 + echo " prompt \"$(2)\""; \
3.39 + echo ""; \
3.40 + for entry in $(5); do \
3.41 + file="$(4)/$${entry}.in"; \
3.42 + _entry=$$(echo "$${entry}" |sed -r -s -e 's/[-.+]/_/g;'); \
3.43 + echo "config $(3)_$${_entry}"; \
3.44 + echo " bool"; \
3.45 + printf " prompt \"$${entry}"; \
3.46 + if grep -E '^# +EXPERIMENTAL$$' $${file} >/dev/null 2>&1; then \
3.47 + echo " (EXPERIMENTAL)\""; \
3.48 + echo " depends on EXPERIMENTAL"; \
3.49 + else \
3.50 + echo "\""; \
3.51 + fi; \
3.52 + done; \
3.53 + echo ""; \
3.54 + echo "endchoice"; \
3.55 + for entry in $(5); do \
3.56 + file="$(4)/$${entry}.in"; \
3.57 + _entry=$$(echo "$${entry}" |sed -r -s -e 's/[-.+]/_/g;'); \
3.58 + echo ""; \
3.59 + echo "if $(3)_$${_entry}"; \
3.60 + echo "config $(3)"; \
3.61 + echo " default \"$${entry}\" if $(3)_$${_entry}"; \
3.62 + echo "source $${file}"; \
3.63 + echo "endif"; \
3.64 + done; \
3.65 ) >$(1)
3.66 endef
3.67
3.68 $(CT_TOP_DIR)/config.gen/arch.in: $(ARCH_CONFIG_FILES)
3.69 - $(call build_gen_choice_in,$(patsubst $(CT_TOP_DIR)/%,%,$@),Architecture,ARCH,config/arch,$(ARCHS))
3.70 + $(call build_gen_choice_in,$(patsubst $(CT_TOP_DIR)/%,%,$@),Target Architecture,ARCH,config/arch,$(ARCHS))
3.71
3.72 $(CT_TOP_DIR)/config.gen/kernel.in: $(KERNEL_CONFIG_FILES)
3.73 - $(call build_gen_choice_in,$(patsubst $(CT_TOP_DIR)/%,%,$@),Kernel,KERNEL,config/kernel,$(KERNELS))
3.74 + $(call build_gen_choice_in,$(patsubst $(CT_TOP_DIR)/%,%,$@),Target OS,KERNEL,config/kernel,$(KERNELS))
3.75
3.76 # Function build_gen_menu_in:
3.77 # $1 : destination file