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

2025-06-30 Thread Britton Kerin
On Mon, Jun 30, 2025, 9:14 AM Zack Weinberg wrote: > 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 >

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

2025-06-30 Thread Paul Smith
On Mon, 2025-06-30 at 15:03 -0400, Zack Weinberg wrote: > On Mon, Jun 30, 2025, at 2:21 PM, Paul D. Smith wrote: > > Follow-up Comment #6, bug #67265 (group make): > > Make's expansion rules are very simple.  When some text undergoes > > expansion, make goes through the text and looks for un-escape

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 Paul Smith
On Mon, 2025-06-30 at 13:23 -0400, Zack Weinberg wrote: > > 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. > >

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

2025-06-30 Thread Paul D. Smith
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 different sequence of characters, which > would then be recogn

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. > > If I understand you

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

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

2025-06-30 Thread Tim Murphy
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. If I understand you then you want to use $(file) to get around the command

[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

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

2025-06-30 Thread Paul Smith
On Mon, 2025-06-30 at 17:55 +0100, Tim Murphy wrote: > 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? I think the ask is that the expan

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

2025-06-30 Thread Tim Murphy
On Mon, 30 Jun 2025, 16:41 Zack Weinberg, 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

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

2025-06-30 Thread Paul D. Smith
Update of bug #67265 (group make): Item Group:None => Enhancement ___ Follow-up Comment #4: It is not a bug. All expansion in recipes happens the same way, regardless of whether what's being expanded is a

[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 Timothy N Murphy
Follow-up Comment #2, bug #67265 (group make): Hi, Make always expands a command before executing it in the shell - this is why your $(file) is getting done before mkdir. I don't think you need $(file) here at all since you can use the shell to create a file with something like mkdir -p test.d

[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
URL: Summary: $(file) in commands is executed too early Group: make Submitter: zackw Submitted: Mon 30 Jun 2025 02:50:00 PM GMT Severity: 3 - Normal Item Group:

Re: bug-report: make does not read Makefile on Windows in case sensitive folder

2025-06-30 Thread Eli Zaretskii
> From: Espen Ottar > CC: "bug-make@gnu.org" > Date: Mon, 30 Jun 2025 13:39:30 + > > Ok, my bad. I was using make 3.81 from > https://gnuwin32.sourceforge.net/packages/make.htm Try the one from ezwinports site.

Sv: bug-report: make does not read Makefile on Windows in case sensitive folder

2025-06-30 Thread Espen Ottar
Ok, my bad. I was using make 3.81 from https://gnuwin32.sourceforge.net/packages/make.htm Fra: bug-make-bounces+espen.ottar=greendigital...@gnu.org på vegne av Eli Zaretskii Sendt: mandag 30. juni 2025 15:23 Til: Espen Ottar Kopi: bug-make@gnu.org Emne: Re:

Re: bug-report: make does not read Makefile on Windows in case sensitive folder

2025-06-30 Thread Eli Zaretskii
> From: Espen Ottar > Date: Mon, 30 Jun 2025 07:47:41 + > > On Windows it is possible to enable case sensitivity on a per-folder basis . > (using fsutil.exe) > When case sensitivity is enabled, make fails to read "Makefile" (with capital > M) > The workaround is to use "make -f Makefile" bu

bug-report: make does not read Makefile on Windows in case sensitive folder

2025-06-30 Thread Espen Ottar
On Windows it is possible to enable case sensitivity on a per-folder basis . (using fsutil.exe) When case sensitivity is enabled, make fails to read "Makefile" (with capital M) The workaround is to use "make -f Makefile" but that should not be necessary