Permalink
Browse files

Address review comments on an earlier change:

 - autogen.sh now uses "#!/bin/sh -e" rather than "|| exit 1" everywhere.
 - autogen.sh now determines srcdir automatically from $0
 - autogen.sh no longer tells you to run "./configure --srcdir=.".
  • Loading branch information...
1 parent dd0bcf5 commit 946857c057da7a392d6e41ce81db5f66d0899f0c fergus.henderson committed Apr 18, 2008
Showing with 11 additions and 7 deletions.
  1. +11 −7 autogen.sh
View
@@ -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

0 comments on commit 946857c

Please sign in to comment.