summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2007-01-15 20:24:59 +0000
committerSimon McVittie <smcv@celebrin.pseudorandom.co.uk>2007-01-16 14:43:03 +0000
commit24d8be176996913853b01f0e3ed1d33082640dec (patch)
treefe679d1ff973f91475509d86ca08e238bf0f654c /Makefile.am
parenta9575bf47b9ba5bc02ad5280fe35652758c0d00e (diff)
Generate HTML docs from reStructuredText if rst2html is available
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am22
1 files changed, 22 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 0c25710..f2b4720 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,8 +1,12 @@
+docdir = $(datadir)/doc
+pkgdocdir = $(datadir)/doc/dbus-python
+
# === Miscellaneous ===
CLEANFILES =
EXTRA_DIST = API_CHANGES.txt dbus-python.pc.in HACKING.txt \
AUTHORS COPYING NEWS ChangeLog TODO \
+ doc/tutorial.txt.in \
examples/example-async-client.py \
examples/example-client.py \
examples/example-service.py \
@@ -117,6 +121,24 @@ ChangeLog: always-rebuild
fi; \
fi
+if ENABLE_DOCS
+TXT_RSTDOCS = doc/tutorial.txt API_CHANGES.txt HACKING.txt
+HTML_TXT_RSTDOCS = doc/tutorial.html API_CHANGES.html HACKING.html
+RSTDOCS = README NEWS TODO
+HTML_RSTDOCS = README.html NEWS.html TODO.html
+
+dist_pkgdoc_DATA = $(TXT_RSTDOCS) $(RSTDOCS)
+nodist_pkgdoc_DATA = $(HTML_TXT_RSTDOCS) $(HTML_RSTDOCS)
+
+RST2HTMLFLAGS = --generator --date --time --exit-status=2 \
+ --cloak-email-addresses --no-raw --no-file-insertion
+
+$(HTML_TXT_RSTDOCS) : %.html: %.txt
+ $(RST2HTML) $(RST2HTMLFLAGS) $< $@
+$(HTML_RSTDOCS) : %.html: %
+ $(RST2HTML) $(RST2HTMLFLAGS) $< $@
+endif
+
if ENABLE_API_DOCS
all: api/index.html