[Sugar-devel] [PATCH sugar] Allow to build outside the source directory

Daniel Narvaez dwnarvaez at gmail.com
Tue Jun 26 08:26:02 EDT 2012


From: Daniel Narvaez <dwnarvaez at gmail.com>

This is based on a patch by
Marco Pesenti Gritti <marco at marcopg.org>,
with reviewer comments addressed.
---
 autogen.sh |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/autogen.sh b/autogen.sh
index a71e202..bac5247 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,4 +1,13 @@
 #!/bin/sh
+
+test -n "${srcdir}" || srcdir=`dirname "$0"`
+test -n "${srcdir}" || srcdir="$(pwd)"
+
+olddir="$(pwd)"
+cd "$srcdir"
+
 intltoolize
 autoreconf -i
-./configure --enable-maintainer-mode "$@"
+
+cd "$olddir"
+"$srcdir/configure" --enable-maintainer-mode "$@"
-- 
1.7.10.2



More information about the Sugar-devel mailing list