Skip to content

Commit b8cc1a9

Browse files
committed
Merge branch 'ps/meson-bin-sh'
Meson-based build framework update. * ps/meson-bin-sh: meson: prefer shell at "/bin/sh" meson: report detected runtime executable paths
2 parents a4ad13d + 4cba20f commit b8cc1a9

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

meson.build

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,11 @@ shell = find_program('sh', dirs: program_path, native: true)
243243
tar = find_program('tar', dirs: program_path, native: true)
244244
time = find_program('time', dirs: program_path, required: get_option('benchmarks'))
245245

246-
target_shell = find_program('sh', dirs: program_path, native: false)
246+
# Detect the target shell that is used by Git at runtime. Note that we prefer
247+
# "/bin/sh" over a PATH-based lookup, which provides a working shell on most
248+
# supported systems. This path is also the default shell path used by our
249+
# Makefile. This lookup can be overridden via `program_path`.
250+
target_shell = find_program('sh', dirs: program_path + [ '/bin' ], native: false)
247251

248252
# Sanity-check that programs required for the build exist.
249253
foreach tool : ['cat', 'cut', 'grep', 'sort', 'tr', 'uname']
@@ -2174,3 +2178,9 @@ summary({
21742178
'sha256': sha256_backend,
21752179
'zlib': zlib_backend,
21762180
}, section: 'Backends')
2181+
2182+
summary({
2183+
'perl': target_perl,
2184+
'python': target_python,
2185+
'shell': target_shell,
2186+
}, section: 'Runtime executable paths')

0 commit comments

Comments
 (0)