Don't leak memory in Struct repr()
[dbus-python-phuang.git] / Makefile.am
blob99b76aeb39390237cfd0ad76e8074bc93bcf1711
1 # the api, doc, include subdirs don't need their own Makefile.am
2 SUBDIRS = _dbus_bindings _dbus_glib_bindings dbus examples test
4 CLEANFILES =
5 EXTRA_DIST = dbus-python.pc.in AUTHORS COPYING ChangeLog
6 # miss out the gconf examples for now - they don't work
8 pkgconfigdir = $(libdir)/pkgconfig
9 pkgconfig_DATA = dbus-python.pc
11 dbusincludedir = $(includedir)/dbus-1.0/dbus
12 dbusinclude_HEADERS = include/dbus-python.h
14 python_PYTHON = dbus_bindings.py
16 # === Tests ===
18 cross-test-compile: all
19 cross-test-server:
20         @$(MAKE) -C test cross-test-server
21 cross-test-client:
22         @$(MAKE) -C test cross-test-client
24 # === Documentation ===
26 ChangeLog: always-rebuild
27         @if test -d $(top_srcdir)/.git; then \
28                 if git-log --stat > ChangeLog; then \
29                         : ; \
30                 else \
31                         git-log > Changelog || exit 1; \
32                 fi; \
33         fi
35 TXT_RSTDOCS = doc/tutorial.txt doc/API_CHANGES.txt doc/HACKING.txt
36 RSTDOCS = README NEWS TODO
37 dist_doc_DATA = $(TXT_RSTDOCS) $(RSTDOCS)
39 maintainer-update-website: _maintainer-update-apidocs \
40         _maintainer-update-htmldocs
42 if ENABLE_DOCS
43 _maintainer-update-htmldocs: $(HTML_TXT_RSTDOCS) $(HTML_RSTDOCS)
44         rsync -rtvzPp --chmod=Dg+s,ug+rwX,o=rX doc \
45         $(RSTDOCS) $(HTML_RSTDOCS) \
46         dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/doc/dbus-python/
48 HTML_TXT_RSTDOCS = doc/tutorial.html doc/API_CHANGES.html doc/HACKING.html
49 HTML_RSTDOCS = README.html NEWS.html TODO.html
50 nodist_doc_DATA = $(HTML_TXT_RSTDOCS) $(HTML_RSTDOCS)
52 CLEANFILES += $(nodist_doc_DATA)
54 $(HTML_TXT_RSTDOCS) : %.html: %.txt
55                 $(RST2HTML) $(RST2HTMLFLAGS) $< $@
56 $(HTML_RSTDOCS) : %.html: %
57                 $(RST2HTML) $(RST2HTMLFLAGS) $< $@
58 else
59 _maintainer-update-htmldocs:
60         @echo "*** Not updating the HTML docs on the website - install rst2html"
61         @echo "*** from http://docutils.sourceforge.net/ and configure with "
62         @echo "*** --enable-html-docs"
63 endif
65 if ENABLE_API_DOCS
66 all: api/index.html
68 clean-local:
69         rm -rf api
71 dbus/.doc-needs-rebuild-stamp:
72         $(MAKE) -C dbus
73 _dbus_bindings/_dbus_bindings.la:
74         $(MAKE) -C _dbus_bindings
75 _dbus_glib_bindings/_dbus_glib_bindings.la:
76         $(MAKE) -C _dbus_glib_bindings
78 PWD = `pwd`
79 APIDOC_PYTHONPATH = $(PWD)/$(top_srcdir):$(PWD)/_dbus_bindings/.libs:$(PWD)/_dbus_glib_bindings/.libs
81 api api/index.html: $(python_PYTHON) dbus/.doc-needs-rebuild-stamp \
82                     _dbus_bindings/_dbus_bindings.la \
83                     _dbus_glib_bindings/_dbus_glib_bindings.la
84         rm -rf api
85         mkdir api
86         PYTHONPATH=$(APIDOC_PYTHONPATH) DBUS_PYTHON_NO_DEPRECATED=1 $(PYTHON) -Wignore::DeprecationWarning $(EPYDOC) -o api --html \
87                 --docformat restructuredtext -v \
88                 `find dbus -name '*.py' | grep -v dbus_bindings \
89                         | sed -e 's#/__init__\.py##g' \
90                                 -e 's/\.py\>//g' -e 's#/#.#'g` \
91                 || { rm -rf api; exit 1; }
93 _maintainer-update-apidocs: api
94         rsync -rtvzPp --chmod=Dg+s,ug+rwX,o=rX api/ \
95         dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/doc/dbus-python/api/
96 else
97 _maintainer-update-apidocs:
98         @echo "*** Not updating the API docs on the website - install epydoc 3"
99         @echo "*** alpha (or newer) and configure with --enable-api-docs"
100 endif
102 .PHONY: cross-test-compile cross-test-server cross-test-client \
103         always-rebuild maintainer-update-website \
104         _maintainer-update-apidocs _maintainer-update-htmldocs