From ea334582964d6b8fbf5d8e2b36e890d643512d07 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Fri, 4 Mar 2016 01:20:40 +0000 Subject: [PATCH] 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(-) diff --git a/autogen.sh b/autogen.sh index 3184e69..21860dd 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 -- 2.5.0