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