> (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)
utime will only work if the file already exists. The above looks like it
would work to create empty files.
Steve Peters
st...@fisharerojo.org
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.
(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?
--
Chip Salzenberg - a.k.a. - <ch...@pobox.com>
Open Source is not an excuse to write fun code
then leave the actual work to others.