]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ps/meson-bin-sh'
authorJunio C Hamano <gitster@pobox.com>
Mon, 12 May 2025 21:22:50 +0000 (14:22 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 12 May 2025 21:22:50 +0000 (14:22 -0700)
Meson-based build framework update.

* ps/meson-bin-sh:
  meson: prefer shell at "/bin/sh"
  meson: report detected runtime executable paths

1  2 
meson.build

diff --cc meson.build
index 270ce933d0f5d6c58f96c9383d05fa0b36502150,6a90310a2ca311c6d9d8b0c40b0d40a3dcc4e4b1..148ae668eb017d89d914e2df28342122c2d8a12e
@@@ -241,9 -235,12 +241,13 @@@ git = find_program('git', dirs: program
  sed = find_program('sed', dirs: program_path, native: true)
  shell = find_program('sh', dirs: program_path, native: true)
  tar = find_program('tar', dirs: program_path, native: true)
 +time = find_program('time', dirs: program_path, required: get_option('benchmarks'))
  
- target_shell = find_program('sh', dirs: program_path, native: false)
+ # Detect the target shell that is used by Git at runtime. Note that we prefer
+ # "/bin/sh" over a PATH-based lookup, which provides a working shell on most
+ # supported systems. This path is also the default shell path used by our
+ # Makefile. This lookup can be overridden via `program_path`.
+ target_shell = find_program('sh', dirs: program_path + [ '/bin' ], native: false)
  
  # Sanity-check that programs required for the build exist.
  foreach tool : ['cat', 'cut', 'grep', 'sort', 'tr', 'uname']