blob: c4984ece082fa84cbcb34fbb48cbe33d9f9b8f5d [file] [log] [blame]
Martin Rothbfdb4892022-10-28 22:25:02 -06001## SPDX-License-Identifier: GPL-2.0-only
Nicholas Chin35599f92023-02-21 19:41:06 -07002# Minimal makefile for Sphinx documentation
Jonathan Neuschäfer5e48c752018-04-19 16:23:56 +02003#
4
Nicholas Chin35599f92023-02-21 19:41:06 -07005# You can set these variables from the command line, and also
6# from the environment for the first two.
7SPHINXOPTS ?=
8SPHINXBUILD ?= sphinx-build
9SPHINXAUTOBUILD = sphinx-autobuild
10SOURCEDIR = .
11BUILDDIR = _build
Jonathan Neuschäfer5e48c752018-04-19 16:23:56 +020012
Nicholas Chin35599f92023-02-21 19:41:06 -070013# Put it first so that "make" without argument is like "make help".
Jonathan Neuschäfer5e48c752018-04-19 16:23:56 +020014help:
Nicholas Chin35599f92023-02-21 19:41:06 -070015 @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Jonathan Neuschäfer5e48c752018-04-19 16:23:56 +020016
Nicholas Chin35599f92023-02-21 19:41:06 -070017.PHONY: help Makefile.sphinx
Jonathan Neuschäfer5e48c752018-04-19 16:23:56 +020018
Tom Hiller651b11b2018-08-18 19:20:16 -040019.PHONY: livehtml
20livehtml:
Jonathan Neuschäfer806ad192018-10-10 14:22:51 +020021 @echo "Starting sphinx-autobuild. The HTML pages are in $(BUILDDIR)."
22 @echo "Press Ctrl-C to stop."
Tom Hiller651b11b2018-08-18 19:20:16 -040023 @echo
Jonathan Neuschäfer806ad192018-10-10 14:22:51 +020024 $(SPHINXAUTOBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)
Tom Hiller651b11b2018-08-18 19:20:16 -040025
Nicholas Chin35599f92023-02-21 19:41:06 -070026# Catch-all target: route all unknown targets to Sphinx using the new
27# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
28%: Makefile.sphinx
29 @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)