autogen.sh: Fix running out of tree
authorStef Walter <stefw@redhat.com>
Tue, 8 Aug 2017 06:14:13 +0000 (08:14 +0200)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 8 Aug 2017 12:44:17 +0000 (12:44 +0000)
The autogen.sh script should be runnable out of tree. It's mostly
already the case, just one little tweak to make it work.

   $ mkdir build
   $ cd build
   $ ../autogen.sh --prefix=/usr

Closes: #1063
Approved by: cgwalters

autogen.sh

index 0f32089ad2def2f8260f8351ea015783f1c292d7..17f6abf4dd072c0aad2cf0a6030935398880db3a 100755 (executable)
@@ -28,7 +28,6 @@ else
         gtkdocize
 fi
 
-cd $olddir
 if ! test -f libglnx/README.md || ! test -f bsdiff/README.md; then
     git submodule update --init
 fi
@@ -41,4 +40,5 @@ ln -sf ../libglnx/libglnx.m4 buildutil/libglnx.m4
 
 autoreconf --force --install --verbose
 
+cd $olddir
 test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"