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