[dvblast-devel] Remove version.h, all version information is in Makefile
Georgi Chorbadzhiyski
git at videolan.org
Fri Apr 6 01:03:42 CEST 2012
dvblast | branch: master | Georgi Chorbadzhiyski <gf at unixsol.org> | Fri Apr 6 01:55:27 2012 +0300| [d1c5fe04c615c933dec60c0827a73f0cd0b997d9] | committer: Georgi Chorbadzhiyski
Remove version.h, all version information is in Makefile
> http://git.videolan.org/gitweb.cgi/dvblast.git/?a=commit;h=d1c5fe04c615c933dec60c0827a73f0cd0b997d9
---
Makefile | 11 ++++++-----
dvblast.c | 4 +---
dvblastctl.c | 4 +---
version.h | 25 -------------------------
4 files changed, 8 insertions(+), 36 deletions(-)
diff --git a/Makefile b/Makefile
index 5615cbb..1441bd5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,13 @@
-# DVBlast Makefile
-# Customise the path of your kernel
-
-VERSION = 2.1.0
+VERSION_MAJOR = 2
+VERSION_MINOR = 1
TOPDIR = `basename ${PWD}`
GIT_VER = $(shell git describe --tags --dirty --always 2>/dev/null)
CFLAGS += -Wall -Wformat-security -O3 -fomit-frame-pointer
CFLAGS += -g
+CFLAGS += -DVERSION=\"$(VERSION_MINOR).$(VERSION_MAJOR)\"
+CFLAGS += -DVERSION_MAJOR=$(VERSION_MAJOR)
+CFLAGS += -DVERSION_MINOR=$(VERSION_MINOR)
ifneq "$(GIT_VER)" ""
CFLAGS += -DVERSION_EXTRA=\"git-$(GIT_VER)\"
else
@@ -34,7 +35,7 @@ all: dvblast dvblastctl
.PHONY: clean install uninstall dist
-%.o: %.c Makefile dvblast.h en50221.h comm.h version.h asi.h mrtg-cnt.h
+%.o: %.c Makefile dvblast.h en50221.h comm.h asi.h mrtg-cnt.h
@echo "CC $<"
$(Q)$(CC) $(CFLAGS) -c $<
diff --git a/dvblast.c b/dvblast.c
index dd25a40..549b174 100644
--- a/dvblast.c
+++ b/dvblast.c
@@ -39,7 +39,6 @@
#include <errno.h>
#include "dvblast.h"
-#include "version.h"
#ifdef HAVE_ICONV
#include <iconv.h>
@@ -428,8 +427,7 @@ static void SigHandler( int i_signal )
*****************************************************************************/
static void DisplayVersion()
{
- msg_Raw( NULL, "DVBlast %d.%d.%d (%s)", VERSION_MAJOR, VERSION_MINOR,
- VERSION_REVISION, VERSION_EXTRA );
+ msg_Raw( NULL, "DVBlast %s (%s)", VERSION, VERSION_EXTRA );
}
/*****************************************************************************
diff --git a/dvblastctl.c b/dvblastctl.c
index 968830d..2397a38 100644
--- a/dvblastctl.c
+++ b/dvblastctl.c
@@ -46,7 +46,6 @@
#include "dvblast.h"
#include "en50221.h"
#include "comm.h"
-#include "version.h"
int i_verbose = 3;
int i_syslog = 0;
@@ -200,8 +199,7 @@ static const struct dvblastctl_option options[] =
void usage()
{
- printf("DVBlastctl %d.%d.%d (%s)\n", VERSION_MAJOR, VERSION_MINOR,
- VERSION_REVISION, VERSION_EXTRA );
+ printf("DVBlastctl %s (%s)\n", VERSION, VERSION_EXTRA );
printf("Usage: dvblastctl -r <remote socket> [-x <text|xml>] [cmd]\n");
printf("Options:\n");
printf(" -r --remote-socket <name> Set socket name to <name>.\n" );
diff --git a/version.h b/version.h
deleted file mode 100644
index 7cbf445..0000000
--- a/version.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*****************************************************************************
- * version.h
- *****************************************************************************
- * Copyright (C) 2004, 2008-2010 VideoLAN
- *
- * Authors: Andy Gatward <a.j.gatward at reading.ac.uk>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#define VERSION_MAJOR 2
-#define VERSION_MINOR 0
-#define VERSION_REVISION 0
More information about the dvblast-devel
mailing list