Skip to content

Commit 2c374ea

Browse files
pks-tgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3ee3a6e commit 2c374ea

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Documentation/meson.build

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,17 +206,17 @@ manpages = {
206206

207207
docs_backend = get_option('docs_backend')
208208
if docs_backend == 'auto'
209-
if find_program('asciidoc', required: false).found()
209+
if find_program('asciidoc', dirs: program_path, required: false).found()
210210
docs_backend = 'asciidoc'
211-
elif find_program('asciidoctor', required: false).found()
211+
elif find_program('asciidoctor', dirs: program_path, required: false).found()
212212
docs_backend = 'asciidoctor'
213213
else
214214
error('Neither asciidoc nor asciidoctor were found.')
215215
endif
216216
endif
217217

218218
if docs_backend == 'asciidoc'
219-
asciidoc = find_program('asciidoc', required: true)
219+
asciidoc = find_program('asciidoc', dirs: program_path)
220220
asciidoc_html = 'xhtml11'
221221
asciidoc_docbook = 'docbook'
222222
xmlto_extra = [ ]
@@ -245,7 +245,7 @@ if docs_backend == 'asciidoc'
245245
asciidoc_conf,
246246
]
247247
elif docs_backend == 'asciidoctor'
248-
asciidoctor = find_program('asciidoctor', required: true)
248+
asciidoctor = find_program('asciidoctor', dirs: program_path)
249249
asciidoc_html = 'xhtml5'
250250
asciidoc_docbook = 'docbook5'
251251
xmlto_extra = [
@@ -283,7 +283,7 @@ elif docs_backend == 'asciidoctor'
283283
]
284284
endif
285285

286-
xmlto = find_program('xmlto')
286+
xmlto = find_program('xmlto', dirs: program_path)
287287

288288
cmd_lists = [
289289
'cmds-ancillaryinterrogators.txt',
@@ -404,7 +404,7 @@ if get_option('docs').contains('html')
404404
pointing_to: 'git.html',
405405
)
406406

407-
xsltproc = find_program('xsltproc')
407+
xsltproc = find_program('xsltproc', dirs: program_path)
408408

409409
user_manual_xml = custom_target(
410410
command: asciidoc_common_options + [

0 commit comments

Comments
 (0)