From c7df47dcea803deb519689c700d8f1728143f279 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 12 Oct 2008 11:22:46 +0000 Subject: 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(-) diff --git a/config/kernel.in b/config/kernel.in index 0178480..388c048 100644 --- a/config/kernel.in +++ b/config/kernel.in @@ -14,12 +14,6 @@ config KERNEL config KERNEL_VERSION string -choice - bool - prompt "Target OS" - source config.gen/kernel.in -endchoice - endmenu diff --git a/config/target.in b/config/target.in index b5c7af1..60881ce 100644 --- a/config/target.in +++ b/config/target.in @@ -28,14 +28,8 @@ config TARGET_LDFLAGS comment "General target options" -choice - bool - prompt "Target architecture:" - source config.gen/arch.in -endchoice - config ARCH_SUPPORTS_BOTH_ENDIAN bool default n diff --git a/kconfig/kconfig.mk b/kconfig/kconfig.mk index 701b435..cdd8c87 100644 --- a/kconfig/kconfig.mk +++ b/kconfig/kconfig.mk @@ -52,39 +52,49 @@ $(CT_TOP_DIR)/config.gen: $(KCONFIG_TOP) # $5 : list of config entries (eg. for architectures: "alpha arm ia64"..., # and for kernels: "bare-metal linux"...) # Example to build the kernels generated config file: -# $(call build_gen_choice_in,config.gen/kernel.in,Kernel,KERNEL,config/kernel,$(KERNELS)) +# $(call build_gen_choice_in,config.gen/kernel.in,Target OS,KERNEL,config/kernel,$(KERNELS)) define build_gen_choice_in @echo ' IN $(1)' - @(echo "# $(2) menu"; \ - echo "# Generated file, do not edit!!!"; \ - echo ""; \ - for entry in $(5); do \ - file="$(4)/$${entry}.in"; \ - _entry=$$(echo "$${entry}" |sed -r -s -e 's/[-.+]/_/g;'); \ - echo "config $(3)_$${_entry}"; \ - echo " bool"; \ - printf " prompt \"$${entry}"; \ - if grep -E '^# +EXPERIMENTAL$$' $${file} >/dev/null 2>&1; then \ - echo " (EXPERIMENTAL)\""; \ - echo " depends on EXPERIMENTAL"; \ - else \ - echo "\""; \ - fi; \ - echo "if $(3)_$${_entry}"; \ - echo "config $(3)"; \ - echo " default \"$${entry}\" if $(3)_$${_entry}"; \ - echo "source $${file}"; \ - echo "endif"; \ - echo ""; \ - done; \ + @(echo "# $(2) menu"; \ + echo "# Generated file, do not edit!!!"; \ + echo ""; \ + echo "choice"; \ + echo " bool"; \ + echo " prompt \"$(2)\""; \ + echo ""; \ + for entry in $(5); do \ + file="$(4)/$${entry}.in"; \ + _entry=$$(echo "$${entry}" |sed -r -s -e 's/[-.+]/_/g;'); \ + echo "config $(3)_$${_entry}"; \ + echo " bool"; \ + printf " prompt \"$${entry}"; \ + if grep -E '^# +EXPERIMENTAL$$' $${file} >/dev/null 2>&1; then \ + echo " (EXPERIMENTAL)\""; \ + echo " depends on EXPERIMENTAL"; \ + else \ + echo "\""; \ + fi; \ + done; \ + echo ""; \ + echo "endchoice"; \ + for entry in $(5); do \ + file="$(4)/$${entry}.in"; \ + _entry=$$(echo "$${entry}" |sed -r -s -e 's/[-.+]/_/g;'); \ + echo ""; \ + echo "if $(3)_$${_entry}"; \ + echo "config $(3)"; \ + echo " default \"$${entry}\" if $(3)_$${_entry}"; \ + echo "source $${file}"; \ + echo "endif"; \ + done; \ ) >$(1) endef $(CT_TOP_DIR)/config.gen/arch.in: $(ARCH_CONFIG_FILES) - $(call build_gen_choice_in,$(patsubst $(CT_TOP_DIR)/%,%,$@),Architecture,ARCH,config/arch,$(ARCHS)) + $(call build_gen_choice_in,$(patsubst $(CT_TOP_DIR)/%,%,$@),Target Architecture,ARCH,config/arch,$(ARCHS)) $(CT_TOP_DIR)/config.gen/kernel.in: $(KERNEL_CONFIG_FILES) - $(call build_gen_choice_in,$(patsubst $(CT_TOP_DIR)/%,%,$@),Kernel,KERNEL,config/kernel,$(KERNELS)) + $(call build_gen_choice_in,$(patsubst $(CT_TOP_DIR)/%,%,$@),Target OS,KERNEL,config/kernel,$(KERNELS)) # Function build_gen_menu_in: # $1 : destination file -- cgit v0.10.2-6-g49f6