gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, master, updated. fbc5d9e9d82f596a5872


From: Rob Savoye
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. fbc5d9e9d82f596a5872a4e162b65aa48428aefc
Date: Thu, 09 Dec 2010 15:45:41 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  fbc5d9e9d82f596a5872a4e162b65aa48428aefc (commit)
      from  60de066b98de7439e6c1f9549daf1d13708f3d0c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=fbc5d9e9d82f596a5872a4e162b65aa48428aefc


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.

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

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am           |   40 ++++++++++++----------------------------
 packaging/snapshot.am |    8 ++++++--
 2 files changed, 18 insertions(+), 30 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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