Makefile.am 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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. # 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) -c . @srcdir@
  12. # Configurations for aria2.
  13. man_MANS = $(BUILDDIR)/man/aria2c.1
  14. EXTRA_DIST = $(man_MANS) aria2c.rst index.rst _static/default2.css mkapiref.py
  15. $(man_MANS): aria2c.rst
  16. $(MAKE) man
  17. # Autogenerated rules by sphinx-quickstart
  18. .PHONY: help docclean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
  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 " devhelp to make HTML files and a Devhelp project"
  29. @echo " epub to make an epub"
  30. @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
  31. @echo " latexpdf to make LaTeX files and run them through pdflatex"
  32. @echo " text to make text files"
  33. @echo " man to make manual pages"
  34. @echo " changes to make an overview of all changed/added/deprecated items"
  35. @echo " linkcheck to check all external links for integrity"
  36. @echo " doctest to run all doctests embedded in the documentation (if enabled)"
  37. libaria2api: $(top_builddir)/src/includes/aria2/aria2.h
  38. $(builddir)/mkapiref.py $^ > $@
  39. docclean:
  40. -rm libaria2api
  41. -rm -rf $(BUILDDIR)/*
  42. html: libaria2api
  43. $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
  44. @echo
  45. @echo "Build finished. The HTML pages are in $(BUILDDIR)/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/aria2.qhcp"
  73. @echo "To view the help file:"
  74. @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/aria2.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/aria2"
  81. @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/aria2"
  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. changes:
  107. $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
  108. @echo
  109. @echo "The overview file is in $(BUILDDIR)/changes."
  110. linkcheck:
  111. $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
  112. @echo
  113. @echo "Link check complete; look for any errors in the above output " \
  114. "or in $(BUILDDIR)/linkcheck/output.txt."
  115. doctest:
  116. $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
  117. @echo "Testing of doctests in the sources finished, look at the " \
  118. "results in $(BUILDDIR)/doctest/output.txt."
  119. clean-local: docclean