Makefile 5.4 KB

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