Title: [195083] trunk/Tools
Revision
195083
Author
[email protected]
Date
2016-01-14 16:50:15 -0800 (Thu, 14 Jan 2016)

Log Message

[webkitdirs] Replaced grep invocation with perl code
https://bugs.webkit.org/show_bug.cgi?id=153106

Patch by Konstantin Tokarev <[email protected]> on 2016-01-14
Reviewed by Alex Christensen.

* Scripts/webkitdirs.pm:
(determineArchitecture):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (195082 => 195083)


--- trunk/Tools/ChangeLog	2016-01-15 00:14:14 UTC (rev 195082)
+++ trunk/Tools/ChangeLog	2016-01-15 00:50:15 UTC (rev 195083)
@@ -1,3 +1,13 @@
+2016-01-14  Konstantin Tokarev  <[email protected]>
+
+        [webkitdirs] Replaced grep invocation with perl code
+        https://bugs.webkit.org/show_bug.cgi?id=153106
+
+        Reviewed by Alex Christensen.
+
+        * Scripts/webkitdirs.pm:
+        (determineArchitecture):
+
 2016-01-14  Brian Burg  <[email protected]>
 
         prepare-changelog does not read paths containing spaces properly

Modified: trunk/Tools/Scripts/webkitdirs.pm (195082 => 195083)


--- trunk/Tools/Scripts/webkitdirs.pm	2016-01-15 00:14:14 UTC (rev 195082)
+++ trunk/Tools/Scripts/webkitdirs.pm	2016-01-15 00:50:15 UTC (rev 195083)
@@ -339,11 +339,16 @@
         }
     } elsif (isCMakeBuild()) {
         my $host_processor = "";
-        $host_processor = `cmake --system-information | grep CMAKE_SYSTEM_PROCESSOR`;
-        if ($host_processor =~ m/^CMAKE_SYSTEM_PROCESSOR \"([^"]+)\"/) {
-            # We have a configured build tree; use it.
-            $architecture = $1;
-            $architecture = 'x86_64' if $architecture eq 'amd64';
+        if (open my $cmake_sysinfo, "-|", "cmake", "--system-information") {
+            while (<$cmake_sysinfo>) {
+                next unless index($_, 'CMAKE_SYSTEM_PROCESSOR') == 0;
+                if (/^CMAKE_SYSTEM_PROCESSOR \"([^"]+)\"/) {
+                    $architecture = $1;
+                    $architecture = 'x86_64' if $architecture eq 'amd64';
+                    last;
+                }
+            }
+            close $cmake_sysinfo;
         }
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to