[vlc-devel] commit: Update the GIT revision properly ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Jan 10 17:13:23 CET 2009


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Jan 10 18:13:33 2009 +0200| [eac4e0c9a52d197f1313b12097a4d8065c513222] | committer: Rémi Denis-Courmont 

Update the GIT revision properly

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eac4e0c9a52d197f1313b12097a4d8065c513222
---

 src/Makefile.am |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 85b1006..78c73d9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -13,7 +13,7 @@ EXTRA_DIST = extras/COPYING modules/builtin.h.in \
 	libvlc.sym \
 	libvlccore.sym
 
-BUILT_SOURCES = modules/builtin.h misc/revision.c ../include/vlc_about.h
+BUILT_SOURCES = modules/builtin.h ../include/vlc_about.h
 CLEANFILES = $(BUILT_SOURCES)
 
 SUFFIXES = .pc.in .pc
@@ -468,13 +468,21 @@ SOURCES_libvlc_control = \
 # Stamp rules
 ###############################################################################
 
+misc/revision.c.tmp:
+	rm -f -- $@
+	echo "/* AUTOGENERATED FILE - DO NOT EDIT */" > $@
+	REVISION="$$(cd "$(top_srcdir)"; git describe 2>/dev/null || echo "$(VERSION)")"; \
+	echo "const char psz_vlc_changeset[] = \"$$REVISION\";" >> $@
+	diff $@ misc/revision.c >/dev/null 2>&1 || \
+		cat misc/revision.c.tmp > misc/revision.c
+
 misc/revision.c:
-	rm -f -- $@ $@.tmp
-	echo "/* AUTOGENERATED FILE - DO NOT EDIT */" > $@.tmp
-	REVISION="$$(cd "$(top_srcdir)"; git describe 2>/dev/null || echo exported)"; \
-	echo "const char psz_vlc_changeset[] = \"$$REVISION\";" >> $@.tmp
-	mv -f -- $@.tmp $@
+	$(MAKE) misc/revision.c.tmp
+	cat misc/revision.c.tmp > misc/revision.c
+
+BUILT_SOURCES += misc/revision.c.tmp misc/revision.c
 
+.PHONY: misc/revision.c.tmp
 
 ###############################################################################
 # Unit/regression test




More information about the vlc-devel mailing list