summaryrefslogtreecommitdiff
path: root/kconfig
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-02-11 20:28:10 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-02-11 20:28:10 (GMT)
commit013230cda91a104af9e1344ccf926c19c52d9e1d (patch)
tree42bbe5ec594601a4df895aba30366a9a50744555 /kconfig
parent9dc4e8172fb18203f86f5d62e7204472f787ace6 (diff)
scripts: add action to extract config from a build.log file
That got removed quite some time ago, but is really usefull to get the configuration from a build.log file of a failing build.
Diffstat (limited to 'kconfig')
-rw-r--r--kconfig/kconfig.mk17
1 files changed, 17 insertions, 0 deletions
diff --git a/kconfig/kconfig.mk b/kconfig/kconfig.mk
index 296ca5e..88dcdd3 100644
--- a/kconfig/kconfig.mk
+++ b/kconfig/kconfig.mk
@@ -24,12 +24,29 @@ oldconfig: $(obj)/conf .config
@$(ECHO) " CONF $(KCONFIG_TOP)"
$(SILENT)$< -s $(KCONFIG_TOP)
+# 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; \
+ }'
+
#-----------------------------------------------------------
# Help text used by make help
help-config::
@echo ' menuconfig - Update current config using a menu based program'
@echo ' oldconfig - Update current config using a provided .config as base'
+ @echo ' extractconfig - Extract to stdout the configuration items from a'
+ @echo ' build.log file piped to stdin'
#-----------------------------------------------------------
# Hmmm! Cheesy build!