From: Patrick Steinhardt <ps@pks.im>
To: Eli Schwartz <eschwartz@gentoo.org>
Cc: git@vger.kernel.org, Sam James <sam@gentoo.org>
Subject: Re: [PATCH] meson: fix perl detection when docs are enabled, but perl bindings aren't
Date: Mon, 17 Mar 2025 15:01:16 +0100 [thread overview]
Message-ID: <Z9grLNimSDd8-Pen@pks.im> (raw)
In-Reply-To: <20250316060605.166364-1-eschwartz@gentoo.org>
On Sun, Mar 16, 2025 at 02:06:05AM -0400, Eli Schwartz wrote:
> The `perl` variable in meson.build is assigned to a program lookup,
> which may have the value "not-found object" if configuring with
> `-Dperl=disabled`.
>
> There is already a list of other cases where we do need a perl command,
> even when not building perl bindings. Building documentation should be
> one of those cases, but was missing from the list. Add it.
>
> Fixes:
>
> ```
> $ meson setup builddir/ -Ddocs=man -Dperl=disabled -Dtests=false
> [...]
> Documentation/meson.build:308:22: ERROR: Tried to use not-found external program in "command"
> ```
>
> Bug: https://bugs.gentoo.org/949247
Nit: we typically don't include Bug trailers.
> Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
> ---
> meson.build | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meson.build b/meson.build
> index efe2871c9d..c6241c7a12 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -772,7 +772,7 @@ endif
> # features. It is optional if you want to neither execute tests nor use any of
> # these optional features.
> perl_required = get_option('perl')
> -if get_option('tests') or get_option('gitweb').enabled() or 'netrc' in get_option('credential_helpers')
> +if get_option('tests') or get_option('gitweb').enabled() or 'netrc' in get_option('credential_helpers') or get_option('docs') != []
> perl_required = true
> endif
This change does indeed make sense. We require Perl in order to generate
command lists. Ideally we would get rid of this dependency so that it
does become possible to build documentation without Perl, as this is the
only part of the build system that requires it. But until then I'm fine
with making the requirement explicit here.
Patrick
prev parent reply other threads:[~2025-03-17 14:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-16 6:06 [PATCH] meson: fix perl detection when docs are enabled, but perl bindings aren't Eli Schwartz
2025-03-17 14:01 ` Patrick Steinhardt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z9grLNimSDd8-Pen@pks.im \
--to=ps@pks.im \
--cc=eschwartz@gentoo.org \
--cc=git@vger.kernel.org \
--cc=sam@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).