Title: [120199] trunk/Tools
Revision
120199
Author
[email protected]
Date
2012-06-13 06:51:08 -0700 (Wed, 13 Jun 2012)

Log Message

[EFL] Store and compare md5sum of jhbuild files to trigger cleaning Dependencies
https://bugs.webkit.org/show_bug.cgi?id=85790

Patch by Dominik Röttsches <[email protected]> on 2012-06-13
Reviewed by Gustavo Noronha Silva.

Add md5 checks for jhbuild configuration for EFL, reusing the gtk jhbuild related
code in webkitdirs.pm.

* Scripts/webkitdirs.pm:
(jhbuildConfigurationChanged):
(saveJhbuildMd5):
(cleanJhbuild):
(buildAutotoolsProject):
(generateBuildSystemFromCMakeProject):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (120198 => 120199)


--- trunk/Tools/ChangeLog	2012-06-13 13:51:02 UTC (rev 120198)
+++ trunk/Tools/ChangeLog	2012-06-13 13:51:08 UTC (rev 120199)
@@ -1,3 +1,20 @@
+2012-06-13  Dominik Röttsches  <[email protected]>
+
+        [EFL] Store and compare md5sum of jhbuild files to trigger cleaning Dependencies
+        https://bugs.webkit.org/show_bug.cgi?id=85790
+
+        Reviewed by Gustavo Noronha Silva.
+
+        Add md5 checks for jhbuild configuration for EFL, reusing the gtk jhbuild related
+        code in webkitdirs.pm.
+
+        * Scripts/webkitdirs.pm:
+        (jhbuildConfigurationChanged):
+        (saveJhbuildMd5):
+        (cleanJhbuild):
+        (buildAutotoolsProject):
+        (generateBuildSystemFromCMakeProject):
+
 2012-06-13  Qi Zhang  <[email protected]>
 
         [Qt] Add configure test for zlib and set WTF_USE_ZLIB if found

Modified: trunk/Tools/Scripts/webkitdirs.pm (120198 => 120199)


--- trunk/Tools/Scripts/webkitdirs.pm	2012-06-13 13:51:02 UTC (rev 120198)
+++ trunk/Tools/Scripts/webkitdirs.pm	2012-06-13 13:51:08 UTC (rev 120199)
@@ -1892,9 +1892,10 @@
             return 1;
         }
 
-        # Get the md5 sum of the file we're testing.
+        # Get the md5 sum of the file we're testing, look in the right platform directory.
         $file =~ m/(.+)\.md5sum/;
-        my $actualFile = join('/', $sourceDir, 'Tools', 'gtk', $1);
+        my $platformDir = isEfl() ? 'efl' : 'gtk';
+        my $actualFile = join('/', $sourceDir, 'Tools', $platformDir, $1);
         my $currentSum = getMD5HashForFile($actualFile);
 
         # Get our previous record.
@@ -1908,6 +1909,33 @@
     }
 }
 
+sub saveJhbuildMd5() {
+    my $platform = isEfl() ? 'efl' : 'gtk';
+    # Save md5sum for jhbuild-related files.
+    foreach my $file (qw(jhbuildrc jhbuild.modules)) {
+        my $source = join('/', $sourceDir, "Tools", $platform, $file);
+        my $destination = join('/', getJhbuildPath(), $file);
+        open(SUM, ">$destination" . ".md5sum");
+        print SUM getMD5HashForFile($source);
+        close(SUM);
+    }
+}
+
+sub cleanJhbuild() {
+        # If the configuration changed, dependencies may have been removed.
+        # Since we lack a granular way of uninstalling those we wipe out the
+        # jhbuild root and start from scratch.
+        my $jhbuildPath = getJhbuildPath();
+        if (system("rm -rf $jhbuildPath/Root") ne 0) {
+            die "Cleaning jhbuild root failed!";
+        }
+
+        my $platform = isEfl() ? 'efl' : 'gtk';
+        if (system("perl $sourceDir/Tools/jhbuild/jhbuild-wrapper --$platform clean") ne 0) {
+            die "Cleaning jhbuild modules failed!";
+        }
+}
+
 sub mustReRunAutogen($@)
 {
     my ($sourceDir, $filename, @currentArguments) = @_;
@@ -1997,18 +2025,7 @@
     # We might need to update jhbuild dependencies.
     my $needUpdate = 0;
     if (jhbuildConfigurationChanged()) {
-        # If the configuration changed, dependencies may have been removed.
-        # Since we lack a granular way of uninstalling those we wipe out the
-        # jhbuild root and start from scratch.
-        my $jhbuildPath = getJhbuildPath();
-        if (system("rm -rf $jhbuildPath/Root") ne 0) {
-            die "Cleaning jhbuild root failed!";
-        }
-
-        if (system("perl $sourceDir/Tools/jhbuild/jhbuild-wrapper --gtk clean") ne 0) {
-            die "Cleaning jhbuild modules failed!";
-        }
-
+        cleanJhbuild();
         $needUpdate = 1;
     }
 
@@ -2023,14 +2040,7 @@
         system("perl", "$sourceDir/Tools/Scripts/update-webkitgtk-libs") == 0 or die $!;
     }
 
-    # Save md5sum for jhbuild-related files.
-    foreach my $file (qw(jhbuildrc jhbuild.modules)) {
-        my $source = join('/', $sourceDir, "Tools", "gtk", $file);
-        my $destination = join('/', getJhbuildPath(), $file);
-        open(SUM, ">$destination" . ".md5sum");
-        print SUM getMD5HashForFile($source);
-        close(SUM);
-    }
+    saveJhbuildMd5();
 
     # If GNUmakefile exists, don't run autogen.sh unless its arguments
     # have changed. The makefile should be smart enough to track autotools
@@ -2095,6 +2105,15 @@
         $ENV{'CXXFLAGS'} = "-march=pentium4 -msse2 -mfpmath=sse " . ($ENV{'CXXFLAGS'} || "");
     }
 
+    if (isEfl() && jhbuildConfigurationChanged()) {
+        cleanJhbuild();
+        system("perl", "$sourceDir/Tools/Scripts/update-webkitefl-libs") == 0 or die $!;
+    }
+
+    if (isEfl()) {
+        saveJhbuildMd5();
+    }
+
     # Remove CMakeCache.txt to avoid using outdated build flags
     if (isEfl()) {
         my $cacheFilePath = File::Spec->catdir($buildPath, "CMakeCache.txt");
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to