gnash-dev
[Top][All Lists]
Advanced

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

[Gnash-dev] Re: [Gnash-commit] [SCM] Gnash branch, master, updated. fbc5


From: strk
Subject: [Gnash-dev] Re: [Gnash-commit] [SCM] Gnash branch, master, updated. fbc5d9e9d82f596a5872a4e162b65aa48428aefc
Date: Thu, 9 Dec 2010 23:37:44 +0100

On Thu, Dec 09, 2010 at 03:45:41PM +0000, Rob Savoye wrote:

> commit fbc5d9e9d82f596a5872a4e162b65aa48428aefc
> Author: Rob Savoye <address@hidden>
> Date:   Thu Dec 9 08:45:14 2010 -0700
> 
>     only rebuild revno,.h if something has changed.
>     Default to the date if GIT isn't found.

This commit makes revno.h be rebuilt ONLY if Makefile or .configline changed
which is something that does NOT happen when you commit something or pull
a new version, both being _the_only_cases_ in which revno.h _should_ change.
Previous state already checked if things changed or not. 

What's the point of using a date in revno.h ?

--strk;


> diff --git a/Makefile.am b/Makefile.am
> index 99c99ca..8f76347 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -126,35 +126,20 @@ BUILT_SOURCES = revno.h .configline
>  # It will NOT be removed by any 'clean' rule (eventually, it should be
>  # removed by maintainer-clean...)
>  #
> -revno.h:
> -if HAVE_GIT
> -     @cd $(top_srcdir); \
> -    if test -d .git; then \
> -        revno=`$(GIT) log | grep '^commit' | wc -l`; \
> -        comm_id=`$(GIT) rev-parse --short HEAD`; \
> -        nick=`$(GIT) branch | grep '^\*' | cut -d ' ' -f 2`; \
> -        echo "static const char* BRANCH_REVNO  = \"$${revno}\";" > 
> revno.h.n; \
> -        echo "static const char* BRANCH_NICK = \"$${nick}\";" >> revno.h.n; \
> -        echo "static const char* COMMIT_ID = \"$${comm_id}\";" >> revno.h.n; 
> \
> -        if test -e revno.h; then \
> -            if diff -q revno.h.n revno.h > /dev/null; then \
> -                echo "Current revno.h is up to date ($${nick} $${revno} 
> $${comm_id})"; \
> -                rm -f revno.h.n; \
> -            else \
> -                echo "Updating revno.h ($${nick} $${revno} $${comm_id})"; \
> -                mv revno.h.n revno.h; \
> -            fi; \
> +revno.h: Makefile .configline
> +     -$(RM) -f revno.h
> +     if test -d $(top_srcdir)/.git -a x$(GIT) != x; then \
> +          revno="$(shell (cd $(top_srcdir) ; $(GIT) log | grep '^commit' | 
> wc -l))"; \
> +          comm_id="$(shell (cd $(top_srcdir) ; $(GIT) rev-parse --short 
> HEAD))"; \
> +          nick="$(shell (cd $(top_srcdir) ; $(GIT) branch | grep '^\*' | cut 
> -d ' ' -f 2))"; \
>          else \
> -            echo "Generating revno.h ($${nick} $${revno} $${comm_id})"; \
> -            mv revno.h.n revno.h; \
> +       revno="$(NOW)"; \
> +       revno="none"; \
> +          nick="master"; \
>          fi; \
> -    else \
> -        echo "Source is not in a git repository, revno.h won't be updated"; \
> -    fi;
> -else
> -     @echo "You don't have git installed, revno.h won't be updated";
> -endif
> -
> +     echo "static const char* BRANCH_REVNO  = \"$${revno}\";" > revno.h; \
> +     echo "static const char* BRANCH_NICK = \"$${nick}\";" >> revno.h; \
> +     echo "static const char* COMMIT_ID = \"$${comm_id}\";" >> revno.h;
>  
>  .configline: config.log
>       address@hidden -f .configline
> @@ -474,7 +459,6 @@ anal testreport checksum:
>  endif
>  
>  .PHONY : dumpconfig \
> -     revno.h \
>       anal \
>       testreport \
>       checksum \
> diff --git a/packaging/snapshot.am b/packaging/snapshot.am
> index 8efdc34..fef7002 100644
> --- a/packaging/snapshot.am
> +++ b/packaging/snapshot.am
> @@ -17,11 +17,15 @@
>  
>  NOW := $(shell date "+%Y%m%d")
>  
> +# Building a snapshot or package assume you have git installed
> +
>  # The branch nickname and revision number must be set before including
>  # the other Makefile fragments used for package building, as they use
>  # these values.
> -BRANCH_REVNO  := $(shell grep "REVNO" $(top_srcdir)/revno.h | cut -d '"' -f 
> 2)
> -BRANCH_NICK   := $(shell grep "NICK" $(top_srcdir)/revno.h | cut -d '"' -f 2)
> +
> +BRANCH_REVNO = "$(shell grep "REVNO" revno.h | cut -d '"' -f 2 | cut -d '.' 
> -f 1)"
> +BRANCH_NICK  = "$(shell grep "NICK" revno.h | cut -d '"' -f 2)"
> +COMMIT_ID    = "$(shell grep "COMMIT_ID" revno.h | cut -d '"' -f 2)"
>  
>  # this is used for Debian style naming conventions
>  NEXT_RELEASE = 0.8.9
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]