Enable the [Supplemental] IDL on BlackBerry
authorharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Apr 2012 17:45:57 +0000 (17:45 +0000)
committerharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Apr 2012 17:45:57 +0000 (17:45 +0000)
https://bugs.webkit.org/show_bug.cgi?id=75413

Reviewed by Rob Buis.

This patch enables the [Supplemental] IDL on BlackBerry by changing the build
flow of BlackBerry as follows.

- Previous build flow:
    foreach $idl (all IDL files) {
        generate-bindings.pl depends on $idl;
        generate-bindings.pl reads $idl;
        generate-bindings.pl generates .h and .cpp files for $idl;
    }

- New build flow (See the discussions in bug 72138 for more details):
    preprocess-idls.pl depends on all IDL files;
    preprocess-idls.pl reads all IDL files;
    preprocess-idls.pl resolves the dependency of [Supplemental=XXXX];
    preprocess-idls.pl outputs supplemental_dependency.tmp;
    foreach $idl (all IDL files) {
        generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
        generate-bindings.pl reads $idl;
        generate-bindings.pl reads supplemental_dependency.tmp;
        generate-bindings.pl generates .h and .cpp files for $idl,
            including all attributes in the IDL files that are implementing $idl;
    }

Tests: Confirm that build succeeds.
       http/tests/websocket/tests/*

* PlatformBlackBerry.cmake: This change is similar to the change we have done for
UseJSC.cmake and UseV8.cmake (bug 75345).

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

Source/WebCore/ChangeLog
Source/WebCore/PlatformBlackBerry.cmake

index 7b13a11..e012448 100644 (file)
@@ -1,3 +1,39 @@
+2012-04-11  Kentaro Hara  <haraken@chromium.org>
+
+        Enable the [Supplemental] IDL on BlackBerry
+        https://bugs.webkit.org/show_bug.cgi?id=75413
+
+        Reviewed by Rob Buis.
+
+        This patch enables the [Supplemental] IDL on BlackBerry by changing the build
+        flow of BlackBerry as follows.
+
+        - Previous build flow:
+            foreach $idl (all IDL files) {
+                generate-bindings.pl depends on $idl;
+                generate-bindings.pl reads $idl;
+                generate-bindings.pl generates .h and .cpp files for $idl;
+            }
+
+        - New build flow (See the discussions in bug 72138 for more details):
+            preprocess-idls.pl depends on all IDL files;
+            preprocess-idls.pl reads all IDL files;
+            preprocess-idls.pl resolves the dependency of [Supplemental=XXXX];
+            preprocess-idls.pl outputs supplemental_dependency.tmp;
+            foreach $idl (all IDL files) {
+                generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
+                generate-bindings.pl reads $idl;
+                generate-bindings.pl reads supplemental_dependency.tmp;
+                generate-bindings.pl generates .h and .cpp files for $idl,
+                    including all attributes in the IDL files that are implementing $idl;
+            }
+
+        Tests: Confirm that build succeeds.
+               http/tests/websocket/tests/*
+
+        * PlatformBlackBerry.cmake: This change is similar to the change we have done for
+        UseJSC.cmake and UseV8.cmake (bug 75345).
+
 2012-04-11  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r113872.
index df9bcd8..86304b5 100644 (file)
@@ -314,13 +314,24 @@ SET(WebCore_CPP_IDL_FILES
     "${WebCore_CPP_IDL_FILES}"
 )
 
+FOREACH (_idl ${WebCore_CPP_IDL_FILES})
+    SET(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n")
+ENDFOREACH ()
+FILE(WRITE ${IDL_FILES_TMP} ${IDL_FILES_LIST})
+
+ADD_CUSTOM_COMMAND(
+    OUTPUT ${SUPPLEMENTAL_DEPENDENCY_FILE}
+    DEPENDS ${WEBCORE_DIR}/bindings/scripts/preprocess-idls.pl ${SCRIPTS_RESOLVE_SUPPLEMENTAL} ${WebCore_CPP_IDL_FILES} ${IDL_ATTRIBUTES_FILE}
+    COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/bindings/scripts/preprocess-idls.pl --defines "${FEATURE_DEFINES_JAVASCRIPT}" --idlFilesList ${IDL_FILES_TMP} --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" --supplementalDependencyFile ${SUPPLEMENTAL_DEPENDENCY_FILE} --idlAttributesFile ${IDL_ATTRIBUTES_FILE}
+    VERBATIM)
+
 FOREACH (_file ${WebCore_CPP_IDL_FILES})
     GET_FILENAME_COMPONENT (_name ${_file} NAME_WE)
     ADD_CUSTOM_COMMAND(
         OUTPUT  ${DERIVED_SOURCES_WEBCORE_DIR}/WebDOM${_name}.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/WebDOM${_name}.h
         MAIN_DEPENDENCY ${_file}
-        DEPENDS ${WEBCORE_DIR}/bindings/scripts/generate-bindings.pl ${SCRIPTS_BINDINGS} ${WEBCORE_DIR}/bindings/scripts/CodeGeneratorCPP.pm ${_file}
-        COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/bindings/scripts/generate-bindings.pl --defines "${FEATURE_DEFINES_WEBCORE}" --generator CPP ${IDL_INCLUDES} --outputDir "${DERIVED_SOURCES_WEBCORE_DIR}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" ${WEBCORE_DIR}/${_file}
+        DEPENDS ${WEBCORE_DIR}/bindings/scripts/generate-bindings.pl ${SCRIPTS_BINDINGS} ${WEBCORE_DIR}/bindings/scripts/CodeGeneratorCPP.pm ${SUPPLEMENTAL_DEPENDENCY_FILE} ${_file}
+        COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/bindings/scripts/generate-bindings.pl --defines "${FEATURE_DEFINES_WEBCORE}" --generator CPP ${IDL_INCLUDES} --outputDir "${DERIVED_SOURCES_WEBCORE_DIR}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" --supplementalDependencyFile ${SUPPLEMENTAL_DEPENDENCY_FILE} ${WEBCORE_DIR}/${_file}
         VERBATIM)
     LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/WebDOM${_name}.cpp)
 ENDFOREACH ()