git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/3] meson: introduce a "docs" alias to compile documentation only

From
Karthik Nayak <karthik.188@gmail.com>
Date
Sep 16, 2025, 09:14 UTC
Message-ID
<CAOLa=ZRVaBp6DAM4gYXFjCRORYxObvWn5egrPAOcGZ42mxnsgg@mail.gmail.com>
In-Reply-To
<20250911-b4-pks-meson-docs-target-v1-1-a92c666ecef9@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 7 quoted lines
> 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`.
>

So earlier we would compile the documentation always (while the dependencies are met). Now we move this to a "docs" subcommand...

[snip]
Show 20 quoted lines
> diff --git a/meson.build b/meson.build
> index b3dfcc0497..40b2a2dc54 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -2101,11 +2101,18 @@ endif
>
>  subdir('bin-wrappers')
>  if get_option('docs') != []
> +  doc_targets = []
>    subdir('Documentation')
>  endif
>
>  subdir('contrib')
>
> +# Note that the target is intentionally configured after including the
> +# 'contrib' directory, as some tool there also have their own manpages.
> +if get_option('docs') != []
> +  alias_target('docs', doc_targets)
> +endif
> +

Shouldn't we also add it to 'meson_options.txt' with default set to true? That would ensure that `meson compile` would also build the docs.

Show 6 quoted lines
>  exclude_from_check_headers = [
>    'compat/',
>    'unicode-width.h',
>
> --
> 2.51.0.450.g87641ccf93.dirty
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 3 of 14 in “ci: don't compile whole project when testing docs with Meson”
  1. 0/3 ci: don't compile whole project when testing docs with MesonPatrick Steinhardt, Sep 11, 2025
  2. 1/3 meson: introduce a "docs" alias to compile documentation onlyPatrick Steinhardt, Sep 11, 2025
  3. Karthik NayakSep 16, 2025
  4. Patrick SteinhardtSep 16, 2025
  5. Karthik NayakSep 16, 2025
  6. 2/3 meson: print docs backend as part of the summaryPatrick Steinhardt, Sep 11, 2025
  7. 3/3 ci: don't compile whole project when testing docs with MesonPatrick Steinhardt, Sep 11, 2025
  8. Karthik NayakSep 16, 2025
  9. Junio C HamanoSep 11, 2025
  10. Patrick SteinhardtSep 15, 2025
  11. Junio C HamanoSep 15, 2025
  12. Patrick SteinhardtSep 16, 2025
  13. Junio C HamanoSep 16, 2025
  14. Karthik NayakSep 16, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.