Makefile 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # Makefile for Sphinx documentation
  2. #
  3. # You can set these variables from the command line.
  4. SPHINXOPTS =
  5. SPHINXBUILD = sphinx-build
  6. PAPER =
  7. # Internal variables.
  8. PAPEROPT_a4 = -D latex_paper_size=a4
  9. PAPEROPT_letter = -D latex_paper_size=letter
  10. ALLSPHINXOPTS = -d .build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
  11. .PHONY: help clean html web htmlhelp latex changes linkcheck
  12. help:
  13. @echo "Please use \`make <target>' where <target> is one of"
  14. @echo " html to make standalone HTML files"
  15. @echo " web to make files usable by Sphinx.web"
  16. @echo " htmlhelp to make HTML files and a HTML help project"
  17. @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
  18. @echo " changes to make an overview over all changed/added/deprecated items"
  19. @echo " linkcheck to check all external links for integrity"
  20. clean:
  21. -rm -rf .build/*
  22. html:
  23. mkdir -p .build/html .build/doctrees
  24. $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) .build/html
  25. @echo
  26. @echo "Build finished. The HTML pages are in .build/html."
  27. web:
  28. mkdir -p .build/web .build/doctrees
  29. $(SPHINXBUILD) -b web $(ALLSPHINXOPTS) .build/web
  30. @echo
  31. @echo "Build finished; now you can run"
  32. @echo " python -m sphinx.web .build/web"
  33. @echo "to start the server."
  34. htmlhelp:
  35. mkdir -p .build/htmlhelp .build/doctrees
  36. $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) .build/htmlhelp
  37. @echo
  38. @echo "Build finished; now you can run HTML Help Workshop with the" \
  39. ".hhp project file in .build/htmlhelp."
  40. latex:
  41. mkdir -p .build/latex .build/doctrees
  42. $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) .build/latex
  43. @echo
  44. @echo "Build finished; the LaTeX files are in .build/latex."
  45. @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
  46. "run these through (pdf)latex."
  47. changes:
  48. mkdir -p .build/changes .build/doctrees
  49. $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) .build/changes
  50. @echo
  51. @echo "The overview file is in .build/changes."
  52. linkcheck:
  53. mkdir -p .build/linkcheck .build/doctrees
  54. $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) .build/linkcheck
  55. @echo
  56. @echo "Link check complete; look for any errors in the above output " \
  57. "or in .build/linkcheck/output.txt."