docs/Makefile
author Radek Brich <radek.brich@devl.cz>
Wed, 03 Sep 2014 21:56:20 +0200
changeset 113 6796adfdc7eb
parent 0 a35731b5e31a
permissions -rw-r--r--
Merge. Due to my schizophrenia, I've accidentally forked my own code. The other set of changes were found in another computer.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     1
# Makefile for Sphinx documentation
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     2
#
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     3
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     4
# You can set these variables from the command line.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     5
SPHINXOPTS    =
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     6
SPHINXBUILD   = sphinx-build
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     7
PAPER         =
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     8
BUILDDIR      = _build
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
     9
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    10
# Internal variables.
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    11
PAPEROPT_a4     = -D latex_paper_size=a4
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    12
PAPEROPT_letter = -D latex_paper_size=letter
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    13
ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    14
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    15
.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    16
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    17
help:
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    18
	@echo "Please use \`make <target>' where <target> is one of"
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    19
	@echo "  html      to make standalone HTML files"
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    20
	@echo "  dirhtml   to make HTML files named index.html in directories"
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    21
	@echo "  pickle    to make pickle files"
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    22
	@echo "  json      to make JSON files"
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    23
	@echo "  htmlhelp  to make HTML files and a HTML help project"
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    24
	@echo "  qthelp    to make HTML files and a qthelp project"
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    25
	@echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    26
	@echo "  changes   to make an overview of all changed/added/deprecated items"
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    27
	@echo "  linkcheck to check all external links for integrity"
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    28
	@echo "  doctest   to run all doctests embedded in the documentation (if enabled)"
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    29
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    30
clean:
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    31
	-rm -rf $(BUILDDIR)/*
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    32
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    33
html:
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    34
	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    35
	@echo
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    36
	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    37
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    38
dirhtml:
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    39
	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    40
	@echo
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    41
	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    42
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    43
pickle:
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    44
	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    45
	@echo
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    46
	@echo "Build finished; now you can process the pickle files."
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    47
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    48
json:
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    49
	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    50
	@echo
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    51
	@echo "Build finished; now you can process the JSON files."
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    52
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    53
htmlhelp:
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    54
	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    55
	@echo
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    56
	@echo "Build finished; now you can run HTML Help Workshop with the" \
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    57
	      ".hhp project file in $(BUILDDIR)/htmlhelp."
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    58
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    59
qthelp:
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    60
	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    61
	@echo
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    62
	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    63
	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    64
	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Tuikit.qhcp"
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    65
	@echo "To view the help file:"
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    66
	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Tuikit.qhc"
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    67
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    68
latex:
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    69
	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    70
	@echo
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    71
	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    72
	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    73
	      "run these through (pdf)latex."
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    74
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    75
changes:
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    76
	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    77
	@echo
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    78
	@echo "The overview file is in $(BUILDDIR)/changes."
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    79
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    80
linkcheck:
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    81
	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    82
	@echo
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    83
	@echo "Link check complete; look for any errors in the above output " \
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    84
	      "or in $(BUILDDIR)/linkcheck/output.txt."
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    85
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    86
doctest:
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    87
	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    88
	@echo "Testing of doctests in the sources finished, look at the " \
Radek Brich <radek.brich@devl.cz>
parents:
diff changeset
    89
	      "results in $(BUILDDIR)/doctest/output.txt."