Git fork

meson: introduce a "docs" alias to compile documentation only

Meson does not currently provide a target to compile documentation,
only. Instead, users needs to compile the whole project, which may be
way more than they really intend to do.

Introduce a new "docs" alias to plug this gap. This alias can be invoked
e.g. with `meson compile docs`.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Patrick Steinhardt and committed by
Junio C Hamano
197f0d0f c44beea4

+19 -12
+2 -2
Documentation/howto/meson.build
··· 29 29 output: 'howto-index.adoc', 30 30 ) 31 31 32 - custom_target( 32 + doc_targets += custom_target( 33 33 command: asciidoc_html_options, 34 34 input: howto_index, 35 35 output: 'howto-index.html', ··· 51 51 capture: true, 52 52 ) 53 53 54 - custom_target( 54 + doc_targets += custom_target( 55 55 command: asciidoc_html_options, 56 56 input: howto_stripped, 57 57 output: fs.stem(howto_stripped.full_path()) + '.html',
+4 -4
Documentation/meson.build
··· 375 375 output: fs.stem(manpage) + '.xml', 376 376 ) 377 377 378 - custom_target( 378 + doc_targets += custom_target( 379 379 command: [ 380 380 xmlto, 381 381 '-m', '@INPUT0@', ··· 398 398 endif 399 399 400 400 if get_option('docs').contains('html') 401 - custom_target( 401 + doc_targets += custom_target( 402 402 command: asciidoc_common_options + [ 403 403 '--backend=' + asciidoc_html, 404 404 '--doctype=manpage', ··· 450 450 depends: documentation_deps, 451 451 ) 452 452 453 - custom_target( 453 + doc_targets += custom_target( 454 454 command: [ 455 455 xsltproc, 456 456 '--xinclude', ··· 479 479 ] 480 480 481 481 foreach article : articles 482 - custom_target( 482 + doc_targets += custom_target( 483 483 command: asciidoc_common_options + [ 484 484 '--backend=' + asciidoc_html, 485 485 '--out-file=@OUTPUT@',
+2 -2
Documentation/technical/meson.build
··· 46 46 output: 'api-index.adoc', 47 47 ) 48 48 49 - custom_target( 49 + doc_targets += custom_target( 50 50 command: asciidoc_html_options, 51 51 input: api_index, 52 52 output: 'api-index.html', ··· 56 56 ) 57 57 58 58 foreach article : api_docs + articles 59 - custom_target( 59 + doc_targets += custom_target( 60 60 command: asciidoc_html_options, 61 61 input: article, 62 62 output: fs.stem(article) + '.html',
+2 -2
contrib/contacts/meson.build
··· 20 20 output: 'git-contacts.xml', 21 21 ) 22 22 23 - custom_target( 23 + doc_targets += custom_target( 24 24 command: [ 25 25 xmlto, 26 26 '-m', '@INPUT@', ··· 39 39 endif 40 40 41 41 if get_option('docs').contains('html') 42 - custom_target( 42 + doc_targets += custom_target( 43 43 command: asciidoc_common_options + [ 44 44 '--backend=' + asciidoc_html, 45 45 '--doctype=manpage',
+2 -2
contrib/subtree/meson.build
··· 38 38 output: 'git-subtree.xml', 39 39 ) 40 40 41 - custom_target( 41 + doc_targets += custom_target( 42 42 command: [ 43 43 xmlto, 44 44 '-m', '@INPUT@', ··· 57 57 endif 58 58 59 59 if get_option('docs').contains('html') 60 - custom_target( 60 + doc_targets += custom_target( 61 61 command: asciidoc_common_options + [ 62 62 '--backend=' + asciidoc_html, 63 63 '--doctype=manpage',
+7
meson.build
··· 2099 2099 2100 2100 subdir('bin-wrappers') 2101 2101 if get_option('docs') != [] 2102 + doc_targets = [] 2102 2103 subdir('Documentation') 2103 2104 endif 2104 2105 2105 2106 subdir('contrib') 2107 + 2108 + # Note that the target is intentionally configured after including the 2109 + # 'contrib' directory, as some tool there also have their own manpages. 2110 + if get_option('docs') != [] 2111 + alias_target('docs', doc_targets) 2112 + endif 2106 2113 2107 2114 exclude_from_check_headers = [ 2108 2115 'compat/',