Re: [PATCH 07/11] meson: deduplicate the list of required programs
- From
Justin Tobler <jltobler@gmail.com>
- Date
- Jan 29, 2025, 20:28 UTC
- Message-ID
- <5ytcbgq73mpxqgz4vsxg4trk456c7b44x74ch64xw54agjlj74@5dd6jtifg5xd>
- In-Reply-To
- <20250129-b4-pks-meson-improvements-v1-7-ab709f0be12c@pks.im>
On 25/01/29 08:12AM, Patrick Steinhardt wrote:
Show 25 quoted lines
> When setting up Meson we detect a couple of executables that we rely on
> in order to build Git and prepend their respective directories to PATH.
> This is done so that Windows can locate these tools at build time in
> case they aren't included in the default PATH, as we know to pick up
> those required build tools from the Git for Windows path explicitly.
>
> The list of executables we check against is somewhat excessive though,
> as many of the tools are all part of coreutils. Let's deduplicate them
> so that we only check for one binary that is part of it, namely cat(1).
>
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
> meson.build | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meson.build b/meson.build
> index 1e1e478d17..48eb068fd8 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -187,7 +187,7 @@ shell = find_program('sh', dirs: program_path)
> tar = find_program('tar', dirs: program_path)
>
> script_environment = environment()
> -foreach tool : ['cat', 'cut', 'grep', 'sed', 'sort', 'tr', 'uname']
> +foreach tool : ['cat', 'grep', 'sed']It might be nice to leave a comment here noting that checking for cat(1) alone is sufficient to account for the other tools part of coreutils.
Show 8 quoted lines
> program = find_program(tool, dirs: program_path)
> script_environment.prepend('PATH', fs.parent(program.full_path()))
> endforeach
>
> --
> 2.48.1.362.g079036d154.dirty
>
>