[cim PATCH 3/3] autogen: Support running out-of-tree

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

 



Instead of having to run autogen.sh inside the source directory
first, before moving to a build directory and run configure there,
it's now possible to run everything from the build directory.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 autogen.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/autogen.sh b/autogen.sh
index a04e4e6..ebe6fe2 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -8,6 +8,14 @@ die()
     exit 1
 }
 
+curdir=$(pwd)
+test "$curdir" || curdir=.
+
+srcdir=$(dirname "$0")
+test "$srcdir" || srcdir=.
+
+cd "$srcdir" || die "Failed to cd into $srcdir"
+
 echo "Running libtool ..."
 libtoolize --copy --force --automake || die
 
@@ -31,6 +39,8 @@ else
     echo "0" > .revision
 fi
 
+cd "$curdir" || die "Failed to cd into $curdir"
+
 if test "$#" -eq 0; then
     echo "Running configure without arguments ..."
     echo "(If you want to pass any, specify them on the $0 command line)"
-- 
2.14.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux