jansson/doc/Makefile.am
Petri Lehtinen b76ee75aad doc: Convert CHANGES to reStructuredText and add it to HTML docs
CHANGES is preprocessed to convert json_*() function names to Sphinx
:cfunc: cross references. This is to keep CHANGES more readable in
both plain text and HTML.
2010-01-14 22:03:48 +02:00

29 lines
737 B
Makefile

EXTRA_DIST = \
conf.py apiref.rst gettingstarted.rst github_commits.c index.rst \
tutorial.rst ext/refcounting.py
SPHINXBUILD = sphinx-build
SPHINXOPTS = -d _build/doctrees -W
# Convert json_*() functions to :cfunc: cross references in
# ../CHANGES, and add a header from changes.rst.in
changes.rst: changes.rst.in ../CHANGES
set -e; \
cat changes.rst.in >$@; \
sed -r -e 's/``(json_[a-z_]+\(\))``/:cfunc:`\1`/g' ../CHANGES \
>>$@
html-local: changes.rst
$(SPHINXBUILD) -b html $(SPHINXOPTS) $(srcdir) _build/html
install-html-local: html
mkdir -p $(DESTDIR)$(htmldir)
cp -r _build/html $(DESTDIR)$(htmldir)
uninstall-local:
rm -rf $(DESTDIR)$(htmldir)
clean-local:
rm -rf _build
rm -f ext/refcounting.pyc changes.rst