Commit bee308ac authored by Georgi Chorbadzhiyski's avatar Georgi Chorbadzhiyski

Define VERSION_EXTRA using git describe in the Makefile.

parent fd08fbd8
......@@ -3,9 +3,15 @@
VERSION = 2.0.0
TOPDIR = `basename ${PWD}`
GIT_VER = $(shell git describe --tags --dirty --always 2>/dev/null)
CFLAGS += -Wall -Wformat-security -O3 -fomit-frame-pointer
CFLAGS += -g
ifneq "$(GIT_VER)" ""
CFLAGS += -DVERSION_EXTRA=\"git-$(GIT_VER)\"
else
CFLAGS += -DVERSION_EXTRA=\"release\"
endif
LDLIBS += -lrt
LDLIBS_DVBLAST += -lpthread
......
......@@ -396,7 +396,7 @@ static void SigHandler( int i_signal )
*****************************************************************************/
static void DisplayVersion()
{
msg_Raw( NULL, "DVBlast %d.%d.%d%s", VERSION_MAJOR, VERSION_MINOR,
msg_Raw( NULL, "DVBlast %d.%d.%d (%s)", VERSION_MAJOR, VERSION_MINOR,
VERSION_REVISION, VERSION_EXTRA );
}
......
......@@ -47,7 +47,7 @@ int i_syslog = 0;
void usage()
{
msg_Raw( NULL, "DVBlastctl %d.%d.%d%s", VERSION_MAJOR, VERSION_MINOR,
msg_Raw( NULL, "DVBlastctl %d.%d.%d (%s)", VERSION_MAJOR, VERSION_MINOR,
VERSION_REVISION, VERSION_EXTRA );
msg_Raw( NULL, "Usage: dvblastctl -r <remote socket> reload|shutdown|fe_status|mmi_status|mmi_open|mmi_close|mmi_get|mmi_send_text|mmi_send_choice [<CAM slot>] [<text/choice>]" );
exit(1);
......
......@@ -24,4 +24,3 @@
#define VERSION_MAJOR 2
#define VERSION_MINOR 0
#define VERSION_REVISION 0
#define VERSION_EXTRA "-svn"
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