help-make
[Top][All Lists]
Advanced

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

Re: gmake creates files that already exist and are up-to-date


From: Simon De Groot
Subject: Re: gmake creates files that already exist and are up-to-date
Date: Mon, 10 Jan 2005 08:51:03 +0100


Hi Paul,

Thank you for your reply. What you tell would explain the behavior. Is there a way to deactivate those caches, or some other way to guarantee that make checks a target's existence right before it executes its rule?

Regards,

Simon.




"Paul D. Smith" <address@hidden>
Sent by: address@hidden

01/08/05 12:01 AM

Please respond to
"Paul D. Smith" <address@hidden>

To
"Simon De Groot" <address@hidden>
cc address@hidden
Subject Re: gmake creates files that already exist and are up-to-date





%% "Simon De Groot" <address@hidden> writes:

 sdg> I have a phony target that creates multiple files. On top of
 sdg> that, I defined a pattern rule for that type of file. Both the
 sdg> phony target and the individual targets are in the dependency
 sdg> tree of the 'all' target.  Once I run gmake --debug=a, I can see
 sdg> that it first makes the phony target, creating all the files,
 sdg> which from then on exist. Afterwards, the dependency requires
 sdg> these files individually. I would expect that by then, these will
 sdg> not be remade, since the phony target has created them
 sdg> successfully. But gmake's debug log reports that each individual
 sdg> file does not exist, and makes them individually.

It sounds like an issue with make's directory cache.  Make internally
caches the contents of directories and updates its cache information
based on the targets that your makefile says exist.

So if a rule in your makefile creates a file that is not listed as a
target, make's internal cache doesn't know about it because your rule
didn't list it as a target that would be created by running that
command.

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


_______________________________________________
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]