diff options
| author | Michael Opdenacker <michael.opdenacker@bootlin.com> | 2024-03-12 21:58:39 +0100 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2024-03-28 07:08:30 -1000 |
| commit | 4745719d0b7677759f5f7b69518d6d1ade2bda89 (patch) | |
| tree | 3d91aab5b2cb4d85e0650636a530fda1de534ae7 /documentation/Makefile | |
| parent | 9090e89240bb12daf539b470f0cfa00c0051451d (diff) | |
| download | poky-4745719d0b7677759f5f7b69518d6d1ade2bda89.tar.gz | |
manuals: add initial stylechecks with Vale
Use the "Vale" (https://vale.sh) tool to perform text style checks
Run "make stylecheck" to run the checks.
This just checks the text, not the Sphinx syntax style choices.
(From yocto-docs rev: 198efc906efbbaced2526cd1221fd16ab35996a1)
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Suggested-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'documentation/Makefile')
| -rw-r--r-- | documentation/Makefile | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/documentation/Makefile b/documentation/Makefile index 9fb6814c8f..804a7dd94c 100644 --- a/documentation/Makefile +++ b/documentation/Makefile | |||
| @@ -5,6 +5,9 @@ | |||
| 5 | # from the environment for the first two. | 5 | # from the environment for the first two. |
| 6 | SPHINXOPTS ?= -W --keep-going -j auto | 6 | SPHINXOPTS ?= -W --keep-going -j auto |
| 7 | SPHINXBUILD ?= sphinx-build | 7 | SPHINXBUILD ?= sphinx-build |
| 8 | # Release notes are excluded because they contain contributor names and commit messages which can't be modified | ||
| 9 | VALEOPTS ?= --no-wrap --glob '!migration-guides/release-notes-*.rst' | ||
| 10 | VALEDOCS ?= . | ||
| 8 | SOURCEDIR = . | 11 | SOURCEDIR = . |
| 9 | IMAGEDIRS = */svg | 12 | IMAGEDIRS = */svg |
| 10 | BUILDDIR = _build | 13 | BUILDDIR = _build |
| @@ -20,7 +23,7 @@ endif | |||
| 20 | help: | 23 | help: |
| 21 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | 24 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
| 22 | 25 | ||
| 23 | .PHONY: all help Makefile clean publish epub latexpdf | 26 | .PHONY: all help Makefile clean stylecheck publish epub latexpdf |
| 24 | 27 | ||
| 25 | publish: Makefile html singlehtml | 28 | publish: Makefile html singlehtml |
| 26 | rm -rf $(BUILDDIR)/$(DESTDIR)/ | 29 | rm -rf $(BUILDDIR)/$(DESTDIR)/ |
| @@ -46,6 +49,14 @@ PNGs := $(foreach dir, $(IMAGEDIRS), $(patsubst %.svg,%.png,$(wildcard $(SOURCED | |||
| 46 | clean: | 49 | clean: |
| 47 | @rm -rf $(BUILDDIR) $(PNGs) $(PDFs) poky.yaml sphinx-static/switchers.js | 50 | @rm -rf $(BUILDDIR) $(PNGs) $(PDFs) poky.yaml sphinx-static/switchers.js |
| 48 | 51 | ||
| 52 | stylecheck: | ||
| 53 | vale sync | ||
| 54 | vale $(VALEOPTS) $(VALEDOCS) | ||
| 55 | |||
| 56 | stylecheck: | ||
| 57 | vale sync | ||
| 58 | vale $(VALEOPTS) $(VALEDOCS) | ||
| 59 | |||
| 49 | epub: $(PNGs) | 60 | epub: $(PNGs) |
| 50 | $(SOURCEDIR)/set_versions.py | 61 | $(SOURCEDIR)/set_versions.py |
| 51 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | 62 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
