build: honor $NOCONFIGURE in autogen.sh
authorRan Benita <ran234@gmail.com>
Wed, 10 Oct 2012 18:53:26 +0000 (20:53 +0200)
committerRan Benita <ran234@gmail.com>
Wed, 10 Oct 2012 19:00:36 +0000 (21:00 +0200)
Using NOCONFIGURE=1 ./autogen.sh can prevent it from running ./configure
on its own, which is sometimes useful.

Signed-off-by: Ran Benita <ran234@gmail.com>
autogen.sh

index c95132e..a6d7699 100755 (executable)
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/sh -e
 
 srcdir=`dirname "$0"`
 test -z "$srcdir" && srcdir=.
@@ -6,7 +6,9 @@ test -z "$srcdir" && srcdir=.
 ORIGDIR=`pwd`
 cd "$srcdir"
 
-autoreconf --verbose --install --symlink --warnings=all || exit 1
-cd "$ORIGDIR" || exit $?
+autoreconf --verbose --install --symlink --warnings=all
+cd "$ORIGDIR"
 
-exec "$srcdir/configure" --enable-maintainer-mode "$@"
+if test -z "$NOCONFIGURE"; then
+    exec "$srcdir/configure" "$@"
+fi