Fixes for the test suite on OS/2
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / Manifest.pm
index 9ded9b4..70c1ef8 100644 (file)
@@ -13,7 +13,7 @@ use vars qw($VERSION @ISA @EXPORT_OK
           $Is_MacOS $Is_VMS 
           $Debug $Verbose $Quiet $MANIFEST $DEFAULT_MSKIP);
 
-$VERSION = 1.44;
+$VERSION = '1.49';
 @ISA=('Exporter');
 @EXPORT_OK = qw(mkmanifest
                 manicheck  filecheck  fullcheck  skipcheck
@@ -350,11 +350,14 @@ sub _maniskip {
     open M, $mfile or open M, $DEFAULT_MSKIP or return sub {0};
     while (<M>){
        chomp;
+       s/\r//;
        next if /^#/;
        next if /^\s*$/;
        push @skip, _macify($_);
     }
     close M;
+    return sub {0} unless (scalar @skip > 0);
+
     my $opts = $Is_VMS ? '(?i)' : '';
 
     # Make sure each entry is isolated in its own parentheses, in case
@@ -432,7 +435,7 @@ sub cp_if_diff {
        if (-e $to) {
            unlink($to) or confess "unlink $to: $!";
        }
-      STRICT_SWITCH: {
+        STRICT_SWITCH: {
            best($from,$to), last STRICT_SWITCH if $how eq 'best';
            cp($from,$to), last STRICT_SWITCH if $how eq 'cp';
            ln($from,$to), last STRICT_SWITCH if $how eq 'ln';
@@ -475,9 +478,13 @@ sub _manicopy_chmod {
     chmod( $perm | ( $perm & 0100 ? 0111 : 0 ), $file );
 }
 
+# Files that are often modified in the distdir.  Don't hard link them.
+my @Exceptions = qw(MANIFEST META.yml SIGNATURE);
 sub best {
     my ($srcFile, $dstFile) = @_;
-    if (!$Config{d_link} or -l $srcFile) {
+
+    my $is_exception = grep $srcFile =~ /$_/, @Exceptions;
+    if ($is_exception or !$Config{d_link} or -l $srcFile) {
        cp($srcFile, $dstFile);
     } else {
        ln($srcFile, $dstFile) or cp($srcFile, $dstFile);
@@ -697,7 +704,9 @@ L<ExtUtils::MakeMaker> which has handy targets for most of the functionality.
 
 Andreas Koenig C<andreas.koenig@anima.de>
 
-Currently maintained by Michael G Schwern C<schwern@pobox.com>
+Maintained by Michael G Schwern C<schwern@pobox.com> within the
+ExtUtils-MakeMaker package and, as a separate CPAN package, by
+Randy Kobes C<r.kobes@uwinnipeg.ca>.
 
 =cut