1# Initially generated with sphinx-quickstart 2 3# You can set these variables from the command line, and also 4# from the environment for the first two. 5SPHINXOPTS ?= 6SPHINXBUILD ?= sphinx-build 7SOURCEDIR = . 8BUILDDIR = _build 9LINKCHECKDIR = _build/linkcheck 10 11# First so that "make" without arguments is like "make help". 12help: 13 @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) 14 15.PHONY: help makefile checklinks 16 17checklinks_rule: 18 @$(SPHINXBUILD) -b linkcheck "$(SOURCEDIR)" "$(LINKCHECKDIR)" $(SPHINXOPTS) 19 @echo 20 @echo "Check finished. Report is in $(LINKCHECKDIR)." 21 22checklinks: 23 cd .. ; python3 -m venv petsc-doc-env ; source petsc-doc-env/bin/activate ; python3 -m pip install -r doc/requirements.txt ; cd doc ; make checklinks_rule; deactivate 24 25clean-classic-docs: 26 ./build_classic_docs.py --clean 27 28clean: clean-classic-docs 29 30images: 31 git clone https://gitlab.com/petsc/images.git -b main-1 --depth=1 images 32 33website-deploy: images 34 $(SPHINXBUILD) -b dirhtml "$(SOURCEDIR)" "$(BUILDDIR)" -T -E -j auto $(SPHINXOPTS) 35 36# use this rule to build the documentation on your machine when working on PETSc documentation 37sphinxhtml: 38 cd .. ; python3 -m venv petsc-doc-env ; source petsc-doc-env/bin/activate ; python3 -m pip install -r doc/requirements.txt ; cd doc ; ${RM} -rf _build* docs/manualpages/singlindex.md docs/manualpages/*/*.md; make SPHINXOPTS="-T -E -W --keep-going -j 4" html; deactivate 39 40# Catch-all target: route all unknown targets to Sphinx using the new 41# "make mode" option. 42%: makefile images 43 @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" -j auto $(SPHINXOPTS) 44 45