From 1f1c809619768dcc645991969c9d72e5fe05a6b0 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Fri, 25 Nov 2011 16:32:26 +0100 Subject: [PATCH] bisect-runner.pl now builds back to 5.005 on the default OS X filesystem. OS X defaults to case-insensitive HFS+. perl-5.8.0 and later have hints files to avoid a clash between Makefile and makefile, and hence can build without problems. Teaching bisect-runner.pl to replicate this hints tweak allows it to build perl-5.6.0 and perl-5.005 on a default HFS+. However, only do this for a case insensitive filesystem, else it breaks the build for 5.003 and earlier (which hardcode 'makefile' in places). perl-5.004 and earlier won't work on a default HFS+ without a *lot* of bodgery, as the distribution from that era has two files, Configure and configure, which trample over each other and confuse git. There are case clashes in later revisions, which may create unexpected failures for some actions (versus the same action on a case sensitive file system) but they don't appear to affect building any 5.*.0 revisions. bisect-runner.pl can build back to 5.002 on OS X on a case sensitive HFS+ file system. --- Porting/bisect-runner.pl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Porting/bisect-runner.pl b/Porting/bisect-runner.pl index 1f38589..fa88c6e 100755 --- a/Porting/bisect-runner.pl +++ b/Porting/bisect-runner.pl @@ -812,6 +812,15 @@ if (!defined $target) { skip('no Configure - is this the //depot/perlext/Compiler branch?') unless -f 'Configure'; +my $case_insensitive; +{ + my ($dev_C, $ino_C) = stat 'Configure'; + die "Could not stat Configure: $!" unless defined $dev_C; + my ($dev_c, $ino_c) = stat 'configure'; + ++$case_insensitive + if defined $dev_c && $dev_C == $dev_c && $ino_C == $ino_c; +} + # This changes to PERL_VERSION in 4d8076ea25903dcb in 1999 my $major = extract_from_file('patchlevel.h', @@ -1580,6 +1589,15 @@ sub patch_hints { # to 5.002, lets just turn it off. $code =~ s/^useshrplib='true'/useshrplib='false'/m if $faking_it; + + # Part of commit d235852b65d51c44 + # Don't do this on a case sensitive HFS+ partition, as it + # breaks the build for 5.003 and earlier. + if ($case_insensitive + && $code !~ /^firstmakefile=GNUmakefile/) { + $code .= "\nfirstmakefile=GNUmakefile;\n"; + } + return $code; }); } -- 2.7.4