bug-make
[Top][All Lists]
Advanced

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

Re: Infinite loop bug with parallel make


From: Paul Smith
Subject: Re: Infinite loop bug with parallel make
Date: Sat, 23 Feb 2013 15:45:59 -0500

On Sat, 2013-02-23 at 17:28 +0000, Ian Lynagh wrote:
> On Sat, Feb 23, 2013 at 06:57:27AM +0200, Shachar Shemesh wrote:
> > 
> > What I'm also interested in is why .SECONDARY made everything slow.
> 
> I've put a cut-down makefile demonstrating this here:
>     http://urchin.earth.li/~ian/tmp/Makefile

I haven't looked deeply into this; however handling an intermediate
prerequisite is more expensive than handling a normal prerequisite.  By
adding the .SECONDARY: target with no prerequisites you're essentially
declaring every single file in the makefile as an intermediate file.
That's causing your slowdowns.

There is probably an opportunity here to add some kind of
short-circuiting (I think make is doing the same work multiple times in
this situation).

I've never really been clear on the purpose and use of .SECONDARY; the
comments in both the GNU make manual and in the code seem odd to me.  I
would really appreciate anyone out there who is using this (either for
specific targets or all by itself as in this example) to explain why
they use it / what they need it for.




reply via email to

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