help-make
[Top][All Lists]
Advanced

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

Re: GMAKE 3.81 vs GMAKE 4.2


From: Paul Smith
Subject: Re: GMAKE 3.81 vs GMAKE 4.2
Date: Tue, 17 Dec 2019 10:33:18 -0500
User-agent: Evolution 3.34.1-2

On Tue, 2019-12-17 at 20:44 +0530, nikhil jain wrote:
> No, I do not want to delete the object file before sending the target
> out. That's not how make should work or I should make it work.

That is simply not true.

In virtually all cases rebuilding a target will involve deleting the old
one in some fashion.  Most reliable build systems will create the target as
a different file then atomically rename it to its final name, so that if
the command is killed while the target is half-written it doesn't corrupt
the next build.

It's absolutely fine if the recipe decides to delete the target explicitly
before starting to rebuild it and a great many recipes work exactly like
this.  The old file will not be used anyway if the recipe fails, nor should
you want it to be since it's known to be out of date!

> It is issue with NFS stale mounts which seems to be resolved if we open
> the file again according to NFS specs (mentioned in another email).

As I haven't seen the actual code you're using I can't say for sure but in
general I'm leery of adding extra overhead to every check of every target
to handle an obscure case that can't actually happen with standard make.




reply via email to

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