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