[EFL][GTK] WebKit2's generate-forwarding-headers.pl runs too many times
authorossy@webkit.org <ossy@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Apr 2015 08:11:52 +0000 (08:11 +0000)
committerossy@webkit.org <ossy@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Apr 2015 08:11:52 +0000 (08:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=142907

Reviewed by Carlos Garcia Campos.

Source/WebKit2:

* PlatformEfl.cmake:
* PlatformGTK.cmake:
* Scripts/generate-forwarding-headers.pl: Make it work with more path and platform arguments.

Tools:

* TestWebKitAPI/PlatformEfl.cmake:
* TestWebKitAPI/PlatformGTK.cmake:
* WebKitTestRunner/PlatformEfl.cmake:
* WebKitTestRunner/PlatformGTK.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182595 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/PlatformEfl.cmake
Source/WebKit2/PlatformGTK.cmake
Source/WebKit2/Scripts/generate-forwarding-headers.pl
Tools/ChangeLog
Tools/TestWebKitAPI/PlatformEfl.cmake
Tools/TestWebKitAPI/PlatformGTK.cmake
Tools/WebKitTestRunner/PlatformEfl.cmake
Tools/WebKitTestRunner/PlatformGTK.cmake

index 91c5644915c4caceb28485c5f97c072296ae20dc..e8d025f99d725f91051dbdf5a35fb2cd366c7db7 100644 (file)
@@ -1,3 +1,14 @@
+2015-04-09  Csaba Osztrogon√°c  <ossy@webkit.org>
+
+        [EFL][GTK] WebKit2's generate-forwarding-headers.pl runs too many times
+        https://bugs.webkit.org/show_bug.cgi?id=142907
+
+        Reviewed by Carlos Garcia Campos.
+
+        * PlatformEfl.cmake:
+        * PlatformGTK.cmake:
+        * Scripts/generate-forwarding-headers.pl: Make it work with more path and platform arguments.
+
 2015-04-08  Joseph Pecoraro  <pecoraro@apple.com>
 
         Exception in console and broken right click after attempting to show context menu in Inspector
index 8ec30a66432767e5da8253e1020f60c250274f75..a1e36a441aafe362e7348462f0109afa896ec913 100644 (file)
@@ -349,17 +349,11 @@ if (ENABLE_ECORE_X)
 endif ()
 
 add_custom_target(forwarding-headerEfl
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include CoordinatedGraphics
-)
-
-add_custom_target(forwarding-headerSoup
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
+    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl --include-path ${WEBKIT2_DIR} --output ${DERIVED_SOURCES_WEBKIT2_DIR}/include --platform efl --platform CoordinatedGraphics --platform soup
 )
 
 set(WEBKIT2_EXTRA_DEPENDENCIES
      forwarding-headerEfl
-     forwarding-headerSoup
 )
 
 configure_file(efl/ewebkit2.pc.in ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2.pc @ONLY)
index 4421c400b4871a61fe91a2c462af60dea946260e..5637a529b8cb7719a3faf5656a6e8a5def18e106 100644 (file)
@@ -978,8 +978,7 @@ add_custom_command(
             ${PluginProcessGTK2_SOURCES}
             ${PluginProcess_SOURCES}
             ${WebKit2_HEADERS}
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${FORWARDING_HEADERS_DIR} gtk
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${FORWARDING_HEADERS_DIR} soup
+    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl --input-path ${WEBKIT2_DIR} --output ${FORWARDING_HEADERS_DIR} --platform gtk --platform soup
     COMMAND touch ${CMAKE_BINARY_DIR}/WebKit2-forwarding-headers.stamp
 )
 add_custom_target(WebKit2-forwarding-headers
index a139da0dd844b313494f0f969d7f72c82ebdf769..7a6308fd4d5fce2c10f5b076910da32d2b573512 100755 (executable)
@@ -32,9 +32,9 @@ use File::Find;
 use File::Basename;
 use File::Path qw(mkpath);
 use File::Spec::Functions;
+use Getopt::Long;
 
 my $srcRoot = realpath(File::Spec->catfile(dirname(abs_path($0)), "../.."));
-my $incFromRoot = abs_path($ARGV[0]);
 my @platformPrefixes = ("cf", "Cocoa", "CoordinatedGraphics", "curl", "efl", "gtk", "mac", "soup", "win");
 my @frameworks = ("JavaScriptCore", "WebCore", "WebKit");
 my @skippedPrefixes;
@@ -44,13 +44,20 @@ my $frameworkDirectoryName;
 my %neededHeaders;
 my $verbose = 0; # enable it for debugging purpose
 
-shift;
-my $outputDirectory = $ARGV[0];
-shift;
-my $platform  = $ARGV[0];
+my @incFromRoot;
+my $outputDirectory;
+my @platform;
+
+my %options = (
+    'include-path=s' => \@incFromRoot,
+    'output=s' => \$outputDirectory,
+    'platform=s' => \@platform
+);
+
+GetOptions(%options);
 
 foreach my $prefix (@platformPrefixes) {
-    push(@skippedPrefixes, $prefix) unless ($prefix =~ $platform);
+    push(@skippedPrefixes, $prefix) if grep($_ =~ "$prefix", @platform) == 0;
 }
 
 foreach (@frameworks) {
@@ -59,7 +66,7 @@ foreach (@frameworks) {
     @frameworkHeaders = ();
     %neededHeaders = ();
 
-    find(\&collectNeededHeaders, $incFromRoot);
+    foreach (@incFromRoot) { find(\&collectNeededHeaders, abs_path($_) ); };
     find(\&collectFrameworkHeaderPaths, File::Spec->catfile($srcRoot, $frameworkDirectoryName));
     createForwardingHeadersForFramework();
 }
index 35a453fd70eb7bcef5b791085549f30820e0d377..9174632888faf30889fce9987808bc9420f4c2cb 100644 (file)
@@ -1,3 +1,15 @@
+2015-04-09  Csaba Osztrogon√°c  <ossy@webkit.org>
+
+        [EFL][GTK] WebKit2's generate-forwarding-headers.pl runs too many times
+        https://bugs.webkit.org/show_bug.cgi?id=142907
+
+        Reviewed by Carlos Garcia Campos.
+
+        * TestWebKitAPI/PlatformEfl.cmake:
+        * TestWebKitAPI/PlatformGTK.cmake:
+        * WebKitTestRunner/PlatformEfl.cmake:
+        * WebKitTestRunner/PlatformGTK.cmake:
+
 2015-04-08  Brent Fulgham  <bfulgham@apple.com>
 
         [Mac] Unreviewed test fix after r182584
index 8018aa137b3c5c54e851e6836487ca35fca6ad46..a20fe5f3decd5e59a22bb881cc88c7f031a8b180 100644 (file)
@@ -1,9 +1,5 @@
 add_custom_target(forwarding-headersEflForTestWebKitAPI
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include CoordinatedGraphics
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${TESTWEBKITAPI_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${TESTWEBKITAPI_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
+    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl --include-path ${WEBKIT2_DIR} --include-path ${TESTWEBKITAPI_DIR} --output ${DERIVED_SOURCES_WEBKIT2_DIR}/include --platform efl --platform CoordinatedGraphics --platform soup
 )
 set(ForwardingHeadersForTestWebKitAPI_NAME forwarding-headersEflForTestWebKitAPI)
 
index f58f2cbc3c6c923b383391acc8369f402b7d0fb7..ed9e6add5bfa0e6de96f42075991682d35637d13 100644 (file)
@@ -140,7 +140,7 @@ add_custom_command(
     OUTPUT ${CMAKE_BINARY_DIR}/TestWebKitAPI-forwarding-headers.stamp
     DEPENDS ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl
             ${TestWebKitAPI_SOURCES}
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${TESTWEBKITAPI_DIR} ${FORWARDING_HEADERS_DIR} gtk
+    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl --include-path ${TESTWEBKITAPI_DIR} --output ${FORWARDING_HEADERS_DIR} --platform gtk
     COMMAND touch ${CMAKE_BINARY_DIR}/TestWebKitAPI-forwarding-headers.stamp
 )
 add_custom_target(TestWebKitAPI-forwarding-headers
index f56c070f2c4974161ce1d5deb6b7a0c1db7b25ea..0f3c8bcea8c2e0767bb2ce8f6ebd9c6290130e38 100644 (file)
@@ -1,6 +1,5 @@
 add_custom_target(forwarding-headersEflForWebKitTestRunner
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT_TESTRUNNER_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT_TESTRUNNER_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
+    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl --include-path ${WEBKIT_TESTRUNNER_DIR} --output ${DERIVED_SOURCES_WEBKIT2_DIR}/include --platform efl --platform soup
 )
 set(ForwardingHeadersForWebKitTestRunner_NAME forwarding-headersEflForWebKitTestRunner)
 
index e7be68e24c977f107cf021e6f28d817819696e5f..c8a0160b6c05b81292fa0aae0cab1d5de3a95267 100644 (file)
@@ -66,7 +66,7 @@ add_custom_command(
             ${WebKitTestRunner_SOURCES}
             ${WebKitTestRunner_HEADERS}
             ${WebKitTestRunnerInjectedBundle_SOURCES}
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT_TESTRUNNER_DIR} ${FORWARDING_HEADERS_DIR} gtk
+    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl --include-path ${WEBKIT_TESTRUNNER_DIR} --output ${FORWARDING_HEADERS_DIR} --platform gtk
     COMMAND touch ${CMAKE_BINARY_DIR}/WebKitTestRunner-forwarding-headers.stamp
 )
 add_custom_target(WebKitTestRunner-forwarding-headers