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 \
41 check_py_sources = $(nobase_python_PYTHON)
42 include $(top_srcdir)/tools/check-coding-style.mk
46 pkgconfigdir = $(libdir)/pkgconfig
47 pkgconfig_DATA = dbus-python.pc
49 dbusincludedir = $(includedir)/dbus-1.0/dbus
50 dbusinclude_HEADERS = include/dbus-python.h
54 cross-test-compile: all
56 @$(MAKE) -C test cross-test-server
58 @$(MAKE) -C test cross-test-client
60 # === Documentation ===
63 chmod u+w $(distdir)/ChangeLog
64 if test -d $(top_srcdir)/.git; then \
65 if git-log --stat > $(distdir)/ChangeLog; then \
68 git-log > $(distdir)/ChangeLog; \
72 TXT_RSTDOCS = doc/tutorial.txt doc/API_CHANGES.txt doc/HACKING.txt
73 RSTDOCS = README NEWS TODO
74 dist_doc_DATA = $(TXT_RSTDOCS) $(RSTDOCS)
77 rsync -tvpP --chmod=ugo=r $(DIST_ARCHIVES) $(DIST_ARCHIVES:%=%.asc) \
78 dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/releases/dbus-python/
80 maintainer-update-website: _maintainer-update-apidocs \
81 _maintainer-update-htmldocs
84 _maintainer-update-htmldocs: $(HTML_TXT_RSTDOCS) $(HTML_RSTDOCS)
85 rsync -rtvzPp --chmod=Dg+s,ug+rwX,o=rX doc \
86 $(RSTDOCS) $(HTML_RSTDOCS) \
87 dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/doc/dbus-python/
89 HTML_TXT_RSTDOCS = doc/tutorial.html doc/API_CHANGES.html doc/HACKING.html
90 HTML_RSTDOCS = README.html NEWS.html TODO.html
91 nodist_doc_DATA = $(HTML_TXT_RSTDOCS) $(HTML_RSTDOCS)
93 CLEANFILES += $(nodist_doc_DATA)
95 $(HTML_TXT_RSTDOCS) : %.html: %.txt
97 $(RST2HTML) $(RST2HTMLFLAGS) $< $@
98 $(HTML_RSTDOCS) : %.html: %
99 $(RST2HTML) $(RST2HTMLFLAGS) $< $@
101 _maintainer-update-htmldocs:
102 @echo "*** Not updating the HTML docs on the website - install rst2html"
103 @echo "*** from http://docutils.sourceforge.net/ and configure with "
104 @echo "*** --enable-html-docs"
113 _dbus_bindings/_dbus_bindings.la:
114 $(MAKE) -C _dbus_bindings
115 _dbus_glib_bindings/_dbus_glib_bindings.la:
116 $(MAKE) -C _dbus_glib_bindings
118 APIDOC_PYTHONPATH = $(abs_top_srcdir):$(abs_top_builddir)/_dbus_bindings/.libs:$(abs_top_builddir)/_dbus_glib_bindings/.libs
120 api api/index.html: $(nobase_python_PYTHON) \
121 _dbus_bindings/_dbus_bindings.la \
122 _dbus_glib_bindings/_dbus_glib_bindings.la
125 PYTHONPATH=$(APIDOC_PYTHONPATH) DBUS_PYTHON_NO_DEPRECATED=1 $(PYTHON) -Wignore::DeprecationWarning $(EPYDOC) -o api --html \
126 --docformat restructuredtext -v \
127 `find dbus -name '*.py' | grep -v dbus_bindings \
128 | sed -e 's#/__init__\.py##g' \
129 -e 's/\.py\>//g' -e 's#/#.#'g` \
130 || { rm -rf api; exit 1; }
132 _maintainer-update-apidocs: api
133 rsync -rtvzPp --chmod=Dg+s,ug+rwX,o=rX api/ \
134 dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/doc/dbus-python/api/
136 _maintainer-update-apidocs:
137 @echo "*** Not updating the API docs on the website - install epydoc 3"
138 @echo "*** alpha (or newer) and configure with --enable-api-docs"
141 .PHONY: cross-test-compile cross-test-server cross-test-client \
142 always-rebuild maintainer-update-website \
143 _maintainer-update-apidocs _maintainer-update-htmldocs \