[Top][All Lists]

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

Re: bash conditional expressions

From: Mischa Baars
Subject: Re: bash conditional expressions
Date: Fri, 12 Nov 2021 14:21:15 +0100

Hi Greg,

It is how my makefiles work :)

Do you realize how much time it takes to load the stat executable on all
source files and object files? Conditional expressions are already in
memory. I prefer using the mtime field, the atime field and conditional


On Fri, Nov 12, 2021 at 1:25 PM Greg Wooledge <greg@wooledge.org> wrote:

> On Fri, Nov 12, 2021 at 10:36:01AM +0100, Mischa Baars wrote:
> > All of my makefiles only compile source files and link object files that
> > are NEW, as in the modification timestamp is newer than OR EQUAL TO the
> > access timestamp,
> That's not how Makefiles work.
> Makefiles compare the mtimes of two files against each other.  Source
> and target.  If the source's mtime is greater than the target's mtime,
> then the target needs to be rebuilt.
> Most Linux distributions these days are disabling or half-disabling
> the atime field at the file system mount-option level, because of the
> tremendous inefficiency and wear on disks that it creates.

reply via email to

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