bug-make
[Top][All Lists]
Advanced

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

Re: Issue using "command" shell builtin in make rules.


From: Paul Smith
Subject: Re: Issue using "command" shell builtin in make rules.
Date: Sat, 18 Nov 2017 09:39:31 -0500

On Tue, 2017-11-07 at 13:43 -0500, Nick Bowler wrote:
> Is this behaviour intended?  I noticed the manual says "make may take
> shortcuts that do not affect the results" but in this instance a change
> in results is definitely observed.

Well, technically "command" is not a valid POSIX shell built-in
command, so relying on it in your makefile scripts without changing the
SHELL variable to /bin/bash (or some other shell that supports
"command") is incorrect.

However, even if you were to change SHELL to /bin/bash, it would still
not work properly :).

I updated the built-in command list to contain "command".  But what
should really happen is make should re-try the slow path if the fast
path fails with a "command not found" error... then we wouldn't have to
 keep adding non-standard built-ins to these lists.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]