From 43f197b58b234b5f912893ab0eb369af9d2f09c0 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Sat, 2 Jun 2012 12:17:29 +0200 Subject: 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. --- make_ext.pl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'make_ext.pl') 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 -- cgit v1.2.1