Allow custom versions with the release file...

This commit is contained in:
nagiosplugins 2009-09-25 08:18:04 +00:00
parent 53efa53d5d
commit 43c187a944
4 changed files with 11 additions and 3 deletions

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

View 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

View 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

View 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