Makefile 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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) .
  12. .PHONY: help clean html dirhtml pickle json 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 " pdf to make PDF document"
  17. @echo " dirhtml to make HTML files named index.html in directories"
  18. @echo " pickle to make pickle files"
  19. @echo " json to make JSON files"
  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. htmlhelp:
  45. $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
  46. @echo
  47. @echo "Build finished; now you can run HTML Help Workshop with the" \
  48. ".hhp project file in $(BUILDDIR)/htmlhelp."
  49. qthelp:
  50. $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
  51. @echo
  52. @echo "Build finished; now you can run "qcollectiongenerator" with the" \
  53. ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
  54. @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/dulwich.qhcp"
  55. @echo "To view the help file:"
  56. @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/dulwich.qhc"
  57. latex:
  58. $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
  59. @echo
  60. @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
  61. @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
  62. "run these through (pdf)latex."
  63. changes:
  64. $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
  65. @echo
  66. @echo "The overview file is in $(BUILDDIR)/changes."
  67. linkcheck:
  68. $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
  69. @echo
  70. @echo "Link check complete; look for any errors in the above output " \
  71. "or in $(BUILDDIR)/linkcheck/output.txt."
  72. doctest:
  73. $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
  74. @echo "Testing of doctests in the sources finished, look at the " \
  75. "results in $(BUILDDIR)/doctest/output.txt."
  76. pdf:
  77. $(SPHINXBUILD) -b pdf $(ALLSPHINXOPTS) $(BUILDDIR)/pdf
  78. @echo
  79. @echo "Build finished. The PDF files are in $(BUILDDIR)/pdf."