summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2016-06-02 15:13:27 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2016-06-02 15:14:26 +0100
commit94169859eee470fd548d32ffd7a526a9212e378f (patch)
tree7cf1ba792bc325ba141b5e2fa36b669c2d4db0ba /autogen.sh
parentdcd096d5cfe954595ab80c11004c6a3a41001922 (diff)
downloadyelp-94169859eee470fd548d32ffd7a526a9212e378f.tar.gz
build: Ensure that autogen.sh works when builddir != srcdir
We need to switch directories, because the tools that modify the build system files, sadly, need to operate in the srcdir. This change is required in order to cope with the jhbuild change of default to enable separate build directories.
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh
index f14e8269..49329813 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -4,11 +4,15 @@
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
}
+cd "$srcdir"
+
PKG_NAME=`autoconf --trace "AC_INIT:$1" "$srcdir/configure.ac"`
if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
@@ -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