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

[PATCH] meson: fix building mergetool docs

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Feb 9, 2026, 10:08 UTC
Message-ID
<604c79018992dee019205741934508091cdd1e47.1770631599.git.phillip.wood@dunelm.org.uk>
From: Phillip Wood <phillip.wood@dunelm.org.uk>

Building the documentation with meson when the build directory is not an immediate subdirectory of the source directory prints the following error

[2/1349] Generating Documentation/mer... command (wrapped by meson to set env) ../../Documentation/generate-mergetool-list.sh: line 15: ../git-mergetool--lib.sh: No such file or directory

The build does not fail because the failure is upstream of a pipe. Fix the error by passing the correct source directory when meson runs "generate-mergetool-list.sh". As that script sets $MERGE_TOOLS_DIR we do not need to set it in the environment when running the script.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
---
We should probably change the script so that error is not ignored
as well. I also wonder if we should use something more exotic than
"build" as the meson build directory in our CI though that wont make
any difference if the script does not fail.
Base-Commit: 3e0db84c88c57e70ac8be8c196dfa92c5d656fbc
Published-As: https://github.com/phillipwood/git/releases/tag/pw%2Fmeson-fix-mergetool-docs%2Fv1
View-Changes-At: https://github.com/phillipwood/git/compare/3e0db84c8...604c79018
Fetch-It-Via: git fetch https://github.com/phillipwood/git pw/meson-fix-mergetool-docs/v1
 Documentation/meson.build | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/Documentation/meson.build b/Documentation/meson.build
index f02dbc20cbc..d0e557c2078 100644
--- a/Documentation/meson.build
+++ b/Documentation/meson.build
@@ -353,13 +353,10 @@ foreach mode : [ 'diff', 'merge' ]
     command: [
       shell,
       '@INPUT@',
-      '..',
+      meson.project_source_root(),
       mode,
       '@OUTPUT@'
     ],
-    env: [
-      'MERGE_TOOLS_DIR=' + meson.project_source_root() / 'mergetools',
-    ],
     input: 'generate-mergetool-list.sh',
     output: 'mergetools-' + mode + '.adoc',
   )
-- 
2.52.0.362.g884e03848a9
Next: Patrick Steinhardt
Message 1 of 2 in “meson: fix building mergetool docs”
  1. meson: fix building mergetool docsPhillip Wood, Feb 9, 2026
  2. Patrick SteinhardtFeb 9, 2026

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.