From dc39be2757bd7fa789c3db834d8d701b1f54f785 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Fri, 4 Mar 2016 01:20:40 +0000 Subject: build: cd to the $srcdir in autogen.sh for running gtkdocize MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gtkdocize needs to run in the $srcdir (or have a --srcdir argument passed to it) so that it can find configure.[ac|in]. Ensure that’s the case in autogen.sh. This fixes autogen.sh in a srcdir ≠ builddir environment. --- autogen.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'autogen.sh') diff --git a/autogen.sh b/autogen.sh index 3184e69a7..21860dd94 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,6 +1,13 @@ #!/bin/sh set -e +test -n "$srcdir" || srcdir=$(dirname "$0") +test -n "$srcdir" || srcdir=. + +olddir=$(pwd) + +cd $srcdir + gtkdocize if test -n "$AUTOMAKE"; then @@ -34,6 +41,8 @@ else run_configure=false fi +cd "$olddir" + if test $run_configure = true; then - ./configure "$@" + $srcdir/configure "$@" fi -- cgit v1.2.1