bug-make
[Top][All Lists]
Advanced

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

Re: 'withfile' function implementation


From: David Boyce
Subject: Re: 'withfile' function implementation
Date: Mon, 30 Jan 2012 21:33:00 -0500

On Mon, Jan 30, 2012 at 6:19 PM, Paul Smith <address@hidden> wrote:
> Is there "something special" you would prefer beyond this?

Well ... it's more of a thought than an actual request or preference,
but I'm suggesting that make might want to take positive steps in your
last case (empty text argument, append to existing file) to force an
update of the mod time. Reasons:

- Something like $(info touch address@hidden(file >>$@)) could become an
efficient, portable, in-process pattern for "touching" a file.

- Make is inherently timestamp based and clear rules are important. It
could create a new class of mysterious, hard-to-reproduce bugs if this
function sometimes updates the timestamp and other times not depending
on the value of the text string.

- As you've noted, the current semantics just fall out from POSIX
behavior. To the degree practical I think it's a good design principle
that timestamp semantics are specified by make (and thus portable),
not deferred to the platform or filesystem.

Again this is not a request per se, just something to think about
before semantics are set in stone.

-David Boyce



reply via email to

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