Makefile 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  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. # User-friendly check for sphinx-build
  9. ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
  10. $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don\'t have Sphinx installed, grab it from http://sphinx-doc.org/)
  11. endif
  12. # Internal variables.
  13. PAPEROPT_a4 = -D latex_paper_size=a4
  14. PAPEROPT_letter = -D latex_paper_size=letter
  15. ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
  16. # the i18n builder cannot share the environment and doctrees with the others
  17. I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
  18. .PHONY: help
  19. help:
  20. @echo "Please use \`make <target>' where <target> is one of"
  21. @echo " html to make standalone HTML files"
  22. @echo " dirhtml to make HTML files named index.html in directories"
  23. @echo " singlehtml to make a single large HTML file"
  24. @echo " pickle to make pickle files"
  25. @echo " json to make JSON files"
  26. @echo " htmlhelp to make HTML files and a HTML help project"
  27. @echo " qthelp to make HTML files and a qthelp project"
  28. @echo " applehelp to make an Apple Help Book"
  29. @echo " devhelp to make HTML files and a Devhelp project"
  30. @echo " epub to make an epub"
  31. @echo " epub3 to make an epub3"
  32. @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
  33. @echo " latexpdf to make LaTeX files and run them through pdflatex"
  34. @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
  35. @echo " text to make text files"
  36. @echo " man to make manual pages"
  37. @echo " texinfo to make Texinfo files"
  38. @echo " info to make Texinfo files and run them through makeinfo"
  39. @echo " gettext to make PO message catalogs"
  40. @echo " changes to make an overview of all changed/added/deprecated items"
  41. @echo " xml to make Docutils-native XML files"
  42. @echo " pseudoxml to make pseudoxml-XML files for display purposes"
  43. @echo " linkcheck to check all external links for integrity"
  44. @echo " doctest to run all doctests embedded in the documentation (if enabled)"
  45. @echo " coverage to run coverage check of the documentation (if enabled)"
  46. @echo " apicheck to verify that all modules are present in autodoc"
  47. @echo " configcheck to verify that all modules are present in autodoc"
  48. .PHONY: clean
  49. clean:
  50. rm -rf $(BUILDDIR)/*
  51. .PHONY: html
  52. html:
  53. $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
  54. @echo
  55. @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
  56. .PHONY: dirhtml
  57. dirhtml:
  58. $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
  59. @echo
  60. @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
  61. .PHONY: singlehtml
  62. singlehtml:
  63. $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
  64. @echo
  65. @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
  66. .PHONY: pickle
  67. pickle:
  68. $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
  69. @echo
  70. @echo "Build finished; now you can process the pickle files."
  71. .PHONY: json
  72. json:
  73. $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
  74. @echo
  75. @echo "Build finished; now you can process the JSON files."
  76. .PHONY: htmlhelp
  77. htmlhelp:
  78. $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
  79. @echo
  80. @echo "Build finished; now you can run HTML Help Workshop with the" \
  81. ".hhp project file in $(BUILDDIR)/htmlhelp."
  82. .PHONY: qthelp
  83. qthelp:
  84. $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
  85. @echo
  86. @echo "Build finished; now you can run "qcollectiongenerator" with the" \
  87. ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
  88. @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/PROJ.qhcp"
  89. @echo "To view the help file:"
  90. @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PROJ.qhc"
  91. .PHONY: applehelp
  92. applehelp:
  93. $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
  94. @echo
  95. @echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
  96. @echo "N.B. You won't be able to view it unless you put it in" \
  97. "~/Library/Documentation/Help or install it in your application" \
  98. "bundle."
  99. .PHONY: devhelp
  100. devhelp:
  101. $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
  102. @echo
  103. @echo "Build finished."
  104. @echo "To view the help file:"
  105. @echo "# mkdir -p $$HOME/.local/share/devhelp/PROJ"
  106. @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/PROJ"
  107. @echo "# devhelp"
  108. .PHONY: epub
  109. epub:
  110. $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
  111. @echo
  112. @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
  113. .PHONY: epub3
  114. epub3:
  115. $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3
  116. @echo
  117. @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3."
  118. .PHONY: latex
  119. latex:
  120. $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
  121. @echo
  122. @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
  123. @echo "Run \`make' in that directory to run these through (pdf)latex" \
  124. "(use \`make latexpdf' here to do that automatically)."
  125. .PHONY: latexpdf
  126. latexpdf:
  127. $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
  128. @echo "Running LaTeX files through pdflatex..."
  129. $(MAKE) -C $(BUILDDIR)/latex all-pdf
  130. @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
  131. .PHONY: latexpdfja
  132. latexpdfja:
  133. $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
  134. @echo "Running LaTeX files through platex and dvipdfmx..."
  135. $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
  136. @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
  137. .PHONY: text
  138. text:
  139. $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
  140. @echo
  141. @echo "Build finished. The text files are in $(BUILDDIR)/text."
  142. .PHONY: man
  143. man:
  144. $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
  145. @echo
  146. @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
  147. .PHONY: texinfo
  148. texinfo:
  149. $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
  150. @echo
  151. @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
  152. @echo "Run \`make' in that directory to run these through makeinfo" \
  153. "(use \`make info' here to do that automatically)."
  154. .PHONY: info
  155. info:
  156. $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
  157. @echo "Running Texinfo files through makeinfo..."
  158. make -C $(BUILDDIR)/texinfo info
  159. @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
  160. .PHONY: gettext
  161. gettext:
  162. $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
  163. @echo
  164. @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
  165. .PHONY: changes
  166. changes:
  167. $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
  168. @echo
  169. @echo "The overview file is in $(BUILDDIR)/changes."
  170. .PHONY: linkcheck
  171. linkcheck:
  172. $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
  173. @echo
  174. @echo "Link check complete; look for any errors in the above output " \
  175. "or in $(BUILDDIR)/linkcheck/output.txt."
  176. .PHONY: doctest
  177. doctest:
  178. $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
  179. @echo "Testing of doctests in the sources finished, look at the " \
  180. "results in $(BUILDDIR)/doctest/output.txt."
  181. .PHONY: coverage
  182. coverage:
  183. $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
  184. @echo "Testing of coverage in the sources finished, look at the " \
  185. "results in $(BUILDDIR)/coverage/python.txt."
  186. .PHONY: apicheck
  187. apicheck:
  188. $(SPHINXBUILD) -b apicheck $(ALLSPHINXOPTS) $(BUILDDIR)/apicheck
  189. .PHONY: configcheck
  190. configcheck:
  191. $(SPHINXBUILD) -b configcheck $(ALLSPHINXOPTS) $(BUILDDIR)/configcheck
  192. .PHONY: xml
  193. xml:
  194. $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
  195. @echo
  196. @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
  197. .PHONY: pseudoxml
  198. pseudoxml:
  199. $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
  200. @echo
  201. @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."