1*f4a2713aSLionel Sambuc# Makefile for Sphinx documentation 2*f4a2713aSLionel Sambuc# 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc# You can set these variables from the command line. 5*f4a2713aSLionel SambucSPHINXOPTS = 6*f4a2713aSLionel SambucSPHINXBUILD = sphinx-build 7*f4a2713aSLionel SambucPAPER = 8*f4a2713aSLionel SambucBUILDDIR = _build 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambuc# Internal variables. 11*f4a2713aSLionel SambucPAPEROPT_a4 = -D latex_paper_size=a4 12*f4a2713aSLionel SambucPAPEROPT_letter = -D latex_paper_size=letter 13*f4a2713aSLionel SambucALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 14*f4a2713aSLionel Sambuc# the i18n builder cannot share the environment and doctrees with the others 15*f4a2713aSLionel SambucI18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 16*f4a2713aSLionel Sambuc 17*f4a2713aSLionel Sambuc.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext 18*f4a2713aSLionel Sambuc 19*f4a2713aSLionel Sambucdefault: html 20*f4a2713aSLionel Sambuc 21*f4a2713aSLionel Sambuchelp: 22*f4a2713aSLionel Sambuc @echo "Please use \`make <target>' where <target> is one of" 23*f4a2713aSLionel Sambuc @echo " html to make standalone HTML files" 24*f4a2713aSLionel Sambuc @echo " dirhtml to make HTML files named index.html in directories" 25*f4a2713aSLionel Sambuc @echo " singlehtml to make a single large HTML file" 26*f4a2713aSLionel Sambuc @echo " pickle to make pickle files" 27*f4a2713aSLionel Sambuc @echo " json to make JSON files" 28*f4a2713aSLionel Sambuc @echo " htmlhelp to make HTML files and a HTML help project" 29*f4a2713aSLionel Sambuc @echo " qthelp to make HTML files and a qthelp project" 30*f4a2713aSLionel Sambuc @echo " devhelp to make HTML files and a Devhelp project" 31*f4a2713aSLionel Sambuc @echo " epub to make an epub" 32*f4a2713aSLionel Sambuc @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 33*f4a2713aSLionel Sambuc @echo " latexpdf to make LaTeX files and run them through pdflatex" 34*f4a2713aSLionel Sambuc @echo " text to make text files" 35*f4a2713aSLionel Sambuc @echo " man to make manual pages" 36*f4a2713aSLionel Sambuc @echo " texinfo to make Texinfo files" 37*f4a2713aSLionel Sambuc @echo " info to make Texinfo files and run them through makeinfo" 38*f4a2713aSLionel Sambuc @echo " gettext to make PO message catalogs" 39*f4a2713aSLionel Sambuc @echo " changes to make an overview of all changed/added/deprecated items" 40*f4a2713aSLionel Sambuc @echo " linkcheck to check all external links for integrity" 41*f4a2713aSLionel Sambuc @echo " doctest to run all doctests embedded in the documentation (if enabled)" 42*f4a2713aSLionel Sambuc 43*f4a2713aSLionel Sambucclean: 44*f4a2713aSLionel Sambuc -rm -rf $(BUILDDIR)/* 45*f4a2713aSLionel Sambuc 46*f4a2713aSLionel Sambuchtml: 47*f4a2713aSLionel Sambuc $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 48*f4a2713aSLionel Sambuc @echo 49*f4a2713aSLionel Sambuc @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 50*f4a2713aSLionel Sambuc 51*f4a2713aSLionel Sambucdirhtml: 52*f4a2713aSLionel Sambuc $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 53*f4a2713aSLionel Sambuc @echo 54*f4a2713aSLionel Sambuc @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 55*f4a2713aSLionel Sambuc 56*f4a2713aSLionel Sambucsinglehtml: 57*f4a2713aSLionel Sambuc $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 58*f4a2713aSLionel Sambuc @echo 59*f4a2713aSLionel Sambuc @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 60*f4a2713aSLionel Sambuc 61*f4a2713aSLionel Sambucpickle: 62*f4a2713aSLionel Sambuc $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 63*f4a2713aSLionel Sambuc @echo 64*f4a2713aSLionel Sambuc @echo "Build finished; now you can process the pickle files." 65*f4a2713aSLionel Sambuc 66*f4a2713aSLionel Sambucjson: 67*f4a2713aSLionel Sambuc $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 68*f4a2713aSLionel Sambuc @echo 69*f4a2713aSLionel Sambuc @echo "Build finished; now you can process the JSON files." 70*f4a2713aSLionel Sambuc 71*f4a2713aSLionel Sambuchtmlhelp: 72*f4a2713aSLionel Sambuc $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 73*f4a2713aSLionel Sambuc @echo 74*f4a2713aSLionel Sambuc @echo "Build finished; now you can run HTML Help Workshop with the" \ 75*f4a2713aSLionel Sambuc ".hhp project file in $(BUILDDIR)/htmlhelp." 76*f4a2713aSLionel Sambuc 77*f4a2713aSLionel Sambucqthelp: 78*f4a2713aSLionel Sambuc $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 79*f4a2713aSLionel Sambuc @echo 80*f4a2713aSLionel Sambuc @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 81*f4a2713aSLionel Sambuc ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 82*f4a2713aSLionel Sambuc @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/ClangStaticAnalyzer.qhcp" 83*f4a2713aSLionel Sambuc @echo "To view the help file:" 84*f4a2713aSLionel Sambuc @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ClangStaticAnalyzer.qhc" 85*f4a2713aSLionel Sambuc 86*f4a2713aSLionel Sambucdevhelp: 87*f4a2713aSLionel Sambuc $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 88*f4a2713aSLionel Sambuc @echo 89*f4a2713aSLionel Sambuc @echo "Build finished." 90*f4a2713aSLionel Sambuc @echo "To view the help file:" 91*f4a2713aSLionel Sambuc @echo "# mkdir -p $$HOME/.local/share/devhelp/ClangStaticAnalyzer" 92*f4a2713aSLionel Sambuc @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/ClangStaticAnalyzer" 93*f4a2713aSLionel Sambuc @echo "# devhelp" 94*f4a2713aSLionel Sambuc 95*f4a2713aSLionel Sambucepub: 96*f4a2713aSLionel Sambuc $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 97*f4a2713aSLionel Sambuc @echo 98*f4a2713aSLionel Sambuc @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 99*f4a2713aSLionel Sambuc 100*f4a2713aSLionel Sambuclatex: 101*f4a2713aSLionel Sambuc $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 102*f4a2713aSLionel Sambuc @echo 103*f4a2713aSLionel Sambuc @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 104*f4a2713aSLionel Sambuc @echo "Run \`make' in that directory to run these through (pdf)latex" \ 105*f4a2713aSLionel Sambuc "(use \`make latexpdf' here to do that automatically)." 106*f4a2713aSLionel Sambuc 107*f4a2713aSLionel Sambuclatexpdf: 108*f4a2713aSLionel Sambuc $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 109*f4a2713aSLionel Sambuc @echo "Running LaTeX files through pdflatex..." 110*f4a2713aSLionel Sambuc $(MAKE) -C $(BUILDDIR)/latex all-pdf 111*f4a2713aSLionel Sambuc @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 112*f4a2713aSLionel Sambuc 113*f4a2713aSLionel Sambuctext: 114*f4a2713aSLionel Sambuc $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 115*f4a2713aSLionel Sambuc @echo 116*f4a2713aSLionel Sambuc @echo "Build finished. The text files are in $(BUILDDIR)/text." 117*f4a2713aSLionel Sambuc 118*f4a2713aSLionel Sambucman: 119*f4a2713aSLionel Sambuc $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 120*f4a2713aSLionel Sambuc @echo 121*f4a2713aSLionel Sambuc @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 122*f4a2713aSLionel Sambuc 123*f4a2713aSLionel Sambuctexinfo: 124*f4a2713aSLionel Sambuc $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 125*f4a2713aSLionel Sambuc @echo 126*f4a2713aSLionel Sambuc @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 127*f4a2713aSLionel Sambuc @echo "Run \`make' in that directory to run these through makeinfo" \ 128*f4a2713aSLionel Sambuc "(use \`make info' here to do that automatically)." 129*f4a2713aSLionel Sambuc 130*f4a2713aSLionel Sambucinfo: 131*f4a2713aSLionel Sambuc $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 132*f4a2713aSLionel Sambuc @echo "Running Texinfo files through makeinfo..." 133*f4a2713aSLionel Sambuc make -C $(BUILDDIR)/texinfo info 134*f4a2713aSLionel Sambuc @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 135*f4a2713aSLionel Sambuc 136*f4a2713aSLionel Sambucgettext: 137*f4a2713aSLionel Sambuc $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 138*f4a2713aSLionel Sambuc @echo 139*f4a2713aSLionel Sambuc @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 140*f4a2713aSLionel Sambuc 141*f4a2713aSLionel Sambucchanges: 142*f4a2713aSLionel Sambuc $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 143*f4a2713aSLionel Sambuc @echo 144*f4a2713aSLionel Sambuc @echo "The overview file is in $(BUILDDIR)/changes." 145*f4a2713aSLionel Sambuc 146*f4a2713aSLionel Sambuclinkcheck: 147*f4a2713aSLionel Sambuc $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 148*f4a2713aSLionel Sambuc @echo 149*f4a2713aSLionel Sambuc @echo "Link check complete; look for any errors in the above output " \ 150*f4a2713aSLionel Sambuc "or in $(BUILDDIR)/linkcheck/output.txt." 151*f4a2713aSLionel Sambuc 152*f4a2713aSLionel Sambucdoctest: 153*f4a2713aSLionel Sambuc $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 154*f4a2713aSLionel Sambuc @echo "Testing of doctests in the sources finished, look at the " \ 155*f4a2713aSLionel Sambuc "results in $(BUILDDIR)/doctest/output.txt." 156