diff --git a/docs/Makefile b/docs/Makefile index baef078a14..2c005df479 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -17,7 +17,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) sou # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext check help: @echo "Please use \`make ' where is one of" @@ -40,12 +40,13 @@ help: @echo " changes to make an overview of all changed/added/deprecated items" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" + @echo " check to check HTML generation" clean: -rm -rf $(BUILDDIR) html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + $(SPHINXBUILD) -W --keep-going -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." @@ -154,3 +155,6 @@ doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." + +check: html clean + @echo "Testing of html in the sources finished." diff --git a/requirements-dev.txt b/requirements-dev.txt index 12a588712b..4f9ff9bad9 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -6,6 +6,7 @@ pyenchant==3.2.2 pylint==2.17.2 autopep8==1.6.0 black==22.3.0 +sphinx==5.3.0 coverage==5.5 diff --git a/selftests/doctest.sh b/selftests/doctest.sh new file mode 100755 index 0000000000..08a0ee57d4 --- /dev/null +++ b/selftests/doctest.sh @@ -0,0 +1,7 @@ +#!/bin/sh -e + +(cd "./docs" && make -k check) + +exit $? + +