All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] autotools: Override do_compile to specify V=1 if project uses AM_V_GEN
@ 2011-03-23 22:30 Colin Walters
  2011-03-24  3:19 ` Khem Raj
  2011-04-18 21:27 ` Saul Wold
  0 siblings, 2 replies; 7+ messages in thread
From: Colin Walters @ 2011-03-23 22:30 UTC (permalink / raw)
  To: poky

[-- Attachment #1: Type: text/plain, Size: 347 bytes --]

    Non-verbose logs are really annoying when trying to debug a build
    failure.  A lot of projects are copying in the flag to use
    AM_SILENT_RULES which automake gained recently.  We need to undo
    this.

    Implement this by overriding do_compile in autotools to look for
    its signature, and specify V=1 to make if we find it.

[-- Attachment #2: 0001-autotools-Override-do_compile-to-specify-V-1-if-proj.patch --]
[-- Type: text/x-patch, Size: 1494 bytes --]

From eb7869c1b300b1e0815708ce44a108e4b8add32d Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Wed, 23 Mar 2011 18:28:36 -0400
Subject: [PATCH] autotools: Override do_compile to specify V=1 if project uses AM_V_GEN

Non-verbose logs are really annoying when trying to debug a build
failure.  A lot of projects are copying in the flag to use
AM_SILENT_RULES which automake gained recently.  We need to undo
this.

Implement this by overriding do_compile in autotools to look for
its signature, and specify V=1 to make if we find it.
---
 meta/classes/autotools.bbclass |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index bc891f9..04d5e2d 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -156,6 +156,15 @@ autotools_do_configure() {
 	fi
 }
 
+# Override base compilation with one that undoes AM_SILENT_RULES; we
+# want the full logs.
+autotools_do_compile() {
+	if grep -q AM_V_GEN Makefile 2>/dev/null; then
+		AM_V_OVERRIDE="V=1"
+	fi
+	${MAKE} ${AM_V_OVERRIDE} ${EXTRA_OEMAKE} "$@" || die "oe_runmake failed"
+}
+
 autotools_do_install() {
 	oe_runmake 'DESTDIR=${D}' install
 	# Info dir listing isn't interesting at this point so remove it if it exists.
@@ -166,4 +175,4 @@ autotools_do_install() {
 
 inherit siteconfig
 
-EXPORT_FUNCTIONS do_configure do_install
+EXPORT_FUNCTIONS do_configure do_compile do_install
-- 
1.7.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-04-18 21:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-23 22:30 [patch] autotools: Override do_compile to specify V=1 if project uses AM_V_GEN Colin Walters
2011-03-24  3:19 ` Khem Raj
2011-03-25 12:41   ` Colin Walters
2011-04-08 21:07     ` Colin Walters
2011-04-09  0:00       ` Khem Raj
2011-04-09  4:36         ` Saul Wold
2011-04-18 21:27 ` Saul Wold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.