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