On 11/23/24 17:23, Simon Tatham wrote:
Pádraig Brady <p...@draigbrady.com> wrote:
All these boil down to you want to pass the actual path
rather than lookup a name in $PATH.
This can be achieved simply with: env $(realpath -ms "$path")

True – and that's what build systems wrapping 'make' often do (perhaps
in-process or at makefile-construction time), to get round the problem
with $< in VPATH builds.

We're talking about a problem on caller side which should be solved in env(1).

In a Makefile, I'd always favor to be explicit.  If a script has to be created
first and then some other target depends on it, then shouldn't the makefile
better specify the filename explicitly, like "$(srcdir)/foo" or "sh -c dir/foo"?

Reducing this precision in env(1) doesn't sound convincing to me.

Have a nice day,
Berny

Reply via email to