amine@23: # Makefile for Sphinx documentation amine@23: # amine@23: amine@23: # You can set these variables from the command line. amine@23: SPHINXOPTS = amine@23: SPHINXBUILD = sphinx-build amine@23: PAPER = amine@23: BUILDDIR = _build amine@23: amine@23: # User-friendly check for sphinx-build amine@23: ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) amine@23: $(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/) amine@23: endif amine@23: amine@23: # Internal variables. amine@23: PAPEROPT_a4 = -D latex_paper_size=a4 amine@23: PAPEROPT_letter = -D latex_paper_size=letter amine@23: ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . amine@23: # the i18n builder cannot share the environment and doctrees with the others amine@23: I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . amine@23: amine@23: .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext amine@23: amine@23: help: amine@23: @echo "Please use \`make ' where is one of" amine@23: @echo " html to make standalone HTML files" amine@23: @echo " dirhtml to make HTML files named index.html in directories" amine@23: @echo " singlehtml to make a single large HTML file" amine@23: @echo " pickle to make pickle files" amine@23: @echo " json to make JSON files" amine@23: @echo " htmlhelp to make HTML files and a HTML help project" amine@23: @echo " qthelp to make HTML files and a qthelp project" amine@23: @echo " applehelp to make an Apple Help Book" amine@23: @echo " devhelp to make HTML files and a Devhelp project" amine@23: @echo " epub to make an epub" amine@23: @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" amine@23: @echo " latexpdf to make LaTeX files and run them through pdflatex" amine@23: @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" amine@23: @echo " text to make text files" amine@23: @echo " man to make manual pages" amine@23: @echo " texinfo to make Texinfo files" amine@23: @echo " info to make Texinfo files and run them through makeinfo" amine@23: @echo " gettext to make PO message catalogs" amine@23: @echo " changes to make an overview of all changed/added/deprecated items" amine@23: @echo " xml to make Docutils-native XML files" amine@23: @echo " pseudoxml to make pseudoxml-XML files for display purposes" amine@23: @echo " linkcheck to check all external links for integrity" amine@23: @echo " doctest to run all doctests embedded in the documentation (if enabled)" amine@23: @echo " coverage to run coverage check of the documentation (if enabled)" amine@23: amine@23: clean: amine@23: rm -rf $(BUILDDIR)/* amine@23: amine@23: html: amine@23: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html amine@23: @echo amine@23: @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." amine@23: amine@23: dirhtml: amine@23: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml amine@23: @echo amine@23: @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." amine@23: amine@23: singlehtml: amine@23: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml amine@23: @echo amine@23: @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." amine@23: amine@23: pickle: amine@23: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle amine@23: @echo amine@23: @echo "Build finished; now you can process the pickle files." amine@23: amine@23: json: amine@23: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json amine@23: @echo amine@23: @echo "Build finished; now you can process the JSON files." amine@23: amine@23: htmlhelp: amine@23: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp amine@23: @echo amine@23: @echo "Build finished; now you can run HTML Help Workshop with the" \ amine@23: ".hhp project file in $(BUILDDIR)/htmlhelp." amine@23: amine@23: qthelp: amine@23: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp amine@23: @echo amine@23: @echo "Build finished; now you can run "qcollectiongenerator" with the" \ amine@23: ".qhcp project file in $(BUILDDIR)/qthelp, like this:" amine@23: @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/auditok.qhcp" amine@23: @echo "To view the help file:" amine@23: @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/auditok.qhc" amine@23: amine@23: applehelp: amine@23: $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp amine@23: @echo amine@23: @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." amine@23: @echo "N.B. You won't be able to view it unless you put it in" \ amine@23: "~/Library/Documentation/Help or install it in your application" \ amine@23: "bundle." amine@23: amine@23: devhelp: amine@23: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp amine@23: @echo amine@23: @echo "Build finished." amine@23: @echo "To view the help file:" amine@23: @echo "# mkdir -p $$HOME/.local/share/devhelp/auditok" amine@23: @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/auditok" amine@23: @echo "# devhelp" amine@23: amine@23: epub: amine@23: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub amine@23: @echo amine@23: @echo "Build finished. The epub file is in $(BUILDDIR)/epub." amine@23: amine@23: latex: amine@23: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex amine@23: @echo amine@23: @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." amine@23: @echo "Run \`make' in that directory to run these through (pdf)latex" \ amine@23: "(use \`make latexpdf' here to do that automatically)." amine@23: amine@23: latexpdf: amine@23: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex amine@23: @echo "Running LaTeX files through pdflatex..." amine@23: $(MAKE) -C $(BUILDDIR)/latex all-pdf amine@23: @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." amine@23: amine@23: latexpdfja: amine@23: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex amine@23: @echo "Running LaTeX files through platex and dvipdfmx..." amine@23: $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja amine@23: @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." amine@23: amine@23: text: amine@23: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text amine@23: @echo amine@23: @echo "Build finished. The text files are in $(BUILDDIR)/text." amine@23: amine@23: man: amine@23: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man amine@23: @echo amine@23: @echo "Build finished. The manual pages are in $(BUILDDIR)/man." amine@23: amine@23: texinfo: amine@23: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo amine@23: @echo amine@23: @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." amine@23: @echo "Run \`make' in that directory to run these through makeinfo" \ amine@23: "(use \`make info' here to do that automatically)." amine@23: amine@23: info: amine@23: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo amine@23: @echo "Running Texinfo files through makeinfo..." amine@23: make -C $(BUILDDIR)/texinfo info amine@23: @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." amine@23: amine@23: gettext: amine@23: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale amine@23: @echo amine@23: @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." amine@23: amine@23: changes: amine@23: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes amine@23: @echo amine@23: @echo "The overview file is in $(BUILDDIR)/changes." amine@23: amine@23: linkcheck: amine@23: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck amine@23: @echo amine@23: @echo "Link check complete; look for any errors in the above output " \ amine@23: "or in $(BUILDDIR)/linkcheck/output.txt." amine@23: amine@23: doctest: amine@23: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest amine@23: @echo "Testing of doctests in the sources finished, look at the " \ amine@23: "results in $(BUILDDIR)/doctest/output.txt." amine@23: amine@23: coverage: amine@23: $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage amine@23: @echo "Testing of coverage in the sources finished, look at the " \ amine@23: "results in $(BUILDDIR)/coverage/python.txt." amine@23: amine@23: xml: amine@23: $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml amine@23: @echo amine@23: @echo "Build finished. The XML files are in $(BUILDDIR)/xml." amine@23: amine@23: pseudoxml: amine@23: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml amine@23: @echo amine@23: @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."