Fix libusb subdirectory builds.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
diff --git a/autogen.sh b/autogen.sh
index ab119f5..1f39800 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -2,9 +2,6 @@
bs_dir="$(dirname $(readlink -f $0))"
rm -rf "${bs_dir}"/autom4te.cache
rm -f "${bs_dir}"/aclocal.m4 "${bs_dir}"/ltmain.sh
-libusb_dir="${bs_dir}"/libusb-1.0/
-rm -rf "${libusb_dir}"/autom4te.cache
-rm -rf "${libusb_dir}"/aclocal.m4 "${libusb_dir}"/ltmain.sh
echo 'Running autoreconf -if...'
aclocal --force -I m4
@@ -13,6 +10,12 @@ autoconf --force
autoheader --force
automake --add-missing --copy --force-missing
+libusb_dir="${bs_dir}"/compat/libusb-1.0/
+rm -rf "${libusb_dir}"/autom4te.cache
+rm -rf "${libusb_dir}"/aclocal.m4 "${libusb_dir}"/ltmain.sh
+
+autoreconf -fi "${libusb_dir}"
+
if test -z "$NOCONFIGURE" ; then
echo 'Configuring...'
"$bs_dir"/configure "$@"
diff --git a/compat/libusb-1.0/Makefile.am b/compat/libusb-1.0/Makefile.am
index ce7b7e2..f06e6a1 100644
--- a/compat/libusb-1.0/Makefile.am
+++ b/compat/libusb-1.0/Makefile.am
@@ -2,8 +2,8 @@ AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
ACLOCAL_AMFLAGS = -I m4
DISTCLEANFILES = libusb-1.0.pc
MAINTAINERCLEANFILES = ChangeLog
-EXTRA_DIST = TODO PORTING msvc
-SUBDIRS = libusb doc
+EXTRA_DIST = TODO PORTING
+SUBDIRS = libusb
if BUILD_EXAMPLES
SUBDIRS += examples
diff --git a/compat/libusb-1.0/configure.ac b/compat/libusb-1.0/configure.ac
index 6b27d1d..c21c344 100644
--- a/compat/libusb-1.0/configure.ac
+++ b/compat/libusb-1.0/configure.ac
@@ -226,7 +226,4 @@ AC_SUBST(LTLDFLAGS)
AC_CONFIG_FILES([libusb-1.0.pc])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([libusb/Makefile])
-AC_CONFIG_FILES([examples/Makefile])
-AC_CONFIG_FILES([doc/Makefile])
-AC_CONFIG_FILES([doc/doxygen.cfg])
AC_OUTPUT