git/contrib/contacts/meson.build
Patrick Steinhardt 197f0d0f39 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>
2025-09-11 09:57:24 -07:00

56 lines
1.3 KiB
Meson

custom_target(
input: 'git-contacts',
output: 'git-contacts',
command: generate_perl_command,
depends: [git_version_file],
install: true,
install_dir: get_option('libexecdir') / 'git-core',
)
if get_option('docs').contains('man')
contacts_xml = custom_target(
command: asciidoc_common_options + [
'--backend=' + asciidoc_docbook,
'--doctype=manpage',
'--out-file=@OUTPUT@',
'@INPUT@',
],
depends: documentation_deps,
input: 'git-contacts.adoc',
output: 'git-contacts.xml',
)
doc_targets += custom_target(
command: [
xmlto,
'-m', '@INPUT@',
'man',
contacts_xml,
'-o',
meson.current_build_dir(),
] + xmlto_extra,
input: [
'../../Documentation/manpage-normal.xsl',
],
output: 'git-contacts.1',
install: true,
install_dir: get_option('mandir') / 'man1',
)
endif
if get_option('docs').contains('html')
doc_targets += custom_target(
command: asciidoc_common_options + [
'--backend=' + asciidoc_html,
'--doctype=manpage',
'--out-file=@OUTPUT@',
'@INPUT@',
],
depends: documentation_deps,
input: 'git-contacts.adoc',
output: 'git-contacts.html',
install: true,
install_dir: get_option('datadir') / 'doc/git-doc',
)
endif