Makefile.am 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
  2. ACLOCAL_AMFLAGS = -I m4
  3. EXTRA_DIST = INSTALL_WIN.txt PORTING doc/libusb.png \
  4. android msvc Xcode
  5. SUBDIRS = libusb
  6. if BUILD_EXAMPLES
  7. SUBDIRS += examples
  8. endif
  9. if BUILD_TESTS
  10. SUBDIRS += tests
  11. endif
  12. pkgconfigdir = $(libdir)/pkgconfig
  13. pkgconfig_DATA = libusb-1.0.pc
  14. # The package name is libusb-1.0, but we want the distribution
  15. # to be created as libusb-x.y.z instead of libusb-1.0-x.y.z
  16. distdir = libusb-$(VERSION)
  17. # Ensure any generated docs are cleaned out
  18. # We need this here because make does not recurse into doc/
  19. clean-local:
  20. rm -rf doc/$(DOXYGEN_HTMLDIR)
  21. # Use dist-hook to accomplish the following things for the dist recipe:
  22. # 1) Remove the GitHub Markdown from the README file
  23. # 2) Remove the .gitattributes file from the msvc directory
  24. dist-hook:
  25. chmod u+w $(distdir)/README $(distdir)/msvc
  26. $(SED) -i.orig -e '/Build Status/d' $(distdir)/README
  27. $(SED) -i.orig -e '/^$$/N;/^\n$$/D' $(distdir)/README
  28. $(SED) -i.orig -e 's/\[\([A-Z]*\)\](\1)/\1/' $(distdir)/README
  29. rm -f $(distdir)/README.orig
  30. rm -f $(distdir)/msvc/.gitattributes
  31. reldir = .release/$(distdir)
  32. sfurl = frs.sourceforge.net:/home/frs/project/libusb/libusb-1.0
  33. .PHONY: dist-upload
  34. dist-upload: dist
  35. rm -rf $(reldir)
  36. mkdir -p $(reldir)
  37. cp $(distdir).tar.bz2 $(reldir)
  38. if [ -z "$$SF_USER" ]; then \
  39. rsync -rv $(reldir) $(sfurl); \
  40. else \
  41. rsync -rv $(reldir) $$SF_USER@$(sfurl); \
  42. fi
  43. rm -rf $(reldir)