[WK2] Notifications clobber each other with multiple processes
[WebKit-https.git] / Source / WebKit2 / DerivedSources.make
1 # Copyright (C) 2010, 2011, 2012 Apple Inc. All rights reserved.
2 #
3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions
5 # are met:
6 # 1.  Redistributions of source code must retain the above copyright
7 #     notice, this list of conditions and the following disclaimer.
8 # 2.  Redistributions in binary form must reproduce the above copyright
9 #     notice, this list of conditions and the following disclaimer in the
10 #     documentation and/or other materials provided with the distribution.
11 #
12 # THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
13 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
14 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
15 # DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
16 # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
18 # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
19 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
20 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
21 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22
23 VPATH = \
24     $(WebKit2) \
25     $(WebKit2)/NetworkProcess \
26     $(WebKit2)/NetworkProcess/mac \
27     $(WebKit2)/PluginProcess \
28     $(WebKit2)/PluginProcess/mac \
29     $(WebKit2)/Shared/Plugins \
30     $(WebKit2)/Shared \
31     $(WebKit2)/Shared/mac \
32     $(WebKit2)/Shared/Authentication \
33     $(WebKit2)/Shared/Network/CustomProtocols \
34     $(WebKit2)/SharedWorkerProcess \
35     $(WebKit2)/OfflineStorageProcess \
36     $(WebKit2)/WebProcess/ApplicationCache \
37     $(WebKit2)/WebProcess/Cookies \
38     $(WebKit2)/WebProcess/FullScreen \
39     $(WebKit2)/WebProcess/Geolocation \
40     $(WebKit2)/WebProcess/IconDatabase \
41     $(WebKit2)/WebProcess/MediaCache \
42     $(WebKit2)/WebProcess/Network \
43     $(WebKit2)/WebProcess/Notifications \
44     $(WebKit2)/WebProcess/Plugins \
45     $(WebKit2)/WebProcess/ResourceCache \
46     $(WebKit2)/WebProcess/Storage \
47     $(WebKit2)/WebProcess/WebCoreSupport \
48     $(WebKit2)/WebProcess/WebPage \
49     $(WebKit2)/WebProcess \
50     $(WebKit2)/UIProcess \
51     $(WebKit2)/UIProcess/Downloads \
52     $(WebKit2)/UIProcess/Network \
53     $(WebKit2)/UIProcess/Network/CustomProtocols \
54     $(WebKit2)/UIProcess/Notifications \
55     $(WebKit2)/UIProcess/Plugins \
56     $(WebKit2)/UIProcess/SharedWorkers \
57     $(WebKit2)/UIProcess/Storage \
58     $(WebKit2)/UIProcess/mac \
59 #
60
61 MESSAGE_RECEIVERS = \
62     AuthenticationManager \
63     CustomProtocolManager \
64     CustomProtocolManagerProxy \
65     DrawingArea \
66     DrawingAreaProxy \
67     DownloadProxy \
68     EventDispatcher \
69     NetworkProcess \
70     NetworkProcessConnection \
71     NetworkProcessProxy \
72     NetworkResourceLoader \
73     NPObjectMessageReceiver \
74     OfflineStorageProcess \
75     PluginControllerProxy \
76     PluginProcess \
77     PluginProcessConnection \
78     PluginProcessConnectionManager \
79     PluginProcessProxy \
80     PluginProxy \
81     SharedWorkerProcess \
82     SharedWorkerProcessProxy \
83     StorageManager \
84     WebApplicationCacheManager \
85     WebApplicationCacheManagerProxy \
86     WebCookieManager \
87     WebCookieManagerProxy \
88     WebConnection \
89     NetworkConnectionToWebProcess \
90     RemoteLayerTreeHost \
91     SecItemShim \
92     SecItemShimProxy \
93     StorageAreaMap \
94     WebContext \
95     WebDatabaseManager \
96     WebDatabaseManagerProxy \
97     WebFullScreenManager \
98     WebFullScreenManagerProxy \
99     WebGeolocationManager \
100     WebGeolocationManagerProxy \
101     WebIconDatabase \
102     WebIconDatabaseProxy \
103     WebInspector \
104     WebInspectorProxy \
105     WebMediaCacheManager \
106     WebMediaCacheManagerProxy \
107     WebNotificationManager \
108     WebPage \
109     WebPageGroupProxy \
110     WebPageProxy \
111     WebProcess \
112     WebProcessConnection \
113     WebProcessProxy \
114     WebResourceCacheManager \
115     WebResourceCacheManagerProxy \
116     WebResourceLoader \
117 #
118
119 SCRIPTS = \
120     $(WebKit2)/Scripts/generate-message-receiver.py \
121     $(WebKit2)/Scripts/generate-messages-header.py \
122     $(WebKit2)/Scripts/webkit2/__init__.py \
123     $(WebKit2)/Scripts/webkit2/messages.py \
124     $(WebKit2)/Scripts/webkit2/model.py \
125     $(WebKit2)/Scripts/webkit2/parser.py \
126 #
127
128 .PHONY : all
129
130 all : \
131     $(MESSAGE_RECEIVERS:%=%MessageReceiver.cpp) \
132     $(MESSAGE_RECEIVERS:%=%Messages.h) \
133 #
134
135 %MessageReceiver.cpp : %.messages.in $(SCRIPTS)
136         @echo Generating messages header for $*...
137         @python $(WebKit2)/Scripts/generate-message-receiver.py $< > $@
138
139 %Messages.h : %.messages.in $(SCRIPTS)
140         @echo Generating message receiver for $*...
141         @python $(WebKit2)/Scripts/generate-messages-header.py $< > $@
142
143 # Mac-specific rules
144
145 ifeq ($(PLATFORM_NAME),macosx)
146
147 FRAMEWORK_FLAGS = $(shell echo $(BUILT_PRODUCTS_DIR) $(FRAMEWORK_SEARCH_PATHS) | perl -e 'print "-F " . join(" -F ", split(" ", <>));')
148 HEADER_FLAGS = $(shell echo $(BUILT_PRODUCTS_DIR) $(HEADER_SEARCH_PATHS) | perl -e 'print "-I" . join(" -I", split(" ", <>));')
149
150 # Some versions of clang incorrectly strip out // comments in c89 code.
151 # Use -traditional as a workaround, but only when needed since that causes
152 # other problems with later versions of clang.
153 ifeq ($(shell echo '//x' | $(CC) -E -P -x c -std=c89 - | grep x),)
154 TEXT_PREPROCESSOR_FLAGS=-E -P -x c -traditional -w
155 else
156 TEXT_PREPROCESSOR_FLAGS=-E -P -x c -std=c89 -w
157 endif
158
159 ifneq ($(SDKROOT),)
160         SDK_FLAGS=-isysroot $(SDKROOT)
161 endif
162
163 SANDBOX_PROFILES = \
164         com.apple.WebProcess.sb \
165         com.apple.WebKit.NetworkProcess.sb
166
167 all: $(SANDBOX_PROFILES)
168
169 %.sb : %.sb.in
170         @echo Pre-processing $* sandbox profile...
171         $(CC) $(SDK_FLAGS) $(TEXT_PREPROCESSOR_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" $< > $@
172
173 endif # macosx
174
175 # ------------------------
176
177 # Windows-specific rules
178
179 ifeq ($(OS),Windows_NT)
180
181 all : HeaderDetection.h
182
183 HeaderDetection.h : DerivedSources.make
184         if [ -f "$(WEBKITLIBRARIESDIR)/include/WebKitQuartzCoreAdditions/WebKitQuartzCoreAdditionsBase.h" ] && [ ! -f "$(WEBKITLIBRARIESDIR)/include/cairo/cairo.h" ]; then echo "#define HAVE_WKQCA 1" > $@; else echo > $@; fi
185         if [ -f "$(WEBKITLIBRARIESDIR)/include/AVFoundationCF/AVCFBase.h" ]; then echo "#define HAVE_AVCF 1" >> $@; else echo >> $@; fi
186
187 endif # Windows_NT