summaryrefslogtreecommitdiffstats
path: root/documentation/Makefile
diff options
context:
space:
mode:
authorJulien Stephan <jstephan@baylibre.com>2024-11-04 16:59:13 +0100
committerSteve Sakoman <steve@sakoman.com>2024-11-11 06:19:19 -0800
commit12c0c4105864a23361083b978ad19cbef7c7b82e (patch)
treefb33983942fe8557e7670c66780f3d3963d17162 /documentation/Makefile
parent0aeee51c3c149f336e40d49faa442be1e413d038 (diff)
downloadpoky-12c0c4105864a23361083b978ad19cbef7c7b82e.tar.gz
documentation: Makefile: add SPHINXLINTDOCS to specify subset to sphinx-lint
make sphinx-lint runs sphinx-lint on the whole documentation which can be long and reports a lot or errors/warnings. Let's add a new SHPINXLINTDOCS variable to allow specifying a subset, just as VALEDOCS does. Keep variable assignment aligned and also use $(SOURCEDIR) by default for SPHINXLINTDOCS and VALEDOCS variables. Also update the README file and fix a typo in Link checking section title. (From yocto-docs rev: ae46746897361d4177f3c4284f46753e3aa8c3c3) Signed-off-by: Julien Stephan <jstephan@baylibre.com> Reviewed-by: Antonin Godard <antonin.godard@bootlin.com> Tested-by: Antonin Godard <antonin.godard@bootlin.com> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> (cherry picked from commit 3dfe7b5c746af31de74f67cf88214e5d52bdb65d) Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'documentation/Makefile')
-rw-r--r--documentation/Makefile23
1 files changed, 12 insertions, 11 deletions
diff --git a/documentation/Makefile b/documentation/Makefile
index 4e0af4bd30..580688d543 100644
--- a/documentation/Makefile
+++ b/documentation/Makefile
@@ -3,17 +3,18 @@
3 3
4# You can set these variables from the command line, and also 4# You can set these variables from the command line, and also
5# from the environment for the first two. 5# from the environment for the first two.
6SPHINXOPTS ?= -W --keep-going -j auto 6SPHINXOPTS ?= -W --keep-going -j auto
7SPHINXBUILD ?= sphinx-build 7SPHINXBUILD ?= sphinx-build
8# Release notes are excluded because they contain contributor names and commit messages which can't be modified 8# Release notes are excluded because they contain contributor names and commit messages which can't be modified
9VALEOPTS ?= --no-wrap --glob '!migration-guides/release-notes-*.rst' 9VALEOPTS ?= --no-wrap --glob '!migration-guides/release-notes-*.rst'
10VALEDOCS ?= . 10SOURCEDIR = .
11SOURCEDIR = . 11VALEDOCS ?= $(SOURCEDIR)
12IMAGEDIRS = */svg 12SPHINXLINTDOCS ?= $(SOURCEDIR)
13BUILDDIR = _build 13IMAGEDIRS = */svg
14DESTDIR = final 14BUILDDIR = _build
15SVG2PNG = inkscape 15DESTDIR = final
16SVG2PDF = inkscape 16SVG2PNG = inkscape
17SVG2PDF = inkscape
17 18
18ifeq ($(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else echo 0; fi),0) 19ifeq ($(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else echo 0; fi),0)
19$(error "The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed") 20$(error "The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed")
@@ -54,7 +55,7 @@ stylecheck:
54 vale $(VALEOPTS) $(VALEDOCS) 55 vale $(VALEOPTS) $(VALEDOCS)
55 56
56sphinx-lint: 57sphinx-lint:
57 sphinx-lint $(SOURCEDIR) 58 sphinx-lint $(SPHINXLINTDOCS)
58 59
59epub: $(PNGs) 60epub: $(PNGs)
60 @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 61 @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)