Generate ngIRCd version number from GIT tag

Now the ngIRCd release/version number is deduced from the "current"
annotated GIT tag; see "git describe --help" for details. This is the
same scheme the Linux kernel uses and gives much more details version
numbers for interim releases and inofficial source archives generated
using "make dist".

Please note: the version number is only updated it the autogen.sh
script is run; so after pulling in and pushing out new commits, you
should run ./autogen.sh!
This commit is contained in:
Alexander Barton 2010-10-21 00:20:08 +02:00
parent 596bc096b0
commit 8288878122
2 changed files with 8 additions and 3 deletions

View File

@ -150,20 +150,23 @@ echo "Generating files ..."
$ACLOCAL && \
$AUTOHEADER && \
$AUTOMAKE --add-missing && \
$AUTOCONF
$AUTOCONF --force
if [ $? -eq 0 -a -x ./configure ]; then
# Success: if we got some parameters we call ./configure and pass
# all of them to it.
NAME=`grep PACKAGE_STRING= configure | cut -d"'" -f2`
if [ "$GO" = "1" ]; then
[ -n "$PREFIX" ] && p=" --prefix=$PREFIX" || p=""
[ -n "$*" ] && a=" $*" || a=""
c="./configure${p}${a}"
echo "Okay, autogen.sh for $NAME done."
echo "Calling \"$c\" ..."
$c
exit $?
else
echo "Okay, autogen.sh done; now run the \"configure\" script."
echo "Okay, autogen.sh for $NAME done."
echo "Now run the \"./configure\" script."
exit 0
fi
else

View File

@ -9,10 +9,12 @@
# Please read the file COPYING, README and AUTHORS for more information.
#
define(VERSION_ID,esyscmd(git describe|sed -e 's/rel-//g'|sed -e 's/-/~/'|tr -d \\n))
# -- Initialisation --
AC_PREREQ(2.50)
AC_INIT(ngircd, 17~rc1)
AC_INIT(ngircd, VERSION_ID)
AC_CONFIG_SRCDIR(src/ngircd/ngircd.c)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(1.6)