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)
76 rsync -tvpP --chmod=ugo=r $(DIST_ARCHIVES) $(DIST_ARCHIVES:%=%.asc) \
77 dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/releases/dbus-python/
79 maintainer-update-website: _maintainer-update-apidocs \
80 _maintainer-update-htmldocs
83 _maintainer-update-htmldocs: $(HTML_TXT_RSTDOCS) $(HTML_RSTDOCS)
84 rsync -rtvzPp --chmod=Dg+s,ug+rwX,o=rX doc \
85 $(RSTDOCS) $(HTML_RSTDOCS) \
86 dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/doc/dbus-python/
88 HTML_TXT_RSTDOCS = doc/tutorial.html doc/API_CHANGES.html doc/HACKING.html
89 HTML_RSTDOCS = README.html NEWS.html TODO.html
90 nodist_doc_DATA = $(HTML_TXT_RSTDOCS) $(HTML_RSTDOCS)
92 CLEANFILES += $(nodist_doc_DATA)
94 $(HTML_TXT_RSTDOCS) : %.html: %.txt
96 $(RST2HTML) $(RST2HTMLFLAGS) $< $@
97 $(HTML_RSTDOCS) : %.html: %
98 $(RST2HTML) $(RST2HTMLFLAGS) $< $@
100 _maintainer-update-htmldocs:
101 @echo "*** Not updating the HTML docs on the website - install rst2html"
102 @echo "*** from http://docutils.sourceforge.net/ and configure with "
103 @echo "*** --enable-html-docs"
112 _dbus_bindings/_dbus_bindings.la:
113 $(MAKE) -C _dbus_bindings
114 _dbus_glib_bindings/_dbus_glib_bindings.la:
115 $(MAKE) -C _dbus_glib_bindings
117 APIDOC_PYTHONPATH = $(abs_top_srcdir):$(abs_top_builddir)/_dbus_bindings/.libs:$(abs_top_builddir)/_dbus_glib_bindings/.libs
119 api api/index.html: $(nobase_python_PYTHON) \
120 _dbus_bindings/_dbus_bindings.la \
121 _dbus_glib_bindings/_dbus_glib_bindings.la
124 PYTHONPATH=$(APIDOC_PYTHONPATH) DBUS_PYTHON_NO_DEPRECATED=1 $(PYTHON) -Wignore::DeprecationWarning $(EPYDOC) -o api --html \
125 --docformat restructuredtext -v \
126 `find dbus -name '*.py' | grep -v dbus_bindings \
127 | sed -e 's#/__init__\.py##g' \
128 -e 's/\.py\>//g' -e 's#/#.#'g` \
129 || { rm -rf api; exit 1; }
131 _maintainer-update-apidocs: api
132 rsync -rtvzPp --chmod=Dg+s,ug+rwX,o=rX api/ \
133 dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/doc/dbus-python/api/
135 _maintainer-update-apidocs:
136 @echo "*** Not updating the API docs on the website - install epydoc 3"
137 @echo "*** alpha (or newer) and configure with --enable-api-docs"
140 .PHONY: cross-test-compile cross-test-server cross-test-client \
141 always-rebuild maintainer-update-website \
142 _maintainer-update-apidocs _maintainer-update-htmldocs \