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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxx], 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

Attachment: pgpB1qWiYyx4v.pgp
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]