Makefile.am 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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 libaria2.rst index.rst README.rst\
  15. technical-notes.rst _static/default2.css mkapiref.py
  16. if HAVE_SPHINXBUILD
  17. $(man_MANS): aria2c.rst
  18. $(MAKE) man
  19. else
  20. $(man_MANS):
  21. $(warning Building only stub man pages. Please install sphinx-build)
  22. if [ ! -d "$(@D)" ]; then mkdir -p "$(@D)"; fi;
  23. if [ ! -e "$@" ]; then touch "$@"; fi;
  24. endif
  25. # Autogenerated rules by sphinx-quickstart
  26. .PHONY: help docclean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
  27. help:
  28. @echo "Please use \`make <target>' where <target> is one of"
  29. @echo " html to make standalone HTML files"
  30. @echo " dirhtml to make HTML files named index.html in directories"
  31. @echo " singlehtml to make a single large HTML file"
  32. @echo " pickle to make pickle files"
  33. @echo " json to make JSON files"
  34. @echo " htmlhelp to make HTML files and a HTML help project"
  35. @echo " qthelp to make HTML files and a qthelp project"
  36. @echo " devhelp to make HTML files and a Devhelp project"
  37. @echo " epub to make an epub"
  38. @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
  39. @echo " latexpdf to make LaTeX files and run them through pdflatex"
  40. @echo " text to make text files"
  41. @echo " man to make manual pages"
  42. @echo " changes to make an overview of all changed/added/deprecated items"
  43. @echo " linkcheck to check all external links for integrity"
  44. @echo " doctest to run all doctests embedded in the documentation (if enabled)"
  45. libaria2api: $(top_builddir)/src/includes/aria2/aria2.h
  46. $(builddir)/mkapiref.py $^ > $@
  47. docclean:
  48. -rm libaria2api
  49. -rm -rf $(BUILDDIR)/*
  50. html: libaria2api
  51. $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
  52. @echo
  53. @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
  54. dirhtml:
  55. $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
  56. @echo
  57. @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
  58. singlehtml:
  59. $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
  60. @echo
  61. @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
  62. pickle:
  63. $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
  64. @echo
  65. @echo "Build finished; now you can process the pickle files."
  66. json:
  67. $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
  68. @echo
  69. @echo "Build finished; now you can process the JSON files."
  70. htmlhelp:
  71. $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
  72. @echo
  73. @echo "Build finished; now you can run HTML Help Workshop with the" \
  74. ".hhp project file in $(BUILDDIR)/htmlhelp."
  75. qthelp:
  76. $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
  77. @echo
  78. @echo "Build finished; now you can run "qcollectiongenerator" with the" \
  79. ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
  80. @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/aria2.qhcp"
  81. @echo "To view the help file:"
  82. @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/aria2.qhc"
  83. devhelp:
  84. $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
  85. @echo
  86. @echo "Build finished."
  87. @echo "To view the help file:"
  88. @echo "# mkdir -p $$HOME/.local/share/devhelp/aria2"
  89. @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/aria2"
  90. @echo "# devhelp"
  91. epub:
  92. $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
  93. @echo
  94. @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
  95. latex:
  96. $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
  97. @echo
  98. @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
  99. @echo "Run \`make' in that directory to run these through (pdf)latex" \
  100. "(use \`make latexpdf' here to do that automatically)."
  101. latexpdf:
  102. $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
  103. @echo "Running LaTeX files through pdflatex..."
  104. $(MAKE) -C $(BUILDDIR)/latex all-pdf
  105. @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
  106. text:
  107. $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
  108. @echo
  109. @echo "Build finished. The text files are in $(BUILDDIR)/text."
  110. man:
  111. $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
  112. @echo
  113. @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
  114. changes:
  115. $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
  116. @echo
  117. @echo "The overview file is in $(BUILDDIR)/changes."
  118. linkcheck:
  119. $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
  120. @echo
  121. @echo "Link check complete; look for any errors in the above output " \
  122. "or in $(BUILDDIR)/linkcheck/output.txt."
  123. doctest:
  124. $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
  125. @echo "Testing of doctests in the sources finished, look at the " \
  126. "results in $(BUILDDIR)/doctest/output.txt."