4 use File::Copy qw/copy/;
7 exit 1 unless defined $bak;
10 exit 1 unless defined $mk and -e $mk and -r _ and -w _;
14 print "Fixing Makefile install targets\n";
16 if (-e $bak && (stat $bak)[9] >= (stat $mk)[9]) { # mtime
17 print "Makefile is old\n";
20 print "Makefile is new\n";
24 open my $in, '<', $bak or die "open(<$bak): $!";
25 open my $out, '>', $mk or die "open(>$mk): $!";
27 s!^(\s*)\$\(INST_ARCHLIB\)\s+(\$\(DESTINSTALL(?:ARCHLIB|SITEARCH|VENDORARCH)\))\s*\\\s*!$1blib/archpub $2/\$(FULLEXT) \\\n!g;
33 utime time, time, $bak; # Update mtime