summaryrefslogtreecommitdiff
path: root/Source/WebKit2/DerivedSources.pri
blob: ad0288b18418411c42007afe553383de9d8c85e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# -------------------------------------------------------------------
# Derived sources for WebKit2
#
# See 'Tools/qmake/README' for an overview of the build system
# -------------------------------------------------------------------

# This file is both a top level target, and included from Target.pri,
# so that the resulting generated sources can be added to SOURCES.
# We only set the template if we're a top level target, so that we
# don't override what Target.pri has already set.
sanitizedFile = $$toSanitizedPath($$_FILE_)
equals(sanitizedFile, $$toSanitizedPath($$_PRO_FILE_)):TEMPLATE = derived

WEBCORE_GENERATED_SOURCES_DIR = ../WebCore/$${GENERATED_SOURCES_DESTDIR}

SOURCE_DIR = $${ROOT_WEBKIT_DIR}/Source

WEBCORE_GENERATED_HEADERS_FOR_WEBKIT2 += \
    $$WEBCORE_GENERATED_SOURCES_DIR/HTMLNames.h \
    $$WEBCORE_GENERATED_SOURCES_DIR/JSCSSStyleDeclaration.h \
    $$WEBCORE_GENERATED_SOURCES_DIR/JSDOMWindow.h \
    $$WEBCORE_GENERATED_SOURCES_DIR/JSElement.h \
    $$WEBCORE_GENERATED_SOURCES_DIR/JSHTMLElement.h \
    $$WEBCORE_GENERATED_SOURCES_DIR/JSNode.h \
    $$WEBCORE_GENERATED_SOURCES_DIR/JSNotification.h \
    $$WEBCORE_GENERATED_SOURCES_DIR/JSRange.h \

defineReplace(message_header_generator_output) {
  FILENAME=$$basename(1)
  return($${GENERATED_SOURCES_DESTDIR}/$$replace(FILENAME, ".messages.in", "Messages.h"))
}

defineReplace(message_receiver_generator_output) {
  FILENAME=$$basename(1)
  return($${GENERATED_SOURCES_DESTDIR}/$$replace(FILENAME, ".messages.in", "MessageReceiver.cpp"))
}

VPATH = \
    PluginProcess \
    WebProcess/ApplicationCache \
    WebProcess/Authentication \
    WebProcess/Battery \
    WebProcess/Cookies \
    WebProcess/FullScreen \
    WebProcess/Geolocation \
    WebProcess/IconDatabase \
    WebProcess/KeyValueStorage \
    WebProcess/MediaCache \
    WebProcess/NetworkInfo \
    WebProcess/Notifications \
    WebProcess/Plugins \
    WebProcess/ResourceCache \
    WebProcess/WebCoreSupport \
    WebProcess/WebPage \
    WebProcess/WebPage/CoordinatedGraphics \
    WebProcess \
    UIProcess \
    UIProcess/CoordinatedGraphics \
    UIProcess/Downloads \
    UIProcess/Notifications \
    UIProcess/Plugins \
    Shared/Plugins

MESSAGE_RECEIVERS = \
    AuthenticationManager.messages.in \
    DownloadProxy.messages.in \
    DrawingAreaProxy.messages.in \
    EventDispatcher.messages.in \
    LayerTreeCoordinatorProxy.messages.in \
    PluginControllerProxy.messages.in \
    PluginProcess.messages.in \
    PluginProcessConnection.messages.in \
    PluginProcessProxy.messages.in \
    PluginProxy.messages.in \
    WebApplicationCacheManager.messages.in \
    WebApplicationCacheManagerProxy.messages.in \
    WebBatteryManager.messages.in \
    WebBatteryManagerProxy.messages.in \
    WebContext.messages.in \
    WebCookieManager.messages.in \
    WebCookieManagerProxy.messages.in \
    WebDatabaseManager.messages.in \
    WebDatabaseManagerProxy.messages.in \
    WebGeolocationManager.messages.in \
    WebGeolocationManagerProxy.messages.in \
    WebIconDatabase.messages.in \
    WebIconDatabaseProxy.messages.in \
    WebInspectorProxy.messages.in \
    WebKeyValueStorageManager.messages.in \
    WebKeyValueStorageManagerProxy.messages.in \
    WebMediaCacheManager.messages.in \
    WebMediaCacheManagerProxy.messages.in \
    WebNetworkInfoManager.messages.in \
    WebNetworkInfoManagerProxy.messages.in \
    WebNotificationManagerProxy.messages.in \
    WebNotificationManager.messages.in \
    WebFullScreenManager.messages.in \
    WebFullScreenManagerProxy.messages.in \
    DrawingArea.messages.in \
    LayerTreeCoordinator.messages.in \
    WebInspector.messages.in \
    WebPage.messages.in \
    WebPageProxy.messages.in \
    WebProcess.messages.in \
    WebProcessConnection.messages.in \
    WebProcessProxy.messages.in \
    WebResourceCacheManager.messages.in \
    WebResourceCacheManagerProxy.messages.in \
    WebVibrationProxy.messages.in \
    NPObjectMessageReceiver.messages.in

SCRIPTS = \
    $$PWD/Scripts/generate-message-receiver.py \
    $$PWD/Scripts/generate-messages-header.py \
    $$PWD/Scripts/webkit2/__init__.py \
    $$PWD/Scripts/webkit2/messages.py \
    $$PWD/Scripts/webkit2/model.py \
    $$PWD/Scripts/webkit2/parser.py

message_header_generator.commands = $${PYTHON} $${SOURCE_DIR}/WebKit2/Scripts/generate-messages-header.py ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
message_header_generator.input = MESSAGE_RECEIVERS
message_header_generator.depends = $$SCRIPTS
message_header_generator.output_function = message_header_generator_output
message_header_generator.add_output_to_sources = false
GENERATORS += message_header_generator

message_receiver_generator.commands = $${PYTHON} $${SOURCE_DIR}/WebKit2/Scripts/generate-message-receiver.py  ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
message_receiver_generator.input = MESSAGE_RECEIVERS
message_receiver_generator.depends = $$SCRIPTS
message_receiver_generator.output_function = message_receiver_generator_output
GENERATORS += message_receiver_generator

fwheader_generator.commands = perl $${SOURCE_DIR}/WebKit2/Scripts/generate-forwarding-headers.pl $${SOURCE_DIR}/WebKit2 $${ROOT_BUILD_DIR}/Source/include qt
fwheader_generator.depends = $${SOURCE_DIR}/WebKit2/Scripts/generate-forwarding-headers.pl
generated_files.depends += fwheader_generator
GENERATORS += fwheader_generator

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}"
    dest_dir = $${ROOT_BUILD_DIR}/Source/include/WebCore

    eval($${header_target}.target = $$dest_dir/$$header_name)
    eval($${header_target}.depends = $$header_path)

    win32: eval($${header_target}.commands = ($${QMAKE_MKDIR} $$toSystemPath($$dest_dir) 2>nul || echo>nul))
    else: eval($${header_target}.commands = $${QMAKE_MKDIR} $$toSystemPath($$dest_dir) )

    eval($${header_target}.commands += && echo $${DOUBLE_ESCAPED_QUOTE}\$${LITERAL_HASH}include \\\"$$header_path\\\"$${DOUBLE_ESCAPED_QUOTE} > $$eval($${header_target}.target))

    GENERATORS += $$header_target
}