Get stacklevel right on deprecation of not specifying bus in BusName.__init__
[dbus-python-phuang.git] / Makefile.am
blob2e00f70244473fd55dd44940447c1f03fc15589a
1 ACLOCAL_AMFLAGS = -I m4
3 # the api, doc, include subdirs don't need their own Makefile.am
4 SUBDIRS = _dbus_bindings _dbus_glib_bindings dbus examples m4 test tools
6 CLEANFILES =
7 EXTRA_DIST = dbus-python.pc.in AUTHORS COPYING ChangeLog \
8              COPYING.LGPL-2.1 COPYING.GPL-2 COPYING.AFL-2.1
9 # miss out the gconf examples for now - they don't work
11 pkgconfigdir = $(libdir)/pkgconfig
12 pkgconfig_DATA = dbus-python.pc
14 dbusincludedir = $(includedir)/dbus-1.0/dbus
15 dbusinclude_HEADERS = include/dbus-python.h
17 python_PYTHON = dbus_bindings.py
19 # === Tests ===
21 cross-test-compile: all
22 cross-test-server:
23         @$(MAKE) -C test cross-test-server
24 cross-test-client:
25         @$(MAKE) -C test cross-test-client
27 # === Documentation ===
29 dist-hook:
30         chmod u+w $(distdir)/ChangeLog
31         if test -d $(top_srcdir)/.git; then \
32                 if git-log --stat > $(distdir)/ChangeLog; then \
33                         : ; \
34                 else \
35                         git-log > $(distdir)/ChangeLog; \
36                 fi; \
37         fi
39 TXT_RSTDOCS = doc/tutorial.txt doc/API_CHANGES.txt doc/HACKING.txt
40 RSTDOCS = README NEWS TODO
41 dist_doc_DATA = $(TXT_RSTDOCS) $(RSTDOCS)
43 maintainer-update-website: _maintainer-update-apidocs \
44         _maintainer-update-htmldocs
46 if ENABLE_DOCS
47 _maintainer-update-htmldocs: $(HTML_TXT_RSTDOCS) $(HTML_RSTDOCS)
48         rsync -rtvzPp --chmod=Dg+s,ug+rwX,o=rX doc \
49         $(RSTDOCS) $(HTML_RSTDOCS) \
50         dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/doc/dbus-python/
52 HTML_TXT_RSTDOCS = doc/tutorial.html doc/API_CHANGES.html doc/HACKING.html
53 HTML_RSTDOCS = README.html NEWS.html TODO.html
54 nodist_doc_DATA = $(HTML_TXT_RSTDOCS) $(HTML_RSTDOCS)
56 CLEANFILES += $(nodist_doc_DATA)
58 $(HTML_TXT_RSTDOCS) : %.html: %.txt
59         $(INSTALL) -d doc
60         $(RST2HTML) $(RST2HTMLFLAGS) $< $@
61 $(HTML_RSTDOCS) : %.html: %
62         $(RST2HTML) $(RST2HTMLFLAGS) $< $@
63 else
64 _maintainer-update-htmldocs:
65         @echo "*** Not updating the HTML docs on the website - install rst2html"
66         @echo "*** from http://docutils.sourceforge.net/ and configure with "
67         @echo "*** --enable-html-docs"
68 endif
70 if ENABLE_API_DOCS
71 all: api/index.html
73 clean-local:
74         rm -rf api
76 dbus/.doc-needs-rebuild-stamp:
77         $(MAKE) -C dbus
78 _dbus_bindings/_dbus_bindings.la:
79         $(MAKE) -C _dbus_bindings
80 _dbus_glib_bindings/_dbus_glib_bindings.la:
81         $(MAKE) -C _dbus_glib_bindings
83 PWD = `pwd`
84 APIDOC_PYTHONPATH = $(PWD)/$(top_srcdir):$(PWD)/_dbus_bindings/.libs:$(PWD)/_dbus_glib_bindings/.libs
86 api api/index.html: $(python_PYTHON) dbus/.doc-needs-rebuild-stamp \
87                     _dbus_bindings/_dbus_bindings.la \
88                     _dbus_glib_bindings/_dbus_glib_bindings.la
89         rm -rf api
90         mkdir api
91         PYTHONPATH=$(APIDOC_PYTHONPATH) DBUS_PYTHON_NO_DEPRECATED=1 $(PYTHON) -Wignore::DeprecationWarning $(EPYDOC) -o api --html \
92                 --docformat restructuredtext -v \
93                 `find dbus -name '*.py' | grep -v dbus_bindings \
94                         | sed -e 's#/__init__\.py##g' \
95                                 -e 's/\.py\>//g' -e 's#/#.#'g` \
96                 || { rm -rf api; exit 1; }
98 _maintainer-update-apidocs: api
99         rsync -rtvzPp --chmod=Dg+s,ug+rwX,o=rX api/ \
100         dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/doc/dbus-python/api/
101 else
102 _maintainer-update-apidocs:
103         @echo "*** Not updating the API docs on the website - install epydoc 3"
104         @echo "*** alpha (or newer) and configure with --enable-api-docs"
105 endif
107 .PHONY: cross-test-compile cross-test-server cross-test-client \
108         always-rebuild maintainer-update-website \
109         _maintainer-update-apidocs _maintainer-update-htmldocs