autogen: Support being called from external build dir
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Tue, 13 Apr 2021 17:07:46 +0000 (19:07 +0200)
committerLudovic Rousseau <ludovic.rousseau@free.fr>
Wed, 14 Apr 2021 14:51:09 +0000 (16:51 +0200)
Building libusb from another build directory doesn't properly work right
now, as calling autogen.sh from there won't work.

An example is when using jhbuild to build it.

So always use absolute paths to call configure and bootstrap scripts

Signed-off-by: Ludovic Rousseau <ludovic.rousseau@free.fr>
autogen.sh
bootstrap.sh
libusb/version_nano.h

index 62d68e5..2ffb10e 100755 (executable)
@@ -2,7 +2,9 @@
 
 set -e
 
-./bootstrap.sh
+srcdir="$(dirname "$0")"
+
+"$srcdir"/bootstrap.sh
 if [ -z "$NOCONFIGURE" ]; then
-    exec ./configure --enable-examples-build --enable-tests-build "$@"
+    exec "$srcdir"/configure --enable-examples-build --enable-tests-build "$@"
 fi
index cfd2b45..fc555d5 100755 (executable)
@@ -2,6 +2,8 @@
 
 set -e
 
+cd "$(dirname "$0")"
+
 if [ ! -d m4 ]; then
     mkdir m4
 fi
index 1dd1b6a..8d36b28 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 11608
+#define LIBUSB_NANO 11609