git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 12/13] meson: consistently use custom program paths to resolve programs

From
Patrick Steinhardt <ps@pks.im>
Date
Feb 26, 2025, 08:22 UTC
Message-ID
<20250226-b4-pks-meson-improvements-v3-12-60c77cf673ae@pks.im>
In-Reply-To
<20250226-b4-pks-meson-improvements-v3-0-60c77cf673ae@pks.im>

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>
---
 Documentation/meson.build | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Documentation/meson.build b/Documentation/meson.build
index 6438fa67920..c6117366ff9 100644
--- a/Documentation/meson.build
+++ b/Documentation/meson.build
@@ -206,9 +206,9 @@ manpages = {
 
 docs_backend = get_option('docs_backend')
 if docs_backend == 'auto'
-  if find_program('asciidoc', required: false).found()
+  if find_program('asciidoc', dirs: program_path, required: false).found()
     docs_backend = 'asciidoc'
-  elif find_program('asciidoctor', required: false).found()
+  elif find_program('asciidoctor', dirs: program_path, required: false).found()
     docs_backend = 'asciidoctor'
   else
     error('Neither asciidoc nor asciidoctor were found.')
@@ -216,7 +216,7 @@ if docs_backend == 'auto'
 endif
 
 if docs_backend == 'asciidoc'
-  asciidoc = find_program('asciidoc', required: true)
+  asciidoc = find_program('asciidoc', dirs: program_path)
   asciidoc_html = 'xhtml11'
   asciidoc_docbook = 'docbook'
   xmlto_extra = [ ]
@@ -245,7 +245,7 @@ if docs_backend == 'asciidoc'
     asciidoc_conf,
   ]
 elif docs_backend == 'asciidoctor'
-  asciidoctor = find_program('asciidoctor', required: true)
+  asciidoctor = find_program('asciidoctor', dirs: program_path)
   asciidoc_html = 'xhtml5'
   asciidoc_docbook = 'docbook5'
   xmlto_extra = [
@@ -283,7 +283,7 @@ elif docs_backend == 'asciidoctor'
   ]
 endif
 
-xmlto = find_program('xmlto')
+xmlto = find_program('xmlto', dirs: program_path)
 
 cmd_lists = [
   'cmds-ancillaryinterrogators.txt',
@@ -404,7 +404,7 @@ if get_option('docs').contains('html')
     pointing_to: 'git.html',
   )
 
-  xsltproc = find_program('xsltproc')
+  xsltproc = find_program('xsltproc', dirs: program_path)
 
   user_manual_xml = custom_target(
     command: asciidoc_common_options + [
-- 
2.48.1.741.g8a9f3a5cdc.dirty
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 12 of 14 in “meson: cleanups, improvements, smallish fixes”
  1. 00/13 meson: cleanups, improvements, smallish fixesPatrick Steinhardt, Feb 26, 2025
  2. 01/13 meson: fix exec path with enabled runtime prefixPatrick Steinhardt, Feb 26, 2025
  3. 03/13 meson: inline the static 'git' libraryPatrick Steinhardt, Feb 26, 2025
  4. 02/13 meson: fix OpenSSL fallback when not explicitly requiredPatrick Steinhardt, Feb 26, 2025
  5. 04/13 meson: simplify use of the common-main libraryPatrick Steinhardt, Feb 26, 2025
  6. 05/13 meson: introduce `libgit_curl` dependencyPatrick Steinhardt, Feb 26, 2025
  7. 06/13 meson: stop linking libcurl into all executablesPatrick Steinhardt, Feb 26, 2025
  8. 07/13 meson: drop separate version libraryPatrick Steinhardt, Feb 26, 2025
  9. 08/13 meson: improve PATH handlingPatrick Steinhardt, Feb 26, 2025
  10. 09/13 meson: improve handling of `sane_tool_path` optionPatrick Steinhardt, Feb 26, 2025
  11. 10/13 meson: prevent finding sed(1) in a loopPatrick Steinhardt, Feb 26, 2025
  12. 12/13 meson: consistently use custom program paths to resolve programsPatrick Steinhardt, Feb 26, 2025
  13. 11/13 meson: fix overwritten `git` variablePatrick Steinhardt, Feb 26, 2025
  14. 13/13 gitlab-ci: restrict maximum number of link jobs on WindowsPatrick Steinhardt, Feb 26, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.