[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, master, updated. 950824ee29ccaad6bfe9
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. 950824ee29ccaad6bfe9d3993c4303a2308a7080 |
Date: |
Thu, 09 Dec 2010 17:47:15 +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 950824ee29ccaad6bfe9d3993c4303a2308a7080 (commit)
from ef5660c87b65242be96435093841d7aa6b25e4c2 (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=950824ee29ccaad6bfe9d3993c4303a2308a7080
commit 950824ee29ccaad6bfe9d3993c4303a2308a7080
Author: Sandro Santilli <address@hidden>
Date: Thu Dec 9 18:39:59 2010 +0100
Revert "only rebuild revno,.h if something has changed. Default to the date
if GIT isn't found."
This reverts commit fbc5d9e9d82f596a5872a4e162b65aa48428aefc.
The revert is due to misleading commit message:
- revno.h was only rebuilt if sources changed before this commit, while
this commit forces removal of it and thus unconditional re-creation
- this commit moves revno.h from source tree to build tree w/out saying
so in the commit log
Additionally (but would normally not trigger a revert)
- the date default is useless as revno.h should always be in packages
obtained w/out git and you can always generate if you got the sources
using git.
NOTE: I wouldn't revert commits if they weren't themselves reverts of mine
in the first place. Please discuss changes on the development mailing
list to avoid commit wars...
diff --git a/Makefile.am b/Makefile.am
index 8f76347..99c99ca 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -126,20 +126,35 @@ BUILT_SOURCES = revno.h .configline
# It will NOT be removed by any 'clean' rule (eventually, it should be
# removed by maintainer-clean...)
#
-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))"; \
+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; \
else \
- revno="$(NOW)"; \
- revno="none"; \
- nick="master"; \
+ echo "Generating revno.h ($${nick} $${revno} $${comm_id})"; \
+ mv revno.h.n revno.h; \
fi; \
- 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;
+ 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
+
.configline: config.log
address@hidden -f .configline
@@ -459,6 +474,7 @@ anal testreport checksum:
endif
.PHONY : dumpconfig \
+ revno.h \
anal \
testreport \
checksum \
diff --git a/packaging/snapshot.am b/packaging/snapshot.am
index fef7002..8efdc34 100644
--- a/packaging/snapshot.am
+++ b/packaging/snapshot.am
@@ -17,15 +17,11 @@
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" 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)"
+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)
# 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, 30 insertions(+), 18 deletions(-)
hooks/post-receive
--
Gnash
- [Gnash-commit] [SCM] Gnash branch, master, updated. 950824ee29ccaad6bfe9d3993c4303a2308a7080,
Sandro Santilli <=