Re: 'withfile' function implementation

2012-01-31 Thread David Boyce
First, I think there may be a bug. Did you intend that appending empty data would always append a newline, such that the file grows by one newline every time? It's consistent with the new documentation but not with what you wrote above (If the file does exist and it's opened for append then the

Re: 'withfile' function implementation

2012-01-30 Thread David Boyce
Thanks, this will make a lot of people happy. One nit: as mentioned earlier I think it would be good to document the relationship of $(file ...) with timestamps. Assuming nothing special is done (I haven't looked at the code) then writing a null string will not update the timestamp. I tried to

Re: 'withfile' function implementation

2012-01-30 Thread Paul Smith
On Mon, 2012-01-30 at 17:44 -0500, David Boyce wrote: Thanks, this will make a lot of people happy. One nit: as mentioned earlier I think it would be good to document the relationship of $(file ...) with timestamps. Assuming nothing special is done (I haven't looked at the code) then writing

Re: 'withfile' function implementation

2012-01-30 Thread David Boyce
On Mon, Jan 30, 2012 at 6:19 PM, Paul Smith psm...@gnu.org 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,

Re: 'withfile' function implementation

2012-01-30 Thread Paul Smith
On Mon, 2012-01-30 at 21:33 -0500, David Boyce wrote: On Mon, Jan 30, 2012 at 6:19 PM, Paul Smith psm...@gnu.org 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

RE: 'withfile' function implementation

2012-01-29 Thread Paul Smith
On Mon, 2012-01-23 at 09:52 -0800, Lawrence Ibarria wrote: I do like this suggestion, feels quite clean! I implemented the write side of this proposal and committed it to CVS, along with regression tests and documentation. The read side is slightly more work but I can do this one too if people

RE: 'withfile' function implementation

2012-01-23 Thread Lawrence Ibarria
I do like this suggestion, feels quite clean! -- Lawrence -Original Message- From: Paul Smith [mailto:psm...@gnu.org] Sent: Monday, January 16, 2012 5:15 AM To: Lawrence Ibarria Cc: bug-make@gnu.org; Tim Murphy (tnmur...@gmail.com) Subject: Re: 'withfile' function implementation

Re: 'withfile' function implementation

2012-01-16 Thread Paul Smith
On Thu, 2011-12-15 at 15:13 -0800, Lawrence Ibarria wrote: This is a rather simple path that implements a very simplified version of what Tim suggested in his message of Sept 25th (https://lists.gnu.org/archive/html/bug-make/2011-09/msg00044.html ). Paul, what do you think? I’d rather not

Re: 'withfile' function implementation

2011-12-16 Thread Tim Murphy
Just a quick comment on this. I looked at the implementation and it seems like a different name would suit this function - e.g. writefile. It basically writes text from it's arguments out to a file. The idea of a function called withfile seems hard to actually implement - I'm not sure how one

Re: 'withfile' function implementation

2011-12-16 Thread Paul Smith
On Fri, 2011-12-16 at 12:41 +, Tim Murphy wrote: I looked at the implementation and it seems like a different name would suit this function - e.g. writefile. It basically writes text from it's arguments out to a file. Thanks all; I'll take a look. --

Re: 'withfile' function implementation

2011-12-16 Thread David Boyce
On Fri, Dec 16, 2011 at 7:41 AM, Tim Murphy tnmur...@gmail.com wrote: would probably be quite nice and they don't absolutely demand that one use the C library mode flags (w,w+,a etc). This is one thing that Paul didn't like from the previous suggestions. A bit of a sidetrack, but I don't agree