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
24man_MANS = nghttp.1 nghttpd.1 nghttpx.1 h2load.1
25
26APIDOCS= \
27	macros.rst \
28	enums.rst \
29	types.rst \
30	nghttp2_check_authority.rst \
31	nghttp2_check_header_name.rst \
32	nghttp2_check_header_value.rst \
33	nghttp2_check_method.rst \
34	nghttp2_check_path.rst \
35	nghttp2_hd_deflate_bound.rst \
36	nghttp2_hd_deflate_change_table_size.rst \
37	nghttp2_hd_deflate_del.rst \
38	nghttp2_hd_deflate_get_dynamic_table_size.rst \
39	nghttp2_hd_deflate_get_max_dynamic_table_size.rst \
40	nghttp2_hd_deflate_get_num_table_entries.rst \
41	nghttp2_hd_deflate_get_table_entry.rst \
42	nghttp2_hd_deflate_hd.rst \
43	nghttp2_hd_deflate_hd_vec.rst \
44	nghttp2_hd_deflate_new.rst \
45	nghttp2_hd_deflate_new2.rst \
46	nghttp2_hd_inflate_change_table_size.rst \
47	nghttp2_hd_inflate_del.rst \
48	nghttp2_hd_inflate_end_headers.rst \
49	nghttp2_hd_inflate_get_dynamic_table_size.rst \
50	nghttp2_hd_inflate_get_max_dynamic_table_size.rst \
51	nghttp2_hd_inflate_get_num_table_entries.rst \
52	nghttp2_hd_inflate_get_table_entry.rst \
53	nghttp2_hd_inflate_hd.rst \
54	nghttp2_hd_inflate_hd2.rst \
55	nghttp2_hd_inflate_new.rst \
56	nghttp2_hd_inflate_new2.rst \
57	nghttp2_http2_strerror.rst \
58	nghttp2_is_fatal.rst \
59	nghttp2_nv_compare_name.rst \
60	nghttp2_option_del.rst \
61	nghttp2_option_new.rst \
62	nghttp2_option_set_builtin_recv_extension_type.rst \
63	nghttp2_option_set_max_deflate_dynamic_table_size.rst \
64	nghttp2_option_set_max_reserved_remote_streams.rst \
65	nghttp2_option_set_max_send_header_block_length.rst \
66	nghttp2_option_set_no_auto_ping_ack.rst \
67	nghttp2_option_set_no_auto_window_update.rst \
68	nghttp2_option_set_no_closed_streams.rst \
69	nghttp2_option_set_no_http_messaging.rst \
70	nghttp2_option_set_no_recv_client_magic.rst \
71	nghttp2_option_set_peer_max_concurrent_streams.rst \
72	nghttp2_option_set_user_recv_extension_type.rst \
73	nghttp2_option_set_max_outbound_ack.rst \
74	nghttp2_option_set_max_settings.rst \
75	nghttp2_pack_settings_payload.rst \
76	nghttp2_priority_spec_check_default.rst \
77	nghttp2_priority_spec_default_init.rst \
78	nghttp2_priority_spec_init.rst \
79	nghttp2_rcbuf_decref.rst \
80	nghttp2_rcbuf_get_buf.rst \
81	nghttp2_rcbuf_incref.rst \
82	nghttp2_rcbuf_is_static.rst \
83	nghttp2_select_next_protocol.rst \
84	nghttp2_session_callbacks_del.rst \
85	nghttp2_session_callbacks_new.rst \
86	nghttp2_session_callbacks_set_before_frame_send_callback.rst \
87	nghttp2_session_callbacks_set_data_source_read_length_callback.rst \
88	nghttp2_session_callbacks_set_error_callback.rst \
89	nghttp2_session_callbacks_set_error_callback2.rst \
90	nghttp2_session_callbacks_set_on_begin_frame_callback.rst \
91	nghttp2_session_callbacks_set_on_begin_headers_callback.rst \
92	nghttp2_session_callbacks_set_on_data_chunk_recv_callback.rst \
93	nghttp2_session_callbacks_set_on_extension_chunk_recv_callback.rst \
94	nghttp2_session_callbacks_set_on_frame_not_send_callback.rst \
95	nghttp2_session_callbacks_set_on_frame_recv_callback.rst \
96	nghttp2_session_callbacks_set_on_frame_send_callback.rst \
97	nghttp2_session_callbacks_set_on_header_callback.rst \
98	nghttp2_session_callbacks_set_on_header_callback2.rst \
99	nghttp2_session_callbacks_set_on_invalid_frame_recv_callback.rst \
100	nghttp2_session_callbacks_set_on_invalid_header_callback.rst \
101	nghttp2_session_callbacks_set_on_invalid_header_callback2.rst \
102	nghttp2_session_callbacks_set_on_stream_close_callback.rst \
103	nghttp2_session_callbacks_set_pack_extension_callback.rst \
104	nghttp2_session_callbacks_set_recv_callback.rst \
105	nghttp2_session_callbacks_set_select_padding_callback.rst \
106	nghttp2_session_callbacks_set_send_callback.rst \
107	nghttp2_session_callbacks_set_send_data_callback.rst \
108	nghttp2_session_callbacks_set_unpack_extension_callback.rst \
109	nghttp2_session_change_stream_priority.rst \
110	nghttp2_session_check_request_allowed.rst \
111	nghttp2_session_check_server_session.rst \
112	nghttp2_session_client_new.rst \
113	nghttp2_session_client_new2.rst \
114	nghttp2_session_client_new3.rst \
115	nghttp2_session_consume.rst \
116	nghttp2_session_consume_connection.rst \
117	nghttp2_session_consume_stream.rst \
118	nghttp2_session_create_idle_stream.rst \
119	nghttp2_session_del.rst \
120	nghttp2_session_find_stream.rst \
121	nghttp2_session_get_effective_local_window_size.rst \
122	nghttp2_session_get_effective_recv_data_length.rst \
123	nghttp2_session_get_hd_deflate_dynamic_table_size.rst \
124	nghttp2_session_get_hd_inflate_dynamic_table_size.rst \
125	nghttp2_session_get_last_proc_stream_id.rst \
126	nghttp2_session_get_local_settings.rst \
127	nghttp2_session_get_local_window_size.rst \
128	nghttp2_session_get_next_stream_id.rst \
129	nghttp2_session_get_outbound_queue_size.rst \
130	nghttp2_session_get_remote_settings.rst \
131	nghttp2_session_get_remote_window_size.rst \
132	nghttp2_session_get_root_stream.rst \
133	nghttp2_session_get_stream_effective_local_window_size.rst \
134	nghttp2_session_get_stream_effective_recv_data_length.rst \
135	nghttp2_session_get_stream_local_close.rst \
136	nghttp2_session_get_stream_local_window_size.rst \
137	nghttp2_session_get_stream_remote_close.rst \
138	nghttp2_session_get_stream_remote_window_size.rst \
139	nghttp2_session_get_stream_user_data.rst \
140	nghttp2_session_mem_recv.rst \
141	nghttp2_session_mem_send.rst \
142	nghttp2_session_recv.rst \
143	nghttp2_session_resume_data.rst \
144	nghttp2_session_send.rst \
145	nghttp2_session_server_new.rst \
146	nghttp2_session_server_new2.rst \
147	nghttp2_session_server_new3.rst \
148	nghttp2_session_set_local_window_size.rst \
149	nghttp2_session_set_next_stream_id.rst \
150	nghttp2_session_set_stream_user_data.rst \
151	nghttp2_session_set_user_data.rst \
152	nghttp2_session_terminate_session.rst \
153	nghttp2_session_terminate_session2.rst \
154	nghttp2_session_upgrade.rst \
155	nghttp2_session_upgrade2.rst \
156	nghttp2_session_want_read.rst \
157	nghttp2_session_want_write.rst \
158	nghttp2_set_debug_vprintf_callback.rst \
159	nghttp2_stream_get_first_child.rst \
160	nghttp2_stream_get_next_sibling.rst \
161	nghttp2_stream_get_parent.rst \
162	nghttp2_stream_get_previous_sibling.rst \
163	nghttp2_stream_get_state.rst \
164	nghttp2_stream_get_sum_dependency_weight.rst \
165	nghttp2_stream_get_weight.rst \
166	nghttp2_strerror.rst \
167	nghttp2_submit_altsvc.rst \
168	nghttp2_submit_data.rst \
169	nghttp2_submit_extension.rst \
170	nghttp2_submit_goaway.rst \
171	nghttp2_submit_headers.rst \
172	nghttp2_submit_origin.rst \
173	nghttp2_submit_ping.rst \
174	nghttp2_submit_priority.rst \
175	nghttp2_submit_push_promise.rst \
176	nghttp2_submit_request.rst \
177	nghttp2_submit_response.rst \
178	nghttp2_submit_rst_stream.rst \
179	nghttp2_submit_settings.rst \
180	nghttp2_submit_shutdown_notice.rst \
181	nghttp2_submit_trailer.rst \
182	nghttp2_submit_window_update.rst \
183	nghttp2_version.rst
184
185RST_FILES = \
186	README.rst \
187	programmers-guide.rst \
188	nghttp.1.rst \
189	nghttpd.1.rst \
190	nghttpx.1.rst \
191	h2load.1.rst
192
193EXTRA_DIST = \
194	CMakeLists.txt \
195	mkapiref.py \
196	$(RST_FILES) \
197	$(APIDOCS) \
198	sources/index.rst \
199	sources/tutorial-client.rst \
200	sources/tutorial-server.rst \
201	sources/tutorial-hpack.rst \
202	sources/nghttpx-howto.rst \
203	sources/h2load-howto.rst \
204	sources/libnghttp2_asio.rst \
205	sources/python-apiref.rst \
206	sources/building-android-binary.rst \
207	sources/contribute.rst \
208	sources/security.rst \
209	_exts/rubydomain/LICENSE.rubydomain \
210	_exts/rubydomain/__init__.py \
211	_exts/rubydomain/rubydomain.py \
212	_themes/sphinx_rtd_theme/__init__.py \
213	_themes/sphinx_rtd_theme/breadcrumbs.html \
214	_themes/sphinx_rtd_theme/footer.html \
215	_themes/sphinx_rtd_theme/layout.html \
216	_themes/sphinx_rtd_theme/locale/de/LC_MESSAGES/sphinx.mo \
217	_themes/sphinx_rtd_theme/locale/de/LC_MESSAGES/sphinx.po \
218	_themes/sphinx_rtd_theme/locale/en/LC_MESSAGES/sphinx.mo \
219	_themes/sphinx_rtd_theme/locale/en/LC_MESSAGES/sphinx.po \
220	_themes/sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.mo \
221	_themes/sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po \
222	_themes/sphinx_rtd_theme/locale/et/LC_MESSAGES/sphinx.mo \
223	_themes/sphinx_rtd_theme/locale/et/LC_MESSAGES/sphinx.po \
224	_themes/sphinx_rtd_theme/locale/fr/LC_MESSAGES/sphinx.mo \
225	_themes/sphinx_rtd_theme/locale/fr/LC_MESSAGES/sphinx.po \
226	_themes/sphinx_rtd_theme/locale/nl/LC_MESSAGES/sphinx.mo \
227	_themes/sphinx_rtd_theme/locale/nl/LC_MESSAGES/sphinx.po \
228	_themes/sphinx_rtd_theme/locale/pt_BR/LC_MESSAGES/sphinx.mo \
229	_themes/sphinx_rtd_theme/locale/pt_BR/LC_MESSAGES/sphinx.po \
230	_themes/sphinx_rtd_theme/locale/ru/LC_MESSAGES/sphinx.mo \
231	_themes/sphinx_rtd_theme/locale/ru/LC_MESSAGES/sphinx.po \
232	_themes/sphinx_rtd_theme/locale/sphinx.pot \
233	_themes/sphinx_rtd_theme/locale/sv/LC_MESSAGES/sphinx.mo \
234	_themes/sphinx_rtd_theme/locale/sv/LC_MESSAGES/sphinx.po \
235	_themes/sphinx_rtd_theme/locale/tr/LC_MESSAGES/sphinx.mo \
236	_themes/sphinx_rtd_theme/locale/tr/LC_MESSAGES/sphinx.po \
237	_themes/sphinx_rtd_theme/locale/zh_CN/LC_MESSAGES/sphinx.mo \
238	_themes/sphinx_rtd_theme/locale/zh_CN/LC_MESSAGES/sphinx.po \
239	_themes/sphinx_rtd_theme/search.html \
240	_themes/sphinx_rtd_theme/searchbox.html \
241	_themes/sphinx_rtd_theme/static/css/badge_only.css \
242	_themes/sphinx_rtd_theme/static/css/fonts/Roboto-Slab-Bold.woff \
243	_themes/sphinx_rtd_theme/static/css/fonts/Roboto-Slab-Bold.woff2 \
244	_themes/sphinx_rtd_theme/static/css/fonts/Roboto-Slab-Regular.woff \
245	_themes/sphinx_rtd_theme/static/css/fonts/Roboto-Slab-Regular.woff2 \
246	_themes/sphinx_rtd_theme/static/css/fonts/fontawesome-webfont.eot \
247	_themes/sphinx_rtd_theme/static/css/fonts/fontawesome-webfont.svg \
248	_themes/sphinx_rtd_theme/static/css/fonts/fontawesome-webfont.ttf \
249	_themes/sphinx_rtd_theme/static/css/fonts/fontawesome-webfont.woff \
250	_themes/sphinx_rtd_theme/static/css/fonts/fontawesome-webfont.woff2 \
251	_themes/sphinx_rtd_theme/static/css/fonts/lato-bold-italic.woff \
252	_themes/sphinx_rtd_theme/static/css/fonts/lato-bold-italic.woff2 \
253	_themes/sphinx_rtd_theme/static/css/fonts/lato-bold.woff \
254	_themes/sphinx_rtd_theme/static/css/fonts/lato-bold.woff2 \
255	_themes/sphinx_rtd_theme/static/css/fonts/lato-normal-italic.woff \
256	_themes/sphinx_rtd_theme/static/css/fonts/lato-normal-italic.woff2 \
257	_themes/sphinx_rtd_theme/static/css/fonts/lato-normal.woff \
258	_themes/sphinx_rtd_theme/static/css/fonts/lato-normal.woff2 \
259	_themes/sphinx_rtd_theme/static/css/theme.css \
260	_themes/sphinx_rtd_theme/static/js/badge_only.js \
261	_themes/sphinx_rtd_theme/static/js/theme.js \
262	_themes/sphinx_rtd_theme/theme.conf \
263	_themes/sphinx_rtd_theme/versions.html \
264	$(man_MANS) \
265	bash_completion/nghttp \
266	bash_completion/nghttpd \
267	bash_completion/nghttpx \
268	bash_completion/h2load
269
270# Makefile for Sphinx documentation
271#
272
273# You can set these variables from the command line.
274SPHINXOPTS    =
275SPHINXBUILD   ?= sphinx-build
276PAPER         =
277BUILDDIR      = manual
278
279# Internal variables.
280PAPEROPT_a4     = -D latex_paper_size=a4
281PAPEROPT_letter = -D latex_paper_size=letter
282ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
283
284.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
285
286help:
287	@echo "Please use \`make <target>' where <target> is one of"
288	@echo "  html       to make standalone HTML files"
289	@echo "  dirhtml    to make HTML files named index.html in directories"
290	@echo "  singlehtml to make a single large HTML file"
291	@echo "  pickle     to make pickle files"
292	@echo "  json       to make JSON files"
293	@echo "  htmlhelp   to make HTML files and a HTML help project"
294	@echo "  qthelp     to make HTML files and a qthelp project"
295	@echo "  devhelp    to make HTML files and a Devhelp project"
296	@echo "  epub       to make an epub"
297	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
298	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
299	@echo "  text       to make text files"
300	@echo "  man        to make manual pages"
301	@echo "  changes    to make an overview of all changed/added/deprecated items"
302	@echo "  linkcheck  to check all external links for integrity"
303	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
304
305apiref.rst: \
306	$(top_builddir)/lib/includes/nghttp2/nghttp2ver.h \
307	$(top_srcdir)/lib/includes/nghttp2/nghttp2.h
308	for i in $(RST_FILES); do [ -e $(builddir)/$$i ] || cp $(srcdir)/$$i $(builddir); done
309	$(PYTHON) $(top_srcdir)/doc/mkapiref.py \
310	apiref.rst macros.rst enums.rst types.rst . $^
311
312$(APIDOCS): apiref.rst
313
314clean-local:
315	if [ $(srcdir) != $(builddir) ]; then for i in $(RST_FILES); do rm -f $(builddir)/$$i; done fi
316	-rm -f apiref.rst
317	-rm -f $(APIDOCS)
318	-rm -rf $(BUILDDIR)/*
319
320html-local: apiref.rst
321	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
322	@echo
323	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
324
325dirhtml:
326	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
327	@echo
328	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
329
330singlehtml:
331	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
332	@echo
333	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
334
335pickle:
336	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
337	@echo
338	@echo "Build finished; now you can process the pickle files."
339
340json:
341	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
342	@echo
343	@echo "Build finished; now you can process the JSON files."
344
345htmlhelp:
346	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
347	@echo
348	@echo "Build finished; now you can run HTML Help Workshop with the" \
349	      ".hhp project file in $(BUILDDIR)/htmlhelp."
350
351qthelp:
352	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
353	@echo
354	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
355	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
356	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/nghttp2.qhcp"
357	@echo "To view the help file:"
358	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/nghttp2.qhc"
359
360devhelp:
361	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
362	@echo
363	@echo "Build finished."
364	@echo "To view the help file:"
365	@echo "# mkdir -p $$HOME/.local/share/devhelp/nghttp2"
366	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/nghttp2"
367	@echo "# devhelp"
368
369epub:
370	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
371	@echo
372	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
373
374latex:
375	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
376	@echo
377	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
378	@echo "Run \`make' in that directory to run these through (pdf)latex" \
379	      "(use \`make latexpdf' here to do that automatically)."
380
381latexpdf:
382	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
383	@echo "Running LaTeX files through pdflatex..."
384	$(MAKE) -C $(BUILDDIR)/latex all-pdf
385	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
386
387text:
388	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
389	@echo
390	@echo "Build finished. The text files are in $(BUILDDIR)/text."
391
392man: apiref.rst
393	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
394	@echo
395	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
396
397changes:
398	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
399	@echo
400	@echo "The overview file is in $(BUILDDIR)/changes."
401
402linkcheck:
403	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
404	@echo
405	@echo "Link check complete; look for any errors in the above output " \
406	      "or in $(BUILDDIR)/linkcheck/output.txt."
407
408doctest:
409	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
410	@echo "Testing of doctests in the sources finished, look at the " \
411	      "results in $(BUILDDIR)/doctest/output.txt."
412