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 = API_CHANGES.txt dbus-python.pc.in HACKING.txt \
6 AUTHORS COPYING NEWS ChangeLog TODO \
8 # miss out the gconf examples for now - they don't work
10 pkgconfigdir = $(libdir)/pkgconfig
11 pkgconfig_DATA = dbus-python.pc
13 dbusincludedir = $(includedir)/dbus-1.0/dbus
14 dbusinclude_HEADERS = include/dbus-python.h
16 python_PYTHON = dbus_bindings.py
20 cross-test-compile: all
22 @$(MAKE) -C test cross-test-server
24 @$(MAKE) -C test cross-test-client
26 # === Documentation ===
28 ChangeLog: always-rebuild
29 @if test -d $(top_srcdir)/.git; then \
30 if git-log --stat > ChangeLog; then \
33 git-log > Changelog || exit 1; \
37 TXT_RSTDOCS = doc/tutorial.txt doc/API_CHANGES.txt doc/HACKING.txt
38 RSTDOCS = README NEWS TODO
39 dist_doc_DATA = $(TXT_RSTDOCS) $(RSTDOCS)
41 maintainer-update-website: _maintainer-update-apidocs \
42 _maintainer-update-htmldocs
45 _maintainer-update-htmldocs: $(HTML_TXT_RSTDOCS) $(HTML_RSTDOCS)
46 rsync -rtvzPp --chmod=Dg+s,ug+rwX,o=rX doc \
47 $(RSTDOCS) $(HTML_RSTDOCS) \
48 dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/doc/dbus-python/
50 HTML_TXT_RSTDOCS = doc/tutorial.html doc/API_CHANGES.html doc/HACKING.html
51 HTML_RSTDOCS = README.html NEWS.html TODO.html
52 nodist_doc_DATA = $(HTML_TXT_RSTDOCS) $(HTML_RSTDOCS)
54 CLEANFILES += $(nodist_doc_DATA)
56 $(HTML_TXT_RSTDOCS) : %.html: %.txt
57 $(RST2HTML) $(RST2HTMLFLAGS) $< $@
58 $(HTML_RSTDOCS) : %.html: %
59 $(RST2HTML) $(RST2HTMLFLAGS) $< $@
61 _maintainer-update-htmldocs:
62 @echo "*** Not updating the HTML docs on the website - install rst2html"
63 @echo "*** from http://docutils.sourceforge.net/ and configure with "
64 @echo "*** --enable-html-docs"
73 dbus/.doc-needs-rebuild-stamp:
75 _dbus_bindings/_dbus_bindings.la:
76 $(MAKE) -C _dbus_bindings
77 _dbus_glib_bindings/_dbus_glib_bindings.la:
78 $(MAKE) -C _dbus_glib_bindings
81 APIDOC_PYTHONPATH = $(PWD)/$(top_srcdir):$(PWD)/_dbus_bindings/.libs:$(PWD)/_dbus_glib_bindings/.libs
83 api api/index.html: $(python_PYTHON) dbus/.doc-needs-rebuild-stamp \
84 _dbus_bindings/_dbus_bindings.la \
85 _dbus_glib_bindings/_dbus_glib_bindings.la
88 PYTHONPATH=$(APIDOC_PYTHONPATH) DBUS_PYTHON_NO_DEPRECATED=1 $(PYTHON) -Wignore::DeprecationWarning $(EPYDOC) -o api --html \
89 --docformat restructuredtext -v \
90 `find dbus -name '*.py' | grep -v dbus_bindings \
91 | sed -e 's#/__init__\.py##g' \
92 -e 's/\.py\>//g' -e 's#/#.#'g` \
93 || { rm -rf api; exit 1; }
95 _maintainer-update-apidocs: api
96 rsync -rtvzPp --chmod=Dg+s,ug+rwX,o=rX api/ \
97 dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/doc/dbus-python/api/
99 _maintainer-update-apidocs:
100 @echo "*** Not updating the API docs on the website - install epydoc 3"
101 @echo "*** alpha (or newer) and configure with --enable-api-docs"
104 .PHONY: cross-test-compile cross-test-server cross-test-client \
105 always-rebuild maintainer-update-website \
106 _maintainer-update-apidocs _maintainer-update-htmldocs