aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@gentoo.org>2025-03-16 02:06:05 -0400
committerJunio C Hamano <gitster@pobox.com>2025-03-17 15:25:42 -0700
commit7c8cd9c1587d180e2d4aa6d0520c0a8ea1a551e6 (patch)
treed93c9e1b3cae38aa8f32a9f5430e3e11a7365db5
parentGit 2.49 (diff)
downloadgit-7c8cd9c1587d180e2d4aa6d0520c0a8ea1a551e6.tar.gz
git-7c8cd9c1587d180e2d4aa6d0520c0a8ea1a551e6.zip
meson: fix perl detection when docs are enabled, but perl bindings aren't
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 Signed-off-by: Eli Schwartz <eschwartz@gentoo.org> Acked-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rw-r--r--meson.build2
1 files changed, 1 insertions, 1 deletions
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