bisect-runner.pl now fixes more 5.11-era make bugs.
authorNicholas Clark <nick@ccl4.org>
Mon, 21 Nov 2011 16:12:04 +0000 (16:12 +0000)
committerNicholas Clark <nick@ccl4.org>
Tue, 22 Nov 2011 08:47:12 +0000 (08:47 +0000)
bisect-runner.pl now patches Makefile.SH to ensure that git_version.h is built
before perl.o, for revisions between the addition of git_version.h, and the
addition of rules to ensure the correct build sequence.

Porting/bisect-runner.pl

index fdf68cd..df36968 100755 (executable)
@@ -1702,6 +1702,46 @@ EOPATCH
                               # fixed in 0f13ebd5d71f8177
                               $code =~ s{^(uudmap\.h) (bitcount\.h): }
                                         {$1: $2\n\n$2: }m;
+
+                              # The rats nest of getting git_version.h correct
+
+                              if ($code =~ s{git_version\.h: stock_git_version\.h
+\tcp stock_git_version\.h git_version\.h}
+                                            {}m) {
+                                  # before 486cd780047ff224
+
+                                  # We probably can't build between
+                                  # 953f6acfa20ec275^ and 8565263ab8a47cda
+                                  # inclusive, but all commits in that range
+                                  # relate to getting make_patchnum.sh working,
+                                  # so it is extremely unlikely to be an
+                                  # interesting bisect target. They will skip.
+
+                                  # No, don't spawn a submake if
+                                  # make_patchnum.sh or make_patchnum.pl fails
+                                  $code =~ s{\|\| \$\(MAKE\) miniperl.*}
+                                            {}m;
+                                  $code =~ s{^\t(sh.*make_patchnum\.sh.*)}
+                                            {\t-$1}m;
+
+                                  # Use an external perl to run make_patchnum.pl
+                                  # because miniperl still depends on
+                                  # git_version.h
+                                  $code =~ s{^\t.*make_patchnum\.pl}
+                                            {\t-$^X make_patchnum.pl}m;
+
+
+                                  # "Truth in advertising" - running
+                                  # make_patchnum generates 2 files.
+                                  $code =~ s{^make_patchnum:.*}{
+make_patchnum: lib/Config_git.pl
+
+git_version.h: lib/Config_git.pl
+
+perlmini\$(OBJ_EXT): git_version.h
+
+lib/Config_git.pl:}m;
+                              }
                               return $code;
                           });
             }