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