From 013230cda91a104af9e1344ccf926c19c52d9e1d Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Thu, 11 Feb 2010 21:28:10 +0100 Subject: 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. --- kconfig/kconfig.mk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'kconfig') diff --git a/kconfig/kconfig.mk b/kconfig/kconfig.mk index 296ca5ea..88dcdd39 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! -- cgit v1.2.3