Signed-off-by: Zebediah Figura z.figura12@gmail.com --- v2: also run 'git add -A' so that new files will actually be seen by make_makefiles.
testbot/bin/build/Build.pl | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/testbot/bin/build/Build.pl b/testbot/bin/build/Build.pl index 051039f..cf1f1f3 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,13 +112,18 @@ sub ApplyPatch($$$) { $NeedConfigure = 1; } + elsif ($Line =~ m=^new file= || $Line =~ m=^deleted file= || $Line =~ m=^rename=) + { + $NeedMakeMakefiles = 1; + } } close FH; }
InfoMsg "Applying patch\n"; system("( cd $DataDir/wine && set -x && " . - " git apply --verbose $PatchFile " . + " git apply --verbose $PatchFile && " . + " git add -A " . ") >> $LogDir/Build.log 2>&1"); if ($? != 0) { @@ -125,6 +131,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";
That works.
On Wed, 29 Nov 2017, Zebediah Figura wrote:
Signed-off-by: Zebediah Figura z.figura12@gmail.com
v2: also run 'git add -A' so that new files will actually be seen by make_makefiles.
testbot/bin/build/Build.pl | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/testbot/bin/build/Build.pl b/testbot/bin/build/Build.pl index 051039f..cf1f1f3 100755 --- a/testbot/bin/build/Build.pl +++ b/testbot/bin/build/Build.pl
[...]
@@ -111,13 +112,18 @@ sub ApplyPatch($$$) { $NeedConfigure = 1; }
elsif ($Line =~ m=^new file= || $Line =~ m=^deleted file= || $Line =~ m=^rename=)
{
$NeedMakeMakefiles = 1;
+ $NeedMakeMakefiles = $NeedConfigure = 1;
Just a nitpick: I would also set NeedConfigure here so we can get out of the loop early if all the $NeedXxx are set (not that this is really likely to happen but it would be in keeping with the current spirit of the code).
[...]
- 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;
And then we don't need this one.