blob: c663c29540f2837d52fa39337fbc5c0d0096f29f [file] [log] [blame]
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001# Minimal makefile for Sphinx documentation
2#
3
4# You can set these variables from the command line, and also
5# from the environment for the first two.
6SPHINXOPTS ?=
7SPHINXBUILD ?= sphinx-build
8SOURCEDIR = .
9BUILDDIR = _build
10DESTDIR = final
11
12# Put it first so that "make" without argument is like "make help".
13help:
14 @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
15
16.PHONY: help Makefile.sphinx clean publish
17
18publish: Makefile.sphinx html singlehtml
19 rm -rf $(BUILDDIR)/$(DESTDIR)/
20 mkdir -p $(BUILDDIR)/$(DESTDIR)/
21 cp -r $(BUILDDIR)/html/* $(BUILDDIR)/$(DESTDIR)/
22 cp $(BUILDDIR)/singlehtml/index.html $(BUILDDIR)/$(DESTDIR)/singleindex.html
23 sed -i -e 's@index.html#@singleindex.html#@g' $(BUILDDIR)/$(DESTDIR)/singleindex.html
24
25clean:
26 @rm -rf $(BUILDDIR)
27
28# Catch-all target: route all unknown targets to Sphinx using the new
29# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
30%: Makefile.sphinx
31 @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)