summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorfergus.henderson <fergus.henderson@01de4be4-8c4a-0410-9132-4925637da917>2008-04-18 01:05:54 +0000
committerfergus.henderson <fergus.henderson@01de4be4-8c4a-0410-9132-4925637da917>2008-04-18 01:05:54 +0000
commit6450d3ae94ab8eae6991462e485ff7c5d30e2b62 (patch)
treefec8845b4ffd2c651cf0d7b8a33e478221e4062b /autogen.sh
parent019ef8a5559ae06b44592ec7e9af49db439d5563 (diff)
downloaddistcc-6450d3ae94ab8eae6991462e485ff7c5d30e2b62.tar.gz
Support running autogen.sh in the build directory, rather than the source directory.
Now the source directory should be completely untouched, so we should be able to autogen, configure, and build even if the source directory is read-only. git-svn-id: http://distcc.googlecode.com/svn/trunk@44 01de4be4-8c4a-0410-9132-4925637da917
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh14
1 files changed, 10 insertions, 4 deletions
diff --git a/autogen.sh b/autogen.sh
index a8acf9c..4cdcc12 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,5 +1,6 @@
#! /bin/sh
+# Usage: autogen.sh [srcdir]
# Run this script to build distcc from CVS.
## first try the default names
@@ -15,14 +16,19 @@ else
exit 1
fi
+srcdir=${1:-.}
+builddir=`pwd`
+
echo "$0: running $ACLOCAL"
-$ACLOCAL -I m4 || exit 1
+(cd $srcdir && $ACLOCAL -I m4 --output=$builddir/aclocal.m4) || exit 1
echo "$0: running $AUTOHEADER"
-$AUTOHEADER || exit 1
+[ -d src ] || mkdir src # Needed for autoheader to generate src/config.h.in.
+$AUTOHEADER $srcdir/configure.ac || exit 1
echo "$0: running $AUTOCONF"
-$AUTOCONF || exit 1
+$AUTOCONF $srcdir/configure.ac > configure || exit 1
+chmod +x configure || exit 1
-echo "Now run ./configure and then make."
+echo "Now run './configure --srcdir=$srcdir' and then 'make'."
exit 0