summaryrefslogtreecommitdiff
path: root/Config
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-06-02 12:45:08 -0400
committerAdam <Adam@anope.org>2011-06-02 12:45:08 -0400
commit184b346166db9d40fcdc7bb6bf3a7929fdd48be9 (patch)
treeeb31d479e510bc7f491712fa67f26d4f1dd6c379 /Config
parentb2c807dc8c30bfd614dc44c68f794b8fc30cc7e6 (diff)
Place version.h in build/ not include/
Diffstat (limited to 'Config')
-rwxr-xr-xConfig10
1 files changed, 8 insertions, 2 deletions
diff --git a/Config b/Config
index deea02258..b28ad3de5 100755
--- a/Config
+++ b/Config
@@ -178,11 +178,17 @@ if [ ! "$NO_INTRO" ] ; then
if [ -d .git ] ; then
VERSION=`git describe --tags`
VERSION_BUILD=`echo "$VERSION" | cut -d'-' -f2`
+ if [ "$SOURCE_DIR" = "." ] ; then
+ test -d build || mkdir -p build/include
+ BUILD_DIR="build"
+ else
+ BUILD_DIR="."
+ fi
VERSION_EXTRA=`echo "$VERSION" | cut -d'-' -f3`
# Only do this if we are not on a tag, src/version.sh will be all we need then.
if [ "$VERSION_BUILD" != "$VERSION_EXTRA" ] ; then
- echo "#define VERSION_BUILD $VERSION_BUILD" > include/version.h
- echo "#define VERSION_EXTRA \"-$VERSION_EXTRA\"" >> include/version.h
+ echo "#define VERSION_BUILD $VERSION_BUILD" > $BUILD_DIR/include/version.h
+ echo "#define VERSION_EXTRA \"-$VERSION_EXTRA\"" >> $BUILD_DIR/include/version.h
fi
fi
cat $SOURCE_DIR/.BANNER | sed "s/CURVER/$VERSION/" | sed "s@SOURCE_DIR@$SOURCE_DIR@" | $PAGER