[Top][All Lists]

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

Re: this is embarrasing... prerequisiste gets updated, but make still sa

From: Paul Smith
Subject: Re: this is embarrasing... prerequisiste gets updated, but make still says it is older than target
Date: Mon, 02 Apr 2012 10:20:03 -0400

On Mon, 2012-04-02 at 09:57 -0400, Lane Schwartz wrote:
> 1) "A target is out of date if it does not exist or if it is older than any
> of the prerequisites (by comparison of last-modification times)."
> NEW 2) "All computation of prerequisite timestamps are performed prior to
> the execution of any make rule."

Except, that's not really true.

The timestamp caching facility of GNU make causes the real behavior to
be difficult to define in situations where the makefile doesn't
accurately describe what the recipes really do.  The actual behavior
depends on which files are added to the cache, and when: they are not
all added up-front.  It's just helpful to think about it as if they were
because if you do, then your makefile will definitely be correct.  If
the makefile does completely describe the results of the recipes then it
all works fine.  If not, the behavior is hard to quantify.

That's why I've considered removing the cache.  However, the cache can
be a performance win, particularly in the common "do nothing" (or at
least "do very little") cases.

Maybe it should be made optional, so you can get slower but more
understandable (in the case of incomplete makefile definitions)
behavior, or else faster behavior but your makefile must be well-formed
(as today).

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

reply via email to

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