autotools: do not output config.log to console

Submitted by Enrico Scholz on Nov. 16, 2012, 5:24 p.m.

Details

Message ID 1353086666-25122-1-git-send-email-enrico.scholz@sigma-chemnitz.de
State New
Headers show

Commit Message

Enrico Scholz Nov. 16, 2012, 5:24 p.m.
Flooding xterm console output with 10000+ lines of config.log is not
very productive and hides the previously printed information.  Because
the interesting lines are usually in the middle of config.log, there
is not easy way to trim down the output.

Patch copies output of config.log into temp-dir and points to this
file.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
---
 meta/classes/autotools.bbclass | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index efeb67f..7dc39f3 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -91,14 +91,12 @@  oe_runconf () {
 	cfgscript="${S}/configure"
 	if [ -x "$cfgscript" ] ; then
 		bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
-		set +e
-		${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"
-		if [ "$?" != "0" ]; then
-			echo "Configure failed. The contents of all config.log files follows to aid debugging"
-			find ${S} -name config.log -print -exec cat {} \;
+		${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@" || (
+			set +x
+			echo "Configure failed. The contents of all config.log files will be put into ${T}/config.log to ease debugging."
+			find ${S} -name config.log -print -exec cat {} \; > ${T}/config.log
 			bbfatal "oe_runconf failed"
-		fi
-		set -e
+		)
 	else
 		bbfatal "no configure script found at $cfgscript"
 	fi