[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: say which of .PRECIOUS: %.o *.o file.o will actually work
From: |
Dmitry Goncharov |
Subject: |
Re: say which of .PRECIOUS: %.o *.o file.o will actually work |
Date: |
Wed, 9 Oct 2024 20:01:05 -0400 |
On Tue, Oct 8, 2024 at 11:16 PM Dan Jacobson <jidanni@jidanni.org> 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 file's name; see *note Interrupts::.
>
> Well say which of
> .PRECIOUS: %.o
> .PRECIOUS: *.o
> .PRECIOUS: file.o
> will actually work.
>
> The words above make the reader think they should use the first form.
>
> But in my experiments, only this last one works.
.PRECIOUS: %.o has the desired effect when a related implicit rule is used.
For example, the following marks hello.x and hello.q as precious.
.PRECIOUS: %.x %.q
all: hello.x
%.x: %.q; $(info $@ from $<)
%.q:;
regards, Dmitry
Re: say which of .PRECIOUS: %.o *.o file.o will actually work, Britton Kerin, 2024/10/10