]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
build: use autobuild module to make build logs nicer
authorEric Blake <eblake@redhat.com>
Wed, 2 Jan 2013 18:10:42 +0000 (11:10 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 2 Jan 2013 23:43:58 +0000 (16:43 -0700)
A recent build failure made me realize that we could usefully add
a bit more information to configure output, for aid in analysis of
failed builds.  Pulling in the autobuild module merely adds these
four lines to configure output:

configure: autobuild project... libvirt
configure: autobuild revision... v1.0.1-113-g7a74eea
configure: autobuild hostname... myhost
configure: autobuild timestamp... 20130102T233543Z

which can be useful even if not using the Autobuild project to parse
build logs.

* bootstrap.conf (gnulib_modules): Add autobuild.
* configure.ac: Favor git version over release version, when available.

bootstrap.conf
configure.ac

index 37a0ae1b5bb4d3863ac0bcfc1954faad62cb3bf0..4b45a4f2feac1af1dfd3a3416c7af55e01ccd1f6 100644 (file)
@@ -1,6 +1,6 @@
 # Bootstrap configuration.
 
-# Copyright (C) 2010-2012 Red Hat, Inc.
+# Copyright (C) 2010-2013 Red Hat, Inc.
 
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -20,6 +20,7 @@
 gnulib_modules='
 accept
 areadlink
+autobuild
 base64
 bind
 bitrotate
index 3c97e4fed0daf0a303a9b57dd1af38b0cf71ebe1..e8c2214f82be5befda6040b4ed41d3f62a78506a 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 
-dnl Copyright (C) 2005-2012 Red Hat, Inc.
+dnl Copyright (C) 2005-2013 Red Hat, Inc.
 dnl See COPYING.LIB for the License of this software
 
 AC_INIT([libvirt], [1.0.1], [libvir-list@redhat.com], [], [http://libvirt.org])
@@ -122,6 +122,12 @@ AC_PROG_CC
 AC_PROG_INSTALL
 AC_PROG_CPP
 
+dnl Setting AB_VERSION makes the 'autobuild' lines of configure output
+dnl slightly more useful
+if test -d $srcdir/.git && git --version >/dev/null 2>&1 ; then
+  AB_VERSION=`cd $srcdir && git describe --match 'v[[0-9]]*' 2>/dev/null`
+fi
+
 gl_EARLY
 gl_INIT