[DVDnav-discuss] Fwd: [PATCH] Create version.h with released version number when SVN not known

Nico Sabbi Nicola.Sabbi at poste.it
Thu May 1 11:25:09 CEST 2008


> 
> ---------- Messaggio inoltrato ----------
> From: Dan Nicholson <dbn.lists at gmail.com>
> To: dvdnav-discuss at mplayerhq.hu
> Date: Mon, 28 Apr 2008 14:53:40 -0700
> Subject: [DVDnav-discuss] [PATCH] Create version.h with released version
> number when SVN not known
> ---
>  Makefile   |    2 +-
>  version.sh |    6 +++++-
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 85108e5..c76c72c 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -79,7 +79,7 @@ version.h: $(SVN_ENTRIES)
>  endif
> 
>  version.h:
> -       sh $(SRC_PATH)/version.sh $(SRC_PATH)
> +       sh $(SRC_PATH)/version.sh $(SRC_PATH) "$(SHLIB_VERSION)"
> 
>  $(SRCS) $(DVDREAD_SRCS): version.h
> 
> diff --git a/version.sh b/version.sh
> index 6ef2323..6b4e52e 100755
> --- a/version.sh
> +++ b/version.sh
> @@ -6,7 +6,11 @@ test $svn_revision || svn_revision=`cd "$1" && \
>     grep revision .svn/entries 2> /dev/null | cut -d '"' -f2 2> /dev/null`
>  test $svn_revision || svn_revision=UNKNOWN
> 
> -NEW_REVISION="#define VERSION \"SVN-r$svn_revision\""
> +if test "$svn_revision" = UNKNOWN && test -n "$2"; then
> +    NEW_REVISION="#define VERSION \"$2\""
> +else
> +    NEW_REVISION="#define VERSION \"SVN-r$svn_revision\""
> +fi
>  OLD_REVISION=`cat version.h 2> /dev/null`
> 
>  # Update version.h only on revision changes to avoid spurious rebuilds
> --
> 1.5.3.2

thanks, applied.
A notice to other committers: trivial patches like this and the previous ones
don't need my approval: commit straight away if you can



More information about the DVDnav-discuss mailing list