Преглед изворни кода

Allow custom versions with the release file...

nagiosplugins пре 16 година
родитељ
комит
43c187a944
4 измењених фајлова са 11 додато и 3 уклоњено
  1. 8 0
      configure.in
  2. 1 1
      plugins-root/Makefile.am
  3. 1 1
      plugins-scripts/Makefile.am
  4. 1 1
      plugins/Makefile.am

+ 8 - 0
configure.in

@@ -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)

+ 1 - 1
plugins-root/Makefile.am

@@ -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

+ 1 - 1
plugins-scripts/Makefile.am

@@ -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

+ 1 - 1
plugins/Makefile.am

@@ -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