From 739afb4e9ef4a0b3ee124d0a188757069791b1a6 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Thu, 1 Sep 2016 18:03:25 +0300 Subject: build: fix previous commit for out-of-source running of autogen.sh Previous commit: dc39be2757bd7fa789c3db834d8d701b1f54f785 This commit makes the final diff match the one by Alban Browaeys, as attached in bug 59705, which addresses some good points that Simon had made in his review. It is more portable and more clean this way. https://bugs.freedesktop.org/show_bug.cgi?id=59705 https://bugs.freedesktop.org/show_bug.cgi?id=94391 --- autogen.sh | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/autogen.sh b/autogen.sh index 21860dd94..a47248cc4 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,15 +1,9 @@ #!/bin/sh set -e -test -n "$srcdir" || srcdir=$(dirname "$0") +test -n "$srcdir" || srcdir=`dirname "$0"` test -n "$srcdir" || srcdir=. -olddir=$(pwd) - -cd $srcdir - -gtkdocize - if test -n "$AUTOMAKE"; then : # don't override an explicit user request elif automake-1.11 --version >/dev/null 2>/dev/null && \ @@ -23,7 +17,11 @@ elif automake-1.11 --version >/dev/null 2>/dev/null && \ export ACLOCAL fi -autoreconf -i -f +( + cd "$srcdir" + gtkdocize + autoreconf -i -f +) # Honor NOCONFIGURE for compatibility with gnome-autogen.sh if test x"$NOCONFIGURE" = x; then @@ -41,8 +39,6 @@ else run_configure=false fi -cd "$olddir" - if test $run_configure = true; then - $srcdir/configure "$@" + "$srcdir/configure" "$@" fi -- cgit v1.2.1