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: Paul D. Smith
Subject: Re: gmake creates files that already exist and are up-to-date
Date: Fri, 7 Jan 2005 18:01:31 -0500

%% "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




reply via email to

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