Re: say which of .PRECIOUS: %.o *.o file.o will actually work

2024-10-10 Thread Britton Kerin
On Tue, Oct 8, 2024 at 7:16 PM Dan Jacobson wrote: > > Manual says: > >You can list the target pattern of an implicit rule (such as '%.o') >as a prerequisite of the special target '.PRECIOUS' to preserve >intermediate files made by implicit rules whose target patterns match >that f

Re: say which of .PRECIOUS: %.o *.o file.o will actually work

2024-10-10 Thread Dan Jacobson
Thanks. OK, the manual should say that >> .PRECIOUS: %.o will usually work, >> .PRECIOUS: *.o will never work, (unless the file really has an asterisk in its name) and >> .PRECIOUS: file.o will always work.

$(foreach) example not understandable

2024-10-10 Thread Dan Jacobson
Regarding https://www.gnu.org/software/make/manual/html_node/Foreach-Function.html I have spent hours and hours trying to figure out what you are trying to say. Yes I understand the sh, and perl "for" functions just fine. The problem apparently is your example, dirs := a b c d files := $

Re: say which of .PRECIOUS: %.o *.o file.o will actually work

2024-10-10 Thread Paul Smith
On Thu, 2024-10-10 at 11:45 -0400, Dmitry Goncharov wrote: > There is little benefit to mark files built by static pattern rules > precious,  because static pattern rules do not build intermediate > files. It's a mistake to consider .PRECIOUS in the context of intermediate files. This is a common

Re: say which of .PRECIOUS: %.o *.o file.o will actually work

2024-10-10 Thread Dmitry Goncharov
On Thursday, October 10, 2024, Britton Kerin wrote: > On Wed, Oct 9, 2024 at 4:01 PM Dmitry Goncharov wrote: >> >> On Tue, Oct 8, 2024 at 11:16 PM Dan Jacobson wrote: >> > >> > Manual says: >> > >> >You can list the target pattern of an implicit rule (such as '%.o') >> >as a prerequisite