Don't distribute COPYING.*, which we no longer have or need
[dbus-python-phuang.git] / Makefile.am
blobcea958bae19eac8281a301e2ed29df6cf8ec4dfe
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/types.py
40 check_py_sources = $(nobase_python_PYTHON)
41 include $(top_srcdir)/tools/check-coding-style.mk
43 # === Devel stuff ===
45 pkgconfigdir = $(libdir)/pkgconfig
46 pkgconfig_DATA = dbus-python.pc
48 dbusincludedir = $(includedir)/dbus-1.0/dbus
49 dbusinclude_HEADERS = include/dbus-python.h
51 # === Tests ===
53 cross-test-compile: all
54 cross-test-server:
55         @$(MAKE) -C test cross-test-server
56 cross-test-client:
57         @$(MAKE) -C test cross-test-client
59 # === Documentation ===
61 dist-hook:
62         chmod u+w $(distdir)/ChangeLog
63         if test -d $(top_srcdir)/.git; then \
64                 if git-log --stat > $(distdir)/ChangeLog; then \
65                         : ; \
66                 else \
67                         git-log > $(distdir)/ChangeLog; \
68                 fi; \
69         fi
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
78 if ENABLE_DOCS
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
91         $(INSTALL) -d doc
92         $(RST2HTML) $(RST2HTMLFLAGS) $< $@
93 $(HTML_RSTDOCS) : %.html: %
94         $(RST2HTML) $(RST2HTMLFLAGS) $< $@
95 else
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"
100 endif
102 if ENABLE_API_DOCS
103 all: api/index.html
105 clean-local:
106         rm -rf api
108 APIDOC_PYTHONPATH = $(abs_top_srcdir):$(abs_top_builddir)/_dbus_bindings/.libs:$(abs_top_builddir)/_dbus_glib_bindings/.libs
110 api api/index.html: $(nobase_python_PYTHON) \
111                     _dbus_bindings/_dbus_bindings.la \
112                     _dbus_glib_bindings/_dbus_glib_bindings.la
113         rm -rf api
114         mkdir api
115         PYTHONPATH=$(APIDOC_PYTHONPATH) DBUS_PYTHON_NO_DEPRECATED=1 $(PYTHON) -Wignore::DeprecationWarning $(EPYDOC) -o api --html \
116                 --docformat restructuredtext -v \
117                 `find dbus -name '*.py' | grep -v dbus_bindings \
118                         | sed -e 's#/__init__\.py##g' \
119                                 -e 's/\.py\>//g' -e 's#/#.#'g` \
120                 || { rm -rf api; exit 1; }
122 _maintainer-update-apidocs: api
123         rsync -rtvzPp --chmod=Dg+s,ug+rwX,o=rX api/ \
124         dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/doc/dbus-python/api/
125 else
126 _maintainer-update-apidocs:
127         @echo "*** Not updating the API docs on the website - install epydoc 3"
128         @echo "*** alpha (or newer) and configure with --enable-api-docs"
129 endif
131 .PHONY: cross-test-compile cross-test-server cross-test-client \
132         always-rebuild maintainer-update-website \
133         _maintainer-update-apidocs _maintainer-update-htmldocs