[orca] Support non-srcdir builds in autogen.sh



commit 5431054194e044f25c4ec76ed6b98f17c1ecc39d
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Fri Jun 3 15:51:23 2016 +0100

    Support non-srcdir builds in autogen.sh
    
    The tools that modify the build system and generate the configure script
    need to be run inside the source directory; the configure script, on the
    other hand, needs to be run in the build directory.

 autogen.sh |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index a8b4317..3c97bb5 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -9,6 +9,8 @@ test -z "$srcdir" && srcdir=.
         exit 1
 }
 
+olddir=`pwd`
+
 PKG_NAME=`autoconf --trace 'AC_INIT:$1' "$srcdir/configure.ac"`
 
 if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
@@ -18,6 +20,8 @@ if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
         echo "" >&2
 fi
 
+cd "$srcdir"
+
 aclocal --install || {
         echo "Try installing the 'automake' package."
         exit 1
@@ -38,6 +42,8 @@ which yelp-build > /dev/null || {
        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]