Makefile 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. # Licensed to the Apache Software Foundation (ASF) under one or more
  2. # contributor license agreements. See the NOTICE file distributed with
  3. # this work for additional information regarding copyright ownership.
  4. # The ASF licenses this file to You under the Apache License, Version 2.0
  5. # (the "License"); you may not use this file except in compliance with
  6. # the License. You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. # Makefile for Sphinx documentation
  16. #
  17. # You can set these variables from the command line.
  18. SPHINXOPTS =
  19. SPHINXBUILD = sphinx-build
  20. PAPER =
  21. BUILDDIR = _build
  22. # User-friendly check for sphinx-build
  23. ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
  24. $(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/)
  25. endif
  26. # Internal variables.
  27. PAPEROPT_a4 = -D latex_paper_size=a4
  28. PAPEROPT_letter = -D latex_paper_size=letter
  29. ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
  30. # the i18n builder cannot share the environment and doctrees with the others
  31. I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
  32. .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
  33. help:
  34. @echo "Please use \`make <target>' where <target> is one of"
  35. @echo " html to make standalone HTML files"
  36. @echo " dirhtml to make HTML files named index.html in directories"
  37. @echo " singlehtml to make a single large HTML file"
  38. @echo " pickle to make pickle files"
  39. @echo " json to make JSON files"
  40. @echo " htmlhelp to make HTML files and a HTML help project"
  41. @echo " qthelp to make HTML files and a qthelp project"
  42. @echo " applehelp to make an Apple Help Book"
  43. @echo " devhelp to make HTML files and a Devhelp project"
  44. @echo " epub to make an epub"
  45. @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
  46. @echo " latexpdf to make LaTeX files and run them through pdflatex"
  47. @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
  48. @echo " text to make text files"
  49. @echo " man to make manual pages"
  50. @echo " texinfo to make Texinfo files"
  51. @echo " info to make Texinfo files and run them through makeinfo"
  52. @echo " gettext to make PO message catalogs"
  53. @echo " changes to make an overview of all changed/added/deprecated items"
  54. @echo " xml to make Docutils-native XML files"
  55. @echo " pseudoxml to make pseudoxml-XML files for display purposes"
  56. @echo " linkcheck to check all external links for integrity"
  57. @echo " doctest to run all doctests embedded in the documentation (if enabled)"
  58. @echo " coverage to run coverage check of the documentation (if enabled)"
  59. clean:
  60. rm -rf $(BUILDDIR)/*
  61. html:
  62. $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
  63. @echo
  64. @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
  65. dirhtml:
  66. $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
  67. @echo
  68. @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
  69. singlehtml:
  70. $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
  71. @echo
  72. @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
  73. pickle:
  74. $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
  75. @echo
  76. @echo "Build finished; now you can process the pickle files."
  77. json:
  78. $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
  79. @echo
  80. @echo "Build finished; now you can process the JSON files."
  81. htmlhelp:
  82. $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
  83. @echo
  84. @echo "Build finished; now you can run HTML Help Workshop with the" \
  85. ".hhp project file in $(BUILDDIR)/htmlhelp."
  86. qthelp:
  87. $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
  88. @echo
  89. @echo "Build finished; now you can run "qcollectiongenerator" with the" \
  90. ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
  91. @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/phoenixdb.qhcp"
  92. @echo "To view the help file:"
  93. @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/phoenixdb.qhc"
  94. applehelp:
  95. $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
  96. @echo
  97. @echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
  98. @echo "N.B. You won't be able to view it unless you put it in" \
  99. "~/Library/Documentation/Help or install it in your application" \
  100. "bundle."
  101. devhelp:
  102. $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
  103. @echo
  104. @echo "Build finished."
  105. @echo "To view the help file:"
  106. @echo "# mkdir -p $$HOME/.local/share/devhelp/phoenixdb"
  107. @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/phoenixdb"
  108. @echo "# devhelp"
  109. epub:
  110. $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
  111. @echo
  112. @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
  113. latex:
  114. $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
  115. @echo
  116. @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
  117. @echo "Run \`make' in that directory to run these through (pdf)latex" \
  118. "(use \`make latexpdf' here to do that automatically)."
  119. latexpdf:
  120. $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
  121. @echo "Running LaTeX files through pdflatex..."
  122. $(MAKE) -C $(BUILDDIR)/latex all-pdf
  123. @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
  124. latexpdfja:
  125. $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
  126. @echo "Running LaTeX files through platex and dvipdfmx..."
  127. $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
  128. @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
  129. text:
  130. $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
  131. @echo
  132. @echo "Build finished. The text files are in $(BUILDDIR)/text."
  133. man:
  134. $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
  135. @echo
  136. @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
  137. texinfo:
  138. $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
  139. @echo
  140. @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
  141. @echo "Run \`make' in that directory to run these through makeinfo" \
  142. "(use \`make info' here to do that automatically)."
  143. info:
  144. $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
  145. @echo "Running Texinfo files through makeinfo..."
  146. make -C $(BUILDDIR)/texinfo info
  147. @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
  148. gettext:
  149. $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
  150. @echo
  151. @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
  152. changes:
  153. $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
  154. @echo
  155. @echo "The overview file is in $(BUILDDIR)/changes."
  156. linkcheck:
  157. $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
  158. @echo
  159. @echo "Link check complete; look for any errors in the above output " \
  160. "or in $(BUILDDIR)/linkcheck/output.txt."
  161. doctest:
  162. $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
  163. @echo "Testing of doctests in the sources finished, look at the " \
  164. "results in $(BUILDDIR)/doctest/output.txt."
  165. coverage:
  166. $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
  167. @echo "Testing of coverage in the sources finished, look at the " \
  168. "results in $(BUILDDIR)/coverage/python.txt."
  169. xml:
  170. $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
  171. @echo
  172. @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
  173. pseudoxml:
  174. $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
  175. @echo
  176. @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."