docs/Makefile
author Dmitriy Morozov <dmitriy@mrzv.org>
Thu, 25 Feb 2010 10:13:55 -0800 (2010-02-25)
changeset 104 307ed799be32
parent 100 78a1e77609e6
permissions -rw-r--r--
Added FloatType as a possible option type
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     1
# Makefile for Sphinx documentation
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     2
#
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     3
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     4
# You can set these variables from the command line.
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     5
SPHINXOPTS    =
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     6
SPHINXBUILD   = sphinx-build
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     7
PAPER         =
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     8
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     9
# Internal variables.
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    10
PAPEROPT_a4     = -D latex_paper_size=a4
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    11
PAPEROPT_letter = -D latex_paper_size=letter
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    12
ALLSPHINXOPTS   = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    13
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    14
.PHONY: all help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    15
100
78a1e77609e6 index.rst: fix link to overview
Alexander Solovyov <piranha@piranha.org.ua>
parents: 75
diff changeset
    16
all: html
33
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    17
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    18
help:
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    19
	@echo "Please use \`make <target>' where <target> is one of"
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    20
	@echo "  html      to make standalone HTML files"
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    21
	@echo "  dirhtml   to make HTML files named index.html in directories"
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    22
	@echo "  pickle    to make pickle files"
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    23
	@echo "  json      to make JSON files"
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    24
	@echo "  htmlhelp  to make HTML files and a HTML help project"
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    25
	@echo "  qthelp    to make HTML files and a qthelp project"
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    26
	@echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    27
	@echo "  changes   to make an overview of all changed/added/deprecated items"
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    28
	@echo "  linkcheck to check all external links for integrity"
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    29
	@echo "  doctest   to run all doctests embedded in the documentation (if enabled)"
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    30
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    31
clean:
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    32
	-rm -rf _build/*
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    33
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    34
html:
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    35
	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    36
	@echo
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    37
	@echo "Build finished. The HTML pages are in _build/html."
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    38
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    39
dirhtml:
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    40
	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) _build/dirhtml
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    41
	@echo
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    42
	@echo "Build finished. The HTML pages are in _build/dirhtml."
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    43
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    44
pickle:
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    45
	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    46
	@echo
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    47
	@echo "Build finished; now you can process the pickle files."
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    48
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    49
json:
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    50
	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) _build/json
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    51
	@echo
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    52
	@echo "Build finished; now you can process the JSON files."
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    53
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    54
htmlhelp:
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    55
	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    56
	@echo
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    57
	@echo "Build finished; now you can run HTML Help Workshop with the" \
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    58
	      ".hhp project file in _build/htmlhelp."
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    59
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    60
qthelp:
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    61
	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) _build/qthelp
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    62
	@echo
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    63
	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    64
	      ".qhcp project file in _build/qthelp, like this:"
75
2782b2406ba8 rename from finaloption to opster
Alexander Solovyov <piranha@piranha.org.ua>
parents: 33
diff changeset
    65
	@echo "# qcollectiongenerator _build/qthelp/Opster.qhcp"
33
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    66
	@echo "To view the help file:"
75
2782b2406ba8 rename from finaloption to opster
Alexander Solovyov <piranha@piranha.org.ua>
parents: 33
diff changeset
    67
	@echo "# assistant -collectionFile _build/qthelp/Opster.qhc"
33
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    68
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    69
latex:
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    70
	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    71
	@echo
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    72
	@echo "Build finished; the LaTeX files are in _build/latex."
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    73
	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    74
	      "run these through (pdf)latex."
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    75
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    76
changes:
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    77
	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    78
	@echo
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    79
	@echo "The overview file is in _build/changes."
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    80
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    81
linkcheck:
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    82
	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    83
	@echo
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    84
	@echo "Link check complete; look for any errors in the above output " \
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    85
	      "or in _build/linkcheck/output.txt."
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    86
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    87
doctest:
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    88
	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    89
	@echo "Testing of doctests in the sources finished, look at the " \
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    90
	      "results in _build/doctest/output.txt."
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    91
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    92
open:
e82b3f5c36d9 documentation
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    93
	open _build/html/index.html