public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Phillip Wood <phillip.wood@dunelm.org.uk>
Cc: git@vger.kernel.org, Phillip Wood <phillip.wood123@gmail.com>
Subject: Re: [PATCH] meson: fix building mergetool docs
Date: Mon, 9 Feb 2026 13:32:33 +0100	[thread overview]
Message-ID: <aYnT4XdQQ2hBEsTQ@pks.im> (raw)
In-Reply-To: <604c79018992dee019205741934508091cdd1e47.1770631599.git.phillip.wood@dunelm.org.uk>

On Mon, Feb 09, 2026 at 10:08:43AM +0000, Phillip Wood wrote:
> 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

Oh, good catch.

> 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.

Huh.

> 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.

We probably could, I guess. And making the script more solid would
definitely be a very good step regardless of whether or not we want to
use a more esoteric build directory.

> 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@'
>      ],

Makes sense. I assume that this is the only change required to make
out-of-source builds work?

> -    env: [
> -      'MERGE_TOOLS_DIR=' + meson.project_source_root() / 'mergetools',
> -    ],

Hm. We indeed set this environment variable in the script itself. I was
a bit puzzled at first because we don't export it, and it's not used
directly. But we source "git-mergetool--lib.sh", which in turn uses the
variable, so it shouldn't be needed to export it.

So this looks like a nice simplification to me, thanks!

Patrick

      reply	other threads:[~2026-02-09 12:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-09 10:08 [PATCH] meson: fix building mergetool docs Phillip Wood
2026-02-09 12:32 ` Patrick Steinhardt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aYnT4XdQQ2hBEsTQ@pks.im \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=phillip.wood123@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox