Makefile 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. BUILDDIR = build
  8. # Internal variables.
  9. PAPEROPT_a4 = -D latex_paper_size=a4
  10. PAPEROPT_letter = -D latex_paper_size=letter
  11. ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
  12. .PHONY: help clean html dirhtml pickle json epub htmlhelp qthelp latex changes linkcheck doctest
  13. help:
  14. @echo "Please use \`make <target>' where <target> is one of"
  15. @echo " html to make standalone HTML files"
  16. @echo " dirhtml to make HTML files named index.html in directories"
  17. @echo " pickle to make pickle files"
  18. @echo " json to make JSON files"
  19. @echo " epub to make ePub files (sphinx >= v1.2b2)"
  20. @echo " htmlhelp to make HTML files and a HTML help project"
  21. @echo " qthelp to make HTML files and a qthelp project"
  22. @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
  23. @echo " changes to make an overview of all changed/added/deprecated items"
  24. @echo " linkcheck to check all external links for integrity"
  25. @echo " doctest to run all doctests embedded in the documentation (if enabled)"
  26. clean:
  27. -rm -rf $(BUILDDIR)/*
  28. html:
  29. $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
  30. @echo
  31. @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
  32. dirhtml:
  33. $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
  34. @echo
  35. @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
  36. pickle:
  37. $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
  38. @echo
  39. @echo "Build finished; now you can process the pickle files."
  40. json:
  41. $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
  42. @echo
  43. @echo "Build finished; now you can process the JSON files."
  44. epub:
  45. $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
  46. @echo
  47. @echo "Build finished. The e-Pub pages are in $(BUILDDIR)/epub."
  48. htmlhelp:
  49. $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
  50. @echo
  51. @echo "Build finished; now you can run HTML Help Workshop with the" \
  52. ".hhp project file in $(BUILDDIR)/htmlhelp."
  53. qthelp:
  54. $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
  55. @echo
  56. @echo "Build finished; now you can run "qcollectiongenerator" with the" \
  57. ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
  58. @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/boto.qhcp"
  59. @echo "To view the help file:"
  60. @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/boto.qhc"
  61. latex:
  62. $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
  63. @echo
  64. @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
  65. @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
  66. "run these through (pdf)latex."
  67. changes:
  68. $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
  69. @echo
  70. @echo "The overview file is in $(BUILDDIR)/changes."
  71. linkcheck:
  72. $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
  73. @echo
  74. @echo "Link check complete; look for any errors in the above output " \
  75. "or in $(BUILDDIR)/linkcheck/output.txt."
  76. doctest:
  77. $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
  78. @echo "Testing of doctests in the sources finished, look at the " \
  79. "results in $(BUILDDIR)/doctest/output.txt."