Unreviewed (speculative) build fixes for EFL, GTK and Qt after r144218.
[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     $$WEBCORE_GENERATED_SOURCES_DIR/JSUint8Array.h \
28
29 defineReplace(message_header_generator_output) {
30   FILENAME=$$basename(1)
31   return($${GENERATED_SOURCES_DESTDIR}/$$replace(FILENAME, ".messages.in", "Messages.h"))
32 }
33
34 defineReplace(message_receiver_generator_output) {
35   FILENAME=$$basename(1)
36   return($${GENERATED_SOURCES_DESTDIR}/$$replace(FILENAME, ".messages.in", "MessageReceiver.cpp"))
37 }
38
39 VPATH = \
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
67 MESSAGE_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     StorageAreaProxy.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     WebKeyValueStorageManager.messages.in \
97     WebKeyValueStorageManagerProxy.messages.in \
98     WebMediaCacheManager.messages.in \
99     WebMediaCacheManagerProxy.messages.in \
100     WebNetworkInfoManager.messages.in \
101     WebNetworkInfoManagerProxy.messages.in \
102     WebNotificationManagerProxy.messages.in \
103     WebNotificationManager.messages.in \
104     WebFullScreenManager.messages.in \
105     WebFullScreenManagerProxy.messages.in \
106     CoordinatedLayerTreeHost.messages.in \
107     DrawingArea.messages.in \
108     WebInspector.messages.in \
109     WebPage.messages.in \
110     WebPageGroupProxy.messages.in \
111     WebPageProxy.messages.in \
112     WebProcess.messages.in \
113     WebProcessConnection.messages.in \
114     WebProcessProxy.messages.in \
115     WebResourceCacheManager.messages.in \
116     WebResourceCacheManagerProxy.messages.in \
117     WebVibrationProxy.messages.in \
118     NPObjectMessageReceiver.messages.in
119
120 SCRIPTS = \
121     $$PWD/Scripts/generate-message-receiver.py \
122     $$PWD/Scripts/generate-messages-header.py \
123     $$PWD/Scripts/webkit2/__init__.py \
124     $$PWD/Scripts/webkit2/messages.py \
125     $$PWD/Scripts/webkit2/model.py \
126     $$PWD/Scripts/webkit2/parser.py
127
128 message_header_generator.commands = $${PYTHON} $${SOURCE_DIR}/WebKit2/Scripts/generate-messages-header.py ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
129 message_header_generator.input = MESSAGE_RECEIVERS
130 message_header_generator.depends = $$SCRIPTS
131 message_header_generator.output_function = message_header_generator_output
132 message_header_generator.add_output_to_sources = false
133 GENERATORS += message_header_generator
134
135 message_receiver_generator.commands = $${PYTHON} $${SOURCE_DIR}/WebKit2/Scripts/generate-message-receiver.py  ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
136 message_receiver_generator.input = MESSAGE_RECEIVERS
137 message_receiver_generator.depends = $$SCRIPTS
138 message_receiver_generator.output_function = message_receiver_generator_output
139 GENERATORS += message_receiver_generator
140
141 fwheader_generator.commands = perl $${SOURCE_DIR}/WebKit2/Scripts/generate-forwarding-headers.pl $${SOURCE_DIR}/WebKit2 $${ROOT_BUILD_DIR}/Source/include qt
142 fwheader_generator.depends = $${SOURCE_DIR}/WebKit2/Scripts/generate-forwarding-headers.pl
143 generated_files.depends += fwheader_generator
144 GENERATORS += fwheader_generator
145
146 for(header, WEBCORE_GENERATED_HEADERS_FOR_WEBKIT2) {
147     header_name = $$basename(header)
148     header_path = $$header
149     header_target = $$replace(header_path, [^a-zA-Z0-9_], -)
150     header_target = "qtheader-$${header_target}"
151     dest_dir = $${ROOT_BUILD_DIR}/Source/include/WebCore
152
153     eval($${header_target}.target = $$dest_dir/$$header_name)
154     eval($${header_target}.depends = $$header_path)
155
156     win32: eval($${header_target}.commands = ($${QMAKE_MKDIR} $$toSystemPath($$dest_dir) 2>nul || echo>nul))
157     else: eval($${header_target}.commands = $${QMAKE_MKDIR} $$toSystemPath($$dest_dir) )
158
159     eval($${header_target}.commands += && echo $${DOUBLE_ESCAPED_QUOTE}\$${LITERAL_HASH}include \\\"$$header_path\\\"$${DOUBLE_ESCAPED_QUOTE} > $$eval($${header_target}.target))
160
161     GENERATORS += $$header_target
162 }
163