meson: consistently use custom program paths to resolve programs
The calls to `find_program()` in our documentation don't use our custom program path. This variable gets populated on Windows with the location of Git for Windows so that we can use it to provide our build tools. Consequently, we may not be able to find all necessary binaries on Windows. Adapt the calls to use the program path to fix this. While at it, drop `required: true` arguments, which are the default anyway. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Patrick Steinhardt committed
Feb 26, 2025 at 09:22 UTC
2c374ea4bb47c84f80f905df3a00b7d724386a28
1 file changed
+6
-6
Documentation/meson.build
+6
-6
@@ -206,9 +206,9 @@ manpages = {
206
207
docs_backend = get_option('docs_backend')
208
if docs_backend == 'auto'
209
- if find_program('asciidoc', required: false).found()
209
+ if find_program('asciidoc', dirs: program_path, required: false).found()
210
docs_backend = 'asciidoc'
211
- elif find_program('asciidoctor', required: false).found()
211
+ elif find_program('asciidoctor', dirs: program_path, required: false).found()
212
docs_backend = 'asciidoctor'
213
else
214
error('Neither asciidoc nor asciidoctor were found.')
@@ -216,7 +216,7 @@ if docs_backend == 'auto'
216
endif
217
218
if docs_backend == 'asciidoc'
219
- asciidoc = find_program('asciidoc', required: true)
219
+ asciidoc = find_program('asciidoc', dirs: program_path)
220
asciidoc_html = 'xhtml11'
221
asciidoc_docbook = 'docbook'
222
xmlto_extra = [ ]
@@ -245,7 +245,7 @@ if docs_backend == 'asciidoc'
245
asciidoc_conf,
246
]
247
elif docs_backend == 'asciidoctor'
248
- asciidoctor = find_program('asciidoctor', required: true)
248
+ asciidoctor = find_program('asciidoctor', dirs: program_path)
249
asciidoc_html = 'xhtml5'
250
asciidoc_docbook = 'docbook5'
251
xmlto_extra = [
@@ -283,7 +283,7 @@ elif docs_backend == 'asciidoctor'
283
]
284
endif
285
286
-xmlto = find_program('xmlto')
286
+xmlto = find_program('xmlto', dirs: program_path)
287
288
cmd_lists = [
289
'cmds-ancillaryinterrogators.txt',
@@ -404,7 +404,7 @@ if get_option('docs').contains('html')
404
pointing_to: 'git.html',
405
)
406
407
- xsltproc = find_program('xsltproc')
407
+ xsltproc = find_program('xsltproc', dirs: program_path)
408
409
user_manual_xml = custom_target(
410
command: asciidoc_common_options + [