summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2018-05-02 11:08:09 +0100
committerSimon McVittie <smcv@collabora.com>2018-05-02 11:08:16 +0100
commit6c630a819f6504d48a3a205ab323b2d0458913e5 (patch)
treeea27051ef5ac3d8211892eed81b301f9d1fec34a /Makefile.am
parent2d7f71cc7002b5d968f83adffe09e2fc8fd63eb5 (diff)
Convert documentation from epydoc to Sphinx
Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am72
1 files changed, 46 insertions, 26 deletions
diff --git a/Makefile.am b/Makefile.am
index d0ed822..ae5f9de 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -416,36 +416,56 @@ _maintainer-update-htmldocs:
@echo "*** --enable-html-docs"
endif
-if ENABLE_API_DOCS
-all: api/index.html
-
-clean-local:
- rm -rf api
-
-APIDOC_PYTHONPATH = $(abs_top_srcdir):$(abs_top_builddir)/.libs
+sphinx_sources = \
+ doc/API_CHANGES.txt \
+ doc/conf.py \
+ doc/dbus.bus.rst \
+ doc/dbus.connection.rst \
+ doc/dbus.decorators.rst \
+ doc/dbus.exceptions.rst \
+ doc/dbus.gi_service.rst \
+ doc/dbus.glib.rst \
+ doc/dbus.gobject_service.rst \
+ doc/dbus.lowlevel.rst \
+ doc/dbus.mainloop.rst \
+ doc/dbus.proxies.rst \
+ doc/dbus.rst \
+ doc/dbus.server.rst \
+ doc/dbus.service.rst \
+ doc/dbus.types.rst \
+ doc/HACKING.txt \
+ doc/index.rst \
+ doc/news.rst \
+ doc/PY3PORT.txt \
+ doc/tutorial.txt \
+ NEWS \
+ README \
+ $(NULL)
+EXTRA_DIST += $(sphinx_sources)
-api api/index.html: $(nobase_python_PYTHON) \
- _dbus_bindings.la \
- _dbus_glib_bindings.la
- rm -rf api
- mkdir api
+if ENABLE_API_DOCS
+all: doc/_build/index.html
+
+doc/_build/index.html: $(nobase_python_PYTHON) \
+ _dbus_bindings.la \
+ _dbus_glib_bindings.la \
+ $(sphinx_sources) \
+ $(NULL)
+ rm -rf doc/_build
+ mkdir doc/_build
cd $(abs_top_srcdir) && \
- PYTHONPATH=$(APIDOC_PYTHONPATH) DBUS_PYTHON_NO_DEPRECATED=1 \
- $(PYTHON) -Wignore::DeprecationWarning \
- $(EPYDOC) -o $(abs_top_builddir)/api --html \
- --docformat restructuredtext -v \
- `find dbus -name '*.py' \
- | sed -e 's#/__init__\.py##g' \
- -e 's/\.py\>//g' -e 's#/#.#'g` \
- || { rm -rf api; exit 1; }
-
-_maintainer-update-apidocs: api
- rsync -rtvzPp --chmod=Dg+s,ug+rwX,o=rX api/ \
- dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/doc/dbus-python/api/
+ abs_top_srcdir='$(abs_top_srcdir)' \
+ abs_top_builddir='$(abs_top_builddir)' \
+ DBUS_PYTHON_NO_DEPRECATED=1 \
+ $(PYTHON) -m sphinx -b html $(abs_top_srcdir)/doc doc/_build
+
+_maintainer-update-apidocs: doc/_build/index.html
+ rsync -rtvzPp --chmod=Dg+s,ug+rwX,o=rX doc/_build/ \
+ dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/doc/dbus-python/
else
_maintainer-update-apidocs:
- @echo "*** Not updating the API docs on the website - install epydoc 3"
- @echo "*** alpha (or newer) and configure with --enable-api-docs"
+ @echo "*** Not updating the API docs on the website - install sphinx"
+ @echo "*** and configure with --enable-api-docs"
endif
check_c_sources = \