[gnome-todo] build: Enable out-of-tree builds
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] build: Enable out-of-tree builds
- Date: Tue, 28 Jul 2015 10:38:56 +0000 (UTC)
commit 23c8c1531ad17560128872b0652954b8397fbf90
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Jul 21 11:10:21 2015 +0100
build: Enable out-of-tree builds
A couple simple changes that allow running autogen.sh from a separate
build directory.
autogen.sh | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 363eaf2..f6bdaba 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,14 +1,18 @@
#!/bin/sh
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
+test -n "$srcdir" || srcdir=`dirname "$0"`
+test -n "$srcdir" || srcdir=.
-(test -f "$srcdir/configure.ac") || {
+olddir=`pwd`
+
+cd $srcdir
+
+(test -f configure.ac) || {
echo "*** ERROR: Directory '$srcdir' does not look like the top-level directory of the project ***"
exit 1
}
-PKG_NAME=`autoconf --trace 'AC_INIT:$1' "$srcdir/configure.ac"`
+PKG_NAME=`autoconf --trace 'AC_INIT:$1' configure.ac`
if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
echo "*** WARNING: I am going to run \`configure' with no arguments." >&2
@@ -23,6 +27,8 @@ glib-gettextize --force --copy || exit $?
intltoolize --force --copy --automake || exit $?
autoreconf --verbose --force --install -Wno-portability || exit $?
+cd $olddir
+
if [ "x$NOCONFIGURE" = x ]; then
$srcdir/configure "$@" || exit $?
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]