qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] configure: minor improvements to config.log
@ 2011-11-23 17:26 Peter Maydell
  2011-11-23 17:26 ` [Qemu-devel] [PATCH 1/2] configure: Include #define name in check_define compiler error Peter Maydell
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Peter Maydell @ 2011-11-23 17:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, patches

Two trivial patches which make it a little easier to look at config.log
and figure out what's going on.

The next step down this road would probably be something like
   test_start() {
       echo "# Checking for $1..." >> config.log
   }

and then lots of:
   test_start "zlib"
in the relevant places.
 


Peter Maydell (2):
  configure: Include #define name in check_define compiler error
  configure: Print a banner comment at the top of config.log

 configure |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

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

* [Qemu-devel] [PATCH 1/2] configure: Include #define name in check_define compiler error
  2011-11-23 17:26 [Qemu-devel] [PATCH 0/2] configure: minor improvements to config.log Peter Maydell
@ 2011-11-23 17:26 ` Peter Maydell
  2011-11-23 17:26 ` [Qemu-devel] [PATCH 2/2] configure: Print a banner comment at the top of config.log Peter Maydell
  2011-11-24 10:40 ` [Qemu-devel] [Qemu-trivial] [PATCH 0/2] configure: minor improvements to config.log Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2011-11-23 17:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, patches

Include the name of the #define being tested for in the compiler
error produced when a check_define test is run and fails. This
appears only in the config.log, but it does make it a little easier
to debug problems by inspecting config.log.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index f033438..5a35b6d 100755
--- a/configure
+++ b/configure
@@ -249,7 +249,7 @@ source_path=`cd "$source_path"; pwd`
 check_define() {
 cat > $TMPC <<EOF
 #if !defined($1)
-#error Not defined
+#error $1 not defined
 #endif
 int main(void) { return 0; }
 EOF
-- 
1.7.1

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

* [Qemu-devel] [PATCH 2/2] configure: Print a banner comment at the top of config.log
  2011-11-23 17:26 [Qemu-devel] [PATCH 0/2] configure: minor improvements to config.log Peter Maydell
  2011-11-23 17:26 ` [Qemu-devel] [PATCH 1/2] configure: Include #define name in check_define compiler error Peter Maydell
@ 2011-11-23 17:26 ` Peter Maydell
  2011-11-24 10:40 ` [Qemu-devel] [Qemu-trivial] [PATCH 0/2] configure: minor improvements to config.log Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2011-11-23 17:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, patches

Print a banner comment at the top of config.log identifying
when configure was run and the arguments used. This is occasionally
useful for debugging purposes.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 configure |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 5a35b6d..2e23650 100755
--- a/configure
+++ b/configure
@@ -20,6 +20,11 @@ TMPE="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.exe"
 trap "rm -f $TMPC $TMPO $TMPE" EXIT INT QUIT TERM
 rm -f config.log
 
+# Print a helpful header at the top of config.log
+echo "# QEMU configure log $(date)" >> config.log
+echo "# produced by $0 $*" >> config.log
+echo "#" >> config.log
+
 compile_object() {
   echo $cc $QEMU_CFLAGS -c -o $TMPO $TMPC >> config.log
   $cc $QEMU_CFLAGS -c -o $TMPO $TMPC >> config.log 2>&1
-- 
1.7.1

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

* Re: [Qemu-devel] [Qemu-trivial] [PATCH 0/2] configure: minor improvements to config.log
  2011-11-23 17:26 [Qemu-devel] [PATCH 0/2] configure: minor improvements to config.log Peter Maydell
  2011-11-23 17:26 ` [Qemu-devel] [PATCH 1/2] configure: Include #define name in check_define compiler error Peter Maydell
  2011-11-23 17:26 ` [Qemu-devel] [PATCH 2/2] configure: Print a banner comment at the top of config.log Peter Maydell
@ 2011-11-24 10:40 ` Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2011-11-24 10:40 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-trivial, qemu-devel, patches

On Wed, Nov 23, 2011 at 05:26:42PM +0000, Peter Maydell wrote:
> Two trivial patches which make it a little easier to look at config.log
> and figure out what's going on.
> 
> The next step down this road would probably be something like
>    test_start() {
>        echo "# Checking for $1..." >> config.log
>    }
> 
> and then lots of:
>    test_start "zlib"
> in the relevant places.
>  
> 
> 
> Peter Maydell (2):
>   configure: Include #define name in check_define compiler error
>   configure: Print a banner comment at the top of config.log
> 
>  configure |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)

Thanks, applied to the trivial patches -next tree:
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches-next

Stefan

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

end of thread, other threads:[~2011-11-24 10:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-23 17:26 [Qemu-devel] [PATCH 0/2] configure: minor improvements to config.log Peter Maydell
2011-11-23 17:26 ` [Qemu-devel] [PATCH 1/2] configure: Include #define name in check_define compiler error Peter Maydell
2011-11-23 17:26 ` [Qemu-devel] [PATCH 2/2] configure: Print a banner comment at the top of config.log Peter Maydell
2011-11-24 10:40 ` [Qemu-devel] [Qemu-trivial] [PATCH 0/2] configure: minor improvements to config.log Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).