summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--documentation/Makefile23
-rw-r--r--documentation/README10
2 files changed, 21 insertions, 12 deletions
diff --git a/documentation/Makefile b/documentation/Makefile
index 189bd1dfac..0bd9db5eae 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 $(SOURCEDIR)/set_versions.py 61 $(SOURCEDIR)/set_versions.py
diff --git a/documentation/README b/documentation/README
index 8ac8d52367..8a47fd4a3f 100644
--- a/documentation/README
+++ b/documentation/README
@@ -150,7 +150,7 @@ directories:
150 $ make stylecheck VALEDOCS="<file1> <file2>" 150 $ make stylecheck VALEDOCS="<file1> <file2>"
151 $ make stylecheck VALEDOCS=<dir> 151 $ make stylecheck VALEDOCS=<dir>
152 152
153Link checking the Yocto Project documentation 153Lint checking the Yocto Project documentation
154============================================= 154=============================================
155 155
156To fix errors which are not reported by Sphinx itself, 156To fix errors which are not reported by Sphinx itself,
@@ -164,6 +164,14 @@ To run sphinx-lint:
164 164
165 $ make sphinx-lint 165 $ make sphinx-lint
166 166
167Lint checking the whole documentation might take some time and generate a
168lot of warnings/errors, thus one can run sphinx-lint on a subset of files
169or directories:
170
171 $ make sphinx-lint SPHINXLINTDOCS=<file>
172 $ make sphinx-lint SPHINXLINTDOCS="<file1> <file2>"
173 $ make sphinx-lint SPHINXLINTDOCS=<dir>
174
167Sphinx theme and CSS customization 175Sphinx theme and CSS customization
168================================== 176==================================
169 177