Define VERSION in configure, and add git describe output if available.
The client release version is now defined in configure.in rather than source/irc.c. The gitversion.sh script is used to automatically add a suffix to the version number for versions of the client built from git. Also removed AC_REVISION() from configure.in, because $Revision$ doesn't make sense with git.
This commit is contained in:
12
configure
vendored
12
configure
vendored
@@ -1,5 +1,4 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# From configure.in Revision: 467 .
|
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.59.
|
# Generated by GNU Autoconf 2.59.
|
||||||
#
|
#
|
||||||
@@ -1350,12 +1349,11 @@ topdir="`pwd`"
|
|||||||
ac_config_headers="$ac_config_headers include/defs.h"
|
ac_config_headers="$ac_config_headers include/defs.h"
|
||||||
|
|
||||||
|
|
||||||
VERSION=`sed -n -e 's/";$//' -e '/ const char irc_version.. = "/s///p' -e '/const char irc_version/q' < $srcdir/source/irc.c 2>/dev/null`
|
|
||||||
if test x"$VERSION" = x""; then
|
|
||||||
VERSION="BitchX-1.0"
|
|
||||||
fi
|
|
||||||
_VERSION_="BitchX"
|
_VERSION_="BitchX"
|
||||||
VERSION_NUMBER="`echo "$VERSION" | sed 's/BitchX-//'`"
|
RELEASE_TAG="bitchx-1.2.1"
|
||||||
|
RELEASE="1.2.1"
|
||||||
|
VERSION_NUMBER="$RELEASE`"$srcdir/gitversion.sh" "$RELEASE_TAG" "$srcdir"`"
|
||||||
|
VERSION="$_VERSION_-$VERSION_NUMBER"
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
#define VERSION_NUMBER "$VERSION_NUMBER"
|
#define VERSION_NUMBER "$VERSION_NUMBER"
|
||||||
@@ -17209,7 +17207,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo BitchX \(c\) 1996-2012 Colten Edwards et al
|
echo BitchX \(c\) 1996-2015 Colten Edwards et al
|
||||||
echo ----------------------------------------------------------
|
echo ----------------------------------------------------------
|
||||||
echo
|
echo
|
||||||
echo The configuration script has finished. You should look through
|
echo The configuration script has finished. You should look through
|
||||||
|
|||||||
14
configure.in
14
configure.in
@@ -3,21 +3,17 @@ dnl Copyright (c) 1999-2001 David Walluck
|
|||||||
dnl All rights reserved.
|
dnl All rights reserved.
|
||||||
|
|
||||||
AC_PREREQ(2.59)
|
AC_PREREQ(2.59)
|
||||||
AC_REVISION($Revision$)
|
|
||||||
AC_INIT
|
AC_INIT
|
||||||
AC_CONFIG_SRCDIR([$srcdir/source/irc.c])
|
AC_CONFIG_SRCDIR([$srcdir/source/irc.c])
|
||||||
topdir="`pwd`"
|
topdir="`pwd`"
|
||||||
AC_SUBST(topdir)
|
AC_SUBST(topdir)
|
||||||
AC_CONFIG_HEADERS(include/defs.h)
|
AC_CONFIG_HEADERS(include/defs.h)
|
||||||
|
|
||||||
dnl Get the version number from source/irc.c.
|
|
||||||
dnl Maybe it's better to set the VERSION in here instead.
|
|
||||||
VERSION=`sed -n -e 's/";$//' -e '/ const char irc_version.. = "/s///p' -e '/const char irc_version/q' < $srcdir/source/irc.c 2>/dev/null`
|
|
||||||
if test x"$VERSION" = x""; then
|
|
||||||
VERSION="BitchX-1.0"
|
|
||||||
fi
|
|
||||||
_VERSION_="BitchX"
|
_VERSION_="BitchX"
|
||||||
VERSION_NUMBER="`echo "$VERSION" | sed 's/BitchX-//'`"
|
RELEASE_TAG="bitchx-1.2.1"
|
||||||
|
RELEASE="1.2.1"
|
||||||
|
VERSION_NUMBER="$RELEASE`"$srcdir/gitversion.sh" "$RELEASE_TAG" "$srcdir"`"
|
||||||
|
VERSION="$_VERSION_-$VERSION_NUMBER"
|
||||||
AC_DEFINE_UNQUOTED(VERSION_NUMBER, "$VERSION_NUMBER", Define BitchX version number here.)
|
AC_DEFINE_UNQUOTED(VERSION_NUMBER, "$VERSION_NUMBER", Define BitchX version number here.)
|
||||||
AC_SUBST(VERSION_NUMBER)
|
AC_SUBST(VERSION_NUMBER)
|
||||||
echo Welcome to the "$VERSION" configuration
|
echo Welcome to the "$VERSION" configuration
|
||||||
@@ -1115,7 +1111,7 @@ AC_CONFIG_COMMANDS([default],[[ echo timestamp > stamp-h
|
|||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo BitchX \(c\) 1996-2012 Colten Edwards et al
|
echo BitchX \(c\) 1996-2015 Colten Edwards et al
|
||||||
echo ----------------------------------------------------------
|
echo ----------------------------------------------------------
|
||||||
echo
|
echo
|
||||||
echo The configuration script has finished. You should look through
|
echo The configuration script has finished. You should look through
|
||||||
|
|||||||
16
gitversion.sh
Executable file
16
gitversion.sh
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
test $# -gt 0 || exit
|
||||||
|
|
||||||
|
tag="$1"
|
||||||
|
|
||||||
|
if test $# -gt 1; then
|
||||||
|
cd $2 || exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
test -d .git || exit
|
||||||
|
|
||||||
|
desc=`git describe --match "$tag" 2>/dev/null` || exit
|
||||||
|
|
||||||
|
echo "$desc" | sed -e "s@^$tag@@"
|
||||||
|
|
||||||
@@ -62,11 +62,7 @@ CVS_REVISION(irc_c)
|
|||||||
#include <signame.h>
|
#include <signame.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef VERSION
|
|
||||||
const char irc_version[] = "BitchX-1.2.1";
|
|
||||||
#else
|
|
||||||
const char irc_version[] = VERSION;
|
const char irc_version[] = VERSION;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Format of bitchx_numver: MMmmpp
|
/* Format of bitchx_numver: MMmmpp
|
||||||
* MM = major version (eg 10 = 1.0)
|
* MM = major version (eg 10 = 1.0)
|
||||||
|
|||||||
Reference in New Issue
Block a user