Makefile 2.9 KB

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