Re: [PATCH 1/3] meson: expose knob for xmlto relative links in manuals
Patrick Steinhardt <[email protected]>
| Newsgroups | org.kernel.vger.git |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Aug 07, 2026 at 07:56:24AM -0400, D. Ben Knoble wrote:
> diff --git a/Documentation/meson.build b/Documentation/meson.build
> index f4854f802d..cfa9c67609 100644
> --- a/Documentation/meson.build
> +++ b/Documentation/meson.build
> @@ -379,13 +379,18 @@ foreach manpage, category : manpages
> output: fs.stem(manpage) + '.xml',
> )
>
> + man_base_url = 'file://' + htmldir + '/'
> + if get_option('man_base_url') != ''
> + man_base_url = get_option('man_base_url')
> + endif
> +
> doc_targets += custom_target(
> command: [
> xmlto,
> '-m', '@INPUT0@',
> '-m', '@INPUT1@',
> '--stringparam',
> - 'man.base.url.for.relative.links=' + get_option('prefix') / get_option('mandir'),
> + 'man.base.url.for.relative.links=' + man_base_url,
> 'man',
> manpage_xml_target,
> '-o',
> diff --git a/meson_options.txt b/meson_options.txt
> index dc88f130d7..d590c21648 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -111,6 +111,8 @@ option('default_help_format', type: 'combo', choices: ['man', 'html', 'platform'
> description: 'Default format used when executing git-help(1).')
> option('docs_backend', type: 'combo', choices: ['asciidoc', 'asciidoctor', 'auto'], value: 'auto',
> description: 'Which backend to use to generate documentation.')
> +option('man_base_url', type: 'string', value: '',
> + description: 'The base URL to use for relative links in manuals')
Makes sense. I also verified that we indeed use the "file://" prefix by
default in our Makefile.
Patrick