Makefile 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. # Makefile for Sphinx documentation
  2. #
  3. # You can set these variables from the command line.
  4. PYTHON ?= python
  5. SPHINXOPTS =
  6. SPHINXBUILD = sphinx-build
  7. PAPER =
  8. BUILDDIR = build
  9. # Internal variables.
  10. PAPEROPT_a4 = -D latex_paper_size=a4
  11. PAPEROPT_letter = -D latex_paper_size=letter
  12. ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
  13. # the i18n builder cannot share the environment and doctrees with the others
  14. I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
  15. .PHONY: help clean html htmlview dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
  16. help:
  17. @echo "Please use \`make <target>' where <target> is one of"
  18. @echo " html to make standalone HTML files"
  19. @echo " htmlview to open the index page built by the html target in your browser"
  20. @echo " dirhtml to make HTML files named index.html in directories"
  21. @echo " singlehtml to make a single large HTML file"
  22. @echo " pickle to make pickle files"
  23. @echo " json to make JSON files"
  24. @echo " htmlhelp to make HTML files and a HTML help project"
  25. @echo " qthelp to make HTML files and a qthelp project"
  26. @echo " devhelp to make HTML files and a Devhelp project"
  27. @echo " epub to make an epub"
  28. @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
  29. @echo " latexpdf to make LaTeX files and run them through pdflatex"
  30. @echo " text to make text files"
  31. @echo " man to make manual pages"
  32. @echo " changes to make an overview of all changed/added/deprecated items"
  33. @echo " linkcheck to check all external links for integrity"
  34. @echo " doctest to run all doctests embedded in the documentation (if enabled)"
  35. @echo " texinfo to make Texinfo files"
  36. @echo " info to make Texinfo files and run them through makeinfo"
  37. @echo " gettext to make PO message catalogs"
  38. clean:
  39. -rm -rf $(BUILDDIR)/*
  40. html:
  41. $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
  42. @echo
  43. @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
  44. htmlview: html
  45. $(PYTHON) -c "import webbrowser; webbrowser.open('build/html/index.html')"
  46. dirhtml:
  47. $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
  48. @echo
  49. @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
  50. singlehtml:
  51. $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
  52. @echo
  53. @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
  54. pickle:
  55. $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
  56. @echo
  57. @echo "Build finished; now you can process the pickle files."
  58. json:
  59. $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
  60. @echo
  61. @echo "Build finished; now you can process the JSON files."
  62. htmlhelp:
  63. $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
  64. @echo
  65. @echo "Build finished; now you can run HTML Help Workshop with the" \
  66. ".hhp project file in $(BUILDDIR)/htmlhelp."
  67. qthelp:
  68. $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
  69. @echo
  70. @echo "Build finished; now you can run "qcollectiongenerator" with the" \
  71. ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
  72. @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/GNUMediaGoblin.qhcp"
  73. @echo "To view the help file:"
  74. @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/GNUMediaGoblin.qhc"
  75. devhelp:
  76. $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
  77. @echo
  78. @echo "Build finished."
  79. @echo "To view the help file:"
  80. @echo "# mkdir -p $$HOME/.local/share/devhelp/GNUMediaGoblin"
  81. @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/GNUMediaGoblin"
  82. @echo "# devhelp"
  83. epub:
  84. $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
  85. @echo
  86. @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
  87. latex:
  88. $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
  89. @echo
  90. @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
  91. @echo "Run \`make' in that directory to run these through (pdf)latex" \
  92. "(use \`make latexpdf' here to do that automatically)."
  93. latexpdf:
  94. $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
  95. @echo "Running LaTeX files through pdflatex..."
  96. make -C $(BUILDDIR)/latex all-pdf
  97. @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
  98. text:
  99. $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
  100. @echo
  101. @echo "Build finished. The text files are in $(BUILDDIR)/text."
  102. man:
  103. $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
  104. @echo
  105. @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
  106. texinfo:
  107. $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
  108. @echo
  109. @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
  110. @echo "Run \`make' in that directory to run these through makeinfo" \
  111. "(use \`make info' here to do that automatically)."
  112. info:
  113. $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
  114. @echo "Running Texinfo files through makeinfo..."
  115. make -C $(BUILDDIR)/texinfo info
  116. @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
  117. gettext:
  118. $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
  119. @echo
  120. @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
  121. changes:
  122. $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
  123. @echo
  124. @echo "The overview file is in $(BUILDDIR)/changes."
  125. linkcheck:
  126. $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
  127. @echo
  128. @echo "Link check complete; look for any errors in the above output " \
  129. "or in $(BUILDDIR)/linkcheck/output.txt."
  130. doctest:
  131. $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
  132. @echo "Testing of doctests in the sources finished, look at the " \
  133. "results in $(BUILDDIR)/doctest/output.txt."