Davide Pesavento | 04af5f2 | 2020-06-21 22:02:47 -0400 | [diff] [blame] | 1 | # Minimal makefile for Sphinx documentation |
Alexander Afanasyev | 772662a | 2013-11-21 23:22:40 +0000 | [diff] [blame] | 2 | # |
| 3 | |
Davide Pesavento | 04af5f2 | 2020-06-21 22:02:47 -0400 | [diff] [blame] | 4 | # You can set these variables from the command line, and also |
| 5 | # from the environment for the first two. |
| 6 | SPHINXOPTS ?= |
| 7 | SPHINXBUILD ?= sphinx-build |
| 8 | SOURCEDIR = . |
Alexander Afanasyev | 772662a | 2013-11-21 23:22:40 +0000 | [diff] [blame] | 9 | BUILDDIR = _build |
| 10 | |
Davide Pesavento | 04af5f2 | 2020-06-21 22:02:47 -0400 | [diff] [blame] | 11 | # Put it first so that "make" without argument is like "make help". |
Alexander Afanasyev | 772662a | 2013-11-21 23:22:40 +0000 | [diff] [blame] | 12 | help: |
Davide Pesavento | 04af5f2 | 2020-06-21 22:02:47 -0400 | [diff] [blame] | 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
Alexander Afanasyev | 772662a | 2013-11-21 23:22:40 +0000 | [diff] [blame] | 14 | |
Davide Pesavento | 04af5f2 | 2020-06-21 22:02:47 -0400 | [diff] [blame] | 15 | .PHONY: help Makefile |
Alexander Afanasyev | 772662a | 2013-11-21 23:22:40 +0000 | [diff] [blame] | 16 | |
Davide Pesavento | 04af5f2 | 2020-06-21 22:02:47 -0400 | [diff] [blame] | 17 | # Catch-all target: route all unknown targets to Sphinx using the new |
| 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). |
| 19 | %: Makefile |
| 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |