diff mbox series

[2/5] Makefile: add a checks rule

Message ID 20250729-variables-checks-v1-2-5ad6ca9b9386@bootlin.com
State New
Headers show
Series Add checks for glossaries correctness | expand

Commit Message

Antonin Godard July 29, 2025, 11:30 a.m. UTC
The checks rule can be run to perform some checks on the docs.
For now it only includes running the check-glossaries script.

This rule should only run basic checks or should not prevent the user
from building the docs in case of failure.

This rule can be used in the future to run additional checks on the
documentation.

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
 documentation/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/documentation/Makefile b/documentation/Makefile
index 65e29713d..5ba3d42fc 100644
--- a/documentation/Makefile
+++ b/documentation/Makefile
@@ -52,6 +52,9 @@  PNGs := $(foreach dir, $(IMAGEDIRS), $(patsubst %.svg,%.png,$(wildcard $(SOURCED
 clean:
 	@rm -rf $(BUILDDIR) $(PNGs) $(PDFs) poky.yaml sphinx-static/switchers.js releases.rst
 
+checks:
+	$(SOURCEDIR)/tools/check-glossaries --docs-dir $(SOURCEDIR)
+
 stylecheck:
 	vale sync
 	vale $(VALEOPTS) $(VALEDOCS)
@@ -74,6 +77,6 @@  all: html epub latexpdf
 
 # Catch-all target: route all unknown targets to Sphinx using the new
 # "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
-%:
+%: checks
 	$(SOURCEDIR)/set_versions.py
 	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)