[yelp] build: Ensure that autogen.sh works when builddir != srcdir



commit 94169859eee470fd548d32ffd7a526a9212e378f
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Thu Jun 2 15:13:27 2016 +0100

    build: Ensure that autogen.sh works when builddir != srcdir
    
    We need to switch directories, because the tools that modify the build
    system files, sadly, need to operate in the srcdir.
    
    This change is required in order to cope with the jhbuild change of
    default to enable separate build directories.

 autogen.sh |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index f14e826..4932981 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -4,11 +4,15 @@
 srcdir=`dirname $0`
 test -z "$srcdir" && srcdir=.
 
+olddir=`pwd`
+
 (test -f $srcdir/configure.ac) || {
         echo "**Error**: Directory "\`$srcdir\'" does not look like the top-level project directory"
         exit 1
 }
 
+cd "$srcdir"
+
 PKG_NAME=`autoconf --trace "AC_INIT:$1" "$srcdir/configure.ac"`
 
 if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
@@ -32,6 +36,8 @@ gtkdocize --copy || exit 1
 intltoolize --force --copy --automake || exit 1
 autoreconf --verbose --force --install -Wno-portability || exit 1
 
+cd "$olddir"
+
 if [ "$NOCONFIGURE" = "" ]; then
         $srcdir/configure "$@" || exit 1
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]