1 abs_top_srcdir = @abs_top_srcdir@
2 abs_top_builddir = @abs_top_builddir@
4 ACLOCAL_AMFLAGS = -I m4
6 # the api, doc, include subdirs don't need their own Makefile.am
7 # the dbus subdir is handled with non-recursive make because of #12741
8 SUBDIRS = _dbus_bindings _dbus_glib_bindings examples m4 test tools
16 # miss out the gconf examples for now - they don't work
18 # === dbus package ===
20 nobase_python_PYTHON = \
24 dbus/dbus_bindings.py \
29 dbus/_expat_introspect_parser.py \
31 dbus/gobject_service.py \
34 dbus/mainloop/__init__.py \
35 dbus/mainloop/glib.py \
40 check_py_sources = $(nobase_python_PYTHON)
41 include $(top_srcdir)/tools/check-coding-style.mk
45 pkgconfigdir = $(libdir)/pkgconfig
46 pkgconfig_DATA = dbus-python.pc
48 dbusincludedir = $(includedir)/dbus-1.0/dbus
49 dbusinclude_HEADERS = include/dbus-python.h
53 cross-test-compile: all
55 @$(MAKE) -C test cross-test-server
57 @$(MAKE) -C test cross-test-client
59 # === Documentation ===
62 chmod u+w $(distdir)/ChangeLog
63 if test -d $(top_srcdir)/.git; then \
64 if git-log --stat > $(distdir)/ChangeLog; then \
67 git-log > $(distdir)/ChangeLog; \
71 TXT_RSTDOCS = doc/tutorial.txt doc/API_CHANGES.txt doc/HACKING.txt
72 RSTDOCS = README NEWS TODO
73 dist_doc_DATA = $(TXT_RSTDOCS) $(RSTDOCS)
75 maintainer-update-website: _maintainer-update-apidocs \
76 _maintainer-update-htmldocs
79 _maintainer-update-htmldocs: $(HTML_TXT_RSTDOCS) $(HTML_RSTDOCS)
80 rsync -rtvzPp --chmod=Dg+s,ug+rwX,o=rX doc \
81 $(RSTDOCS) $(HTML_RSTDOCS) \
82 dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/doc/dbus-python/
84 HTML_TXT_RSTDOCS = doc/tutorial.html doc/API_CHANGES.html doc/HACKING.html
85 HTML_RSTDOCS = README.html NEWS.html TODO.html
86 nodist_doc_DATA = $(HTML_TXT_RSTDOCS) $(HTML_RSTDOCS)
88 CLEANFILES += $(nodist_doc_DATA)
90 $(HTML_TXT_RSTDOCS) : %.html: %.txt
92 $(RST2HTML) $(RST2HTMLFLAGS) $< $@
93 $(HTML_RSTDOCS) : %.html: %
94 $(RST2HTML) $(RST2HTMLFLAGS) $< $@
96 _maintainer-update-htmldocs:
97 @echo "*** Not updating the HTML docs on the website - install rst2html"
98 @echo "*** from http://docutils.sourceforge.net/ and configure with "
99 @echo "*** --enable-html-docs"
108 _dbus_bindings/_dbus_bindings.la:
109 $(MAKE) -C _dbus_bindings
110 _dbus_glib_bindings/_dbus_glib_bindings.la:
111 $(MAKE) -C _dbus_glib_bindings
113 APIDOC_PYTHONPATH = $(abs_top_srcdir):$(abs_top_builddir)/_dbus_bindings/.libs:$(abs_top_builddir)/_dbus_glib_bindings/.libs
115 api api/index.html: $(nobase_python_PYTHON) \
116 _dbus_bindings/_dbus_bindings.la \
117 _dbus_glib_bindings/_dbus_glib_bindings.la
120 PYTHONPATH=$(APIDOC_PYTHONPATH) DBUS_PYTHON_NO_DEPRECATED=1 $(PYTHON) -Wignore::DeprecationWarning $(EPYDOC) -o api --html \
121 --docformat restructuredtext -v \
122 `find dbus -name '*.py' | grep -v dbus_bindings \
123 | sed -e 's#/__init__\.py##g' \
124 -e 's/\.py\>//g' -e 's#/#.#'g` \
125 || { rm -rf api; exit 1; }
127 _maintainer-update-apidocs: api
128 rsync -rtvzPp --chmod=Dg+s,ug+rwX,o=rX api/ \
129 dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/doc/dbus-python/api/
131 _maintainer-update-apidocs:
132 @echo "*** Not updating the API docs on the website - install epydoc 3"
133 @echo "*** alpha (or newer) and configure with --enable-api-docs"
136 .PHONY: cross-test-compile cross-test-server cross-test-client \
137 always-rebuild maintainer-update-website \
138 _maintainer-update-apidocs _maintainer-update-htmldocs