On AIX, bisect-runner.pl must patch Makefile.SH for parallel make issues.
authorNicholas Clark <nick@ccl4.org>
Wed, 23 Nov 2011 09:59:52 +0000 (10:59 +0100)
committerNicholas Clark <nick@ccl4.org>
Wed, 23 Nov 2011 10:14:19 +0000 (11:14 +0100)
It needs to emulate the bug fix of e6807d8ab22b761c, to ensure lib/Config.pm
is built before makedef.pl is run.

Porting/bisect-runner.pl

index c844a98..81dff82 100755 (executable)
@@ -1811,6 +1811,21 @@ $2!;
         }
     }
 
+    if ($^O eq 'aix' && $major >= 11 && $major <= 15
+        && extract_from_file('makedef.pl', qr/^use Config/)) {
+        edit_file('Makefile.SH', sub {
+                      # The AIX part of commit e6807d8ab22b761c
+                      # It's safe to substitute lib/Config.pm for config.sh
+                      # as lib/Config.pm depends on config.sh
+                      # If the tree is post e6807d8ab22b761c, the substitution
+                      # won't match, which is harmless.
+                      my $code = shift;
+                      $code =~ s{^(perl\.exp:.* )config\.sh(\b.*)}
+                                {$1 . '$(CONFIGPM)' . $2}me;
+                      return $code;
+                  });
+    }
+
     # There was a bug in makedepend.SH which was fixed in version 96a8704c.
     # Symptom was './makedepend: 1: Syntax error: Unterminated quoted string'
     # Remove this if you're actually bisecting a problem related to