From: Marcus Holland-Moritz Date: Mon, 14 Aug 2006 20:29:57 +0000 (+0000) Subject: Only copy ppport.h to destination if it is different. X-Git-Tag: accepted/trunk/20130322.191538~17155 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=16a923550a24cd3580cabfa5e5d58a4ee2561b87;p=platform%2Fupstream%2Fperl.git Only copy ppport.h to destination if it is different. This avoids unneccessary rebuilds. p4raw-id: //depot/perl@28715 --- diff --git a/mkppport b/mkppport index 00462f9..07aa8b2 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;