diff options
Diffstat (limited to 'src/configure')
-rwxr-xr-x | src/configure | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/configure b/src/configure index ac2dc03..a791738 100755 --- a/src/configure +++ b/src/configure @@ -139,7 +139,7 @@ if [ -n "$ERRORS" ] && [ $EBUILD_COMPAT -ne 1 ]; then exit 1 fi - +rm -f version.h rm -f include.mk case $TARGET in Linux) @@ -238,4 +238,33 @@ else echo "not installing example files" fi +VERSION=`cat ../version` +if which svn >/dev/null; then + SVN_REV=`svn info | grep "^Revision: " | awk '{print($2)}'` + if [ -n "$SVN_REV" ]; then + VERSION="$VERSION (svn$SVN_REV)" + fi +fi +HOSTNAME=`hostname` +DATE=`date +"%d.%m.%Y %H:%M:%S %Z"` + +cat >> version.h <<EOF +/* + * uanytun version info + * + * this file was created automatically + * do not edit this file directly + * use ./configure instead + */ + +#ifndef UANYTUN_version_h_INCLUDED +#define UANYTUN_version_h_INCLUDED + +#define VERSION_STRING_0 "uanytun version $VERSION" +#define VERSION_STRING_1 "built on $HOSTNAME, $DATE" + +#endif + +EOF + exit 0 |