Makefile.am 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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 = $(top_srcdir)/doc/manual/en
  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. # Configurations for aria2.
  13. man_MANS = $(BUILDDIR)/man/aria2c.1
  14. HTML = $(BUILDDIR)/html
  15. EXTRA_DIST = aria2c.rst $(man_MANS) $(HTML)
  16. HTMLINSTALLDIR = $(DESTDIR)$(docdir)/manual/en
  17. # Copy $(BUILDDIR)/html recursively to the install dir. Since Automake
  18. # does not provide this feature, we do it ourselves.
  19. install-data-local: $(HTML)
  20. mkdir -p $(HTMLINSTALLDIR) && \
  21. cp -r $(BUILDDIR)/html $(HTMLINSTALLDIR) && \
  22. chmod -R u+w $(HTMLINSTALLDIR) && \
  23. rm -f $(HTMLINSTALLDIR)/html/.buildinfo
  24. uninstall-local:
  25. -rm -rf $(HTMLINSTALLDIR)
  26. dist-hook:
  27. -rm -f $(distdir)/$(BUILDDIR)/html/.buildinfo
  28. $(man_MANS): aria2c.rst
  29. $(MAKE) man
  30. $(HTML): aria2c.rst
  31. $(MAKE) html
  32. # Autogenerated rules by sphinx-quickstart
  33. .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
  34. help:
  35. @echo "Please use \`make <target>' where <target> is one of"
  36. @echo " html to make standalone HTML files"
  37. @echo " dirhtml to make HTML files named index.html in directories"
  38. @echo " singlehtml to make a single large HTML file"
  39. @echo " pickle to make pickle files"
  40. @echo " json to make JSON files"
  41. @echo " htmlhelp to make HTML files and a HTML help project"
  42. @echo " qthelp to make HTML files and a qthelp project"
  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 " text to make text files"
  48. @echo " man to make manual pages"
  49. @echo " changes to make an overview of all changed/added/deprecated items"
  50. @echo " linkcheck to check all external links for integrity"
  51. @echo " doctest to run all doctests embedded in the documentation (if enabled)"
  52. clean:
  53. -rm -rf $(BUILDDIR)/*
  54. html:
  55. $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
  56. @echo
  57. @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
  58. dirhtml:
  59. $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
  60. @echo
  61. @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
  62. singlehtml:
  63. $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
  64. @echo
  65. @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
  66. pickle:
  67. $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
  68. @echo
  69. @echo "Build finished; now you can process the pickle files."
  70. json:
  71. $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
  72. @echo
  73. @echo "Build finished; now you can process the JSON files."
  74. htmlhelp:
  75. $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
  76. @echo
  77. @echo "Build finished; now you can run HTML Help Workshop with the" \
  78. ".hhp project file in $(BUILDDIR)/htmlhelp."
  79. qthelp:
  80. $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
  81. @echo
  82. @echo "Build finished; now you can run "qcollectiongenerator" with the" \
  83. ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
  84. @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/aria2.qhcp"
  85. @echo "To view the help file:"
  86. @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/aria2.qhc"
  87. devhelp:
  88. $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
  89. @echo
  90. @echo "Build finished."
  91. @echo "To view the help file:"
  92. @echo "# mkdir -p $$HOME/.local/share/devhelp/aria2"
  93. @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/aria2"
  94. @echo "# devhelp"
  95. epub:
  96. $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
  97. @echo
  98. @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
  99. latex:
  100. $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
  101. @echo
  102. @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
  103. @echo "Run \`make' in that directory to run these through (pdf)latex" \
  104. "(use \`make latexpdf' here to do that automatically)."
  105. latexpdf:
  106. $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
  107. @echo "Running LaTeX files through pdflatex..."
  108. $(MAKE) -C $(BUILDDIR)/latex all-pdf
  109. @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
  110. text:
  111. $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
  112. @echo
  113. @echo "Build finished. The text files are in $(BUILDDIR)/text."
  114. man:
  115. $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
  116. @echo
  117. @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
  118. changes:
  119. $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
  120. @echo
  121. @echo "The overview file is in $(BUILDDIR)/changes."
  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. doctest:
  128. $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
  129. @echo "Testing of doctests in the sources finished, look at the " \
  130. "results in $(BUILDDIR)/doctest/output.txt."