[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: .SECONDARY unexpectedly affects rule invocation

From: Mikhail
Subject: Re: .SECONDARY unexpectedly affects rule invocation
Date: Wed, 5 Oct 2022 17:56:33 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

I will reconsider usage of .SECONDARY in my applications and that should work.

Hope this thread highlighted a case worth considering for make devs.



On 05.10.2022 10:51, Dmitry Goncharov wrote:

On Tuesday, October 4, 2022, Mikhail Pomaznoy <mikpom@mikpom.ru> wrote:

Martin's snippet indeed recapitulates the behavior resulted in my initial report.

As for Dmitry's reply: I don't understand if make does what's expected or not.

Works as  documented. Even though I am not sure this particular case was envisioned.

 I believed that A.4 being a prereq of A.4.ind will always trigger the latter being rebuilt if A.4 is newer.

It will, if A.4 is newer. In this case A.4 is not newer. A.4 is missing when make considers A.4.ind.

As a side note: I use make for running pipelines and add .SECONDARY routinely because I don't want anything to be deleted as temporary file

 Secondary without prerequisites is a bad idea. 

Regards, Dmitry


On 10/5/22 09:58, Dmitry Goncharov wrote:
On Tue, Oct 4, 2022 at 10:08 PM Martin Dorey
<Martin.Dorey@hitachivantara.com> wrote:
 Isn't this slightly simplified example sufficient to demonstrate the same behavior...
A.4 is a preqreq to T.1 and also a prereq to A.4.ind.
A.4.ind is present and that's why make skips building secondary A.4
and keeps A.4.ind intact, while walking through A.4.ind prereqs.
T.1 is missing and this causes make to build A.4 in order to build
T.1, after A.4.ind is done with.

regards, Dmitry

reply via email to

[Prev in Thread] Current Thread [Next in Thread]