]> git.ipfire.org Git - thirdparty/git.git/commit
meson: fix installation when -Dlibexexdir is set
authorRamsay Jones <ramsay@ramsayjones.plus.com>
Tue, 15 Jul 2025 23:32:38 +0000 (00:32 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 16 Jul 2025 14:34:32 +0000 (07:34 -0700)
commit586919c3b2b76f11d22e2ce571cb95b8e4bfbd2a
tree976a439d26ea5531de9f03df97e23d7ca792eba3
parent16bd9f20a403117f2e0d9bcda6c6e621d3763e77
meson: fix installation when -Dlibexexdir is set

commit 837f637cf5 ("meson.build: correct setting of GIT_EXEC_PATH",
2025-05-19) corrected the GIT_EXEC_PATH build setting, but then forgot
to update the installation path for the library executables. This causes
a regression when attempting to execute commands, after installing to a
non-standard location (reported here[1]):

    $ meson -Dprefix=/tmp/git -Dlibexecdir=libexec-different build
    $ meson install
    $ /tmp/git/bin/git --exec-path
    /tmp/git/libexec-different
    $ /tmp/git/bin/git daemon
    git: 'daemon' is not a git command. See 'git --help'

In order to fix the issue, use the 'git_exec_path' variable (calculated
while processing -Dlibexecdir) as the 'install_dir' field during the
installation of the library executables.

[1]: <66fd343a-1351-4350-83eb-c797e47b7693@gmail.com>

Reported-by: irecca.kun@gmail.com
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
meson.build