Statistics
| Branch: | Tag: | Revision:

root / docs / Makefile @ c71f38be

History | View | Annotate | Download (5.5 kB)

1 7b006adb Nikos Skalkotos
# Makefile for Sphinx documentation
2 7b006adb Nikos Skalkotos
#
3 7b006adb Nikos Skalkotos
4 7b006adb Nikos Skalkotos
# You can set these variables from the command line.
5 7b006adb Nikos Skalkotos
SPHINXOPTS    =
6 7b006adb Nikos Skalkotos
SPHINXBUILD   = sphinx-build
7 7b006adb Nikos Skalkotos
PAPER         =
8 7b006adb Nikos Skalkotos
BUILDDIR      = _build
9 7b006adb Nikos Skalkotos
10 7b006adb Nikos Skalkotos
# Internal variables.
11 7b006adb Nikos Skalkotos
PAPEROPT_a4     = -D latex_paper_size=a4
12 7b006adb Nikos Skalkotos
PAPEROPT_letter = -D latex_paper_size=letter
13 7b006adb Nikos Skalkotos
ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
14 7b006adb Nikos Skalkotos
# the i18n builder cannot share the environment and doctrees with the others
15 7b006adb Nikos Skalkotos
I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
16 7b006adb Nikos Skalkotos
17 7b006adb Nikos Skalkotos
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
18 7b006adb Nikos Skalkotos
19 7b006adb Nikos Skalkotos
help:
20 7b006adb Nikos Skalkotos
	@echo "Please use \`make <target>' where <target> is one of"
21 7b006adb Nikos Skalkotos
	@echo "  html       to make standalone HTML files"
22 7b006adb Nikos Skalkotos
	@echo "  dirhtml    to make HTML files named index.html in directories"
23 7b006adb Nikos Skalkotos
	@echo "  singlehtml to make a single large HTML file"
24 7b006adb Nikos Skalkotos
	@echo "  pickle     to make pickle files"
25 7b006adb Nikos Skalkotos
	@echo "  json       to make JSON files"
26 7b006adb Nikos Skalkotos
	@echo "  htmlhelp   to make HTML files and a HTML help project"
27 7b006adb Nikos Skalkotos
	@echo "  qthelp     to make HTML files and a qthelp project"
28 7b006adb Nikos Skalkotos
	@echo "  devhelp    to make HTML files and a Devhelp project"
29 7b006adb Nikos Skalkotos
	@echo "  epub       to make an epub"
30 7b006adb Nikos Skalkotos
	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
31 7b006adb Nikos Skalkotos
	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
32 7b006adb Nikos Skalkotos
	@echo "  text       to make text files"
33 7b006adb Nikos Skalkotos
	@echo "  man        to make manual pages"
34 7b006adb Nikos Skalkotos
	@echo "  texinfo    to make Texinfo files"
35 7b006adb Nikos Skalkotos
	@echo "  info       to make Texinfo files and run them through makeinfo"
36 7b006adb Nikos Skalkotos
	@echo "  gettext    to make PO message catalogs"
37 7b006adb Nikos Skalkotos
	@echo "  changes    to make an overview of all changed/added/deprecated items"
38 7b006adb Nikos Skalkotos
	@echo "  linkcheck  to check all external links for integrity"
39 7b006adb Nikos Skalkotos
	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
