notmuch/doc/Makefile.local
David Bremner df70fc4b4b doc: add target rst2man to build man pages using rst2man
Many people have docutils installed, but not sphinx. Allow these
people to build the man pages.
2014-03-09 10:41:09 -03:00

34 lines
826 B
Makefile

# -*- makefile -*-
dir := doc
# You can set these variables from the command line.
SPHINXOPTS := -q -c $(dir)
SPHINXBUILD = sphinx-build
DOCBUILDDIR := $(dir)/_build
prerst2man := python $(dir)/prerst2man.py
# Internal variables.
ALLSPHINXOPTS := -d $(DOCBUILDDIR)/doctrees $(SPHINXOPTS) $(dir)
.PHONY: sphinx-html sphinx-man sphinx-texinfo sphinx-info
.PHONY: rst2man
sphinx-html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(DOCBUILDDIR)/html
sphinx-man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(DOCBUILDDIR)/man
sphinx-texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(DOCBUILDDIR)/texinfo
sphinx-info: sphinx-texinfo
make -C $(DOCBUILDDIR)/texinfo info
# fallback target in case sphinx not installed
rst2man:
$(prerst2man) $(DOCBUILDDIR)/.. $(DOCBUILDDIR)/man
CLEAN := $(CLEAN) $(DOCBUILDDIR)