summaryrefslogtreecommitdiff
path: root/mkppport
diff options
context:
space:
mode:
authorMarcus Holland-Moritz <mhx-perl@gmx.net>2006-08-14 20:29:57 +0000
committerMarcus Holland-Moritz <mhx-perl@gmx.net>2006-08-14 20:29:57 +0000
commit16a923550a24cd3580cabfa5e5d58a4ee2561b87 (patch)
treebf54482138524303599beacedb22aae28ba3cde5 /mkppport
parentd31fb070b291649b455f137f48c7f21c85ad7d6a (diff)
downloadperl-16a923550a24cd3580cabfa5e5d58a4ee2561b87.tar.gz
Only copy ppport.h to destination if it is different.
This avoids unneccessary rebuilds. p4raw-id: //depot/perl@28715
Diffstat (limited to 'mkppport')
-rw-r--r--mkppport10
1 files changed, 8 insertions, 2 deletions
diff --git a/mkppport b/mkppport
index 00462f95c9..07aa8b22e5 100644
--- a/mkppport
+++ b/mkppport
@@ -4,6 +4,7 @@ use warnings;
use Getopt::Long;
use Pod::Usage;
use File::Spec;
+use File::Compare qw( compare );
use File::Copy qw( copy );
use File::Basename qw( dirname );
@@ -82,9 +83,14 @@ unless (-e 'ppport.h') {
# Now install the created ppport.h into extension directories
iterdirs {
my($dir, $fulldir) = @_;
- print "installing ppport.h for $dir\n";
my $dest = File::Spec->catfile($fulldir, 'ppport.h');
- copy('ppport.h', $dest) or die "copying ppport.h to $dest failed: $!\n";
+ if (compare('ppport.h', $dest)) {
+ print "installing ppport.h for $dir\n";
+ copy('ppport.h', $dest) or die "copying ppport.h to $dest failed: $!\n";
+ }
+ else {
+ print "ppport.h in $dir is up-to-date\n";
+ }
};
exit 0;