1 1.1.1.1.8.2 martin # Makefile for Sphinx documentation 2 1.1.1.1.8.2 martin # 3 1.1.1.1.8.2 martin 4 1.1.1.1.8.2 martin # You can set these variables from the command line. 5 1.1.1.1.8.2 martin SPHINXOPTS = 6 1.1.1.1.8.2 martin SPHINXBUILD = sphinx-build 7 1.1.1.1.8.2 martin SPHINXAUTOBUILD = sphinx-autobuild 8 1.1.1.1.8.2 martin PAPER = 9 1.1.1.1.8.2 martin BUILDDIR = build 10 1.1.1.1.8.2 martin SRCDIR = src 11 1.1.1.1.8.2 martin 12 1.1.1.1.8.2 martin # User-friendly check for sphinx-build 13 1.1.1.1.8.2 martin ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) 14 1.1.1.1.8.2 martin $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) 15 1.1.1.1.8.2 martin endif 16 1.1.1.1.8.2 martin 17 1.1.1.1.8.2 martin # Internal variables. 18 1.1.1.1.8.2 martin PAPEROPT_a4 = -D latex_paper_size=a4 19 1.1.1.1.8.2 martin PAPEROPT_letter = -D latex_paper_size=letter 20 1.1.1.1.8.2 martin ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SRCDIR) 21 1.1.1.1.8.2 martin # the i18n builder cannot share the environment and doctrees with the others 22 1.1.1.1.8.2 martin I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SRCDIR) 23 1.1.1.1.8.2 martin 24 1.1.1.1.8.2 martin .PHONY: help clean html livehtml dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext 25 1.1.1.1.8.2 martin 26 1.1.1.1.8.2 martin help: 27 1.1.1.1.8.2 martin @echo "Please use \`make <target>' where <target> is one of" 28 1.1.1.1.8.2 martin @echo " html to make standalone HTML files" 29 1.1.1.1.8.2 martin @echo " livehtml to make standalone HTML files and live reload them" 30 1.1.1.1.8.2 martin @echo " dirhtml to make HTML files named index.html in directories" 31 1.1.1.1.8.2 martin @echo " singlehtml to make a single large HTML file" 32 1.1.1.1.8.2 martin @echo " pickle to make pickle files" 33 1.1.1.1.8.2 martin @echo " json to make JSON files" 34 1.1.1.1.8.2 martin @echo " htmlhelp to make HTML files and a HTML help project" 35 1.1.1.1.8.2 martin @echo " qthelp to make HTML files and a qthelp project" 36 1.1.1.1.8.2 martin @echo " devhelp to make HTML files and a Devhelp project" 37 1.1.1.1.8.2 martin @echo " epub to make an epub" 38 1.1.1.1.8.2 martin @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 39 1.1.1.1.8.2 martin @echo " latexpdf to make LaTeX files and run them through pdflatex" 40 1.1.1.1.8.2 martin @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" 41 1.1.1.1.8.2 martin @echo " text to make text files" 42 1.1.1.1.8.2 martin @echo " man to make manual pages" 43 1.1.1.1.8.2 martin @echo " texinfo to make Texinfo files" 44 1.1.1.1.8.2 martin @echo " info to make Texinfo files and run them through makeinfo" 45 1.1.1.1.8.2 martin @echo " gettext to make PO message catalogs" 46 1.1.1.1.8.2 martin @echo " changes to make an overview of all changed/added/deprecated items" 47 1.1.1.1.8.2 martin @echo " xml to make Docutils-native XML files" 48 1.1.1.1.8.2 martin @echo " pseudoxml to make pseudoxml-XML files for display purposes" 49 1.1.1.1.8.2 martin @echo " linkcheck to check all external links for integrity" 50 1.1.1.1.8.2 martin @echo " doctest to run all doctests embedded in the documentation (if enabled)" 51 1.1.1.1.8.2 martin 52 1.1.1.1.8.2 martin clean: 53 1.1.1.1.8.2 martin rm -rf $(BUILDDIR)/* 54 1.1.1.1.8.2 martin 55 1.1.1.1.8.2 martin html: 56 1.1.1.1.8.2 martin $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 57 1.1.1.1.8.2 martin @echo 58 1.1.1.1.8.2 martin @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 59 1.1.1.1.8.2 martin 60 1.1.1.1.8.2 martin livehtml: html 61 1.1.1.1.8.2 martin $(SPHINXAUTOBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 62 1.1.1.1.8.2 martin 63 1.1.1.1.8.2 martin dirhtml: 64 1.1.1.1.8.2 martin $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 65 1.1.1.1.8.2 martin @echo 66 1.1.1.1.8.2 martin @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 67 1.1.1.1.8.2 martin 68 1.1.1.1.8.2 martin singlehtml: 69 1.1.1.1.8.2 martin $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 70 1.1.1.1.8.2 martin @echo 71 1.1.1.1.8.2 martin @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 72 1.1.1.1.8.2 martin 73 1.1.1.1.8.2 martin pickle: 74 1.1.1.1.8.2 martin $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 75 1.1.1.1.8.2 martin @echo 76 1.1.1.1.8.2 martin @echo "Build finished; now you can process the pickle files." 77 1.1.1.1.8.2 martin 78 1.1.1.1.8.2 martin json: 79 1.1.1.1.8.2 martin $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 80 1.1.1.1.8.2 martin @echo 81 1.1.1.1.8.2 martin @echo "Build finished; now you can process the JSON files." 82 1.1.1.1.8.2 martin 83 1.1.1.1.8.2 martin htmlhelp: 84 1.1.1.1.8.2 martin $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 85 1.1.1.1.8.2 martin @echo 86 1.1.1.1.8.2 martin @echo "Build finished; now you can run HTML Help Workshop with the" \ 87 1.1.1.1.8.2 martin ".hhp project file in $(BUILDDIR)/htmlhelp." 88 1.1.1.1.8.2 martin 89 1.1.1.1.8.2 martin qthelp: 90 1.1.1.1.8.2 martin $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 91 1.1.1.1.8.2 martin @echo 92 1.1.1.1.8.2 martin @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 93 1.1.1.1.8.2 martin ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 94 1.1.1.1.8.2 martin @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/libuv.qhcp" 95 1.1.1.1.8.2 martin @echo "To view the help file:" 96 1.1.1.1.8.2 martin @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/libuv.qhc" 97 1.1.1.1.8.2 martin 98 1.1.1.1.8.2 martin devhelp: 99 1.1.1.1.8.2 martin $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 100 1.1.1.1.8.2 martin @echo 101 1.1.1.1.8.2 martin @echo "Build finished." 102 1.1.1.1.8.2 martin @echo "To view the help file:" 103 1.1.1.1.8.2 martin @echo "# mkdir -p $$HOME/.local/share/devhelp/libuv" 104 1.1.1.1.8.2 martin @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/libuv" 105 1.1.1.1.8.2 martin @echo "# devhelp" 106 1.1.1.1.8.2 martin 107 1.1.1.1.8.2 martin epub: 108 1.1.1.1.8.2 martin $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 109 1.1.1.1.8.2 martin @echo 110 1.1.1.1.8.2 martin @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 111 1.1.1.1.8.2 martin 112 1.1.1.1.8.2 martin latex: 113 1.1.1.1.8.2 martin $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 114 1.1.1.1.8.2 martin @echo 115 1.1.1.1.8.2 martin @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 116 1.1.1.1.8.2 martin @echo "Run \`make' in that directory to run these through (pdf)latex" \ 117 1.1.1.1.8.2 martin "(use \`make latexpdf' here to do that automatically)." 118 1.1.1.1.8.2 martin 119 1.1.1.1.8.2 martin latexpdf: 120 1.1.1.1.8.2 martin $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 121 1.1.1.1.8.2 martin @echo "Running LaTeX files through pdflatex..." 122 1.1.1.1.8.2 martin $(MAKE) -C $(BUILDDIR)/latex all-pdf 123 1.1.1.1.8.2 martin @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 124 1.1.1.1.8.2 martin 125 1.1.1.1.8.2 martin latexpdfja: 126 1.1.1.1.8.2 martin $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 127 1.1.1.1.8.2 martin @echo "Running LaTeX files through platex and dvipdfmx..." 128 1.1.1.1.8.2 martin $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja 129 1.1.1.1.8.2 martin @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 130 1.1.1.1.8.2 martin 131 1.1.1.1.8.2 martin text: 132 1.1.1.1.8.2 martin $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 133 1.1.1.1.8.2 martin @echo 134 1.1.1.1.8.2 martin @echo "Build finished. The text files are in $(BUILDDIR)/text." 135 1.1.1.1.8.2 martin 136 1.1.1.1.8.2 martin man: 137 1.1.1.1.8.2 martin $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 138 1.1.1.1.8.2 martin @echo 139 1.1.1.1.8.2 martin @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 140 1.1.1.1.8.2 martin 141 1.1.1.1.8.2 martin texinfo: 142 1.1.1.1.8.2 martin $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 143 1.1.1.1.8.2 martin @echo 144 1.1.1.1.8.2 martin @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 145 1.1.1.1.8.2 martin @echo "Run \`make' in that directory to run these through makeinfo" \ 146 1.1.1.1.8.2 martin "(use \`make info' here to do that automatically)." 147 1.1.1.1.8.2 martin 148 1.1.1.1.8.2 martin info: 149 1.1.1.1.8.2 martin $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 150 1.1.1.1.8.2 martin @echo "Running Texinfo files through makeinfo..." 151 1.1.1.1.8.2 martin make -C $(BUILDDIR)/texinfo info 152 1.1.1.1.8.2 martin @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 153 1.1.1.1.8.2 martin 154 1.1.1.1.8.2 martin gettext: 155 1.1.1.1.8.2 martin $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 156 1.1.1.1.8.2 martin @echo 157 1.1.1.1.8.2 martin @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 158 1.1.1.1.8.2 martin 159 1.1.1.1.8.2 martin changes: 160 1.1.1.1.8.2 martin $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 161 1.1.1.1.8.2 martin @echo 162 1.1.1.1.8.2 martin @echo "The overview file is in $(BUILDDIR)/changes." 163 1.1.1.1.8.2 martin 164 1.1.1.1.8.2 martin linkcheck: 165 1.1.1.1.8.2 martin $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 166 1.1.1.1.8.2 martin @echo 167 1.1.1.1.8.2 martin @echo "Link check complete; look for any errors in the above output " \ 168 1.1.1.1.8.2 martin "or in $(BUILDDIR)/linkcheck/output.txt." 169 1.1.1.1.8.2 martin 170 1.1.1.1.8.2 martin doctest: 171 1.1.1.1.8.2 martin $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 172 1.1.1.1.8.2 martin @echo "Testing of doctests in the sources finished, look at the " \ 173 1.1.1.1.8.2 martin "results in $(BUILDDIR)/doctest/output.txt." 174 1.1.1.1.8.2 martin 175 1.1.1.1.8.2 martin xml: 176 1.1.1.1.8.2 martin $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml 177 1.1.1.1.8.2 martin @echo 178 1.1.1.1.8.2 martin @echo "Build finished. The XML files are in $(BUILDDIR)/xml." 179 1.1.1.1.8.2 martin 180 1.1.1.1.8.2 martin pseudoxml: 181 1.1.1.1.8.2 martin $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml 182 1.1.1.1.8.2 martin @echo 183 1.1.1.1.8.2 martin @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." 184