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 # miss out the gconf examples for now - they don't work
8 pkgconfigdir = $(libdir)/pkgconfig
9 pkgconfig_DATA = dbus-python.pc
11 dbusincludedir = $(includedir)/dbus-1.0/dbus
12 dbusinclude_HEADERS = include/dbus-python.h
14 python_PYTHON = dbus_bindings.py
18 cross-test-compile: all
20 @$(MAKE) -C test cross-test-server
22 @$(MAKE) -C test cross-test-client
24 # === Documentation ===
26 ChangeLog: always-rebuild
27 @if test -d $(top_srcdir)/.git; then \
28 if git-log --stat > ChangeLog; then \
31 git-log > Changelog || exit 1; \
35 TXT_RSTDOCS = doc/tutorial.txt doc/API_CHANGES.txt doc/HACKING.txt
36 RSTDOCS = README NEWS TODO
37 dist_doc_DATA = $(TXT_RSTDOCS) $(RSTDOCS)
39 maintainer-update-website: _maintainer-update-apidocs \
40 _maintainer-update-htmldocs
43 _maintainer-update-htmldocs: $(HTML_TXT_RSTDOCS) $(HTML_RSTDOCS)
44 rsync -rtvzPp --chmod=Dg+s,ug+rwX,o=rX doc \
45 $(RSTDOCS) $(HTML_RSTDOCS) \
46 dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/doc/dbus-python/
48 HTML_TXT_RSTDOCS = doc/tutorial.html doc/API_CHANGES.html doc/HACKING.html
49 HTML_RSTDOCS = README.html NEWS.html TODO.html
50 nodist_doc_DATA = $(HTML_TXT_RSTDOCS) $(HTML_RSTDOCS)
52 CLEANFILES += $(nodist_doc_DATA)
54 $(HTML_TXT_RSTDOCS) : %.html: %.txt
55 $(RST2HTML) $(RST2HTMLFLAGS) $< $@
56 $(HTML_RSTDOCS) : %.html: %
57 $(RST2HTML) $(RST2HTMLFLAGS) $< $@
59 _maintainer-update-htmldocs:
60 @echo "*** Not updating the HTML docs on the website - install rst2html"
61 @echo "*** from http://docutils.sourceforge.net/ and configure with "
62 @echo "*** --enable-html-docs"
71 dbus/.doc-needs-rebuild-stamp:
73 _dbus_bindings/_dbus_bindings.la:
74 $(MAKE) -C _dbus_bindings
75 _dbus_glib_bindings/_dbus_glib_bindings.la:
76 $(MAKE) -C _dbus_glib_bindings
79 APIDOC_PYTHONPATH = $(PWD)/$(top_srcdir):$(PWD)/_dbus_bindings/.libs:$(PWD)/_dbus_glib_bindings/.libs
81 api api/index.html: $(python_PYTHON) dbus/.doc-needs-rebuild-stamp \
82 _dbus_bindings/_dbus_bindings.la \
83 _dbus_glib_bindings/_dbus_glib_bindings.la
86 PYTHONPATH=$(APIDOC_PYTHONPATH) DBUS_PYTHON_NO_DEPRECATED=1 $(PYTHON) -Wignore::DeprecationWarning $(EPYDOC) -o api --html \
87 --docformat restructuredtext -v \
88 `find dbus -name '*.py' | grep -v dbus_bindings \
89 | sed -e 's#/__init__\.py##g' \
90 -e 's/\.py\>//g' -e 's#/#.#'g` \
91 || { rm -rf api; exit 1; }
93 _maintainer-update-apidocs: api
94 rsync -rtvzPp --chmod=Dg+s,ug+rwX,o=rX api/ \
95 dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/doc/dbus-python/api/
97 _maintainer-update-apidocs:
98 @echo "*** Not updating the API docs on the website - install epydoc 3"
99 @echo "*** alpha (or newer) and configure with --enable-api-docs"
102 .PHONY: cross-test-compile cross-test-server cross-test-client \
103 always-rebuild maintainer-update-website \
104 _maintainer-update-apidocs _maintainer-update-htmldocs