[vlc-devel] commit: Create revision.c ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Jun 3 21:23:03 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Mon Feb 23 19:11:03 2009 +0200| [a76e38e103fb6e405b218c61ef475ca85223262e] | committer: Rémi Denis-Courmont 

Create revision.c

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

 src/Makefile.am |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 84f380a..571ec0a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -161,6 +161,7 @@ AM_LDFLAGS += -avoid-version
 endif
 
 libvlccore_la_SOURCES = $(SOURCES_libvlc)
+nodist_libvlccore_la_SOURCES = revision.c
 libvlccore_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlccore` \
 	-DMODULE_STRING=\"main\" \
 	-DLOCALEDIR=\"$(localedir)\" \
@@ -469,6 +470,28 @@ SOURCES_libvlc_control = \
 	control/media_discoverer.c
 
 ###############################################################################
+# GIT revision
+###############################################################################
+
+BUILT_SOURCES += stamp-revision
+CLEANFILES += revision.txt revision.c
+
+revision.c: revision.txt
+	rm -f -- revision.c
+	echo -n "const char psz_vlc_changeset[] = \"$$(cat revision.txt)\";" \
+		> revision.c
+
+revision.txt:
+	$(MAKE) stamp-revision
+	touch revision.txt
+
+stamp-revision:
+	rm -f -- revision.tmp
+	git describe --tags --long --always > revision.tmp
+	diff revision.tmp revision.txt >/dev/null 2>&1 || \
+	mv -f -- revision.tmp revision.txt
+
+###############################################################################
 # Unit/regression test
 ###############################################################################
 




More information about the vlc-devel mailing list