• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Generated documents
2set(APIDOCS
3  macros.rst
4  enums.rst
5  types.rst
6  nghttp2_check_header_name.rst
7  nghttp2_check_header_value.rst
8  nghttp2_hd_deflate_bound.rst
9  nghttp2_hd_deflate_change_table_size.rst
10  nghttp2_hd_deflate_del.rst
11  nghttp2_hd_deflate_get_dynamic_table_size.rst
12  nghttp2_hd_deflate_get_max_dynamic_table_size.rst
13  nghttp2_hd_deflate_get_num_table_entries.rst
14  nghttp2_hd_deflate_get_table_entry.rst
15  nghttp2_hd_deflate_hd.rst
16  nghttp2_hd_deflate_hd_vec.rst
17  nghttp2_hd_deflate_new.rst
18  nghttp2_hd_deflate_new2.rst
19  nghttp2_hd_inflate_change_table_size.rst
20  nghttp2_hd_inflate_del.rst
21  nghttp2_hd_inflate_end_headers.rst
22  nghttp2_hd_inflate_get_dynamic_table_size.rst
23  nghttp2_hd_inflate_get_max_dynamic_table_size.rst
24  nghttp2_hd_inflate_get_num_table_entries.rst
25  nghttp2_hd_inflate_get_table_entry.rst
26  nghttp2_hd_inflate_hd.rst
27  nghttp2_hd_inflate_hd2.rst
28  nghttp2_hd_inflate_new.rst
29  nghttp2_hd_inflate_new2.rst
30  nghttp2_http2_strerror.rst
31  nghttp2_is_fatal.rst
32  nghttp2_nv_compare_name.rst
33  nghttp2_option_del.rst
34  nghttp2_option_new.rst
35  nghttp2_option_set_builtin_recv_extension_type.rst
36  nghttp2_option_set_max_deflate_dynamic_table_size.rst
37  nghttp2_option_set_max_reserved_remote_streams.rst
38  nghttp2_option_set_max_send_header_block_length.rst
39  nghttp2_option_set_no_auto_ping_ack.rst
40  nghttp2_option_set_no_auto_window_update.rst
41  nghttp2_option_set_no_http_messaging.rst
42  nghttp2_option_set_no_recv_client_magic.rst
43  nghttp2_option_set_peer_max_concurrent_streams.rst
44  nghttp2_option_set_user_recv_extension_type.rst
45  nghttp2_option_set_max_settings.rst
46  nghttp2_pack_settings_payload.rst
47  nghttp2_priority_spec_check_default.rst
48  nghttp2_priority_spec_default_init.rst
49  nghttp2_priority_spec_init.rst
50  nghttp2_rcbuf_decref.rst
51  nghttp2_rcbuf_get_buf.rst
52  nghttp2_rcbuf_incref.rst
53  nghttp2_rcbuf_is_static.rst
54  nghttp2_select_next_protocol.rst
55  nghttp2_session_callbacks_del.rst
56  nghttp2_session_callbacks_new.rst
57  nghttp2_session_callbacks_set_before_frame_send_callback.rst
58  nghttp2_session_callbacks_set_data_source_read_length_callback.rst
59  nghttp2_session_callbacks_set_error_callback.rst
60  nghttp2_session_callbacks_set_on_begin_frame_callback.rst
61  nghttp2_session_callbacks_set_on_begin_headers_callback.rst
62  nghttp2_session_callbacks_set_on_data_chunk_recv_callback.rst
63  nghttp2_session_callbacks_set_on_extension_chunk_recv_callback.rst
64  nghttp2_session_callbacks_set_on_frame_not_send_callback.rst
65  nghttp2_session_callbacks_set_on_frame_recv_callback.rst
66  nghttp2_session_callbacks_set_on_frame_send_callback.rst
67  nghttp2_session_callbacks_set_on_header_callback.rst
68  nghttp2_session_callbacks_set_on_header_callback2.rst
69  nghttp2_session_callbacks_set_on_invalid_frame_recv_callback.rst
70  nghttp2_session_callbacks_set_on_invalid_header_callback.rst
71  nghttp2_session_callbacks_set_on_invalid_header_callback2.rst
72  nghttp2_session_callbacks_set_on_stream_close_callback.rst
73  nghttp2_session_callbacks_set_pack_extension_callback.rst
74  nghttp2_session_callbacks_set_recv_callback.rst
75  nghttp2_session_callbacks_set_select_padding_callback.rst
76  nghttp2_session_callbacks_set_send_callback.rst
77  nghttp2_session_callbacks_set_send_data_callback.rst
78  nghttp2_session_callbacks_set_unpack_extension_callback.rst
79  nghttp2_session_change_stream_priority.rst
80  nghttp2_session_check_request_allowed.rst
81  nghttp2_session_check_server_session.rst
82  nghttp2_session_client_new.rst
83  nghttp2_session_client_new2.rst
84  nghttp2_session_client_new3.rst
85  nghttp2_session_consume.rst
86  nghttp2_session_consume_connection.rst
87  nghttp2_session_consume_stream.rst
88  nghttp2_session_create_idle_stream.rst
89  nghttp2_session_del.rst
90  nghttp2_session_find_stream.rst
91  nghttp2_session_get_effective_local_window_size.rst
92  nghttp2_session_get_effective_recv_data_length.rst
93  nghttp2_session_get_hd_deflate_dynamic_table_size.rst
94  nghttp2_session_get_hd_inflate_dynamic_table_size.rst
95  nghttp2_session_get_last_proc_stream_id.rst
96  nghttp2_session_get_local_settings.rst
97  nghttp2_session_get_local_window_size.rst
98  nghttp2_session_get_next_stream_id.rst
99  nghttp2_session_get_outbound_queue_size.rst
100  nghttp2_session_get_remote_settings.rst
101  nghttp2_session_get_remote_window_size.rst
102  nghttp2_session_get_root_stream.rst
103  nghttp2_session_get_stream_effective_local_window_size.rst
104  nghttp2_session_get_stream_effective_recv_data_length.rst
105  nghttp2_session_get_stream_local_close.rst
106  nghttp2_session_get_stream_local_window_size.rst
107  nghttp2_session_get_stream_remote_close.rst
108  nghttp2_session_get_stream_remote_window_size.rst
109  nghttp2_session_get_stream_user_data.rst
110  nghttp2_session_mem_recv.rst
111  nghttp2_session_mem_send.rst
112  nghttp2_session_recv.rst
113  nghttp2_session_resume_data.rst
114  nghttp2_session_send.rst
115  nghttp2_session_server_new.rst
116  nghttp2_session_server_new2.rst
117  nghttp2_session_server_new3.rst
118  nghttp2_session_set_local_window_size.rst
119  nghttp2_session_set_next_stream_id.rst
120  nghttp2_session_set_stream_user_data.rst
121  nghttp2_session_terminate_session.rst
122  nghttp2_session_terminate_session2.rst
123  nghttp2_session_upgrade.rst
124  nghttp2_session_upgrade2.rst
125  nghttp2_session_want_read.rst
126  nghttp2_session_want_write.rst
127  nghttp2_set_debug_vprintf_callback.rst
128  nghttp2_stream_get_first_child.rst
129  nghttp2_stream_get_next_sibling.rst
130  nghttp2_stream_get_parent.rst
131  nghttp2_stream_get_previous_sibling.rst
132  nghttp2_stream_get_state.rst
133  nghttp2_stream_get_sum_dependency_weight.rst
134  nghttp2_stream_get_weight.rst
135  nghttp2_strerror.rst
136  nghttp2_submit_altsvc.rst
137  nghttp2_submit_data.rst
138  nghttp2_submit_extension.rst
139  nghttp2_submit_goaway.rst
140  nghttp2_submit_headers.rst
141  nghttp2_submit_ping.rst
142  nghttp2_submit_priority.rst
143  nghttp2_submit_push_promise.rst
144  nghttp2_submit_request.rst
145  nghttp2_submit_response.rst
146  nghttp2_submit_rst_stream.rst
147  nghttp2_submit_settings.rst
148  nghttp2_submit_shutdown_notice.rst
149  nghttp2_submit_trailer.rst
150  nghttp2_submit_window_update.rst
151  nghttp2_version.rst
152)
153
154set(MAN_PAGES
155  nghttp.1
156  nghttpd.1
157  nghttpx.1
158  h2load.1
159)
160
161# Other .rst files from the source tree that need to be copied
162# XXX move them to sources/ and create .in files?
163set(RST_FILES
164  README.rst
165  programmers-guide.rst
166  nghttp.1.rst
167  nghttpd.1.rst
168  nghttpx.1.rst
169  h2load.1.rst
170)
171
172# XXX unused for now
173set(EXTRA_DIST
174  mkapiref.py
175  ${RST_FILES}
176  ${APIDOCS}
177  sources/index.rst
178  sources/tutorial-client.rst
179  sources/tutorial-server.rst
180  sources/tutorial-hpack.rst
181  sources/nghttpx-howto.rst
182  sources/h2load-howto.rst
183  sources/building-android-binary.rst
184  sources/contribute.rst
185  _exts/rubydomain/LICENSE.rubydomain
186  _exts/rubydomain/__init__.py
187  _exts/rubydomain/rubydomain.py
188  _themes/sphinx_rtd_theme/__init__.py
189  _themes/sphinx_rtd_theme/breadcrumbs.html
190  _themes/sphinx_rtd_theme/footer.html
191  _themes/sphinx_rtd_theme/layout.html
192  _themes/sphinx_rtd_theme/layout_old.html
193  _themes/sphinx_rtd_theme/search.html
194  _themes/sphinx_rtd_theme/searchbox.html
195  _themes/sphinx_rtd_theme/static/css/badge_only.css
196  _themes/sphinx_rtd_theme/static/css/theme.css
197  _themes/sphinx_rtd_theme/static/fonts/FontAwesome.otf
198  _themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.eot
199  _themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.svg
200  _themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.ttf
201  _themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff
202  _themes/sphinx_rtd_theme/static/js/theme.js
203  _themes/sphinx_rtd_theme/theme.conf
204  _themes/sphinx_rtd_theme/versions.html
205  ${MAN_PAGES}
206  bash_completion/nghttp
207  bash_completion/nghttpd
208  bash_completion/nghttpx
209  bash_completion/h2load
210)
211
212# Based on Makefile for Sphinx documentation
213
214# You can set these variables from the command line.
215set(SPHINXOPTS)
216set(SPHINXBUILD sphinx-build)
217set(PAPER)
218set(BUILDDIR    manual)
219
220# Internal variables.
221set(PAPEROPT_a4     -D latex_paper_size=a4)
222set(PAPEROPT_letter -D latex_paper_size=letter)
223set(ALLSPHINXOPTS   -d ${BUILDDIR}/doctrees ${PAPEROPT_${PAPER}} ${SPHINXOPTS} .)
224
225# "Please use `make <target>' where <target> is one of"
226# "  html       to make standalone HTML files"
227# "  dirhtml    to make HTML files named index.html in directories"
228# "  singlehtml to make a single large HTML file"
229# "  pickle     to make pickle files"
230# "  json       to make JSON files"
231# "  htmlhelp   to make HTML files and a HTML help project"
232# "  qthelp     to make HTML files and a qthelp project"
233# "  devhelp    to make HTML files and a Devhelp project"
234# "  epub       to make an epub"
235# "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
236# "  latexpdf   to make LaTeX files and run them through pdflatex"
237# "  text       to make text files"
238# "  man        to make manual pages"
239# "  changes    to make an overview of all changed/added/deprecated items"
240# "  linkcheck  to check all external links for integrity"
241# "  doctest    to run all doctests embedded in the documentation (if enabled)"
242
243
244# Copy files for out-of-tree builds
245if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
246  set(RST_BUILD_FILES)
247  foreach(rstfile IN LISTS RST_FILES)
248    set(outfile "${CMAKE_CURRENT_BINARY_DIR}/${rstfile}")
249    add_custom_command(OUTPUT "${outfile}"
250      COMMAND ${CMAKE_COMMAND} -E copy
251              "${CMAKE_CURRENT_SOURCE_DIR}/${rstfile}" "${outfile}"
252      DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${rstfile}"
253    )
254    list(APPEND RST_BUILD_FILES "${outfile}")
255  endforeach()
256else()
257  set(RST_BUILD_FILES "${RST_FILES}")
258endif()
259
260set(apiref_SOURCES
261  ${CMAKE_BINARY_DIR}/lib/includes/nghttp2/nghttp2ver.h
262  ${CMAKE_SOURCE_DIR}/lib/includes/nghttp2/nghttp2.h
263)
264# Generates apiref.rst and other files
265add_custom_command(
266  OUTPUT
267    apiref.rst
268    ${APIDOCS}
269  COMMAND
270    "${Python3_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/mkapiref.py"
271    apiref.rst macros.rst enums.rst types.rst .
272    ${apiref_SOURCES}
273  DEPENDS
274    ${RST_BUILD_FILES}
275    ${apiref_SOURCES}
276)
277
278
279
280set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${BUILDDIR}")
281
282# Invokes sphinx-build and prints the given messages when completed
283function(sphinxbuild builder)
284  set(echo_commands)
285  foreach(message IN LISTS ARGN)
286    list(APPEND echo_commands COMMAND ${CMAKE_COMMAND} -E echo "${message}")
287  endforeach()
288  add_custom_target(${builder}
289    COMMAND "${SPHINXBUILD}" -b ${builder} ${ALLSPHINXOPTS} "${BUILDDIR}/${builder}"
290    COMMAND ${CMAKE_COMMAND} -E echo
291    ${echo_commands}
292    VERBATIM
293    DEPENDS apiref.rst
294  )
295endfunction()
296
297foreach(builder html dirhtml singlehtml)
298  sphinxbuild(${builder}
299    "Build finished. The HTML pages are in ${BUILDDIR}/${builder}.")
300endforeach()
301sphinxbuild(pickle  "Build finished; now you can process the pickle files.")
302sphinxbuild(json    "Build finished; now you can process the JSON files.")
303sphinxbuild(htmlhelp
304  "Build finished; now you can run HTML Help Workshop with the"
305  ".hhp project file in ${BUILDDIR}/htmlhelp."
306)
307sphinxbuild(qthelp
308  "Build finished; now you can run \"qcollectiongenerator\" with the"
309  ".qhcp project file in ${BUILDDIR}/qthelp, like this:"
310  "# qcollectiongenerator ${BUILDDIR}/qthelp/nghttp2.qhcp"
311  "To view the help file:"
312  "# assistant -collectionFile ${BUILDDIR}/qthelp/nghttp2.qhc"
313)
314sphinxbuild(devhelp
315  "Build finished."
316  "To view the help file:"
317  "# mkdir -p ~/.local/share/devhelp/nghttp2"
318  "# ln -s ${BUILDDIR}/devhelp ~/.local/share/devhelp/nghttp2"
319  "# devhelp"
320)
321sphinxbuild(epub    "Build finished. The epub file is in ${BUILDDIR}/epub.")
322sphinxbuild(latex
323  "Build finished; the LaTeX files are in ${BUILDDIR}/latex."
324  "Run `make' in that directory to run these through (pdf)latex"
325  "(use `make latexpdf' here to do that automatically)."
326)
327
328# Invoke the Makefile generated by sphinx
329add_custom_target(latexpdf
330  COMMAND ${CMAKE_COMMAND} -E echo "Running LaTeX files through pdflatex..."
331  COMMAND make -C "${BUILDDIR}/latex" all-pdf
332  COMMAND ${CMAKE_COMMAND} -E echo "pdflatex finished; the PDF files are in ${BUILDDIR}/latex."
333  DEPENDS latex
334)
335
336sphinxbuild(text    "Build finished. The text files are in ${BUILDDIR}/text.")
337sphinxbuild(man     "Build finished. The manual pages are in ${BUILDDIR}/man.")
338sphinxbuild(changes "The overview file is in ${BUILDDIR}/changes.")
339sphinxbuild(linkcheck
340  "Link check complete; look for any errors in the above output"
341  "or in ${BUILDDIR}/linkcheck/output.txt."
342)
343sphinxbuild(doctest
344  "Testing of doctests in the sources finished, look at the"
345  "results in ${BUILDDIR}/doctest/output.txt."
346)
347
348foreach(_man_page IN LISTS MAN_PAGES)
349  install(FILES ${_man_page}
350    DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
351  )
352endforeach()
353