Debian Codegraph @

docsrc/Makefile

raw symbols SCIP
1 # Makefile for Sphinx documentation
2 #
3
4 # You can set these variables from the command line.
5 SPHINXOPTS = -n
6 SPHINXBUILD = sphinx-build
7 PAPER =
8 SOURCEDIR = .
9 BUILDDIR = build
10 PERL2RST = ../tools/perl2rst
11
12 # User-friendly check for sphinx-build
13 ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
14 $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
15 endif
16
17 # User-friendly check for perl2rst
18 ifeq ($(shell which $(PERL2RST) >/dev/null 2>&1; echo $$?), 1)
19 $(error The '$(PERL2RST)' command was not found. Make sure you have perl2rst installed, then set the PERL2RST environment variable to point to the full path of the '$(PERL2RST)' script. It relies on Perl module Pod::POM::View::Restructured)
20 endif
21
22 # Internal variables.
23 PAPEROPT_a4 = -D latex_paper_size=a4
24 PAPEROPT_letter = -D latex_paper_size=letter
25 ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCEDIR)
26 # the i18n builder cannot share the environment and doctrees with the others
27 I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCEDIR)
28
29 .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
30
31 help:
32 @echo "Please use \`make <target>' where <target> is one of"
33 @echo " html to make standalone HTML files"
34 @echo " dirhtml to make HTML files named index.html in directories"
35 @echo " singlehtml to make a single large HTML file"
36 @echo " pickle to make pickle files"
37 @echo " json to make JSON files"
38 @echo " htmlhelp to make HTML files and a HTML help project"
39 @echo " qthelp to make HTML files and a qthelp project"
40 @echo " devhelp to make HTML files and a Devhelp project"
41 @echo " epub to make an epub"
42 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
43 @echo " latexpdf to make LaTeX files and run them through pdflatex"
44 @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
45 @echo " text to make text files"
46 @echo " man to make manual pages"
47 @echo " texinfo to make Texinfo files"
48 @echo " info to make Texinfo files and run them through makeinfo"
49 @echo " gettext to make PO message catalogs"
50 @echo " changes to make an overview of all changed/added/deprecated items"
51 @echo " xml to make Docutils-native XML files"
52 @echo " pseudoxml to make pseudoxml-XML files for display purposes"
53 @echo " linkcheck to check all external links for integrity"
54 @echo " doctest to run all doctests embedded in the documentation (if enabled)"
55
56 clean:
57 rm -rf $(BUILDDIR)/*
58
59 init: ../lib/imapoptions ../perl/imap/IMAP/Shell.pm
60 @echo "creating imap/reference/manpages/systemcommands/cyradm.rst"
61 $(PERL2RST) cyradm < ../perl/imap/IMAP/Shell.pm > $(SOURCEDIR)/imap/reference/manpages/systemcommands/cyradm.rst
62 @echo "creating imap/reference/manpages/usercommands/sieveshell.rst"
63 $(PERL2RST) sieveshell < ../perl/sieve/scripts/sieveshell.pl > $(SOURCEDIR)/imap/reference/manpages/usercommands/sieveshell.rst
64 @echo "creating imap/reference/manpages/configs/imapd.conf.rst"
65 ../tools/config2rst ../lib/imapoptions > $(SOURCEDIR)/imap/reference/manpages/configs/imapd.conf.rst
66
67 html: init
68 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
69 @echo
70 @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
71
72 dirhtml: init
73 $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
74 @echo
75 @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
76
77 singlehtml: init
78 $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
79 @echo
80 @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
81
82 pickle: init
83 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
84 @echo
85 @echo "Build finished; now you can process the pickle files."
86
87 json: init
88 $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
89 @echo
90 @echo "Build finished; now you can process the JSON files."
91
92 htmlhelp: init
93 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
94 @echo
95 @echo "Build finished; now you can run HTML Help Workshop with the" \
96 ".hhp project file in $(BUILDDIR)/htmlhelp."
97
98 qthelp: init
99 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
100 @echo
101 @echo "Build finished; now you can run "qcollectiongenerator" with the" \
102 ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
103 @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/CyrusIMAP.qhcp"
104 @echo "To view the help file:"
105 @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/CyrusIMAP.qhc"
106
107 devhelp: init
108 $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
109 @echo
110 @echo "Build finished."
111 @echo "To view the help file:"
112 @echo "# mkdir -p $$HOME/.local/share/devhelp/CyrusIMAP"
113 @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/CyrusIMAP"
114 @echo "# devhelp"
115
116 epub: init
117 $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
118 @echo
119 @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
120
121 latex: init
122 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
123 @echo
124 @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
125 @echo "Run \`make' in that directory to run these through (pdf)latex" \
126 "(use \`make latexpdf' here to do that automatically)."
127
128 latexpdf: init
129 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
130 @echo "Running LaTeX files through pdflatex..."
131 $(MAKE) -C $(BUILDDIR)/latex all-pdf
132 @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
133
134 latexpdfja: init
135 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
136 @echo "Running LaTeX files through platex and dvipdfmx..."
137 $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
138 @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
139
140 text: init
141 $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
142 @echo
143 @echo "Build finished. The text files are in $(BUILDDIR)/text."
144
145 man: init
146 $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
147 @echo
148 @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
149
150 texinfo: init
151 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
152 @echo
153 @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
154 @echo "Run \`make' in that directory to run these through makeinfo" \
155 "(use \`make info' here to do that automatically)."
156
157 info: init
158 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
159 @echo "Running Texinfo files through makeinfo..."
160 make -C $(BUILDDIR)/texinfo info
161 @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
162
163 gettext: init
164 $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
165 @echo
166 @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
167
168 changes: init
169 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
170 @echo
171 @echo "The overview file is in $(BUILDDIR)/changes."
172
173 linkcheck: init
174 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
175 @echo
176 @echo "Link check complete; look for any errors in the above output " \
177 "or in $(BUILDDIR)/linkcheck/output.txt."
178
179 doctest: init
180 $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
181 @echo "Testing of doctests in the sources finished, look at the " \
182 "results in $(BUILDDIR)/doctest/output.txt."
183
184 xml: init
185 $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
186 @echo
187 @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
188
189 pseudoxml: init
190 $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
191 @echo
192 @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."