Skip to content

Commit

Permalink
Address review comments on an earlier change:
Browse files Browse the repository at this point in the history
 - 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
fergushenderson committed Apr 18, 2008
1 parent dd0bcf5 commit 946857c
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions autogen.sh
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/sh #! /bin/sh -e


# Usage: autogen.sh [srcdir] # Usage: autogen.sh [srcdir]
# Run this script to build distcc from CVS. # Run this script to build distcc from CVS.
Expand All @@ -16,19 +16,23 @@ else
exit 1 exit 1
fi fi


srcdir=${1:-.} srcdir=`dirname "$0"`
builddir=`pwd` builddir=`pwd`


echo "$0: running $ACLOCAL" 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" echo "$0: running $AUTOHEADER"
[ -d src ] || mkdir src # Needed for autoheader to generate src/config.h.in. [ -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" echo "$0: running $AUTOCONF"
$AUTOCONF $srcdir/configure.ac > configure || exit 1 $AUTOCONF $srcdir/configure.ac > configure
chmod +x configure || exit 1 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 exit 0

0 comments on commit 946857c

Please sign in to comment.