Use MIT/X11 license for code owned by Collabora and Red Hat only, as per Havoc's...
[dbus-python-phuang.git] / Makefile.am
blobb35ace583958d9603d5b6679a85bc9874c342c35
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 SUBDIRS = _dbus_bindings _dbus_glib_bindings dbus examples m4 test tools
9 CLEANFILES =
10 EXTRA_DIST = \
11         dbus-python.pc.in \
12         AUTHORS \
13         COPYING \
14         ChangeLog \
15         COPYING.GPL-2 \
16         COPYING.AFL-2.1
17 # miss out the gconf examples for now - they don't work
19 pkgconfigdir = $(libdir)/pkgconfig
20 pkgconfig_DATA = dbus-python.pc
22 dbusincludedir = $(includedir)/dbus-1.0/dbus
23 dbusinclude_HEADERS = include/dbus-python.h
25 python_PYTHON = dbus_bindings.py
27 # === Tests ===
29 cross-test-compile: all
30 cross-test-server:
31         @$(MAKE) -C test cross-test-server
32 cross-test-client:
33         @$(MAKE) -C test cross-test-client
35 # === Documentation ===
37 dist-hook:
38         chmod u+w $(distdir)/ChangeLog
39         if test -d $(top_srcdir)/.git; then \
40                 if git-log --stat > $(distdir)/ChangeLog; then \
41                         : ; \
42                 else \
43                         git-log > $(distdir)/ChangeLog; \
44                 fi; \
45         fi
47 TXT_RSTDOCS = doc/tutorial.txt doc/API_CHANGES.txt doc/HACKING.txt
48 RSTDOCS = README NEWS TODO
49 dist_doc_DATA = $(TXT_RSTDOCS) $(RSTDOCS)
51 maintainer-update-website: _maintainer-update-apidocs \
52         _maintainer-update-htmldocs
54 if ENABLE_DOCS
55 _maintainer-update-htmldocs: $(HTML_TXT_RSTDOCS) $(HTML_RSTDOCS)
56         rsync -rtvzPp --chmod=Dg+s,ug+rwX,o=rX doc \
57         $(RSTDOCS) $(HTML_RSTDOCS) \
58         dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/doc/dbus-python/
60 HTML_TXT_RSTDOCS = doc/tutorial.html doc/API_CHANGES.html doc/HACKING.html
61 HTML_RSTDOCS = README.html NEWS.html TODO.html
62 nodist_doc_DATA = $(HTML_TXT_RSTDOCS) $(HTML_RSTDOCS)
64 CLEANFILES += $(nodist_doc_DATA)
66 $(HTML_TXT_RSTDOCS) : %.html: %.txt
67         $(INSTALL) -d doc
68         $(RST2HTML) $(RST2HTMLFLAGS) $< $@
69 $(HTML_RSTDOCS) : %.html: %
70         $(RST2HTML) $(RST2HTMLFLAGS) $< $@
71 else
72 _maintainer-update-htmldocs:
73         @echo "*** Not updating the HTML docs on the website - install rst2html"
74         @echo "*** from http://docutils.sourceforge.net/ and configure with "
75         @echo "*** --enable-html-docs"
76 endif
78 if ENABLE_API_DOCS
79 all: api/index.html
81 clean-local:
82         rm -rf api
84 dbus/.doc-needs-rebuild-stamp:
85         $(MAKE) -C dbus
86 _dbus_bindings/_dbus_bindings.la:
87         $(MAKE) -C _dbus_bindings
88 _dbus_glib_bindings/_dbus_glib_bindings.la:
89         $(MAKE) -C _dbus_glib_bindings
91 APIDOC_PYTHONPATH = $(abs_top_srcdir):$(abs_top_builddir)/_dbus_bindings/.libs:$(abs_top_builddir)/_dbus_glib_bindings/.libs
93 api api/index.html: $(python_PYTHON) dbus/.doc-needs-rebuild-stamp \
94                     _dbus_bindings/_dbus_bindings.la \
95                     _dbus_glib_bindings/_dbus_glib_bindings.la
96         rm -rf api
97         mkdir api
98         PYTHONPATH=$(APIDOC_PYTHONPATH) DBUS_PYTHON_NO_DEPRECATED=1 $(PYTHON) -Wignore::DeprecationWarning $(EPYDOC) -o api --html \
99                 --docformat restructuredtext -v \
100                 `find dbus -name '*.py' | grep -v dbus_bindings \
101                         | sed -e 's#/__init__\.py##g' \
102                                 -e 's/\.py\>//g' -e 's#/#.#'g` \
103                 || { rm -rf api; exit 1; }
105 _maintainer-update-apidocs: api
106         rsync -rtvzPp --chmod=Dg+s,ug+rwX,o=rX api/ \
107         dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/doc/dbus-python/api/
108 else
109 _maintainer-update-apidocs:
110         @echo "*** Not updating the API docs on the website - install epydoc 3"
111         @echo "*** alpha (or newer) and configure with --enable-api-docs"
112 endif
114 .PHONY: cross-test-compile cross-test-server cross-test-client \
115         always-rebuild maintainer-update-website \
116         _maintainer-update-apidocs _maintainer-update-htmldocs