Add wrapper for DBusServer.
[dbus-python-phuang.git] / Makefile.am
blob40ac719e9a2a5afa1f50d8977e42dcc9e4c565ce
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
10 CLEANFILES =
11 EXTRA_DIST = \
12         dbus-python.pc.in \
13         AUTHORS \
14         COPYING \
15         ChangeLog
16 # miss out the gconf examples for now - they don't work
18 # === dbus package ===
20 nobase_python_PYTHON = \
21     dbus_bindings.py \
22     dbus/bus.py \
23     dbus/connection.py \
24     dbus/dbus_bindings.py \
25     dbus/_dbus.py \
26     dbus/_version.py \
27     dbus/decorators.py \
28     dbus/exceptions.py \
29     dbus/_expat_introspect_parser.py \
30     dbus/glib.py \
31     dbus/gobject_service.py \
32     dbus/__init__.py \
33     dbus/lowlevel.py \
34     dbus/mainloop/__init__.py \
35     dbus/mainloop/glib.py \
36     dbus/proxies.py \
37     dbus/service.py \
38     dbus/server.py \
39     dbus/types.py
41 check_py_sources = $(nobase_python_PYTHON)
42 include $(top_srcdir)/tools/check-coding-style.mk
44 # === Devel stuff ===
46 pkgconfigdir = $(libdir)/pkgconfig
47 pkgconfig_DATA = dbus-python.pc
49 dbusincludedir = $(includedir)/dbus-1.0/dbus
50 dbusinclude_HEADERS = include/dbus-python.h
52 # === Tests ===
54 cross-test-compile: all
55 cross-test-server:
56         @$(MAKE) -C test cross-test-server
57 cross-test-client:
58         @$(MAKE) -C test cross-test-client
60 # === Documentation ===
62 dist-hook:
63         chmod u+w $(distdir)/ChangeLog
64         if test -d $(top_srcdir)/.git; then \
65                 if git-log --stat > $(distdir)/ChangeLog; then \
66                         : ; \
67                 else \
68                         git-log > $(distdir)/ChangeLog; \
69                 fi; \
70         fi
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)
76 maintainer-upload:
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
83 if ENABLE_DOCS
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
96         $(INSTALL) -d doc
97         $(RST2HTML) $(RST2HTMLFLAGS) $< $@
98 $(HTML_RSTDOCS) : %.html: %
99         $(RST2HTML) $(RST2HTMLFLAGS) $< $@
100 else
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"
105 endif
107 if ENABLE_API_DOCS
108 all: api/index.html
110 clean-local:
111         rm -rf api
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
123         rm -rf api
124         mkdir api
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/
135 else
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"
139 endif
141 .PHONY: cross-test-compile cross-test-server cross-test-client \
142         always-rebuild maintainer-update-website \
143         _maintainer-update-apidocs _maintainer-update-htmldocs \
144         maintainer-upload