1.1 --- a/kconfig/Makefile Thu May 17 22:10:48 2007 +0000
1.2 +++ b/kconfig/Makefile Sat Jun 02 07:56:45 2007 +0000
1.3 @@ -2,6 +2,9 @@
1.4 # crosstool-ng configuration targets
1.5 # These targets are used from top-level makefile
1.6
1.7 +# Derive the project version from, well, the project version:
1.8 +export PROJECTVERSION=$(CT_VERSION)
1.9 +
1.10 KCONFIG_TOP = config/config.in
1.11 obj = ./kconfig
1.12 PHONY += clean help oldconfig menuconfig config silentoldconfig \
1.13 @@ -18,11 +21,14 @@
1.14
1.15 # Build a list of all config files
1.16 CONFIG_FILES = $(filter-out %debug.in,$(shell find $(CT_TOP_DIR)/config -type f -name '*.in'))
1.17 +DEBUG_CONFIG_FILES = $(shell find $(CT_TOP_DIR)/config/debug -type f -name '*.in')
1.18 +TOOLS_CONFIG_FILES = $(shell find $(CT_TOP_DIR)/config/tools -type f -name '*.in')
1.19
1.20 -# Derive the project version from, well, the project version:
1.21 -export PROJECTVERSION=$(CT_VERSION)
1.22 +.PHONY: generated_config_files
1.23 +generated_config_files: $(CT_TOP_DIR)/config/debug.in \
1.24 + $(CT_TOP_DIR)/config/tools.in
1.25
1.26 -$(CT_TOP_DIR)/config/debug.in: $(CONFIG_FILES)
1.27 +$(CT_TOP_DIR)/config/debug.in: $(DEBUG_CONFIG_FILES)
1.28 @echo "# Debug facilities menu" >$@
1.29 @echo "# Generated file, do not edit!!!" >>$@
1.30 @echo "menu \"Debug facilities\"" >>$@
1.31 @@ -31,13 +37,22 @@
1.32 done >>$@
1.33 @echo "endmenu" >>$@
1.34
1.35 -menuconfig: $(obj)/mconf $(CT_TOP_DIR)/config/debug.in
1.36 +$(CT_TOP_DIR)/config/tools.in: $(TOOLS_CONFIG_FILES)
1.37 + @echo "# Tools facilities menu" >$@
1.38 + @echo "# Generated file, do not edit!!!" >>$@
1.39 + @echo "menu \"Tools facilities\"" >>$@
1.40 + @for f in $(patsubst $(CT_TOP_DIR)/%,%,$(wildcard $(CT_TOP_DIR)/config/tools/*.in)); do \
1.41 + echo "source $${f}"; \
1.42 + done >>$@
1.43 + @echo "endmenu" >>$@
1.44 +
1.45 +menuconfig: $(obj)/mconf generated_config_files
1.46 @$< $(KCONFIG_TOP)
1.47
1.48 -config: $(obj)/conf $(CT_TOP_DIR)/config/debug.in
1.49 +config: $(obj)/conf generated_config_files
1.50 @$< $(KCONFIG_TOP)
1.51
1.52 -oldconfig: $(obj)/conf $(CT_TOP_DIR)/config/debug.in
1.53 +oldconfig: $(obj)/conf generated_config_files
1.54 @$< -s $(KCONFIG_TOP)
1.55
1.56 # Help text used by make help
1.57 @@ -66,4 +81,4 @@
1.58
1.59 clean::
1.60 @rm -f $(wildcard kconfig/*zconf*.c) kconfig/{conf,mconf}
1.61 - @rm -f "$(CT_TOP_DIR)/config/debug.in"
1.62 + @rm -f "$(CT_TOP_DIR)/config/debug.in" "$(CT_TOP_DIR)/config/tools.in"