From 799225755f1f57e2f33b5e7efd673715d19730e0 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 5 Jan 2022 18:23:26 +0200 Subject: [PATCH 37/37] Meson: Find shell executable just once See osdn #43452 Signed-off-by: Marko Lindqvist --- meson.build | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 72ae9d5428..0c734c4561 100644 --- a/meson.build +++ b/meson.build @@ -415,6 +415,7 @@ if get_option('nls') endif python_exe = find_program('python3') +sh_exe = find_program('sh') common_inc = include_directories(cross_inc_path, lua_inc_path, 'dependencies/luasql/src', 'dependencies/tinycthread', @@ -432,16 +433,16 @@ client_inc = [common_inc, include_directories('client', 'client/include', tool_inc = [server_inc, include_directories('tools/ruleutil', 'tools/shared')] runwrap = custom_target('runwrap', output: 'run.sh', - command: ['sh', files('bootstrap/generate_meson_run.sh'), '@OUTPUT@'], + command: [sh_exe, files('bootstrap/generate_meson_run.sh'), '@OUTPUT@'], depend_files: files('bootstrap/generate_meson_run.sh'), build_by_default: true) verhdr = custom_target('verhdr', output: 'version_gen.h', - command: ['sh', files('gen_headers/generate_version_header.sh'), '@OUTPUT@'], + command: [sh_exe, files('gen_headers/generate_version_header.sh'), '@OUTPUT@'], depend_files: files('fc_version')) ls_core = custom_target('langstat_core', output: 'langstat_core.txt', - command: ['sh', files('bootstrap/generate_langstat.sh'), 'core', + command: [sh_exe, files('bootstrap/generate_langstat.sh'), 'core', meson.project_source_root(), meson.project_build_root()]) @@ -467,7 +468,7 @@ pack_client = custom_target('packets_client', output: ['packhand_gen.h', depend_files: files('common/networking/packets.def')) gitrev = custom_target('gitrev', output: 'fc_gitrev_gen.h', - command: ['sh', files('bootstrap/generate_gitrev.sh'), + command: [sh_exe, files('bootstrap/generate_gitrev.sh'), meson.project_source_root(), '@OUTPUT@'], build_by_default: get_option('gitrev')) -- 2.34.1