Follow-up Comment #10, bug #58734 (project make):

I am sorry, but there are problems in gmake that only show
up with large or complex makefiles. I cannot give simpler
examples as I cannot spend an infinite amount of time in trying
to find a smaller example.

I however already explained to you how you could make gmake
compatible to make in this area. Since even the classic make
did cache file time stamps, it is obvious that things can 
be done in a compatible way.

- You may cache whatever you like as long as you do not
  break things that are part of the basic functionality of
  make since 1976. So do just not make the wrong conclusions
  from cached time stamps.

- If a cached time stamp results in the assumption that
  the related file is up to date, this is OK. This may be
  wrong if the file was removed meanwhile, but I believe
  this is not a problem.

- If a file was the target of a rule command that did exit()
  with code zero, assume "younger than any file" without
  checking the file time stamp again.

- If the cached time results in the assumption that the
  file is out of date or missing, check the time stamp
  again. This is what seems to be missing in gmake.

Just a note: assuming a file is out of date and rerunning the
rule command is more expensive than calling stat() for the file.
The cases where you need to rerun stat() are rare and thus do
not affect the overall performance.

Claiming that the file does not exist (this is what happens
with gmake) is incompatible to the behavior of make. If you
are familiar with the source code of gmake, it should be
obvious how to fix it. Just call stat() if you believe that
a file does not exist.


Reply to this item at:


  Message sent via Savannah

Reply via email to