[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #58734] gmake does not check for the existence of a file before com
From: |
Jörg Schilling |
Subject: |
[bug #58734] gmake does not check for the existence of a file before complaining it is missing |
Date: |
Mon, 30 Nov 2020 07:30:52 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; SunOS i86pc; rv:45.0) Gecko/20100101 Firefox/45.0 |
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:
<https://savannah.gnu.org/bugs/?58734>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/