Re: [bug #67265] $(file) in commands is executed too early

2025-06-30 Thread Zack Weinberg
On Mon, Jun 30, 2025, at 2:21 PM, Paul D. Smith wrote: > Follow-up Comment #6, bug #67265 (group make): >> If you are determined that anything that looks like $(...) or ${...} must be >> consumed by expansion, you could get the same effect by having $(file >> REDIRECTION, CONTENTS) expand to a diff

Re: [bug #67265] $(file) in commands is executed too early

2025-06-30 Thread Zack Weinberg
On Mon, Jun 30, 2025, at 1:43 PM, Tim Murphy wrote: > On Mon, 30 Jun 2025 at 18:14, Zack Weinberg wrote: >> p.s. I do insist that this is a bug, not a feature request. The existing >> behavior is strictly less useful than the requested behavior, and surprising >> to boot.

Re: [bug #67265] $(file) in commands is executed too early

2025-06-30 Thread Zack Weinberg
On Mon, Jun 30, 2025, at 12:55 PM, Tim Murphy wrote: > 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? It doesn't have to control what happens inside a shell comman

[bug #67265] $(file) in commands is executed too early

2025-06-30 Thread Zack Weinberg
Follow-up Comment #5, bug #67265 (group make): > We're not going to make $(file...) a special case that expands differently > than everything else. I'm surprised you insist on this. There is plenty of precedent for using the same notation for expandable and non-expandable primitives: both Lisp

[bug #67265] $(file) in commands is executed too early

2025-06-30 Thread Zack Weinberg
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* i

[bug #67265] $(file) in commands is executed too early

2025-06-30 Thread Zack Weinberg
Follow-up Comment #1, bug #67265 (group make): (Tested only with 4.3, but I don't see anything related to $(file) in the NEWS for 4.4. Problem originally found by Stack Overflow user 'stefanct' here

[bug #67265] $(file) in commands is executed too early

2025-06-30 Thread Zack Weinberg
: None ___ Follow-up Comments: --- Date: Mon 30 Jun 2025 02:50:00 PM GMT By: Zack Weinberg This Makefile should, but does not, create a file named 'test.txt' in a directory named 'test.