Thread (49 messages) 49 messages, 3 authors, 2025-02-26

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

From: Justin Tobler <hidden>
Date: 2025-01-29 20:31:31

On 25/01/29 08:12AM, Patrick Steinhardt wrote:
quoted hunk ↗ jump to hunk
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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help