[Top][All Lists]
[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, 16 Jan 2012 08:55:29 -0500 |
2012/1/16 Paul Smith <address@hidden>:
> 2. Unclear what to do about newlines. The code doesn't add any but
> getting a newline into a make variable is tricky.
Is it possible https://savannah.gnu.org/bugs/?35063 would help here? I
think it's a simple, robust, helpful extension (but I would).
> '>>' : Open the file with mode "a" (append) and write the second
> argument to the file, plus a newline. If no second argument is given,
> nothing is written (if the file didn't exist it will be created but
> empty; if the file did exist it will be unchanged).
Would it make sense to guarantee timestamp update even with an empty
second argument? Reasons in favor:
- 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 file and other times not.
- Something like $(info touch address@hidden(file >>$@)) could become an
efficient, portable, in-process pattern for "touching" a file.
> Do people think this would be useable?
Looks good to me.
-David Boyce
- Re: 'withfile' function implementation, Paul Smith, 2012/01/16
- Re: 'withfile' function implementation, Tim Murphy, 2012/01/16
- Re: 'withfile' function implementation,
David Boyce <=
- RE: 'withfile' function implementation, Lawrence Ibarria, 2012/01/23
- RE: 'withfile' function implementation, Paul Smith, 2012/01/29
- Re: 'withfile' function implementation, David Boyce, 2012/01/30
- Re: 'withfile' function implementation, Paul Smith, 2012/01/30
- Re: 'withfile' function implementation, David Boyce, 2012/01/30
- Re: 'withfile' function implementation, Paul Smith, 2012/01/31
- Re: 'withfile' function implementation, David Boyce, 2012/01/31