Modified: trunk/Tools/ChangeLog (87956 => 87957)
--- trunk/Tools/ChangeLog 2011-06-02 21:45:00 UTC (rev 87956)
+++ trunk/Tools/ChangeLog 2011-06-02 21:50:34 UTC (rev 87957)
@@ -1,3 +1,14 @@
+2011-06-02 Martin Robinson <[email protected]>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] autogen.sh is run twice for each buld on the bots
+ https://bugs.webkit.org/show_bug.cgi?id=61951
+
+ * Scripts/webkitdirs.pm: Only check the previous autotools arguments
+ for the WebKit project. This prevents build-jsc runs from forcing subsequent
+ build-webkit runs to re-rerun autogen.sh.
+
2011-06-02 Sheriff Bot <[email protected]>
Unreviewed, rolling out r87946.
Modified: trunk/Tools/Scripts/webkitdirs.pm (87956 => 87957)
--- trunk/Tools/Scripts/webkitdirs.pm 2011-06-02 21:45:00 UTC (rev 87956)
+++ trunk/Tools/Scripts/webkitdirs.pm 2011-06-02 21:50:34 UTC (rev 87957)
@@ -1421,6 +1421,29 @@
return $prefix . '-' . $feature;
}
+sub runAutogenForAutotoolsProject($@)
+{
+ my ($dir, $prefix, $sourceDir, $saveArguments, $argumentsFile, @buildArgs) = @_;
+
+ print "Calling autogen.sh in " . $dir . "\n\n";
+ print "Installation prefix directory: $prefix\n" if(defined($prefix));
+
+ if ($saveArguments) {
+ # Write autogen.sh arguments to a file so that we can detect
+ # when they change and automatically re-run it.
+ open(AUTOTOOLS_ARGUMENTS, ">$argumentsFile");
+ print AUTOTOOLS_ARGUMENTS join(" ", @buildArgs);
+ close(AUTOTOOLS_ARGUMENTS);
+ }
+
+ # Make the path relative since it will appear in all -I compiler flags.
+ # Long argument lists cause bizarre slowdowns in libtool.
+ my $relSourceDir = File::Spec->abs2rel($sourceDir) || ".";
+ if (system("$relSourceDir/autogen.sh", @buildArgs) ne 0) {
+ die "Calling autogen.sh failed!\n";
+ }
+}
+
sub autogenArgumentsHaveChanged($@)
{
my ($filename, @currentArguments) = @_;
@@ -1500,38 +1523,25 @@
return 0;
}
- # If GNUmakefile exists, don't run autogen.sh. The makefile should be
- # smart enough to track autotools dependencies and re-run autogen.sh
- # when build files change.
+ # If GNUmakefile exists, don't run autogen.sh unless its arguments
+ # have changed. The makefile should be smart enough to track autotools
+ # dependencies and re-run autogen.sh when build files change.
my $autogenArgumentsFile = "previous-autogen-arguments.txt";
- my $result;
- if (!(-e "GNUmakefile") or autogenArgumentsHaveChanged($autogenArgumentsFile, @buildArgs)) {
+ my $saveAutogenArguments = $project eq "WebKit";
+ if (!(-e "GNUmakefile")) {
+ runAutogenForAutotoolsProject($dir, $prefix, $sourceDir, $saveAutogenArguments, $autogenArgumentsFile, @buildArgs);
+ }
- # Write autogen.sh arguments to a file so that we can detect
- # when they change and automatically re-run it.
- open(AUTOTOOLS_ARGUMENTS, ">$autogenArgumentsFile");
- print AUTOTOOLS_ARGUMENTS join(" ", @buildArgs);
- close(AUTOTOOLS_ARGUMENTS);
-
- print "Calling configure in " . $dir . "\n\n";
- print "Installation prefix directory: $prefix\n" if(defined($prefix));
-
- # Make the path relative since it will appear in all -I compiler flags.
- # Long argument lists cause bizarre slowdowns in libtool.
- my $relSourceDir = File::Spec->abs2rel($sourceDir) || ".";
- $result = system "$relSourceDir/autogen.sh", @buildArgs;
- if ($result ne 0) {
- die "Failed to setup build environment using 'autotools'!\n";
- }
+ if ($saveAutogenArguments and autogenArgumentsHaveChanged($autogenArgumentsFile, @buildArgs)) {
+ runAutogenForAutotoolsProject($dir, $prefix, $sourceDir, $saveAutogenArguments, $autogenArgumentsFile, @buildArgs);
}
- $result = system "$make $makeArgs";
- if ($result ne 0) {
+ if (system("$make $makeArgs") ne 0) {
die "\nFailed to build WebKit using '$make'!\n";
}
chdir ".." or die;
- return $result;
+ return 0;
}
sub generateBuildSystemFromCMakeProject