14754a72fSPatrick Sanan# Initially generated with sphinx-quickstart 24754a72fSPatrick Sanan 34754a72fSPatrick Sanan# You can set these variables from the command line, and also 44754a72fSPatrick Sanan# from the environment for the first two. 54754a72fSPatrick SananSPHINXOPTS ?= 64754a72fSPatrick SananSPHINXBUILD ?= sphinx-build 74754a72fSPatrick SananSOURCEDIR = . 84754a72fSPatrick SananBUILDDIR = _build 94754a72fSPatrick SananLINKCHECKDIR = _build/linkcheck 104754a72fSPatrick Sanan 114754a72fSPatrick Sanan# First so that "make" without arguments is like "make help". 124754a72fSPatrick Sananhelp: 134754a72fSPatrick Sanan @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) 144754a72fSPatrick Sanan 154754a72fSPatrick Sanan.PHONY: help makefile checklinks 164754a72fSPatrick Sanan 1788932633SBarry Smithchecklinks_rule: 184754a72fSPatrick Sanan @$(SPHINXBUILD) -b linkcheck "$(SOURCEDIR)" "$(LINKCHECKDIR)" $(SPHINXOPTS) 194754a72fSPatrick Sanan @echo 204754a72fSPatrick Sanan @echo "Check finished. Report is in $(LINKCHECKDIR)." 214754a72fSPatrick Sanan 2288932633SBarry Smithchecklinks: 2388932633SBarry Smith 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 2488932633SBarry Smith 254754a72fSPatrick Sananclean-classic-docs: 264754a72fSPatrick Sanan ./build_classic_docs.py --clean 274754a72fSPatrick Sanan 284754a72fSPatrick Sananclean: clean-classic-docs 294754a72fSPatrick Sanan 304754a72fSPatrick Sananimages: 314754a72fSPatrick Sanan git clone https://gitlab.com/petsc/images.git -b main-1 --depth=1 images 324754a72fSPatrick Sanan 334754a72fSPatrick Sananwebsite-deploy: images 34a019710eSSatish Balay $(SPHINXBUILD) -b dirhtml "$(SOURCEDIR)" "$(BUILDDIR)" -T -E -j auto $(SPHINXOPTS) 354754a72fSPatrick Sanan 36*66c9fbddSBarry Smith# use this rule to build the documentation on your machine when working on PETSc documentation 37997fbc66SBarry Smithsphinxhtml: 385a460d17SBarry Smith 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 39997fbc66SBarry Smith 404754a72fSPatrick Sanan# Catch-all target: route all unknown targets to Sphinx using the new 414754a72fSPatrick Sanan# "make mode" option. 424754a72fSPatrick Sanan%: makefile images 43a019710eSSatish Balay @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" -j auto $(SPHINXOPTS) 444754a72fSPatrick Sanan 45