2010-08-02 Balazs Kelemen <kb@inf.u-szeged.hu>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Aug 2010 14:32:38 +0000 (14:32 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Aug 2010 14:32:38 +0000 (14:32 +0000)
        Reviewed by Simon Hausmann.

        [Qt] Generate forwarding headers for WebKit2

        https://bugs.webkit.org/show_bug.cgi?id=43336

        * DerivedSources.pro: Added WebKit2/DerivedSources.pro to SUBDIRS if webkit2 is on.
2010-08-02  Balazs Kelemen  <kb@inf.u-szeged.hu>

        Reviewed by Simon Hausmann.

        [Qt] Generate forwarding headers for WebKit2

        https://bugs.webkit.org/show_bug.cgi?id=43336

        * WebCore.pri: Removed header copying logic.
        * WebCore.pro: Add include paths for WebKit2.
2010-08-02  Balazs Kelemen  <kb@inf.u-szeged.hu>

        Reviewed by Simon Hausmann.

        [Qt] Generate forwarding headers for WebKit2

        https://bugs.webkit.org/show_bug.cgi?id=43336

        * DerivedSources.pro: Added.
2010-08-02  Balazs Kelemen  <kb@inf.u-szeged.hu>

        Reviewed by Simon Hausmann.

        [Qt] Generate forwarding headers for WebKit2

        https://bugs.webkit.org/show_bug.cgi?id=43336

        * Scripts/webkitdirs.pm: Call make on WebKit2/Makefile.DerivedSources.

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

ChangeLog
DerivedSources.pro
WebCore/ChangeLog
WebCore/WebCore.pri
WebCore/WebCore.pro
WebKit2/ChangeLog
WebKit2/DerivedSources.pro [new file with mode: 0644]
WebKitTools/ChangeLog
WebKitTools/Scripts/webkitdirs.pm

index a0d18c9e637e0b294f8a8857252205bcc44d2b44..3a24572c2120bfd3dbb6bc8bfc1598fc6295979b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2010-08-02  Balazs Kelemen  <kb@inf.u-szeged.hu>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Generate forwarding headers for WebKit2
+
+        https://bugs.webkit.org/show_bug.cgi?id=43336
+
+        * DerivedSources.pro: Added WebKit2/DerivedSources.pro to SUBDIRS if webkit2 is on.
+
 2010-07-30  Patrick Gansterer  <paroga@paroga.com>
 
         Reviewed by Nikolas Zimmermann.
index d1a4802686d3fec1ae1b4a71bf0ce6a870163cad..880a716a56e996632280a1d2b273107d07ee339f 100644 (file)
@@ -6,6 +6,10 @@ SUBDIRS += \
         WebCore/DerivedSources.pro \
         WebKit/qt/Api/DerivedSources.pro
 
+webkit2 {
+    SUBDIRS += WebKit2/DerivedSources.pro
+}
+
 for(subpro, SUBDIRS) {
     subdir = $${dirname(subpro)}
     subtarget = $$replace(subpro, [^a-zA-Z0-9_], -)
index 0c4e6ab2433c4351e1b4de364cb9560f9470c168..3924892bfd5e489f7892b6bee363bd51c92bfb4a 100644 (file)
@@ -1,3 +1,14 @@
+2010-08-02  Balazs Kelemen  <kb@inf.u-szeged.hu>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Generate forwarding headers for WebKit2
+
+        https://bugs.webkit.org/show_bug.cgi?id=43336
+
+        * WebCore.pri: Removed header copying logic.
+        * WebCore.pro: Add include paths for WebKit2.
+
 2010-08-02  Andrey Kosyakov  <caseq@chromium.org>
 
         Reviewed by Pavel Feldman.
index 34db91116d20741ed222cfef2c0fcab5029c0370..ff65cae078a187521ea286e07dc9db1c156e62df 100644 (file)
@@ -667,93 +667,6 @@ IDL_BINDINGS += \
 
 INSPECTOR_INTERFACES = inspector/Inspector.idl
 
-WEBCORE_HEADERS_FOR_WEBKIT2 += \
-    bindings/js/DOMWrapperWorld.h \
-    platform/FileChooser.h \
-    platform/network/qt/ResourceError.h \
-    platform/network/qt/ResourceRequest.h \
-    platform/network/qt/ResourceResponse.h \
-    dom/KeyboardEvent.h \
-    editing/EditCommand.h \
-    history/BackForwardList.h \
-    history/BackForwardControllerClient.h \
-    history/HistoryItem.h \
-    html/HTMLFormElement.h \
-    html/HTMLFrameOwnerElement.h \
-    inspector/InspectorClient.h \
-    loader/appcache/ApplicationCacheStorage.h \
-    loader/DocumentLoader.h \
-    loader/FormState.h \
-    loader/FrameLoader.h \
-    loader/FrameLoaderClient.h \
-    loader/FrameLoaderTypes.h \
-    loader/PolicyChecker.h \
-    loader/ProgressTracker.h \
-    page/animation/AnimationController.h \
-    page/Chrome.h \
-    page/ChromeClient.h \
-    page/ContextMenuClient.h \
-    page/DragClient.h \
-    page/EditorClient.h \
-    page/EventHandler.h \
-    page/FocusController.h \
-    page/Frame.h \
-    page/FrameLoadRequest.h \
-    page/FrameView.h \
-    page/Page.h \
-    page/Settings.h \
-    page/WindowFeatures.h \
-    platform/Cursor.h \
-    platform/PlatformKeyboardEvent.h \
-    platform/PlatformMouseEvent.h \
-    platform/PlatformWheelEvent.h \
-    platform/Widget.h \
-    platform/KURL.h \
-    platform/graphics/Color.h \
-    platform/graphics/ColorSpace.h \
-    platform/graphics/GraphicsTypes.h \
-    platform/graphics/Image.h \
-    platform/graphics/ImageSource.h \
-    platform/graphics/FloatRect.h \
-    platform/graphics/GraphicsContext.h \
-    platform/graphics/GraphicsLayerClient.h \
-    platform/graphics/IntPoint.h \
-    platform/graphics/IntRect.h \
-    platform/graphics/IntSize.h \
-    platform/graphics/Tile.h \
-    platform/graphics/TiledBackingStore.h \
-    platform/graphics/TiledBackingStoreClient.h \
-    platform/sql/SQLiteDatabase.h \
-    platform/text/PlatformString.h \
-    platform/text/StringImpl.h \
-    platform/MIMETypeRegistry.h \
-    rendering/RenderTreeAsText.h \
-    plugins/PluginData.h \
-
-JSC_HEADERS_FOR_WEBKIT2 += \
-    ../JavaScriptCore/runtime/JSObject.h \
-
-WEBKIT2_API_HEADERS += \
-    ../WebKit2/UIProcess/API/C/WKAPICast.h \
-    ../WebKit2/UIProcess/API/C/WKBase.h \
-    ../WebKit2/UIProcess/API/C/WKContext.h \
-    ../WebKit2/UIProcess/API/C/WKContextPrivate.h \
-    ../WebKit2/UIProcess/API/C/WKFrame.h \
-    ../WebKit2/UIProcess/API/C/WKFramePolicyListener.h \
-    ../WebKit2/UIProcess/API/C/WKNavigationData.h \
-    ../WebKit2/UIProcess/API/C/WKPage.h \
-    ../WebKit2/UIProcess/API/C/WKPageNamespace.h \
-    ../WebKit2/UIProcess/API/C/WKPagePrivate.h \
-    ../WebKit2/UIProcess/API/C/WKPreferences.h \
-    ../WebKit2/UIProcess/API/C/WKString.h \
-    ../WebKit2/UIProcess/API/C/WKURL.h \
-    ../WebKit2/UIProcess/API/C/WebKit2.h \
-    ../WebKit2/UIProcess/API/cpp/WKRetainPtr.h \
-    ../WebKit2/UIProcess/API/qt/qgraphicswkview.h \
-    ../WebKit2/UIProcess/API/qt/qwkpage.h \
-    ../WebKit2/WebProcess/InjectedBundle/API/c/WKBundleBase.h \
-    ../WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h \
-
 mathmlnames.output = $${WC_GENERATED_SOURCES_DIR}/MathMLNames.cpp
 mathmlnames.input = MATHML_NAMES
 mathmlnames.wkScript = $$PWD/dom/make_names.pl
@@ -917,31 +830,3 @@ webkitversion.commands = perl $$webkitversion.wkScript --config $$PWD/../WebKit/
 webkitversion.clean = ${QMAKE_VAR_WC_GENERATED_SOURCES_DIR}/WebKitVersion.h
 webkitversion.wkAddOutputToSources = false
 addExtraCompiler(webkitversion)
-
-webkit2 {
-
-# GENERATOR 12: Copy WebCore headers for WebKit2
-webcoreheaders.output = ../include/WebCore/${QMAKE_FILE_BASE}.h
-webcoreheaders.input = WEBCORE_HEADERS_FOR_WEBKIT2
-webcoreheaders.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT}
-webcoreheaders.clean = ${QMAKE_FILE_OUT}
-webcoreheaders.wkAddOutputToSources = false
-addExtraCompiler(webcoreheaders)
-
-# GENERATOR 12-B: Copy JavaScriptCore headers for WebKit2
-jscheaders.output = ../include/JavaScriptCore/${QMAKE_FILE_BASE}.h
-jscheaders.input = JSC_HEADERS_FOR_WEBKIT2
-jscheaders.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT}
-jscheaders.clean = ${QMAKE_FILE_OUT}
-jscheaders.wkAddOutputToSources = false
-addExtraCompiler(jscheaders)
-
-# GENERATOR 13: Copy WebKit2 headers
-webkit2headers.output = ../include/WebKit2/${QMAKE_FILE_BASE}.h
-webkit2headers.input = WEBKIT2_API_HEADERS
-webkit2headers.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT}
-webkit2headers.clean = ${QMAKE_FILE_OUT}
-webkit2headers.wkAddOutputToSources = false
-addExtraCompiler(webkit2headers)
-
-}
index fe261acbfc72bbdc31fe0dff61b6ab689fcfea14..25b194fcb1a20570486976782070dc36cebb3e16 100644 (file)
@@ -3386,6 +3386,11 @@ SOURCES += \
     ../WebKit2/WebProcess/WebProcess.cpp \
     ../WebKit2/WebProcess/qt/WebProcessMainQt.cpp
 
