[WebKit2] Add the ability to send messages to the WebPageGroupProxy
[WebKit-https.git] / Source / WebKit2 / DerivedSources.pri
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.
11 sanitizedFile = $$toSanitizedPath($$_FILE_)
12 equals(sanitizedFile, $$toSanitizedPath($$_PRO_FILE_)):TEMPLATE = derived
13
14 WEBCORE_GENERATED_SOURCES_DIR = ../WebCore/$${GENERATED_SOURCES_DESTDIR}
15
16 SOURCE_DIR = $${ROOT_WEBKIT_DIR}/Source
17
18 WEBCORE_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
28 defineReplace(message_header_generator_output) {
29   FILENAME=$$basename(1)
30   return($${GENERATED_SOURCES_DESTDIR}/$$replace(FILENAME, ".messages.in", "Messages.h"))
31 }
32
33 defineReplace(message_receiver_generator_output) {
34   FILENAME=$$basename(1)
35   return($${GENERATED_SOURCES_DESTDIR}/$$replace(FILENAME, ".messages.in", "MessageReceiver.cpp"))
36 }
37
38 VPATH = \
39     PluginProcess \
40     WebProcess/ApplicationCache \
41     WebProcess/Authentication \
42     WebProcess/Battery \
43     WebProcess/Cookies \
44     WebProcess/FullScreen \
45     WebProcess/Geolocation \
46     WebProcess/IconDatabase \
47     WebProcess/KeyValueStorage \
48     WebProcess/MediaCache \
49     WebProcess/NetworkInfo \
50     WebProcess/Notifications \
51     WebProcess/Plugins \
52     WebProcess/ResourceCache \
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     Shared/Plugins
63
64 MESSAGE_RECEIVERS = \
65     AuthenticationManager.messages.in \
66     DownloadProxy.messages.in \
67     DrawingAreaProxy.messages.in \
68     EventDispatcher.messages.in \
69     LayerTreeCoordinatorProxy.messages.in \
70     PluginControllerProxy.messages.in \
71     PluginProcess.messages.in \
72     PluginProcessConnection.messages.in \
73     PluginProcessProxy.messages.in \
74     PluginProxy.messages.in \
75     WebApplicationCacheManager.messages.in \
76     WebApplicationCacheManagerProxy.messages.in \
77     WebBatteryManager.messages.in \
78     WebBatteryManagerProxy.messages.in \
79     WebContext.messages.in \
80     WebCookieManager.messages.in \
81     WebCookieManagerProxy.messages.in \
82     WebDatabaseManager.messages.in \
83     WebDatabaseManagerProxy.messages.in \
84     WebGeolocationManager.messages.in \
85     WebGeolocationManagerProxy.messages.in \
86     WebIconDatabase.messages.in \
87     WebIconDatabaseProxy.messages.in \
88     WebInspectorProxy.messages.in \
89     WebKeyValueStorageManager.messages.in \
90     WebKeyValueStorageManagerProxy.messages.in \
91     WebMediaCacheManager.messages.in \
92     WebMediaCacheManagerProxy.messages.in \
93     WebNetworkInfoManager.messages.in \
94     WebNetworkInfoManagerProxy.messages.in \
95     WebNotificationManagerProxy.messages.in \
96     WebNotificationManager.messages.in \
97     WebFullScreenManager.messages.in \
98     WebFullScreenManagerProxy.messages.in \
99     DrawingArea.messages.in \
100     LayerTreeCoordinator.messages.in \
101     WebInspector.messages.in \
102     WebPage.messages.in \
103     WebPageGroupProxy.messages.in \
104     WebPageProxy.messages.in \
105     WebProcess.messages.in \
106     WebProcessConnection.messages.in \
107     WebProcessProxy.messages.in \
108     WebResourceCacheManager.messages.in \
109     WebResourceCacheManagerProxy.messages.in \
110     WebVibrationProxy.messages.in \
111     NPObjectMessageReceiver.messages.in
112
113 SCRIPTS = \
114     $$PWD/Scripts/generate-message-receiver.py \
115     $$PWD/Scripts/generate-messages-header.py \
116     $$PWD/Scripts/webkit2/__init__.py \
117     $$PWD/Scripts/webkit2/messages.py \
118     $$PWD/Scripts/webkit2/model.py \
119     $$PWD/Scripts/webkit2/parser.py
120
121 message_header_generator.commands = $${PYTHON} $${SOURCE_DIR}/WebKit2/Scripts/generate-messages-header.py ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
122 message_header_generator.input = MESSAGE_RECEIVERS
123 message_header_generator.depends = $$SCRIPTS
124 message_header_generator.output_function = message_header_generator_output
125 message_header_generator.add_output_to_sources = false
126 GENERATORS += message_header_generator
127
128 message_receiver_generator.commands = $${PYTHON} $${SOURCE_DIR}/WebKit2/Scripts/generate-message-receiver.py  ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
129 message_receiver_generator.input = MESSAGE_RECEIVERS
130 message_receiver_generator.depends = $$SCRIPTS
131 message_receiver_generator.output_function = message_receiver_generator_output
132 GENERATORS += message_receiver_generator
133
134 fwheader_generator.commands = perl $${SOURCE_DIR}/WebKit2/Scripts/generate-forwarding-headers.pl $${SOURCE_DIR}/WebKit2 $${ROOT_BUILD_DIR}/Source/include qt
135 fwheader_generator.depends = $${SOURCE_DIR}/WebKit2/Scripts/generate-forwarding-headers.pl
136 generated_files.depends += fwheader_generator
137 GENERATORS += fwheader_generator
138
139 for(header, WEBCORE_GENERATED_HEADERS_FOR_WEBKIT2) {
140     header_name = $$basename(header)
141     header_path = $$header
142     header_target = $$replace(header_path, [^a-zA-Z0-9_], -)
143     header_target = "qtheader-$${header_target}"
144     dest_dir = $${ROOT_BUILD_DIR}/Source/include/WebCore
145
146     eval($${header_target}.target = $$dest_dir/$$header_name)
147     eval($${header_target}.depends = $$header_path)
148
149     win32: eval($${header_target}.commands = ($${QMAKE_MKDIR} $$toSystemPath($$dest_dir) 2>nul || echo>nul))
150     else: eval($${header_target}.commands = $${QMAKE_MKDIR} $$toSystemPath($$dest_dir) )
151
152     eval($${header_target}.commands += && echo $${DOUBLE_ESCAPED_QUOTE}\$${LITERAL_HASH}include \\\"$$header_path\\\"$${DOUBLE_ESCAPED_QUOTE} > $$eval($${header_target}.target))
153
154     GENERATORS += $$header_target
155 }
156