help-make
[Top][All Lists]
Advanced

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

RE: how to remember updated targets across recursive make invocations?


From: Paul Smith
Subject: RE: how to remember updated targets across recursive make invocations?
Date: Sun, 26 Feb 2012 14:57:45 -0500

On Mon, 2012-02-20 at 00:52 -0800, Mark Galeck (CW) wrote:
> Yes absolutely, I know it is about the recursion. I meant, "example
> situation", that is, "how to modify the above example to keep its gist
> but achieve the desired effect".  I guess the answer is "no".  OK, I
> will read that paper.

Correct, the answer is "no".  The knowledge of whether a target was
updated or not exists in the memory of the running make.  When the
running make exits, all that knowledge is lost.  If you invoke make
recursively that's an entirely different instance of make, with its own
memory etc.

At that point the only way a subsequent make can determine whether
something was updated or not is by using the same algorithm the original
did (timestamps stored on the filesystem), and by marking that target as
depending on a PHONY target you are guaranteeing it will always be
considered out of date and rebuilt every time.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.net
 "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]