help-make
[Top][All Lists]
Advanced

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

Re: Pre-including a generated file


From: Nikhil A. Patil
Subject: Re: Pre-including a generated file
Date: Wed, 12 Aug 2009 13:21:18 -0500
User-agent: Mutt/1.5.16 (2007-06-09)

On Wed, Aug 12, 2009 at 15:13 -0300, Leandro Lucarella wrote:
> Paul Smith, el 12 de agosto a las 13:54 me escribiste:
> > On Wed, 2009-08-12 at 14:21 -0300, Leandro Lucarella wrote:
> > > I need to use .PHONY though, because the script should be executed always.
> > > If I don't, make call the ./gen_file just the first time, and then it
> > > never gets outdated in successive make calls.
> > 
> > You can't use .PHONY or make will go into an infinite loop, because
> > every time it starts it will build the out of date file, then re-exec,
> > then build the out-of-date file again and re-exec, etc. etc.
> 
> Just for the sake of curiosity: I doesn't go into an infinite loop.
> I don't know exactly why, but it doesn't, and it doesn't emit an error or
> warning either.

I had a situation where the command to generate the included file was
faster than the filesystem timestamp precision. This practically limited
the recursion to 1 or 2 steps. If I am right, adding a "sleep 1" into
your gen_file command should cause an infinite loop.

nikhil

> 
> -- 
> Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
> ----------------------------------------------------------------------------
> GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
> ----------------------------------------------------------------------------
> A heart that's full up like a landfill,
> a job that slowly kills you,
> bruises that won't heal.
> 
> 
> 
> _______________________________________________
> Help-make mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-make




reply via email to

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