# Makefile for Sphinx documentation

# You can set these variables from the command line.
SPHINXOPTS    =
SPHINXBUILD   = sphinx-build
PAPER         =

# Internal variables.
PAPEROPT_a4     = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS   = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help clean html docs deploy

help:
	@echo "Please use \`make <target>' where <target> is one of"
	@echo "  clean     to clear all files generated by Sphinx"
	@echo "  html      to make standalone HTML files"
	@echo "  docs      to make standalone HTML files with removing all previously generated files"


clean:
	rm -rf build
	rm -rf examples modules

html:
	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
	@echo
	@echo "Build finished. The HTML pages are in build/html."

docs: clean html

deploy:
	./deploy.sh
	@echo
	@echo "New version of the docs deployed."
