Commit 4c9d9fd61ab047370af443a66e63eb4b2d740213

ckolivas 2013-08-29T12:23:07

Fix libusb subdirectory builds.

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