On Mon, Apr 04, 2005 at 12:00:20PM -0400, Chip Salzenberg wrote:
> Currently, config/gen/makefiles/root.in says:
> 
>   TOUCH      = $(PERL) -e ${PQ}open(A,qq{>>$$_}) or die foreach @ARGV${PQ}
> 
> However, this fails for my source tree.  I habitually leave
> CVS-controlled files write-only until they are locally modified.
                       read-only?

> (This is "cvs -r" behavior, also triggered by exporting CVSREAD=1.)
> 
> Perl has a C<utime> operator which should work even when files are
> read-only.  Is there a reason that $(TOUCH) doesn't use it?

ExtUtils::Command has a perfectly good and known working touch() function
which both opens for appending AND uses utime.

        TOUCH = $(PERL) -MExtUtils::Command -e touch @ARGV

However, as currently implemented, it will die if the file is unwritable.
This can be corrected but I'm not confident in relying solely on utime 
because perlport sez...

               May not behave as expected.  Behavior depends on the C runtime
               library's implementation of utime(), and the filesystem being
               used.  The FAT filesystem typically does not support an "access
               time" field, and it may limit timestamps to a granularity of
               two seconds. (Win32)

Reply via email to