1.1 --- a/kconfig/kconfig.mk Fri Oct 10 14:30:44 2008 +0000
1.2 +++ b/kconfig/kconfig.mk Sun Oct 12 11:22:46 2008 +0000
1.3 @@ -52,39 +52,49 @@
1.4 # $5 : list of config entries (eg. for architectures: "alpha arm ia64"...,
1.5 # and for kernels: "bare-metal linux"...)
1.6 # Example to build the kernels generated config file:
1.7 -# $(call build_gen_choice_in,config.gen/kernel.in,Kernel,KERNEL,config/kernel,$(KERNELS))
1.8 +# $(call build_gen_choice_in,config.gen/kernel.in,Target OS,KERNEL,config/kernel,$(KERNELS))
1.9 define build_gen_choice_in
1.10 @echo ' IN $(1)'
1.11 - @(echo "# $(2) menu"; \
1.12 - echo "# Generated file, do not edit!!!"; \
1.13 - echo ""; \
1.14 - for entry in $(5); do \
1.15 - file="$(4)/$${entry}.in"; \
1.16 - _entry=$$(echo "$${entry}" |sed -r -s -e 's/[-.+]/_/g;'); \
1.17 - echo "config $(3)_$${_entry}"; \
1.18 - echo " bool"; \
1.19 - printf " prompt \"$${entry}"; \
1.20 - if grep -E '^# +EXPERIMENTAL$$' $${file} >/dev/null 2>&1; then \
1.21 - echo " (EXPERIMENTAL)\""; \
1.22 - echo " depends on EXPERIMENTAL"; \
1.23 - else \
1.24 - echo "\""; \
1.25 - fi; \
1.26 - echo "if $(3)_$${_entry}"; \
1.27 - echo "config $(3)"; \
1.28 - echo " default \"$${entry}\" if $(3)_$${_entry}"; \
1.29 - echo "source $${file}"; \
1.30 - echo "endif"; \
1.31 - echo ""; \
1.32 - done; \
1.33 + @(echo "# $(2) menu"; \
1.34 + echo "# Generated file, do not edit!!!"; \
1.35 + echo ""; \
1.36 + echo "choice"; \
1.37 + echo " bool"; \
1.38 + echo " prompt \"$(2)\""; \
1.39 + echo ""; \
1.40 + for entry in $(5); do \
1.41 + file="$(4)/$${entry}.in"; \
1.42 + _entry=$$(echo "$${entry}" |sed -r -s -e 's/[-.+]/_/g;'); \
1.43 + echo "config $(3)_$${_entry}"; \
1.44 + echo " bool"; \
1.45 + printf " prompt \"$${entry}"; \
1.46 + if grep -E '^# +EXPERIMENTAL$$' $${file} >/dev/null 2>&1; then \
1.47 + echo " (EXPERIMENTAL)\""; \
1.48 + echo " depends on EXPERIMENTAL"; \
1.49 + else \
1.50 + echo "\""; \
1.51 + fi; \
1.52 + done; \
1.53 + echo ""; \
1.54 + echo "endchoice"; \
1.55 + for entry in $(5); do \
1.56 + file="$(4)/$${entry}.in"; \
1.57 + _entry=$$(echo "$${entry}" |sed -r -s -e 's/[-.+]/_/g;'); \
1.58 + echo ""; \
1.59 + echo "if $(3)_$${_entry}"; \
1.60 + echo "config $(3)"; \
1.61 + echo " default \"$${entry}\" if $(3)_$${_entry}"; \
1.62 + echo "source $${file}"; \
1.63 + echo "endif"; \
1.64 + done; \
1.65 ) >$(1)
1.66 endef
1.67
1.68 $(CT_TOP_DIR)/config.gen/arch.in: $(ARCH_CONFIG_FILES)
1.69 - $(call build_gen_choice_in,$(patsubst $(CT_TOP_DIR)/%,%,$@),Architecture,ARCH,config/arch,$(ARCHS))
1.70 + $(call build_gen_choice_in,$(patsubst $(CT_TOP_DIR)/%,%,$@),Target Architecture,ARCH,config/arch,$(ARCHS))
1.71
1.72 $(CT_TOP_DIR)/config.gen/kernel.in: $(KERNEL_CONFIG_FILES)
1.73 - $(call build_gen_choice_in,$(patsubst $(CT_TOP_DIR)/%,%,$@),Kernel,KERNEL,config/kernel,$(KERNELS))
1.74 + $(call build_gen_choice_in,$(patsubst $(CT_TOP_DIR)/%,%,$@),Target OS,KERNEL,config/kernel,$(KERNELS))
1.75
1.76 # Function build_gen_menu_in:
1.77 # $1 : destination file