Add a separate class for networking related storage
[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/Authentication \
43     WebProcess/Battery \
44     WebProcess/Cookies \
45     WebProcess/FullScreen \
46     WebProcess/Geolocation \
47     WebProcess/IconDatabase \
48     WebProcess/KeyValueStorage \
49     WebProcess/MediaCache \
50     WebProcess/NetworkInfo \
51     WebProcess/Notifications \
52     WebProcess/Plugins \
53     WebProcess/ResourceCache \
54     WebProcess/WebCoreSupport \
55     WebProcess/WebPage \
56     WebProcess/WebPage/CoordinatedGraphics \
57     WebProcess \
58     UIProcess \
59     UIProcess/CoordinatedGraphics \
60     UIProcess/Downloads \
61     UIProcess/Notifications \
62     UIProcess/Plugins \
63     Shared \
64     Shared/Plugins
65
66 MESSAGE_RECEIVERS = \
67     AuthenticationManager.messages.in \
68     CoordinatedLayerTreeHostProxy.messages.in \
69     DownloadProxy.messages.in \
70     DrawingAreaProxy.messages.in \
71     EventDispatcher.messages.in \
72     PluginControllerProxy.messages.in \
73     PluginProcess.messages.in \
74     PluginProcessConnection.messages.in \
75     PluginProcessProxy.messages.in \
76     PluginProxy.messages.in \
77     WebApplicationCacheManager.messages.in \
78     WebApplicationCacheManagerProxy.messages.in \
79     WebBatteryManager.messages.in \
80     WebBatteryManagerProxy.messages.in \
81     WebConnection.messages.in \
82     WebContext.messages.in \
83     WebCookieManager.messages.in \
84     WebCookieManagerProxy.messages.in \
85     WebDatabaseManager.messages.in \
86     WebDatabaseManagerProxy.messages.in \
87     WebGeolocationManager.messages.in \
88     WebGeolocationManagerProxy.messages.in \
89     WebIconDatabase.messages.in \
90     WebIconDatabaseProxy.messages.in \
91     WebInspectorProxy.messages.in \
92     WebKeyValueStorageManager.messages.in \
93     WebKeyValueStorageManagerProxy.messages.in \
94     WebMediaCacheManager.messages.in \
95     WebMediaCacheManagerProxy.messages.in \
96     WebNetworkInfoManager.messages.in \
97     WebNetworkInfoManagerProxy.messages.in \
98     WebNotificationManagerProxy.messages.in \
99     WebNotificationManager.messages.in \
100     WebFullScreenManager.messages.in \
101     WebFullScreenManagerProxy.messages.in \
102     CoordinatedLayerTreeHost.messages.in \
103     DrawingArea.messages.in \
104     WebInspector.messages.in \
105     WebPage.messages.in \
106     WebPageGroupProxy.messages.in \
107     WebPageProxy.messages.in \
108     WebProcess.messages.in \
109     WebProcessConnection.messages.in \
110     WebProcessProxy.messages.in \
111     WebResourceCacheManager.messages.in \
112     WebResourceCacheManagerProxy.messages.in \
113     WebVibrationProxy.messages.in \
114     NPObjectMessageReceiver.messages.in
115
116 SCRIPTS = \
117     $$PWD/Scripts/generate-message-receiver.py \
118     $$PWD/Scripts/generate-messages-header.py \
119     $$PWD/Scripts/webkit2/__init__.py \
120     $$PWD/Scripts/webkit2/messages.py \
121     $$PWD/Scripts/webkit2/model.py \
122     $$PWD/Scripts/webkit2/parser.py
123
124 message_header_generator.commands = $${PYTHON} $${SOURCE_DIR}/WebKit2/Scripts/generate-messages-header.py ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
125 message_header_generator.input = MESSAGE_RECEIVERS
126 message_header_generator.depends = $$SCRIPTS
127 message_header_generator.output_function = message_header_generator_output
128 message_header_generator.add_output_to_sources = false
129 GENERATORS += message_header_generator
130
131 message_receiver_generator.commands = $${PYTHON} $${SOURCE_DIR}/WebKit2/Scripts/generate-message-receiver.py  ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
132 message_receiver_generator.input = MESSAGE_RECEIVERS
133 message_receiver_generator.depends = $$SCRIPTS
134 message_receiver_generator.output_function = message_receiver_generator_output
135 GENERATORS += message_receiver_generator
136
137 fwheader_generator.commands = perl $${SOURCE_DIR}/WebKit2/Scripts/generate-forwarding-headers.pl $${SOURCE_DIR}/WebKit2 $${ROOT_BUILD_DIR}/Source/include qt
138 fwheader_generator.depends = $${SOURCE_DIR}/WebKit2/Scripts/generate-forwarding-headers.pl
139 generated_files.depends += fwheader_generator
140 GENERATORS += fwheader_generator
141
142 for(header, WEBCORE_GENERATED_HEADERS_FOR_WEBKIT2) {
143     header_name = $$basename(header)
144     header_path = $$header
145     header_target = $$replace(header_path, [^a-zA-Z0-9_], -)
146     header_target = "qtheader-$${header_target}"
147     dest_dir = $${ROOT_BUILD_DIR}/Source/include/WebCore
148
149     eval($${header_target}.target = $$dest_dir/$$header_name)
150     eval($${header_target}.depends = $$header_path)
151
152     win32: eval($${header_target}.commands = ($${QMAKE_MKDIR} $$toSystemPath($$dest_dir) 2>nul || echo>nul))
153     else: eval($${header_target}.commands = $${QMAKE_MKDIR} $$toSystemPath($$dest_dir) )
154
155     eval($${header_target}.commands += && echo $${DOUBLE_ESCAPED_QUOTE}\$${LITERAL_HASH}include \\\"$$header_path\\\"$${DOUBLE_ESCAPED_QUOTE} > $$eval($${header_target}.target))
156
157     GENERATORS += $$header_target
158 }
159