From 79ce359531c2b25e6921ac929c0d2633071df348 Mon Sep 17 00:00:00 2001 From: Tarek Ismail Date: Wed, 2 Oct 2024 16:48:25 +0300 Subject: [PATCH] Build Mir and invoke spelling check on built docs --- doc/sphinx/Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/sphinx/Makefile b/doc/sphinx/Makefile index 30ae665589d..bd1b04b41fa 100644 --- a/doc/sphinx/Makefile +++ b/doc/sphinx/Makefile @@ -36,6 +36,11 @@ full-help: $(VENVDIR) @echo "\n\033[1;31mNOTE: This help texts shows unsupported targets!\033[0m" @echo "Run 'make help' to see supported targets." +build_mir: + cd ../../; \ + cmake -B .build_doc; \ + cmake --build .build_doc --target doc; + # Shouldn't assume that venv is available on Ubuntu by default; discussion here: # https://bugs.launchpad.net/ubuntu/+source/python3.4/+bug/1290847 $(SPHINXDIR)/requirements.txt: @@ -72,7 +77,7 @@ run: install # Doesn't depend on $(BUILDDIR) to rebuild properly at every run. html: install - . $(VENV); $(SPHINXBUILD) -b dirhtml "$(SOURCEDIR)" "$(BUILDDIR)" -w $(SPHINXDIR)/warnings.txt $(SPHINXOPTS) + . $(VENV); cd ../../.build_doc/doc/sphinx; $(SPHINXBUILD) -b dirhtml "$(SOURCEDIR)" "$(BUILDDIR)" -w $(SPHINXDIR)/warnings.txt $(SPHINXOPTS) epub: install . $(VENV); $(SPHINXBUILD) -b epub "$(SOURCEDIR)" "$(BUILDDIR)" -w $(SPHINXDIR)/warnings.txt $(SPHINXOPTS) @@ -90,8 +95,8 @@ clean-doc: git clean -fx "$(BUILDDIR)" rm -rf $(SPHINXDIR)/.doctrees -spelling: html - . $(VENV) ; python3 -m pyspelling -c $(SPHINXDIR)/spellingcheck.yaml -j $(shell nproc) +spelling: build_mir html + . $(VENV) ; cd ../../.build_doc/doc/sphinx/; python3 -m pyspelling -c $(SPHINXDIR)/spellingcheck.yaml -j $(shell nproc) linkcheck: install . $(VENV) ; $(SPHINXBUILD) -b linkcheck "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)