On Mon, 2011-11-14 at 11:29 -0500, David Boyce wrote:
> On Mon, Nov 14, 2011 at 9:25 AM, Paul Smith <[email protected]> wrote:
> > Also, writing 0 bytes to a file does not (at least in my
> > experiment) change its modtime.
> 
> I believe it depends on O_TRUNC. The command ">foo" always updates foo
> but ">>foo" does not.

Sure but that also truncates the file.  It could very well be that you
don't want the file you're touching to lose all its content :-).

For typical make sentinel files, which are often only created so they
exist and have 0 length anyway that's fine.  But touch is a generic
utility.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email protected]>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.net
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist


_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to