[Spice-devel] [PATCH spice 4/4] build-sys: generate spice-version.h

Christophe Fergeau cfergeau at redhat.com
Mon Oct 27 03:02:36 PDT 2014


On Fri, Oct 24, 2014 at 05:54:07PM +0200, Marc-André Lureau wrote:
> Editing the hexadecimal value of spice-version and keeping it in sync
> with actual release is a bit tedious. Let's generate it
> automatically (although handling of bumps will need temporarily static
> versions, when 0.12 -> 1.0 for example)
> ---
>  configure.ac              | 11 +++++++++++
>  server/spice-version.h    | 27 ---------------------------
>  server/spice-version.h.in | 27 +++++++++++++++++++++++++++
>  3 files changed, 38 insertions(+), 27 deletions(-)
>  delete mode 100644 server/spice-version.h
>  create mode 100644 server/spice-version.h.in
> 
> diff --git a/configure.ac b/configure.ac
> index cedeb40..615b31c 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -18,6 +18,16 @@ m4_define([SPICE_AGE], [9])
>  AC_INIT(spice, [m4_esyscmd(build-aux/git-version-gen .tarball-version)],
>          [spice-devel at lists.freedesktop.org], spice)
>  
> +major=`echo $PACKAGE_VERSION | cut -d. -f1`
> +minor=`echo $PACKAGE_VERSION | cut -d. -f2`
> +micro=`echo $PACKAGE_VERSION | cut -d. -f3`
> +git=`echo $PACKAGE_VERSION | cut -d. -f4`
> +if test "$git" != x ; then

This should be:
if test x"$git" != x ; then

Maybe we should also handle v0.12.5-dirty and not increment in that case
too, but that's a not very important corner-case.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20141027/3418f83a/attachment.sig>


More information about the Spice-devel mailing list