2007-02-24 11:00:05 +00:00
|
|
|
# ===========================================================================
|
2007-07-02 19:40:54 +00:00
|
|
|
# crosstool-NG configuration targets
|
2007-02-24 11:00:05 +00:00
|
|
|
# These targets are used from top-level makefile
|
|
|
|
|
2008-10-14 16:50:33 +00:00
|
|
|
#-----------------------------------------------------------
|
|
|
|
# The configurators rules
|
2007-07-01 19:04:20 +00:00
|
|
|
|
2011-05-12 17:45:30 +00:00
|
|
|
configurators = menuconfig nconfig oldconfig
|
2008-10-19 09:34:32 +00:00
|
|
|
PHONY += $(configurators)
|
2008-10-18 18:37:28 +00:00
|
|
|
|
2008-10-19 09:34:32 +00:00
|
|
|
$(configurators): config_files
|
|
|
|
|
2012-01-14 17:22:06 +00:00
|
|
|
CONF := $(CT_LIB_DIR)/kconfig/conf
|
|
|
|
MCONF := $(CT_LIB_DIR)/kconfig/mconf
|
|
|
|
NCONF := $(CT_LIB_DIR)/kconfig/nconf
|
|
|
|
|
|
|
|
menuconfig:
|
2008-10-22 16:56:23 +00:00
|
|
|
@$(ECHO) " CONF $(KCONFIG_TOP)"
|
2012-01-14 17:22:06 +00:00
|
|
|
$(SILENT)$(MCONF) $(KCONFIG_TOP)
|
2007-02-24 11:00:05 +00:00
|
|
|
|
2012-01-14 17:22:06 +00:00
|
|
|
nconfig:
|
2011-05-12 17:45:30 +00:00
|
|
|
@$(ECHO) " CONF $(KCONFIG_TOP)"
|
2012-01-14 17:22:06 +00:00
|
|
|
$(SILENT)$(NCONF) $(KCONFIG_TOP)
|
2011-05-12 17:45:30 +00:00
|
|
|
|
2012-01-14 17:22:06 +00:00
|
|
|
oldconfig: .config
|
2008-10-18 18:37:28 +00:00
|
|
|
@$(ECHO) " CONF $(KCONFIG_TOP)"
|
2012-01-14 17:22:06 +00:00
|
|
|
$(SILENT)$(CONF) --silent$@ $(KCONFIG_TOP)
|
2007-02-24 11:00:05 +00:00
|
|
|
|
2010-02-11 20:28:10 +00:00
|
|
|
# Always be silent, the stdout an be >.config
|
|
|
|
extractconfig:
|
|
|
|
@awk 'BEGIN { dump=0; } \
|
|
|
|
dump==1 && $$0~/^\[.....\][[:space:]]+(# |)CT_/ { \
|
|
|
|
$$1=""; \
|
|
|
|
gsub("^[[:space:]]",""); \
|
|
|
|
print; \
|
|
|
|
} \
|
|
|
|
$$0~/Dumping user-supplied crosstool-NG configuration: done in/ { \
|
|
|
|
dump=0; \
|
|
|
|
} \
|
|
|
|
$$0~/Dumping user-supplied crosstool-NG configuration$$/ { \
|
|
|
|
dump=1; \
|
|
|
|
}'
|
|
|
|
|
2008-10-14 16:50:33 +00:00
|
|
|
#-----------------------------------------------------------
|
2007-02-24 11:00:05 +00:00
|
|
|
# Help text used by make help
|
2008-10-14 16:50:33 +00:00
|
|
|
|
2007-06-17 16:24:23 +00:00
|
|
|
help-config::
|
2007-08-15 14:59:37 +00:00
|
|
|
@echo ' menuconfig - Update current config using a menu based program'
|
|
|
|
@echo ' oldconfig - Update current config using a provided .config as base'
|
2010-02-11 20:28:10 +00:00
|
|
|
@echo ' extractconfig - Extract to stdout the configuration items from a'
|
|
|
|
@echo ' build.log file piped to stdin'
|