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 62d68e5d0b763e166221daf42ee3a343c3e05d6a..2ffb10e09bfeb68058a34b964d8a64fa68a4c326 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 cfd2b45d6d0d67c7c2a1d78c85561aec6c3b9a09..fc555d50a7b4e223fd24522d3d1ca101c7270aa4 100755 (executable)
@@ -2,6 +2,8 @@
 
 set -e
 
+cd "$(dirname "$0")"
+
 if [ ! -d m4 ]; then
     mkdir m4
 fi
index 1dd1b6a71be2a5418473552243ffa1ac80ecd12d..8d36b280b6080cee3fbf7bc1a2165308c133c916 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 11608
+#define LIBUSB_NANO 11609