diff options
author | Yves Orton <demerphq@gmail.com> | 2006-12-15 13:52:45 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-12-15 13:51:44 +0000 |
commit | 90ec05cef95275d090438d677bea4199a5df35b5 (patch) | |
tree | 728b85f293983200df10a06d2cf45e3db2521039 /ext/Errno | |
parent | 955c272e505839f6c86e2403961d6237672ec9af (diff) | |
download | perl-90ec05cef95275d090438d677bea4199a5df35b5.tar.gz |
Re: [PATCH] Errno doesnt rebuild when things it depends on in Config.pm change
Message-ID: <9b18b3110612150352y2394954bg5acd5ec5fd320d33@mail.gmail.com>
p4raw-id: //depot/perl@29558
Diffstat (limited to 'ext/Errno')
-rw-r--r-- | ext/Errno/Makefile.PL | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/Errno/Makefile.PL b/ext/Errno/Makefile.PL index 604d4fb8e8..527f700dba 100644 --- a/ext/Errno/Makefile.PL +++ b/ext/Errno/Makefile.PL @@ -1,7 +1,26 @@ use ExtUtils::MakeMaker; +use Config; @VMS = ($^O eq 'VMS') ? (MAN3PODS => {}) : (); +my $arch = "$Config{'archname'}-$Config{'osvers'}"; +my $got = ""; +if (-e 'arch.txt') { + open my $in, "<", "arch.txt" or die "Can't read 'arch.txt': $!"; + $got = <$in>; + close $in; +} +if ($got ne $arch) { + if (-e "Errno.pm") { + print "Removing old 'Errno.pm'\n"; + unlink "Errno.pm" + or die "Failed to remove out of date 'Errno.pm': $!"; + } + open my $out, ">", "arch.txt" or die "Can't write 'arch.txt': $!"; + print $out $arch; + close $out; +} + WriteMakefile( NAME => 'Errno', VERSION_FROM => 'Errno_pm.PL', |