Re: [PATCH 07/11] meson: deduplicate the list of required programs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25/01/29 08:12AM, Patrick Steinhardt wrote:
> 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@xxxxxx>
> ---
>  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.

>    program = find_program(tool, dirs: program_path)
>    script_environment.prepend('PATH', fs.parent(program.full_path()))
>  endforeach
> 
> -- 
> 2.48.1.362.g079036d154.dirty
> 
> 




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux