aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meson.build12
1 files changed, 10 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 8e8f228a37..bd14bc15a1 100644
--- a/meson.build
+++ b/meson.build
@@ -1592,10 +1592,19 @@ else
error('Unsupported CSPRNG backend: ' + csprng_backend)
endif
+git_exec_path = 'libexec/git-core'
+libexec = get_option('libexecdir')
+if libexec != 'libexec' and libexec != '.'
+ git_exec_path = libexec
+endif
+
if get_option('runtime_prefix')
libgit_c_args += '-DRUNTIME_PREFIX'
build_options_config.set('RUNTIME_PREFIX', 'true')
- git_exec_path = get_option('libexecdir') / 'git-core'
+
+ if git_exec_path.startswith('/')
+ error('runtime_prefix requires a relative libexecdir not:', libexec)
+ endif
if compiler.has_header('mach-o/dyld.h')
libgit_c_args += '-DHAVE_NS_GET_EXECUTABLE_PATH'
@@ -1632,7 +1641,6 @@ if get_option('runtime_prefix')
endif
else
build_options_config.set('RUNTIME_PREFIX', 'false')
- git_exec_path = get_option('prefix') / get_option('libexecdir') / 'git-core'
endif
libgit_c_args += '-DGIT_EXEC_PATH="' + git_exec_path + '"'