[Testbot] Run make_makefiles when a file is added or removed.

Zebediah Figura z.figura12 at gmail.com
Thu Nov 23 19:25:08 CST 2017


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 testbot/bin/build/Build.pl | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/testbot/bin/build/Build.pl b/testbot/bin/build/Build.pl
index 051039f..474cb84 100755
--- a/testbot/bin/build/Build.pl
+++ b/testbot/bin/build/Build.pl
@@ -74,6 +74,7 @@ sub ApplyPatch($$$)
 {
   my ($PatchFile, $PatchType, $BaseName) = @_;
 
+  my $NeedMakeMakefiles = !1;
   my $NeedMakefile = 0;
   my $NeedMakeInclude = !1;
   my $NeedBuildDeps = !1;
@@ -84,7 +85,7 @@ sub ApplyPatch($$$)
   {
     my $Line;
     while (defined($Line = <FH>) &&
-           ($NeedMakefile == 0 || ! $NeedMakeInclude || ! $NeedBuildDeps ||
+           (! $NeedMakeMakefiles || $NeedMakefile == 0 || ! $NeedMakeInclude || ! $NeedBuildDeps ||
             ! $NeedImplib || ! $NeedAutoconf || ! $NeedConfigure))
     {
       if ($Line =~ m=^diff.*(?:tests/Makefile\.in|Make\.vars\.in|Make\.rules\.in|Maketest\.rules\.in)$=)
@@ -111,6 +112,10 @@ sub ApplyPatch($$$)
       {
         $NeedConfigure = 1;
       }
+      elsif ($Line =~ m=^new file= || $Line =~ m=^deleted file= || $Line =~ m=^rename=)
+      {
+        $NeedMakeMakefiles = 1;
+      }
     }
     close FH;
   }
@@ -125,6 +130,20 @@ sub ApplyPatch($$$)
     return (-1, $NeedMakeInclude, $NeedBuildDeps, $NeedImplib, $NeedConfigure);
   }
 
+  if ($NeedMakeMakefiles)
+  {
+    InfoMsg "Running make_makefiles\n";
+    system("( cd $DataDir/wine && set -x && " .
+           " ./tools/make_makefiles " .
+           ") >> $LogDir/Build.log 2>&1");
+    if ($? != 0)
+    {
+      LogMsg "make_makefiles failed\n";
+      return (-1, $NeedMakeInclude, $NeedBuildDeps, $NeedImplib, $NeedConfigure);
+    }
+    $NeedConfigure = 1;
+  }
+
   if ($NeedAutoconf && ! $NeedConfigure)
   {
     InfoMsg "Running autoconf\n";
-- 
2.7.4




More information about the wine-devel mailing list