+INCLUDEPATH = \
+    $$OUTPUT_DIR/WebCore/generated \
+    $$INCLUDEPATH \
+    $$OUPUT_DIR/include
+
 }
 
 symbian {
index 7ec10a54e9f2f8b17eb5ede596e8a7a2d9057ee0..52946eec2d30da907f761770a31068df8c98bb3f 100644 (file)
@@ -1,3 +1,13 @@
+2010-08-02  Balazs Kelemen  <kb@inf.u-szeged.hu>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Generate forwarding headers for WebKit2
+
+        https://bugs.webkit.org/show_bug.cgi?id=43336
+
+        * DerivedSources.pro: Added.
+
 2010-08-01  Anders Carlsson  <andersca@apple.com>
 
         Reviewed by Sam Weinig.
diff --git a/WebKit2/DerivedSources.pro b/WebKit2/DerivedSources.pro
new file mode 100644 (file)
index 0000000..f7cd243
--- /dev/null
@@ -0,0 +1,243 @@
+TEMPLATE = lib
+TARGET = dummy
+
+CONFIG -= debug_and_release
+
+WEBCORE_HEADERS_FOR_WEBKIT2 += \
+    bindings/js/DOMWrapperWorld.h \
+    bindings/js/GCController.h \
+    bindings/js/JSPluginElementFunctions.h \
+    bridge/IdentifierRep.h \
+    bridge/npapi.h \
+    bridge/npruntime.h \
+    config.h \
+    css/CSSComputedStyleDeclaration.h \
+    dom/Event.h \
+    dom/KeyboardEvent.h \
+    dom/Node.h \
+    dom/Range.h \
+    editing/EditCommand.h \
+    editing/EditorInsertAction.h \
+    editing/TextAffinity.h \
+    history/BackForwardControllerClient.h \
+    history/BackForwardList.h \
+    history/HistoryItem.h \
+    html/HTMLFormElement.h \
+    html/HTMLFrameOwnerElement.h \
+    html/HTMLPlugInElement.h \
+    inspector/InspectorClient.h \
+    loader/appcache/ApplicationCacheStorage.h \
+    loader/Cache.h \
+    loader/DocumentLoader.h \
+    loader/FormState.h \
+    loader/FrameLoaderClient.h \
+    loader/FrameLoader.h \
+    loader/FrameLoaderTypes.h \
+    loader/NetscapePlugInStreamLoader.h \
+    loader/PolicyChecker.h \
+    loader/ProgressTracker.h \
+    page/animation/AnimationController.h \
+    page/ChromeClient.h \
+    page/Chrome.h \
+    page/ContextMenuClient.h \
+    page/DragClient.h \
+    page/EditorClient.h \
+    page/EventHandler.h \
+    page/FocusController.h \
+    page/Frame.h \
+    page/FrameLoadRequest.h \
+    page/FrameView.h \
+    page/MediaCanStartListener.h \
+    page/PageGroup.h \
+    page/Page.h \
+    page/SecurityOrigin.h \
+    page/Settings.h \
+    page/WindowFeatures.h \
+    platform/Cursor.h \
+    platform/FileChooser.h \
+    platform/FileSystem.h \
+    platform/graphics/FloatRect.h \
+    platform/graphics/FontRenderingMode.h \
+    platform/graphics/GraphicsContext.h \
+    platform/graphics/GraphicsLayerClient.h \
+    platform/graphics/GraphicsLayer.h \
+    platform/graphics/IntPoint.h \
+    platform/graphics/IntRect.h \
+    platform/graphics/IntSize.h \
+    platform/HostWindow.h \
+    platform/KURL.h \
+    platform/LocalizationStrategy.h \
+    platform/MIMETypeRegistry.h \
+    platform/network/android/ResourceError.h \
+    platform/network/android/ResourceRequest.h \
+    platform/network/android/ResourceResponse.h \
+    platform/network/HTTPHeaderMap.h \
+    platform/PlatformKeyboardEvent.h \
+    platform/PlatformMouseEvent.h \
+    platform/PlatformStrategies.h \
+    platform/PlatformWheelEvent.h \
+    platform/PopupMenu.h \
+    platform/PopupMenuClient.h \
+    platform/SchemeRegistry.h \
+    platform/ScrollView.h \
+    platform/SearchPopupMenu.h \
+    platform/SharedBuffer.h \
+    platform/text/PlatformString.h \
+    platform/text/StringHash.h \
+    platform/Widget.h \
+    platform/win/BitmapInfo.h \
+    platform/WindowsKeyboardCodes.h \
+    platform/win/WebCoreInstanceHandle.h \
+    platform/win/WindowMessageBroadcaster.h \
+    platform/win/WindowMessageListener.h \
+    plugins/npfunctions.h \
+    plugins/PluginData.h \
+    plugins/PluginStrategy.h \
+    plugins/PluginViewBase.h \
+    rendering/RenderLayer.h \
+    rendering/RenderTreeAsText.h \
+
+WEBCORE_GENERATED_HEADERS_FOR_WEBKIT2 += \
+    $$OUTPUT_DIR/WebCore/generated/JSElement.h \
+    $$OUTPUT_DIR/WebCore/generated/JSCSSStyleDeclaration.h
+
+JSC_HEADERS_FOR_WEBKIT2 += \
+    API/APICast.h \
+    API/JavaScript.h \
+    API/JSBase.h \
+    runtime/Error.h \
+    runtime/FunctionPrototype.h \
+    runtime/InternalFunction.h \
+    runtime/JSGlobalObject.h \
+    runtime/JSLock.h \
+    runtime/JSObject.h \
+    runtime/JSObjectWithGlobalObject.h \
+    runtime/ObjectPrototype.h \
+    runtime/Protect.h \
+    wtf/Platform.h \
+    wtf/text/StringHash.h \
+
+WEBKIT2_API_HEADERS += \
+    UIProcess/API/C/WKAPICast.h \
+    UIProcess/API/C/WKBase.h \
+    UIProcess/API/C/WKContext.h \
+    UIProcess/API/C/WKContextPrivate.h \
+    UIProcess/API/C/WKFrame.h \
+    UIProcess/API/C/WKFramePolicyListener.h \
+    UIProcess/API/C/WKNavigationData.h \
+    UIProcess/API/C/WKPage.h \
+    UIProcess/API/C/WKPageNamespace.h \
+    UIProcess/API/C/WKPagePrivate.h \
+    UIProcess/API/C/WKPreferences.h \
+    UIProcess/API/C/WKString.h \
+    UIProcess/API/C/WKURL.h \
+    UIProcess/API/C/WebKit2.h \
+    UIProcess/API/cpp/WKRetainPtr.h \
+    UIProcess/API/qt/qgraphicswkview.h \
+    UIProcess/API/qt/qwkpage.h \
+    WebProcess/InjectedBundle/API/c/WKBundleBase.h \
+    WebProcess/InjectedBundle/API/c/WKBundlePage.h \
+
+
+QUOTE = ""
+DOUBLE_ESCAPED_QUOTE = ""
+ESCAPE = ""
+MKDIR = ""
+win32-msvc* {
+    ESCAPE = "^"
+    MKDIR = md
+} else symbian {
+    ESCAPE = "^"
+    MKDIR = mkdir
+} else:win32-g++*:isEmpty(QMAKE_SH) {
+    # MinGW's make will run makefile commands using sh, even if make
+    #  was run from the Windows shell, if it finds sh in the path.
+    ESCAPE = "^"
+    MKDIR = md
+} else {
+    QUOTE = "\'"
+    DOUBLE_ESCAPED_QUOTE = "\\\'"
+    MKDIR = mkdir
+}
+
+DIRS = \
+    $$OUTPUT_DIR/include/JavaScriptCore \
+    $$OUTPUT_DIR/include/WebCore \
+    $$OUTPUT_DIR/include/WebKit2
+
+for(DIR, DIRS) {
+    !exists($$DIR): system($$MKDIR $$DIR)
+}
+
+QMAKE_EXTRA_TARGETS += createdirs
+
+SRC_ROOT_DIR = $$replace(PWD, /WebKit2, /)
+
+for(HEADER, WEBCORE_HEADERS_FOR_WEBKIT2) {
+    DESTDIR_BASE = "WebCore"
+
+    HEADER_NAME = $$basename(HEADER)
+    HEADER_PATH = $$SRC_ROOT_DIR/$$DESTDIR_BASE/$$HEADER
+    HEADER_TARGET = $$replace(HEADER_PATH, [^a-zA-Z0-9_], -)
+    HEADER_TARGET = "qtheader-$${HEADER_TARGET}"
+    DESTDIR = $$OUTPUT_DIR/include/$$DESTDIR_BASE
+
+    #FIXME: This should be organized out into a function
+    eval($${HEADER_TARGET}.target = $$DESTDIR/$$HEADER_NAME)
+    eval($${HEADER_TARGET}.depends = $$HEADER_PATH)
+    eval($${HEADER_TARGET}.commands = echo $${DOUBLE_ESCAPED_QUOTE}\$${LITERAL_HASH}include \\\"$$HEADER_PATH\\\"$${DOUBLE_ESCAPED_QUOTE} > $$eval($${HEADER_TARGET}.target))
+
+    QMAKE_EXTRA_TARGETS += $$HEADER_TARGET
+    generated_files.depends += $$eval($${HEADER_TARGET}.target)
+}
+
+for(HEADER, WEBCORE_GENERATED_HEADERS_FOR_WEBKIT2) {
+    HEADER_NAME = $$basename(HEADER)
+    HEADER_PATH = $$HEADER
+    HEADER_TARGET = $$replace(HEADER_PATH, [^a-zA-Z0-9_], -)
+    HEADER_TARGET = "qtheader-$${HEADER_TARGET}"
+    DESTDIR = $$OUTPUT_DIR/include/"WebCore"
+
+    eval($${HEADER_TARGET}.target = $$DESTDIR/$$HEADER_NAME)
+    eval($${HEADER_TARGET}.depends = $$HEADER_PATH)
+    eval($${HEADER_TARGET}.commands = echo $${DOUBLE_ESCAPED_QUOTE}\$${LITERAL_HASH}include \\\"$$HEADER_PATH\\\"$${DOUBLE_ESCAPED_QUOTE} > $$eval($${HEADER_TARGET}.target))
+
+    QMAKE_EXTRA_TARGETS += $$HEADER_TARGET
+    generated_files.depends += $$eval($${HEADER_TARGET}.target)
+}
+
+for(HEADER, JSC_HEADERS_FOR_WEBKIT2) {
+    DESTDIR_BASE = "JavaScriptCore"
+
+    HEADER_NAME = $$basename(HEADER)
+    HEADER_PATH = $$SRC_ROOT_DIR/$$DESTDIR_BASE/$$HEADER
+    HEADER_TARGET = $$replace(HEADER_PATH, [^a-zA-Z0-9_], -)
+    HEADER_TARGET = "qtheader-$${HEADER_TARGET}"
+    DESTDIR = $$OUTPUT_DIR/include/$$DESTDIR_BASE
+
+    eval($${HEADER_TARGET}.target = $$DESTDIR/$$HEADER_NAME)
+    eval($${HEADER_TARGET}.depends = $$HEADER_PATH)
+    eval($${HEADER_TARGET}.commands = echo $${DOUBLE_ESCAPED_QUOTE}\$${LITERAL_HASH}include \\\"$$HEADER_PATH\\\"$${DOUBLE_ESCAPED_QUOTE} > $$eval($${HEADER_TARGET}.target))
+
+    QMAKE_EXTRA_TARGETS += $$HEADER_TARGET
+    generated_files.depends += $$eval($${HEADER_TARGET}.target)
+}
+
+for(HEADER, WEBKIT2_API_HEADERS) {
+    DESTDIR_BASE = "WebKit2"
+
+    HEADER_NAME = $$basename(HEADER)
+    HEADER_PATH = $$PWD/$$HEADER
+    HEADER_TARGET = $$replace(HEADER_PATH, [^a-zA-Z0-9_], -)
+    HEADER_TARGET = "qtheader-$${HEADER_TARGET}"
+    DESTDIR = $$OUTPUT_DIR/include/$$DESTDIR_BASE
+
+    eval($${HEADER_TARGET}.target = $$DESTDIR/$$HEADER_NAME)
+    eval($${HEADER_TARGET}.depends = $$HEADER_PATH)
+    eval($${HEADER_TARGET}.commands = echo $${DOUBLE_ESCAPED_QUOTE}\$${LITERAL_HASH}include \\\"$$HEADER_PATH\\\"$${DOUBLE_ESCAPED_QUOTE} > $$eval($${HEADER_TARGET}.target))
+
+    QMAKE_EXTRA_TARGETS += $$HEADER_TARGET
+    generated_files.depends += $$eval($${HEADER_TARGET}.target)
+}
+
+QMAKE_EXTRA_TARGETS += generated_files
index d6843553a3e489a6b64f9323a0d1c7b9db48a677..3b32dc17ddc5227e945be3321ba81bbc3c8c21b1 100644 (file)
@@ -1,3 +1,13 @@
+2010-08-02  Balazs Kelemen  <kb@inf.u-szeged.hu>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Generate forwarding headers for WebKit2
+
+        https://bugs.webkit.org/show_bug.cgi?id=43336
+
+        * Scripts/webkitdirs.pm: Call make on WebKit2/Makefile.DerivedSources.
+
 2010-08-02  Fumitoshi Ukai  <ukai@chromium.org>
 
         Reviewed by Kent Tamura.
index 745e808f82726aafd75a1b0a3cebc476c54358a7..028d63df5844ab5a77cd5ef8e045fee07fb85ac6 100644 (file)
@@ -1418,6 +1418,8 @@ sub buildQMakeProject($@)
 
     print "Generating derived sources\n\n";
 
+    push @buildArgs, "OUTPUT_DIR=" . baseProductDir() . "/$config";
+
     my @dsQmakeArgs = @buildArgs;
     push @dsQmakeArgs, "-r";
     push @dsQmakeArgs, sourceDir() . "/DerivedSources.pro";
@@ -1431,7 +1433,12 @@ sub buildQMakeProject($@)
     my $dsMakefile = "Makefile.DerivedSources";
 
     # Iterate over different source directories manually to workaround a problem with qmake+extraTargets+s60
-    for my $subdir ("JavaScriptCore", "WebCore", "WebKit/qt/Api") {
+    my @subdirs = ("JavaScriptCore", "WebCore", "WebKit/qt/Api");
+    if (grep { $_ eq "CONFIG+=webkit2"} @buildArgs) {
+        push @subdirs, "WebKit2";
+    }
+
+    for my $subdir (@subdirs) {
         print "Calling '$make $makeargs -f $dsMakefile generated_files' in " . $dir . "/$subdir\n\n";
         if ($make eq "nmake") {
             my $subdirWindows = $subdir;
@@ -1445,7 +1452,6 @@ sub buildQMakeProject($@)
         }
     }
 
-    push @buildArgs, "OUTPUT_DIR=" . baseProductDir() . "/$config";
     push @buildArgs, sourceDir() . "/WebKit.pro";
     if ($config =~ m/debug/i) {
         push @buildArgs, "CONFIG-=release";