blob: 09d7cf528980c5ba0c304fd1627c1713607d4e07 [file] [log] [blame]
Daniel Drakef46716f2009-08-27 21:14:54 +05451AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
Daniel Drake8be25602009-06-13 17:19:07 +01002ACLOCAL_AMFLAGS = -I m4
Chris Dickens4a5540a2020-03-25 00:09:26 -07003EXTRA_DIST = INSTALL_WIN.txt PORTING doc/libusb.png \
4 android msvc Xcode
5SUBDIRS = libusb
Daniel Drake852bba42007-11-28 13:48:45 +00006
7if BUILD_EXAMPLES
8SUBDIRS += examples
9endif
10
Toby Gray21cf6e42012-11-21 14:00:31 +000011if BUILD_TESTS
12SUBDIRS += tests
13endif
14
Chris Dickens4a5540a2020-03-25 00:09:26 -070015pkgconfigdir = $(libdir)/pkgconfig
16pkgconfig_DATA = libusb-1.0.pc
Daniel Drake852bba42007-11-28 13:48:45 +000017
Chris Dickens4a5540a2020-03-25 00:09:26 -070018# 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)
Daniel Drake852bba42007-11-28 13:48:45 +000021
Chris Dickens4a5540a2020-03-25 00:09:26 -070022# 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
Chris Dickens60c83952020-04-09 12:30:57 -070038reldir = .release/$(distdir)
39sfurl = frs.sourceforge.net:/home/frs/project/libusb/libusb-1.0
Chris Dickens4a5540a2020-03-25 00:09:26 -070040.PHONY: dist-upload
Chris Dickens4a5540a2020-03-25 00:09:26 -070041dist-upload: dist
Daniel Drakef46716f2009-08-27 21:14:54 +054542 rm -rf $(reldir)
43 mkdir -p $(reldir)
44 cp $(distdir).tar.bz2 $(reldir)
Chris Dickens4a5540a2020-03-25 00:09:26 -070045 if [ -z "$$SF_USER" ]; then \
46 rsync -rv $(reldir) $(sfurl); \
47 else \
48 rsync -rv $(reldir) $$SF_USER@$(sfurl); \
49 fi
Daniel Drakef46716f2009-08-27 21:14:54 +054550 rm -rf $(reldir)