summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh18
1 files changed, 11 insertions, 7 deletions
diff --git a/autogen.sh b/autogen.sh
index 4cdcc12..6328d02 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/sh -e
# Usage: autogen.sh [srcdir]
# Run this script to build distcc from CVS.
@@ -16,19 +16,23 @@ else
exit 1
fi
-srcdir=${1:-.}
+srcdir=`dirname "$0"`
builddir=`pwd`
echo "$0: running $ACLOCAL"
-(cd $srcdir && $ACLOCAL -I m4 --output=$builddir/aclocal.m4) || exit 1
+(cd $srcdir && $ACLOCAL -I m4 --output=$builddir/aclocal.m4)
echo "$0: running $AUTOHEADER"
[ -d src ] || mkdir src # Needed for autoheader to generate src/config.h.in.
-$AUTOHEADER $srcdir/configure.ac || exit 1
+$AUTOHEADER $srcdir/configure.ac
echo "$0: running $AUTOCONF"
-$AUTOCONF $srcdir/configure.ac > configure || exit 1
-chmod +x configure || exit 1
+$AUTOCONF $srcdir/configure.ac > configure
+chmod +x configure
-echo "Now run './configure --srcdir=$srcdir' and then 'make'."
+if [ "$srcdir" = "." ]; then
+ echo "Now run './configure' and then 'make'."
+else
+ echo "Now run './configure --srcdir=$srcdir' and then 'make'."
+fi
exit 0