Re: [PATCH 1/3] meson: introduce a "docs" alias to compile documentation only
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Sep 16, 2025, 11:50 UTC
- Message-ID
- <CAOLa=ZSvra91ca_-rgNq1UoNQg6-n1nF4F7NgjuAc-mpNBTS4A@mail.gmail.com>
- In-Reply-To
- <aMk0CdaN8pzEPf7m@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 30 quoted lines
> On Tue, Sep 16, 2025 at 04:14:56AM -0500, Karthik Nayak wrote:
>> Patrick Steinhardt <ps@pks.im> writes:
>> > 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.
>
> We already have the "docs" option in "meson_options.txt". In fact, it is
> not even possible to have an option that is _not_ declared in that file
> :)
>Nice. I should've verified, I was merely looking at the diff-stat
> The option accepts an array of choices, where the choices can be "man" > or "html" to build manpages, HTML sites, both or none. So as soon as the > user made at least one choice we enable the "docs" target automatically. >
Okay that makes sense! The default is set to '[]'. Okay looks good. Thanks for clarifying.
> Patrick