40 7b006adb Nikos Skalkotos
41 7b006adb Nikos Skalkotos
clean:
42 7b006adb Nikos Skalkotos
	-rm -rf $(BUILDDIR)/*
43 7b006adb Nikos Skalkotos
44 7b006adb Nikos Skalkotos
html:
45 7b006adb Nikos Skalkotos
	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
46 7b006adb Nikos Skalkotos
	@echo
47 7b006adb Nikos Skalkotos
	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
48 7b006adb Nikos Skalkotos
49 7b006adb Nikos Skalkotos
dirhtml:
50 7b006adb Nikos Skalkotos
	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
51 7b006adb Nikos Skalkotos
	@echo
52 7b006adb Nikos Skalkotos
	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
53 7b006adb Nikos Skalkotos
54 7b006adb Nikos Skalkotos
singlehtml:
55 7b006adb Nikos Skalkotos
	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
56 7b006adb Nikos Skalkotos
	@echo
57 7b006adb Nikos Skalkotos
	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
58 7b006adb Nikos Skalkotos
59 7b006adb Nikos Skalkotos
pickle:
60 7b006adb Nikos Skalkotos
	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
61 7b006adb Nikos Skalkotos
	@echo
62 7b006adb Nikos Skalkotos
	@echo "Build finished; now you can process the pickle files."
63 7b006adb Nikos Skalkotos
64 7b006adb Nikos Skalkotos
json:
65 7b006adb Nikos Skalkotos
	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
66 7b006adb Nikos Skalkotos
	@echo
67 7b006adb Nikos Skalkotos
	@echo "Build finished; now you can process the JSON files."
68 7b006adb Nikos Skalkotos
69 7b006adb Nikos Skalkotos
htmlhelp:
70 7b006adb Nikos Skalkotos
	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
71 7b006adb Nikos Skalkotos
	@echo
72 7b006adb Nikos Skalkotos
	@echo "Build finished; now you can run HTML Help Workshop with the" \
73 7b006adb Nikos Skalkotos
	      ".hhp project file in $(BUILDDIR)/htmlhelp."
74 7b006adb Nikos Skalkotos
75 7b006adb Nikos Skalkotos
qthelp:
76 7b006adb Nikos Skalkotos
	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
77 7b006adb Nikos Skalkotos
	@echo
78 7b006adb Nikos Skalkotos
	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
79 7b006adb Nikos Skalkotos
	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
80 7b006adb Nikos Skalkotos
	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/snf-image-creator.qhcp"
81 7b006adb Nikos Skalkotos
	@echo "To view the help file:"
82 7b006adb Nikos Skalkotos
	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/snf-image-creator.qhc"
83 7b006adb Nikos Skalkotos
84 7b006adb Nikos Skalkotos
devhelp:
85 7b006adb Nikos Skalkotos
	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
86 7b006adb Nikos Skalkotos
	@echo
87 7b006adb Nikos Skalkotos
	@echo "Build finished."
88 7b006adb Nikos Skalkotos
	@echo "To view the help file:"
89 7b006adb Nikos Skalkotos
	@echo "# mkdir -p $$HOME/.local/share/devhelp/snf-image-creator"
90 7b006adb Nikos Skalkotos
	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/snf-image-creator"
91 7b006adb Nikos Skalkotos
	@echo "# devhelp"
92 7b006adb Nikos Skalkotos
93 7b006adb Nikos Skalkotos
epub:
94 7b006adb Nikos Skalkotos
	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
95 7b006adb Nikos Skalkotos
	@echo
96 7b006adb Nikos Skalkotos
	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
97 7b006adb Nikos Skalkotos
98 7b006adb Nikos Skalkotos
latex:
99 7b006adb Nikos Skalkotos
	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
100 7b006adb Nikos Skalkotos
	@echo
101 7b006adb Nikos Skalkotos
	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
102 7b006adb Nikos Skalkotos
	@echo "Run \`make' in that directory to run these through (pdf)latex" \
103 7b006adb Nikos Skalkotos
	      "(use \`make latexpdf' here to do that automatically)."
104 7b006adb Nikos Skalkotos
105 7b006adb Nikos Skalkotos
latexpdf:
106 7b006adb Nikos Skalkotos
	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
107 7b006adb Nikos Skalkotos
	@echo "Running LaTeX files through pdflatex..."
108 7b006adb Nikos Skalkotos
	$(MAKE) -C $(BUILDDIR)/latex all-pdf
109 7b006adb Nikos Skalkotos
	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
110 7b006adb Nikos Skalkotos
111 7b006adb Nikos Skalkotos
text:
112 7b006adb Nikos Skalkotos
	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
113 7b006adb Nikos Skalkotos
	@echo
114 7b006adb Nikos Skalkotos
	@echo "Build finished. The text files are in $(BUILDDIR)/text."
115 7b006adb Nikos Skalkotos
116 7b006adb Nikos Skalkotos
man:
117 7b006adb Nikos Skalkotos
	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
118 7b006adb Nikos Skalkotos
	@echo
119 7b006adb Nikos Skalkotos
	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
120 7b006adb Nikos Skalkotos
121 7b006adb Nikos Skalkotos
texinfo:
122 7b006adb Nikos Skalkotos
	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
123 7b006adb Nikos Skalkotos
	@echo
124 7b006adb Nikos Skalkotos
	@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
125 7b006adb Nikos Skalkotos
	@echo "Run \`make' in that directory to run these through makeinfo" \
126 7b006adb Nikos Skalkotos
	      "(use \`make info' here to do that automatically)."
127 7b006adb Nikos Skalkotos
128 7b006adb Nikos Skalkotos
info:
129 7b006adb Nikos Skalkotos
	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
130 7b006adb Nikos Skalkotos
	@echo "Running Texinfo files through makeinfo..."
131 7b006adb Nikos Skalkotos
	make -C $(BUILDDIR)/texinfo info
132 7b006adb Nikos Skalkotos
	@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
133 7b006adb Nikos Skalkotos
134 7b006adb Nikos Skalkotos
gettext:
135 7b006adb Nikos Skalkotos
	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
136 7b006adb Nikos Skalkotos
	@echo
137 7b006adb Nikos Skalkotos
	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
138 7b006adb Nikos Skalkotos
139 7b006adb Nikos Skalkotos
changes:
140 7b006adb Nikos Skalkotos
	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
141 7b006adb Nikos Skalkotos
	@echo
142 7b006adb Nikos Skalkotos
	@echo "The overview file is in $(BUILDDIR)/changes."
143 7b006adb Nikos Skalkotos
144 7b006adb Nikos Skalkotos
linkcheck:
145 7b006adb Nikos Skalkotos
	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
146 7b006adb Nikos Skalkotos
	@echo
147 7b006adb Nikos Skalkotos
	@echo "Link check complete; look for any errors in the above output " \
148 7b006adb Nikos Skalkotos
	      "or in $(BUILDDIR)/linkcheck/output.txt."
149 7b006adb Nikos Skalkotos
150 7b006adb Nikos Skalkotos
doctest:
151 7b006adb Nikos Skalkotos
	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
152 7b006adb Nikos Skalkotos
	@echo "Testing of doctests in the sources finished, look at the " \
153 7b006adb Nikos Skalkotos
	      "results in $(BUILDDIR)/doctest/output.txt."