1 # the api, doc, include subdirs don't need their own Makefile.am
2 SUBDIRS = _dbus_bindings _dbus_glib_bindings dbus examples test
5 EXTRA_DIST = dbus-python.pc.in AUTHORS COPYING ChangeLog \
6 COPYING.LGPL-2.1 COPYING.GPL-2 COPYING.AFL-2.1
7 # miss out the gconf examples for now - they don't work
9 pkgconfigdir = $(libdir)/pkgconfig
10 pkgconfig_DATA = dbus-python.pc
12 dbusincludedir = $(includedir)/dbus-1.0/dbus
13 dbusinclude_HEADERS = include/dbus-python.h
15 python_PYTHON = dbus_bindings.py
19 cross-test-compile: all
21 @$(MAKE) -C test cross-test-server
23 @$(MAKE) -C test cross-test-client
25 # === Documentation ===
27 ChangeLog: always-rebuild
28 @if test -d $(top_srcdir)/.git; then \
29 if git-log --stat > ChangeLog; then \
32 git-log > Changelog || exit 1; \
36 TXT_RSTDOCS = doc/tutorial.txt doc/API_CHANGES.txt doc/HACKING.txt
37 RSTDOCS = README NEWS TODO
38 dist_doc_DATA = $(TXT_RSTDOCS) $(RSTDOCS)
40 maintainer-update-website: _maintainer-update-apidocs \
41 _maintainer-update-htmldocs
44 _maintainer-update-htmldocs: $(HTML_TXT_RSTDOCS) $(HTML_RSTDOCS)
45 rsync -rtvzPp --chmod=Dg+s,ug+rwX,o=rX doc \
46 $(RSTDOCS) $(HTML_RSTDOCS) \
47 dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/doc/dbus-python/
49 HTML_TXT_RSTDOCS = doc/tutorial.html doc/API_CHANGES.html doc/HACKING.html
50 HTML_RSTDOCS = README.html NEWS.html TODO.html
51 nodist_doc_DATA = $(HTML_TXT_RSTDOCS) $(HTML_RSTDOCS)
53 CLEANFILES += $(nodist_doc_DATA)
55 $(HTML_TXT_RSTDOCS) : %.html: %.txt
56 $(RST2HTML) $(RST2HTMLFLAGS) $< $@
57 $(HTML_RSTDOCS) : %.html: %
58 $(RST2HTML) $(RST2HTMLFLAGS) $< $@
60 _maintainer-update-htmldocs:
61 @echo "*** Not updating the HTML docs on the website - install rst2html"
62 @echo "*** from http://docutils.sourceforge.net/ and configure with "
63 @echo "*** --enable-html-docs"
72 dbus/.doc-needs-rebuild-stamp:
74 _dbus_bindings/_dbus_bindings.la:
75 $(MAKE) -C _dbus_bindings
76 _dbus_glib_bindings/_dbus_glib_bindings.la:
77 $(MAKE) -C _dbus_glib_bindings
80 APIDOC_PYTHONPATH = $(PWD)/$(top_srcdir):$(PWD)/_dbus_bindings/.libs:$(PWD)/_dbus_glib_bindings/.libs
82 api api/index.html: $(python_PYTHON) dbus/.doc-needs-rebuild-stamp \
83 _dbus_bindings/_dbus_bindings.la \
84 _dbus_glib_bindings/_dbus_glib_bindings.la
87 PYTHONPATH=$(APIDOC_PYTHONPATH) DBUS_PYTHON_NO_DEPRECATED=1 $(PYTHON) -Wignore::DeprecationWarning $(EPYDOC) -o api --html \
88 --docformat restructuredtext -v \
89 `find dbus -name '*.py' | grep -v dbus_bindings \
90 | sed -e 's#/__init__\.py##g' \
91 -e 's/\.py\>//g' -e 's#/#.#'g` \
92 || { rm -rf api; exit 1; }
94 _maintainer-update-apidocs: api
95 rsync -rtvzPp --chmod=Dg+s,ug+rwX,o=rX api/ \
96 dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/doc/dbus-python/api/
98 _maintainer-update-apidocs:
99 @echo "*** Not updating the API docs on the website - install epydoc 3"
100 @echo "*** alpha (or newer) and configure with --enable-api-docs"
103 .PHONY: cross-test-compile cross-test-server cross-test-client \
104 always-rebuild maintainer-update-website \
105 _maintainer-update-apidocs _maintainer-update-htmldocs