Commit a76e38e1 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont Committed by Rémi Denis-Courmont

Create revision.c

parent 9f2fb762
...@@ -161,6 +161,7 @@ AM_LDFLAGS += -avoid-version ...@@ -161,6 +161,7 @@ AM_LDFLAGS += -avoid-version
endif endif
libvlccore_la_SOURCES = $(SOURCES_libvlc) libvlccore_la_SOURCES = $(SOURCES_libvlc)
nodist_libvlccore_la_SOURCES = revision.c
libvlccore_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlccore` \ libvlccore_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlccore` \
-DMODULE_STRING=\"main\" \ -DMODULE_STRING=\"main\" \
-DLOCALEDIR=\"$(localedir)\" \ -DLOCALEDIR=\"$(localedir)\" \
...@@ -468,6 +469,28 @@ SOURCES_libvlc_control = \ ...@@ -468,6 +469,28 @@ SOURCES_libvlc_control = \
control/mediacontrol_audio_video.c \ control/mediacontrol_audio_video.c \
control/media_discoverer.c 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 # Unit/regression test
############################################################################### ###############################################################################
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment