VERSION | 2 +-
src/Makefile | 4 +++-
src/main.c | 6 ++----
wdmd/Makefile | 3 +++
wdmd/main.c | 4 +---
5 files changed, 10 insertions(+), 9 deletions(-)
New commits:
commit 55de01b481813cc1f94dd4f7dd9ad4139e875d1a
Author: David Teigland <teigland(a)redhat.com>
Date: Mon Oct 8 11:42:30 2012 -0500
sanlock/wdmd: get version from common file
use top level VERSION file for all
Signed-off-by: David Teigland <teigland(a)redhat.com>
diff --git a/VERSION b/VERSION
index 6b4950e..95e3ba8 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.4
+2.5
diff --git a/src/Makefile b/src/Makefile
index 81c57f9..2fb2dee 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -73,6 +73,9 @@ CFLAGS += -D_GNU_SOURCE -g \
-fasynchronous-unwind-tables \
-fdiagnostics-show-option
+VER=$(shell cat ../VERSION)
+CFLAGS += -DVERSION=\"$(VER)\"
+
CMD_CFLAGS = $(CFLAGS) -fPIE -DPIE
CMD_LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie
@@ -83,7 +86,6 @@ LIB_ENTIRE_LDFLAGS += -Wl,-z,relro -pie
LIB_CLIENT_LDFLAGS += -Wl,-z,relro -pie
-
all: $(LIBSO_ENTIRE_TARGET) $(LIBSO_CLIENT_TARGET) $(CMD_TARGET)
$(LIBSO_ENTIRE_TARGET): $(LIB_ENTIRE_SOURCE)
diff --git a/src/main.c b/src/main.c
index 87c784d..17c37a4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -54,8 +54,6 @@
#include "helper.h"
#include "timeouts.h"
-#define RELEASE_VERSION "2.5"
-
#define SIGRUNPATH 100 /* anything that's not SIGTERM/SIGKILL */
struct thread_pool {
@@ -1637,7 +1635,7 @@ static int do_daemon(void)
setup_groups();
log_level(0, 0, NULL, LOG_WARNING, "sanlock daemon started %s host %s",
- RELEASE_VERSION, our_host_name_global);
+ VERSION, our_host_name_global);
setup_priority();
@@ -1840,7 +1838,7 @@ static int read_command_line(int argc, char *argv[])
if (!strcmp(arg1, "version") || !strcmp(arg1, "--version") ||
!strcmp(arg1, "-V")) {
printf("%s %s (built %s %s)\n",
- argv[0], RELEASE_VERSION, __DATE__, __TIME__);
+ argv[0], VERSION, __DATE__, __TIME__);
exit(EXIT_SUCCESS);
}
diff --git a/wdmd/Makefile b/wdmd/Makefile
index 205245b..de6b035 100644
--- a/wdmd/Makefile
+++ b/wdmd/Makefile
@@ -42,6 +42,9 @@ CFLAGS += -D_GNU_SOURCE -g \
-fdiagnostics-show-option \
-fPIE -DPIE
+VER=$(shell cat ../VERSION)
+CFLAGS += -DVERSION=\"$(VER)\"
+
CMD_LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie
CMD_LDADD += -lwdmd -lrt
diff --git a/wdmd/main.c b/wdmd/main.c
index 90e32c6..9d7ac7d 100644
--- a/wdmd/main.c
+++ b/wdmd/main.c
@@ -41,8 +41,6 @@
#define GNUC_UNUSED __attribute__((__unused__))
#endif
-#define RELEASE_VERSION "2.5"
-
#define DEFAULT_TEST_INTERVAL 10
#define RECOVER_TEST_INTERVAL 1
#define DEFAULT_FIRE_TIMEOUT 60
@@ -1333,7 +1331,7 @@ static void print_usage_and_exit(int status)
static void print_version_and_exit(void)
{
- printf("wdmd version %s\n", RELEASE_VERSION);
+ printf("wdmd version %s\n", VERSION);
exit(0);
}