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