No one sane would you 'ct-ng config' to configure crosstool-NG.
Remove this useless rule.
/trunk/kconfig/kconfig.mk | 8 2 6 0 ++------
/trunk/ct-ng.comp | 2 1 1 0 +-
2 files changed, 3 insertions(+), 7 deletions(-)
1 # ===========================================================================
2 # crosstool-NG configuration targets
3 # These targets are used from top-level makefile
5 # Derive the project version from, well, the project version:
6 export PROJECTVERSION=$(CT_VERSION)
8 KCONFIG_TOP = config/config.in
9 obj = $(CT_TOP_DIR)/kconfig
10 PHONY += clean help oldconfig menuconfig defoldconfig
12 # Darwin (MacOS-X) does not have proper libintl support
13 ifeq ($(shell uname -s),Darwin)
17 ifneq ($(KBUILD_NO_NLS),)
18 CFLAGS += -DKBUILD_NO_NLS
21 # Build a list of all config files
22 ARCH_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/arch/*.in)
23 KERNEL_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/kernel/*.in)
24 CC_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/cc/*.in)
25 LIBC_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/libc/*.in)
26 DEBUG_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/debug/*.in)
27 TOOL_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/tools/*.in)
29 STATIC_CONFIG_FILES = $(shell find $(CT_LIB_DIR)/config -type f -name '*.in')
30 GEN_CONFIG_FILES=$(CT_TOP_DIR)/config.gen/arch.in \
31 $(CT_TOP_DIR)/config.gen/kernel.in \
32 $(CT_TOP_DIR)/config.gen/cc.in \
33 $(CT_TOP_DIR)/config.gen/libc.in \
34 $(CT_TOP_DIR)/config.gen/tools.in \
35 $(CT_TOP_DIR)/config.gen/debug.in
37 CONFIG_FILES=$(STATIC_CONFIG_FILES) $(GEN_CONFIG_FILES)
40 ARCHS = $(patsubst $(CT_LIB_DIR)/config/arch/%.in,%,$(ARCH_CONFIG_FILES))
41 KERNELS = $(patsubst $(CT_LIB_DIR)/config/kernel/%.in,%,$(KERNEL_CONFIG_FILES))
42 CCS = $(patsubst $(CT_LIB_DIR)/config/cc/%.in,%,$(CC_CONFIG_FILES))
43 LIBCS = $(patsubst $(CT_LIB_DIR)/config/libc/%.in,%,$(LIBC_CONFIG_FILES))
44 DEBUGS = $(patsubst $(CT_LIB_DIR)/config/debug/%.in,%,$(DEBUG_CONFIG_FILES))
45 TOOLS = $(patsubst $(CT_LIB_DIR)/config/tools/%.in,%,$(TOOL_CONFIG_FILES))
47 $(GEN_CONFIG_FILES): $(CT_TOP_DIR)/config.gen \
48 $(CT_LIB_DIR)/kconfig/kconfig.mk
50 $(CT_TOP_DIR)/config.gen: $(KCONFIG_TOP)
51 @mkdir -p $(CT_TOP_DIR)/config.gen
53 # Function build_gen_choice_in:
54 # $1 : destination file
55 # $2 : name for the entries family (eg. Architecture, kernel...)
56 # $3 : prefix for the choice entries (eg. ARCH, KERNEL...)
57 # $4 : base directory containing config files
58 # $5 : list of config entries (eg. for architectures: "alpha arm ia64"...,
59 # and for kernels: "bare-metal linux"...)
60 # Example to build the kernels generated config file:
61 # $(call build_gen_choice_in,config.gen/kernel.in,Target OS,KERNEL,config/kernel,$(KERNELS))
62 define build_gen_choice_in
64 @(echo "# $(2) menu"; \
65 echo "# Generated file, do not edit!!!"; \
69 echo " prompt \"$(2)\""; \
71 for entry in $(5); do \
72 file="$(4)/$${entry}.in"; \
73 _entry=$$(echo "$${entry}" |sed -r -s -e 's/[-.+]/_/g;'); \
74 echo "config $(3)_$${_entry}"; \
76 printf " prompt \"$${entry}"; \
77 if grep -E '^# +EXPERIMENTAL$$' $${file} >/dev/null 2>&1; then \
78 echo " (EXPERIMENTAL)\""; \
79 echo " depends on EXPERIMENTAL"; \
86 for entry in $(5); do \
87 file="$(4)/$${entry}.in"; \
88 _entry=$$(echo "$${entry}" |sed -r -s -e 's/[-.+]/_/g;'); \
90 echo "if $(3)_$${_entry}"; \
92 echo " default \"$${entry}\" if $(3)_$${_entry}"; \
93 echo "source $${file}"; \
99 $(CT_TOP_DIR)/config.gen/arch.in: $(ARCH_CONFIG_FILES)
100 $(call build_gen_choice_in,$(patsubst $(CT_TOP_DIR)/%,%,$@),Target Architecture,ARCH,config/arch,$(ARCHS))
102 $(CT_TOP_DIR)/config.gen/kernel.in: $(KERNEL_CONFIG_FILES)
103 $(call build_gen_choice_in,$(patsubst $(CT_TOP_DIR)/%,%,$@),Target OS,KERNEL,config/kernel,$(KERNELS))
105 $(CT_TOP_DIR)/config.gen/cc.in: $(CC_CONFIG_FILES)
106 $(call build_gen_choice_in,$(patsubst $(CT_TOP_DIR)/%,%,$@),C compiler,CC,config/cc,$(CCS))
108 $(CT_TOP_DIR)/config.gen/libc.in: $(LIBC_CONFIG_FILES)
109 $(call build_gen_choice_in,$(patsubst $(CT_TOP_DIR)/%,%,$@),C library,LIBC,config/libc,$(LIBCS))
111 # Function build_gen_menu_in:
112 # $1 : destination file
113 # $2 : name of entries family (eg. Tools, Debug...)
114 # $3 : prefix for the menu entries (eg. TOOL, DEBUG)
115 # $4 : base directory containing config files
116 # $5 : list of config entries (eg. for tools: "libelf sstrip"..., and for
117 # debug: "dmalloc duma gdb"...)
118 # Example to build the tools generated config file:
119 # $(call build_gen_menu_in,config.gen/tools.in,Tools,TOOL,config/tools,$(TOOLS))
120 define build_gen_menu_in
122 @(echo "# $(2) facilities menu"; \
123 echo "# Generated file, do not edit!!!"; \
125 for entry in $(5); do \
126 file="$(4)/$${entry}.in"; \
127 _entry=$$(echo "$${entry}" |sed -r -s -e 's/[-.+]/_/g;'); \
128 echo "menuconfig $(3)_$${_entry}"; \
130 printf " prompt \"$${entry}"; \
131 if grep -E '^# +EXPERIMENTAL$$' $${file} >/dev/null 2>&1; then \
132 echo " (EXPERIMENTAL)\""; \
133 echo " depends on EXPERIMENTAL"; \
137 echo "if $(3)_$${_entry}"; \
138 echo "source $${file}"; \
145 $(CT_TOP_DIR)/config.gen/tools.in: $(TOOL_CONFIG_FILES)
146 $(call build_gen_menu_in,$(patsubst $(CT_TOP_DIR)/%,%,$@),Tools,TOOL,config/tools,$(TOOLS))
148 $(CT_TOP_DIR)/config.gen/debug.in: $(DEBUG_CONFIG_FILES)
149 $(call build_gen_menu_in,$(patsubst $(CT_TOP_DIR)/%,%,$@),Debug,DEBUG,config/debug,$(DEBUGS))
151 menuconfig oldconfig defoldconfig: $(KCONFIG_TOP)
154 @ln -sf $(CT_LIB_DIR)/config config
156 menuconfig: $(CONFIG_FILES) $(obj)/mconf
157 @$(obj)/mconf $(KCONFIG_TOP)
159 oldconfig: $(CONFIG_FILES) $(obj)/conf
160 @$(obj)/conf -s $(KCONFIG_TOP)
162 defoldconfig: $(CONFIG_FILES) $(obj)/conf
163 @yes "" |$(obj)/conf -s $(KCONFIG_TOP)
165 # Help text used by make help
167 @echo ' menuconfig - Update current config using a menu based program'
168 @echo ' oldconfig - Update current config using a provided .config as base'
169 @echo ' build log piped into stdin'
173 SHIPPED := $(CT_LIB_DIR)/kconfig/zconf.tab.c $(CT_LIB_DIR)/kconfig/lex.zconf.c $(CT_LIB_DIR)/kconfig/zconf.hash.c
175 $(obj)/conf $(obj)/mconf: $(obj)
180 HEADERS = $(CT_LIB_DIR)/kconfig/expr.h \
181 $(CT_LIB_DIR)/kconfig/lkc.h \
182 $(CT_LIB_DIR)/kconfig/lkc_proto.h
184 FILES = $(CT_LIB_DIR)/kconfig/confdata.c \
185 $(CT_LIB_DIR)/kconfig/expr.c \
186 $(CT_LIB_DIR)/kconfig/menu.c \
187 $(CT_LIB_DIR)/kconfig/symbol.c \
188 $(CT_LIB_DIR)/kconfig/util.c
190 $(obj)/mconf: $(SHIPPED) $(CT_LIB_DIR)/kconfig/mconf.c \
191 $(HEADERS) $(FILES) \
192 $(CT_LIB_DIR)/kconfig/kconfig.mk
193 @echo ' LD kconfig/mconf'
194 @$(HOST_CC) $(CFLAGS) -o $@ $(CT_LIB_DIR)/kconfig/{mconf.c,zconf.tab.c,lxdialog/*.c} \
195 $(shell $(CT_LIB_DIR)/kconfig/lxdialog/check-lxdialog.sh -ccflags) \
196 $(shell $(CT_LIB_DIR)/kconfig/lxdialog/check-lxdialog.sh -ldflags $(HOST_CC))
198 $(obj)/conf: $(SHIPPED) $(CT_LIB_DIR)/kconfig/conf.c \
199 $(HEADERS) $(FILES) \
200 $(CT_LIB_DIR)/kconfig/kconfig.mk
201 @echo ' LD kconfig/conf'
202 @$(HOST_CC) $(CFLAGS) -o $@ $(CT_LIB_DIR)/kconfig/{conf.c,zconf.tab.c}
205 @rm -f $(CT_TOP_DIR)/kconfig/{,m}conf
206 @rmdir --ignore-fail-on-non-empty $(CT_TOP_DIR)/kconfig 2>/dev/null || true
207 @rm -f $(CT_TOP_DIR)/config 2>/dev/null || true
208 @rm -rf $(CT_TOP_DIR)/config.gen