xref: /aosp_15_r20/external/coreboot/Documentation/Makefile.sphinx (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1*b9411a12SAndroid Build Coastguard Worker## SPDX-License-Identifier: GPL-2.0-only
2*b9411a12SAndroid Build Coastguard Worker# Minimal makefile for Sphinx documentation
3*b9411a12SAndroid Build Coastguard Worker#
4*b9411a12SAndroid Build Coastguard Worker
5*b9411a12SAndroid Build Coastguard Worker# You can set these variables from the command line, and also
6*b9411a12SAndroid Build Coastguard Worker# from the environment for the first two.
7*b9411a12SAndroid Build Coastguard WorkerSPHINXOPTS    ?=
8*b9411a12SAndroid Build Coastguard WorkerSPHINXBUILD   ?= sphinx-build
9*b9411a12SAndroid Build Coastguard WorkerSPHINXAUTOBUILD = sphinx-autobuild
10*b9411a12SAndroid Build Coastguard WorkerSOURCEDIR     = .
11*b9411a12SAndroid Build Coastguard WorkerBUILDDIR      = _build
12*b9411a12SAndroid Build Coastguard Worker
13*b9411a12SAndroid Build Coastguard Worker# Put it first so that "make" without argument is like "make help".
14*b9411a12SAndroid Build Coastguard Workerhelp:
15*b9411a12SAndroid Build Coastguard Worker	@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
16*b9411a12SAndroid Build Coastguard Worker
17*b9411a12SAndroid Build Coastguard Worker.PHONY: help Makefile.sphinx
18*b9411a12SAndroid Build Coastguard Worker
19*b9411a12SAndroid Build Coastguard Worker.PHONY: livehtml
20*b9411a12SAndroid Build Coastguard Workerlivehtml:
21*b9411a12SAndroid Build Coastguard Worker	@echo "Starting sphinx-autobuild. The HTML pages are in $(BUILDDIR)."
22*b9411a12SAndroid Build Coastguard Worker	@echo "Press Ctrl-C to stop."
23*b9411a12SAndroid Build Coastguard Worker	@echo
24*b9411a12SAndroid Build Coastguard Worker	$(SPHINXAUTOBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)
25*b9411a12SAndroid Build Coastguard Worker
26*b9411a12SAndroid Build Coastguard Worker# Catch-all target: route all unknown targets to Sphinx using the new
27*b9411a12SAndroid Build Coastguard Worker# "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
28*b9411a12SAndroid Build Coastguard Worker%: Makefile.sphinx
29*b9411a12SAndroid Build Coastguard Worker	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
30