Makefile 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. apidocs:
  29. sphinx-apidoc -feM -s txt -o api ../dulwich
  30. html: apidocs
  31. $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
  32. @echo
  33. @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
  34. dirhtml: apidocs
  35. $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
  36. @echo
  37. @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
  38. pickle: apidocs
  39. $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
  40. @echo
  41. @echo "Build finished; now you can process the pickle files."
  42. json: apidocs
  43. $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
  44. @echo
  45. @echo "Build finished; now you can process the JSON files."
  46. htmlhelp: apidocs
  47. $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
  48. @echo
  49. @echo "Build finished; now you can run HTML Help Workshop with the" \
  50. ".hhp project file in $(BUILDDIR)/htmlhelp."
  51. qthelp: apidocs
  52. $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
  53. @echo
  54. @echo "Build finished; now you can run "qcollectiongenerator" with the" \
  55. ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
  56. @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/dulwich.qhcp"
  57. @echo "To view the help file:"
  58. @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/dulwich.qhc"
  59. latex: apidocs
  60. $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
  61. @echo
  62. @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
  63. @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
  64. "run these through (pdf)latex."
  65. changes: apidocs
  66. $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
  67. @echo
  68. @echo "The overview file is in $(BUILDDIR)/changes."
  69. linkcheck:
  70. $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
  71. @echo
  72. @echo "Link check complete; look for any errors in the above output " \
  73. "or in $(BUILDDIR)/linkcheck/output.txt."
  74. doctest:
  75. $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
  76. @echo "Testing of doctests in the sources finished, look at the " \
  77. "results in $(BUILDDIR)/doctest/output.txt."
  78. pdf:
  79. $(SPHINXBUILD) -b pdf $(ALLSPHINXOPTS) $(BUILDDIR)/pdf
  80. @echo
  81. @echo "Build finished. The PDF files are in $(BUILDDIR)/pdf."