summaryrefslogtreecommitdiff
path: root/Config
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-12-30 22:10:32 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-12-30 22:10:32 +0000
commit23f4c6b43947ea1d0bee370cb0cb3b9f15220df4 (patch)
tree113b27b59eb58528507cba87f86798dc01fbc0cb /Config
parent8287325d4dcd3065ce970a9772b6a3ff7f80e8aa (diff)
Edited Config to create a build directory if the user tried to run Config directly from the source directory, to prevent in-source building but not complain to the user about it.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1892 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'Config')
-rwxr-xr-xConfig20
1 files changed, 17 insertions, 3 deletions
diff --git a/Config b/Config
index dc7f91b5f..71ea9ec11 100755
--- a/Config
+++ b/Config
@@ -104,12 +104,26 @@ Run_Build_System () {
;;
esac
- echo "cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL $SOURCE_DIR"
+ if [ "$SOURCE_DIR" = "." ] ; then
+ pwdsave=`pwd`
+ test -d build || mkdir build
+ cd "build"
+ REAL_SOURCE_DIR=".."
+ else
+ REAL_SOURCE_DIR="$SOURCE_DIR"
+ fi
+
+ echo "cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL $REAL_SOURCE_DIR"
- cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL $SOURCE_DIR
+ cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL $REAL_SOURCE_DIR
echo ""
- echo "Now run make to build Anope."
+ if [ "$SOURCE_DIR" = "." ] ; then
+ echo "Now cd build, then run make to build Anope."
+ cd "$pwdsave"
+ else
+ echo "Now run make to build Anope."
+ fi
else
echo "./configure $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL"