On Mon, 30 Jun 2025, 16:41 Zack Weinberg, <invalid.nore...@gnu.org> wrote:

> Follow-up Comment #3, bug #67265 (group make):
>
> 1. The point of the bug report is that $(file) *should be* processed later
> than other $(...) constructs.  Having said that, it would probably be
> sufficient, and perhaps a less invasive change, to do $(...) expansion of
> *each line of a command list*  independently, after execution of the
> previous
> line.
>

That cannot work logically. How can make control what happens inside a
shell command?  How can make wait until mkdir is executed by the shell and
then expand $(file) before the next shell command executes?


> 2. I am already aware of several alternative ways to do the same operation
> that would avoid the bug.  The existence of those alternatives does not
> mean
> the current behavior of $(file) isn't a bug.
>

It's not $(file) that is causing this effect it's how all make functions
work of any kind. There is always expansion just before a command is
executed. When a command is sent to the shell make has no further control
of it.

To put it another way, you cannot leave make functions in a shell command
or the shell would give an error. That's why make expands the command
before executing it - that's the last chance to modify it.

Regards,

Tim




>     _______________________________________________________
>
> To reply to this notification, you have two options:
> * In the Web UI at <https://savannah.gnu.org/bugs/?67265>.
> * By email to 68927-bugs-savannah <savannah-track...@gnu.org>, ONLY IF
> you preserve both
>   the 'display name' and the 'address specification' in the To: header
>   AND you sign your email with a GPG key registered in your Savannah
> account
>   AND you include the following line in the reply:
>
>   {savane: user = 68927; tracker = bugs; item = 67265}
>
> _______________________________________________
> Message sent via Savannah
> https://savannah.gnu.org/
>

Reply via email to