Code

Allow custom versions with the release file...
authornagiosplugins <nagiosplugins@nagiosplugins.org>
Fri, 25 Sep 2009 08:18:04 +0000 (08:18 +0000)
committernagiosplugins <nagiosplugins@nagiosplugins.org>
Fri, 25 Sep 2009 09:31:04 +0000 (09:31 +0000)
configure.in
plugins-root/Makefile.am
plugins-scripts/Makefile.am
plugins/Makefile.am

index 505af93e6a2c4521363b72122d4f1577363922cf..5cc693c25b897e07ea2f258869d5eadbe40cafc6 100644 (file)
@@ -101,6 +101,14 @@ AC_SUBST(REV_TIMESTAMP)
 dnl Check if version file is present
 AM_CONDITIONAL([RELEASE_PRESENT], [test -f release])
 
+# Also read in the version from it
+if test -f release; then
+       NP_RELEASE="$(<release)"
+else
+       NP_RELEASE="$PACKAGE_VERSION"
+fi
+AC_SUBST(NP_RELEASE)
+
 dnl Checks for programs.
 AC_PATH_PROG(PYTHON,python)
 AC_PATH_PROG(SH,sh)
index dcab4cc77f3e84a40ebcb03735f2b1ea9ca63948..218405356425141dd0cf435a59cf8817806633b0 100644 (file)
@@ -1,7 +1,7 @@
 ## Process this file with automake to produce Makefile.in
 
 if RELEASE_PRESENT
-NP_VERSION = $(PACKAGE_VERSION)
+NP_VERSION = @NP_RELEASE@
 else
 NP-VERSION-FILE: .FORCE-NP-VERSION-FILE
        @$(SHELL_PATH) $(top_srcdir)/NP-VERSION-GEN
index d1ea3c4111a888c1af0fd38ca7c254c54f64dc8c..58db06048ec0c0e6f62b956bffbde0019f88e15e 100644 (file)
@@ -1,7 +1,7 @@
 ## Process this file with automake to produce Makefile.in
 
 if RELEASE_PRESENT
-NP_VERSION = $(PACKAGE_VERSION)
+NP_VERSION = @NP_RELEASE@
 else
 NP-VERSION-FILE: .FORCE-NP-VERSION-FILE
        @$(SHELL_PATH) $(top_srcdir)/NP-VERSION-GEN
index 37de753607295c878430dc028d60584e6518c7ec..4570fb7a437c63fce76e09c492b7107ec4f0a0f4 100644 (file)
@@ -1,7 +1,7 @@
 ## Process this file with automake to produce Makefile.in
 
 if RELEASE_PRESENT
-NP_VERSION = $(PACKAGE_VERSION)
+NP_VERSION = @NP_RELEASE@
 else
 NP-VERSION-FILE: .FORCE-NP-VERSION-FILE
        @$(SHELL_PATH) $(top_srcdir)/NP-VERSION-GEN