summaryrefslogtreecommitdiff
path: root/make_ext.pl
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2012-06-02 12:17:29 +0200
committerNicholas Clark <nick@ccl4.org>2012-06-05 20:59:36 +0200
commit43f197b58b234b5f912893ab0eb369af9d2f09c0 (patch)
tree2661daafff691cda8c9784b642e39e4f00e3da88 /make_ext.pl
parent5924d25db672e4188c36b980f26c737b98533b4f (diff)
downloadperl-43f197b58b234b5f912893ab0eb369af9d2f09c0.tar.gz
In make_ext.pl, only fudge the Makefile.PL timestamp when generating it.
The expedient fudge added by commit 23525070d6c0e51f was actually after the closing } for the if block that auto-generated a Makefile.PL. Hence it was *always* changing the timestamp on every Makefile.PL just before running it, even the ones checked out from the repository. That seems a bit wrong.
Diffstat (limited to 'make_ext.pl')
-rw-r--r--make_ext.pl14
1 files changed, 10 insertions, 4 deletions
diff --git a/make_ext.pl b/make_ext.pl
index cf1e826a86..399bd41713 100644
--- a/make_ext.pl
+++ b/make_ext.pl
@@ -370,11 +370,17 @@ WriteMakefile(
# ex: set ro:
EOM
close $fh or die "Can't close Makefile.PL: $!";
+ # As described in commit 23525070d6c0e51f:
+ # Push the atime and mtime of generated Makefile.PLs back 4
+ # seconds. In certain circumstances ( on virtual machines ) the
+ # generated Makefile.PL can produce a Makefile that is older than
+ # the Makefile.PL. Altering the atime and mtime backwards by 4
+ # seconds seems to resolve the issue.
+ eval {
+ my $ftime = time - 4;
+ utime $ftime, $ftime, 'Makefile.PL';
+ };
}
- eval {
- my $ftime = time - 4;
- utime $ftime, $ftime, 'Makefile.PL';
- };
print "\nRunning Makefile.PL in $ext_dir\n";
# Presumably this can be simplified