1# ------------------------------------------------------------------- 2# Derived sources for WebKit2 3# 4# See 'Tools/qmake/README' for an overview of the build system 5# ------------------------------------------------------------------- 6 7# This file is both a top level target, and included from Target.pri, 8# so that the resulting generated sources can be added to SOURCES. 9# We only set the template if we're a top level target, so that we 10# don't override what Target.pri has already set. 11sanitizedFile = $$toSanitizedPath($$_FILE_) 12equals(sanitizedFile, $$toSanitizedPath($$_PRO_FILE_)):TEMPLATE = derived 13 14WEBCORE_GENERATED_SOURCES_DIR = ../WebCore/$${GENERATED_SOURCES_DESTDIR} 15 16SOURCE_DIR = $${ROOT_WEBKIT_DIR}/Source 17 18WEBCORE_GENERATED_HEADERS_FOR_WEBKIT2 += \ 19 $$WEBCORE_GENERATED_SOURCES_DIR/HTMLNames.h \ 20 $$WEBCORE_GENERATED_SOURCES_DIR/JSCSSStyleDeclaration.h \ 21 $$WEBCORE_GENERATED_SOURCES_DIR/JSDOMWindow.h \ 22 $$WEBCORE_GENERATED_SOURCES_DIR/JSElement.h \ 23 $$WEBCORE_GENERATED_SOURCES_DIR/JSHTMLElement.h \ 24 $$WEBCORE_GENERATED_SOURCES_DIR/JSNode.h \ 25 $$WEBCORE_GENERATED_SOURCES_DIR/JSNotification.h \ 26 $$WEBCORE_GENERATED_SOURCES_DIR/JSRange.h \ 27 $$WEBCORE_GENERATED_SOURCES_DIR/JSUint8Array.h \ 28 29defineReplace(message_header_generator_output) { 30 FILENAME=$$basename(1) 31 return($${GENERATED_SOURCES_DESTDIR}/$$replace(FILENAME, ".messages.in", "Messages.h")) 32} 33 34defineReplace(message_receiver_generator_output) { 35 FILENAME=$$basename(1) 36 return($${GENERATED_SOURCES_DESTDIR}/$$replace(FILENAME, ".messages.in", "MessageReceiver.cpp")) 37} 38 39VPATH = \ 40 PluginProcess \ 41 WebProcess/ApplicationCache \ 42 WebProcess/Battery \ 43 WebProcess/Cookies \ 44 WebProcess/FullScreen \ 45 WebProcess/Geolocation \ 46 WebProcess/IconDatabase \ 47 WebProcess/MediaCache \ 48 WebProcess/NetworkInfo \ 49 WebProcess/Notifications \ 50 WebProcess/Plugins \ 51 WebProcess/ResourceCache \ 52 WebProcess/Storage \ 53 WebProcess/WebCoreSupport \ 54 WebProcess/WebPage \ 55 WebProcess/WebPage/CoordinatedGraphics \ 56 WebProcess \ 57 UIProcess \ 58 UIProcess/CoordinatedGraphics \ 59 UIProcess/Downloads \ 60 UIProcess/Notifications \ 61 UIProcess/Plugins \ 62 UIProcess/Storage \ 63 Shared \ 64 Shared/Authentication \ 65 Shared/Plugins 66 67MESSAGE_RECEIVERS = \ 68 AuthenticationManager.messages.in \ 69 CoordinatedLayerTreeHostProxy.messages.in \ 70 DownloadProxy.messages.in \ 71 DrawingAreaProxy.messages.in \ 72 EventDispatcher.messages.in \ 73 PluginControllerProxy.messages.in \ 74 PluginProcess.messages.in \ 75 PluginProcessConnection.messages.in \ 76 PluginProcessConnectionManager.messages.in \ 77 PluginProcessProxy.messages.in \ 78 PluginProxy.messages.in \ 79 StorageAreaMap.messages.in \ 80 StorageManager.messages.in \ 81 WebApplicationCacheManager.messages.in \ 82 WebApplicationCacheManagerProxy.messages.in \ 83 WebBatteryManager.messages.in \ 84 WebBatteryManagerProxy.messages.in \ 85 WebConnection.messages.in \ 86 WebContext.messages.in \ 87 WebCookieManager.messages.in \ 88 WebCookieManagerProxy.messages.in \ 89 WebDatabaseManager.messages.in \ 90 WebDatabaseManagerProxy.messages.in \ 91 WebGeolocationManager.messages.in \ 92 WebGeolocationManagerProxy.messages.in \ 93 WebIconDatabase.messages.in \ 94 WebIconDatabaseProxy.messages.in \ 95 WebInspectorProxy.messages.in \ 96 WebMediaCacheManager.messages.in \ 97 WebMediaCacheManagerProxy.messages.in \ 98 WebNetworkInfoManager.messages.in \ 99 WebNetworkInfoManagerProxy.messages.in \ 100 WebNotificationManager.messages.in \ 101 WebFullScreenManager.messages.in \ 102 WebFullScreenManagerProxy.messages.in \ 103 CoordinatedLayerTreeHost.messages.in \ 104 DrawingArea.messages.in \ 105 WebInspector.messages.in \ 106 WebPage.messages.in \ 107 WebPageGroupProxy.messages.in \ 108 WebPageProxy.messages.in \ 109 WebProcess.messages.in \ 110 WebProcessConnection.messages.in \ 111 WebProcessProxy.messages.in \ 112 WebResourceCacheManager.messages.in \ 113 WebResourceCacheManagerProxy.messages.in \ 114 WebVibrationProxy.messages.in \ 115 NPObjectMessageReceiver.messages.in 116 117SCRIPTS = \ 118 $$PWD/Scripts/generate-message-receiver.py \ 119 $$PWD/Scripts/generate-messages-header.py \ 120 $$PWD/Scripts/webkit2/__init__.py \ 121 $$PWD/Scripts/webkit2/messages.py \ 122 $$PWD/Scripts/webkit2/model.py \ 123 $$PWD/Scripts/webkit2/parser.py 124 125message_header_generator.commands = $${PYTHON} $${SOURCE_DIR}/WebKit2/Scripts/generate-messages-header.py ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT} 126message_header_generator.input = MESSAGE_RECEIVERS 127message_header_generator.depends = $$SCRIPTS 128message_header_generator.output_function = message_header_generator_output 129message_header_generator.add_output_to_sources = false 130GENERATORS += message_header_generator 131 132message_receiver_generator.commands = $${PYTHON} $${SOURCE_DIR}/WebKit2/Scripts/generate-message-receiver.py ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT} 133message_receiver_generator.input = MESSAGE_RECEIVERS 134message_receiver_generator.depends = $$SCRIPTS 135message_receiver_generator.output_function = message_receiver_generator_output 136GENERATORS += message_receiver_generator 137 138fwheader_generator.commands = perl $${SOURCE_DIR}/WebKit2/Scripts/generate-forwarding-headers.pl $${SOURCE_DIR}/WebKit2 $${ROOT_BUILD_DIR}/Source/include qt 139fwheader_generator.depends = $${SOURCE_DIR}/WebKit2/Scripts/generate-forwarding-headers.pl 140generated_files.depends += fwheader_generator 141GENERATORS += fwheader_generator 142 143for(header, WEBCORE_GENERATED_HEADERS_FOR_WEBKIT2) { 144 header_name = $$basename(header) 145 header_path = $$header 146 header_target = $$replace(header_path, [^a-zA-Z0-9_], -) 147 header_target = "qtheader-$${header_target}" 148 dest_dir = $${ROOT_BUILD_DIR}/Source/include/WebCore 149 150 eval($${header_target}.target = $$dest_dir/$$header_name) 151 eval($${header_target}.depends = $$header_path) 152 153 win32: eval($${header_target}.commands = ($${QMAKE_MKDIR} $$toSystemPath($$dest_dir) 2>nul || echo>nul)) 154 else: eval($${header_target}.commands = $${QMAKE_MKDIR} $$toSystemPath($$dest_dir) ) 155 156 eval($${header_target}.commands += && echo $${DOUBLE_ESCAPED_QUOTE}\$${LITERAL_HASH}include \\\"$$header_path\\\"$${DOUBLE_ESCAPED_QUOTE} > $$eval($${header_target}.target)) 157 158 GENERATORS += $$header_target 159} 160 161