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
|
|
|
|
2013-01-21 23:34:15 +00:00
|
|
|
configurators = menuconfig nconfig oldconfig savedefconfig defconfig
|
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-05-06 22:27:05 +00:00
|
|
|
# We need CONF for savedefconfig in scripts/saveSample.sh
|
|
|
|
export CONF := $(CT_LIB_DIR)/kconfig/conf
|
2012-01-14 17:22:06 +00:00
|
|
|
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
|
|
|
|
2013-01-21 23:34:15 +00:00
|
|
|
savedefconfig: .config
|
2012-08-15 20:06:22 +00:00
|
|
|
@$(ECHO) ' GEN $@'
|
|
|
|
$(SILENT)$(CONF) --savedefconfig=$${CONFIG-defconfig} $(KCONFIG_TOP)
|
|
|
|
|
2013-01-21 23:34:15 +00:00
|
|
|
defconfig:
|
2012-08-15 20:06:22 +00:00
|
|
|
@$(ECHO) ' CONF $@'
|
|
|
|
$(SILENT)$(CONF) --defconfig=$${CONFIG-defconfig} $(KCONFIG_TOP)
|
|
|
|
|
2010-02-11 20:28:10 +00:00
|
|
|
# Always be silent, the stdout an be >.config
|
|
|
|
extractconfig:
|
2012-07-14 16:25:47 +00:00
|
|
|
@$(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; \
|
|
|
|
}'
|
2010-02-11 20:28:10 +00:00
|
|
|
|
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'
|
2012-08-15 20:06:22 +00:00
|
|
|
@echo ' defconfig - Save current config as a mini-defconfig to $${CONFIG}'
|
|
|
|
@echo ' olddefconfig - Update config from a mini-defconfig $${CONFIG}'
|
|
|
|
@echo ' (default: $${CONFIG}=./defconfig)'
|