[cheese] Ensure autogen works in non-srcdir builds



commit 2e6057aca0767d99698dc18d7ef8d6fc290cd160
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Fri Jun 3 14:10:55 2016 +0100

    Ensure autogen works in non-srcdir builds
    
    Only the configure script should be run from the build directory; the
    rest of the ancillary tools that modify the sources and generate the
    configure script itself need to be run inside the source directory.

 autogen.sh |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index f14e826..1a641a5 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -4,6 +4,8 @@
 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
@@ -18,6 +20,8 @@ if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
         echo "" >&2
 fi
 
+cd "$srcdir"
+
 # if the AC_CONFIG_MACRO_DIR() macro is used, create that directory
 # This is a automake bug fixed in automake 1.13.2
 # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13514
@@ -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]