Imported Upstream version 1.0.0
[platform/upstream/nghttp2.git] / doc / Makefile.am
1 # nghttp2 - HTTP/2 C Library
2
3 # Copyright (c) 2012 Tatsuhiro Tsujikawa
4
5 # Permission is hereby granted, free of charge, to any person obtaining
6 # a copy of this software and associated documentation files (the
7 # "Software"), to deal in the Software without restriction, including
8 # without limitation the rights to use, copy, modify, merge, publish,
9 # distribute, sublicense, and/or sell copies of the Software, and to
10 # permit persons to whom the Software is furnished to do so, subject to
11 # the following conditions:
12
13 # The above copyright notice and this permission notice shall be
14 # included in all copies or substantial portions of the Software.
15
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
24 man_MANS = nghttp.1 nghttpd.1 nghttpx.1 h2load.1
25
26 APIDOCS= \
27         apiref.rst \
28         macros.rst \
29         enums.rst \
30         types.rst \
31         nghttp2_check_header_name.rst \
32         nghttp2_check_header_value.rst \
33         nghttp2_hd_deflate_bound.rst \
34         nghttp2_hd_deflate_change_table_size.rst \
35         nghttp2_hd_deflate_del.rst \
36         nghttp2_hd_deflate_hd.rst \
37         nghttp2_hd_deflate_new.rst \
38         nghttp2_hd_deflate_new2.rst \
39         nghttp2_hd_inflate_change_table_size.rst \
40         nghttp2_hd_inflate_del.rst \
41         nghttp2_hd_inflate_end_headers.rst \
42         nghttp2_hd_inflate_hd.rst \
43         nghttp2_hd_inflate_new.rst \
44         nghttp2_hd_inflate_new2.rst \
45         nghttp2_is_fatal.rst \
46         nghttp2_nv_compare_name.rst \
47         nghttp2_option_del.rst \
48         nghttp2_option_new.rst \
49         nghttp2_option_set_no_auto_window_update.rst \
50         nghttp2_option_set_no_http_messaging.rst \
51         nghttp2_option_set_peer_max_concurrent_streams.rst \
52         nghttp2_option_set_no_recv_client_magic.rst \
53         nghttp2_pack_settings_payload.rst \
54         nghttp2_priority_spec_check_default.rst \
55         nghttp2_priority_spec_default_init.rst \
56         nghttp2_priority_spec_init.rst \
57         nghttp2_select_next_protocol.rst \
58         nghttp2_session_callbacks_del.rst \
59         nghttp2_session_callbacks_new.rst \
60         nghttp2_session_callbacks_set_before_frame_send_callback.rst \
61         nghttp2_session_callbacks_set_data_source_read_length_callback.rst \
62         nghttp2_session_callbacks_set_on_begin_frame_callback.rst \
63         nghttp2_session_callbacks_set_on_begin_headers_callback.rst \
64         nghttp2_session_callbacks_set_on_data_chunk_recv_callback.rst \
65         nghttp2_session_callbacks_set_on_frame_not_send_callback.rst \
66         nghttp2_session_callbacks_set_on_frame_recv_callback.rst \
67         nghttp2_session_callbacks_set_on_frame_send_callback.rst \
68         nghttp2_session_callbacks_set_on_header_callback.rst \
69         nghttp2_session_callbacks_set_on_invalid_frame_recv_callback.rst \
70         nghttp2_session_callbacks_set_on_stream_close_callback.rst \
71         nghttp2_session_callbacks_set_recv_callback.rst \
72         nghttp2_session_callbacks_set_select_padding_callback.rst \
73         nghttp2_session_callbacks_set_send_callback.rst \
74         nghttp2_session_callbacks_set_send_data_callback.rst \
75         nghttp2_session_client_new.rst \
76         nghttp2_session_client_new2.rst \
77         nghttp2_session_client_new3.rst \
78         nghttp2_session_consume.rst \
79         nghttp2_session_consume_connection.rst \
80         nghttp2_session_consume_stream.rst \
81         nghttp2_session_del.rst \
82         nghttp2_session_get_effective_local_window_size.rst \
83         nghttp2_session_get_effective_recv_data_length.rst \
84         nghttp2_session_get_last_proc_stream_id.rst \
85         nghttp2_session_get_next_stream_id.rst \
86         nghttp2_session_get_outbound_queue_size.rst \
87         nghttp2_session_get_remote_settings.rst \
88         nghttp2_session_get_remote_window_size.rst \
89         nghttp2_session_get_stream_effective_local_window_size.rst \
90         nghttp2_session_get_stream_effective_recv_data_length.rst \
91         nghttp2_session_get_stream_local_close.rst \
92         nghttp2_session_get_stream_remote_close.rst \
93         nghttp2_session_get_stream_remote_window_size.rst \
94         nghttp2_session_get_stream_user_data.rst \
95         nghttp2_session_mem_recv.rst \
96         nghttp2_session_mem_send.rst \
97         nghttp2_session_recv.rst \
98         nghttp2_session_resume_data.rst \
99         nghttp2_session_send.rst \
100         nghttp2_session_server_new.rst \
101         nghttp2_session_server_new2.rst \
102         nghttp2_session_server_new3.rst \
103         nghttp2_session_set_next_stream_id.rst \
104         nghttp2_session_set_stream_user_data.rst \
105         nghttp2_session_terminate_session.rst \
106         nghttp2_session_terminate_session2.rst \
107         nghttp2_session_upgrade.rst \
108         nghttp2_session_want_read.rst \
109         nghttp2_session_want_write.rst \
110         nghttp2_strerror.rst \
111         nghttp2_submit_data.rst \
112         nghttp2_submit_goaway.rst \
113         nghttp2_submit_headers.rst \
114         nghttp2_submit_ping.rst \
115         nghttp2_submit_priority.rst \
116         nghttp2_submit_push_promise.rst \
117         nghttp2_submit_request.rst \
118         nghttp2_submit_response.rst \
119         nghttp2_submit_rst_stream.rst \
120         nghttp2_submit_settings.rst \
121         nghttp2_submit_shutdown_notice.rst \
122         nghttp2_submit_trailer.rst \
123         nghttp2_submit_window_update.rst \
124         nghttp2_version.rst
125
126 EXTRA_DIST = \
127         mkapiref.py \
128         README.rst \
129         programmers-guide.rst \
130         $(APIDOCS) \
131         nghttp.1.rst \
132         nghttpd.1.rst \
133         nghttpx.1.rst \
134         h2load.1.rst \
135         sources/index.rst \
136         sources/tutorial-client.rst \
137         sources/tutorial-server.rst \
138         sources/tutorial-hpack.rst \
139         sources/nghttpx-howto.rst \
140         sources/h2load-howto.rst \
141         sources/libnghttp2_asio.rst \
142         sources/python-apiref.rst \
143         sources/building-android-binary.rst \
144         sources/contribute.rst \
145         _themes/sphinx_rtd_theme/__init__.py \
146         _themes/sphinx_rtd_theme/breadcrumbs.html \
147         _themes/sphinx_rtd_theme/footer.html \
148         _themes/sphinx_rtd_theme/layout.html \
149         _themes/sphinx_rtd_theme/layout_old.html \
150         _themes/sphinx_rtd_theme/search.html \
151         _themes/sphinx_rtd_theme/searchbox.html \
152         _themes/sphinx_rtd_theme/static/css/badge_only.css \
153         _themes/sphinx_rtd_theme/static/css/theme.css \
154         _themes/sphinx_rtd_theme/static/fonts/FontAwesome.otf \
155         _themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.eot \
156         _themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.svg \
157         _themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.ttf \
158         _themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff \
159         _themes/sphinx_rtd_theme/static/js/theme.js \
160         _themes/sphinx_rtd_theme/theme.conf \
161         _themes/sphinx_rtd_theme/versions.html \
162         $(man_MANS) \
163         bash_completion/nghttp \
164         bash_completion/nghttpd \
165         bash_completion/nghttpx \
166         bash_completion/h2load
167
168 # Makefile for Sphinx documentation
169 #
170
171 # You can set these variables from the command line.
172 SPHINXOPTS    =
173 SPHINXBUILD   = sphinx-build
174 PAPER         =
175 BUILDDIR      = manual
176
177 # Internal variables.
178 PAPEROPT_a4     = -D latex_paper_size=a4
179 PAPEROPT_letter = -D latex_paper_size=letter
180 ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
181
182 .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
183
184 help:
185         @echo "Please use \`make <target>' where <target> is one of"
186         @echo "  html       to make standalone HTML files"
187         @echo "  dirhtml    to make HTML files named index.html in directories"
188         @echo "  singlehtml to make a single large HTML file"
189         @echo "  pickle     to make pickle files"
190         @echo "  json       to make JSON files"
191         @echo "  htmlhelp   to make HTML files and a HTML help project"
192         @echo "  qthelp     to make HTML files and a qthelp project"
193         @echo "  devhelp    to make HTML files and a Devhelp project"
194         @echo "  epub       to make an epub"
195         @echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
196         @echo "  latexpdf   to make LaTeX files and run them through pdflatex"
197         @echo "  text       to make text files"
198         @echo "  man        to make manual pages"
199         @echo "  changes    to make an overview of all changed/added/deprecated items"
200         @echo "  linkcheck  to check all external links for integrity"
201         @echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
202
203 apiref.rst macros.rst enums.rst types.rst: \
204         $(top_builddir)/lib/includes/nghttp2/nghttp2ver.h \
205         $(top_builddir)/lib/includes/nghttp2/nghttp2.h
206         $(PYTHON) $(top_srcdir)/doc/mkapiref.py \
207         $@ macros.rst enums.rst types.rst . $^
208
209 # Inspired by
210 # http://www.gnu.org/savannah-checkouts/gnu/automake/manual/html_node/Multiple-Outputs.html
211 apidoc.stamp: $(top_builddir)/lib/includes/nghttp2/nghttp2ver.h \
212         $(top_builddir)/lib/includes/nghttp2/nghttp2.h
213         @rm -f apidoc.tmp
214         @touch apidoc.tmp
215         $(PYTHON) $(top_srcdir)/doc/mkapiref.py \
216         $@ macros.rst enums.rst types.rst . $^
217         @mv -f apidoc.tmp $@
218 $(APIDOC): apidoc.stamp
219 ## Recover from the removal of $@
220         @if test -f $@; then :; else \
221           rm -f apidoc.stamp; \
222           $(MAKE) $(AM_MAKEFLAGS) apidoc.stamp; \
223         fi
224
225 clean-local:
226         -rm $(APIDOCS)
227         -rm -rf $(BUILDDIR)/*
228
229 html-local: apiref.rst
230         $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
231         @echo
232         @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
233
234 dirhtml:
235         $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
236         @echo
237         @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
238
239 singlehtml:
240         $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
241         @echo
242         @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
243
244 pickle:
245         $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
246         @echo
247         @echo "Build finished; now you can process the pickle files."
248
249 json:
250         $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
251         @echo
252         @echo "Build finished; now you can process the JSON files."
253
254 htmlhelp:
255         $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
256         @echo
257         @echo "Build finished; now you can run HTML Help Workshop with the" \
258               ".hhp project file in $(BUILDDIR)/htmlhelp."
259
260 qthelp:
261         $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
262         @echo
263         @echo "Build finished; now you can run "qcollectiongenerator" with the" \
264               ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
265         @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/nghttp2.qhcp"
266         @echo "To view the help file:"
267         @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/nghttp2.qhc"
268
269 devhelp:
270         $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
271         @echo
272         @echo "Build finished."
273         @echo "To view the help file:"
274         @echo "# mkdir -p $$HOME/.local/share/devhelp/nghttp2"
275         @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/nghttp2"
276         @echo "# devhelp"
277
278 epub:
279         $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
280         @echo
281         @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
282
283 latex:
284         $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
285         @echo
286         @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
287         @echo "Run \`make' in that directory to run these through (pdf)latex" \
288               "(use \`make latexpdf' here to do that automatically)."
289
290 latexpdf:
291         $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
292         @echo "Running LaTeX files through pdflatex..."
293         $(MAKE) -C $(BUILDDIR)/latex all-pdf
294         @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
295
296 text:
297         $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
298         @echo
299         @echo "Build finished. The text files are in $(BUILDDIR)/text."
300
301 man: apiref.rst
302         $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
303         @echo
304         @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
305
306 changes:
307         $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
308         @echo
309         @echo "The overview file is in $(BUILDDIR)/changes."
310
311 linkcheck:
312         $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
313         @echo
314         @echo "Link check complete; look for any errors in the above output " \
315               "or in $(BUILDDIR)/linkcheck/output.txt."
316
317 doctest:
318         $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
319         @echo "Testing of doctests in the sources finished, look at the " \
320               "results in $(BUILDDIR)/doctest/output.txt."