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