http://trac.webkit.org/changeset/146375 causing CrOS crashes
[WebKit-https.git] / Tools / GNUmakefile.am
1 noinst_PROGRAMS += \
2         Programs/ImageDiff
3
4 if ENABLE_WEBKIT1
5 noinst_PROGRAMS += \
6         Programs/DumpRenderTree \
7         Programs/GtkLauncher
8 endif
9
10 # GtkLauncher
11 Programs_GtkLauncher_CPPFLAGS = \
12         -I$(srcdir)/Source/WebKit/gtk \
13         -I$(srcdir)/Source/WebCore/platform/network/soup/cache/ \
14         -I$(top_builddir)/Source/WebKit/gtk \
15         -I$(top_builddir)/DerivedSources \
16         -DWEBKIT_EXEC_PATH=\"${shell pwd}/$(top_builddir)/Programs/\" \
17         $(global_cppflags) \
18         $(javascriptcore_cppflags)
19
20 Programs_GtkLauncher_SOURCES = \
21         Tools/GtkLauncher/LauncherInspectorWindow.c \
22         Tools/GtkLauncher/LauncherInspectorWindow.h \
23         Tools/GtkLauncher/main.c
24
25 Programs_GtkLauncher_CFLAGS = \
26         -ansi \
27         -fno-strict-aliasing \
28         $(global_cflags) \
29         $(FREETYPE_CFLAGS) \
30         $(GTK_CFLAGS) \
31         $(LIBSOUP_CFLAGS) \
32         $(GSTREAMER_CFLAGS)
33
34 Programs_GtkLauncher_LDADD = \
35         libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
36         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
37         $(FREETYPE_LIBS) \
38         $(GTK_LIBS) \
39         $(GLIB_LIBS) \
40         $(LIBSOUP_LIBS) \
41         $(WINMM_LIBS) \
42         $(GSTREAMER_LIBS)
43
44 Programs_GtkLauncher_LDFLAGS = \
45         -no-fast-install \
46         -no-install
47
48 # libWebCoreInternals
49 # We must split off the window.internals implementation into a separate
50 # convenience library because it requires a different include path order
51 # to prefer the WebCore config.h over the DumpRenderTree config.h
52 noinst_LTLIBRARIES += libWebCoreInternals.la
53 libWebCoreInternals_la_SOURCES = \
54         Source/WebCore/bindings/js/JSDOMWrapper.cpp \
55         Source/WebCore/bindings/js/JSDOMWrapper.h \
56         Source/WebCore/testing/MallocStatistics.h \
57         Source/WebCore/testing/Internals.cpp \
58         Source/WebCore/testing/Internals.h \
59         Source/WebCore/testing/InternalSettings.cpp \
60         Source/WebCore/testing/InternalSettings.h \
61         Source/WebCore/testing/MockPagePopupDriver.cpp \
62         Source/WebCore/testing/MockPagePopupDriver.h \
63         Source/WebCore/testing/TypeConversions.h \
64         Source/WebCore/testing/js/WebCoreTestSupport.cpp \
65         Source/WebCore/testing/js/WebCoreTestSupport.h
66
67 libwebcoreinternals_built_sources += \
68         DerivedSources/WebCore/InternalSettingsGenerated.cpp \
69         DerivedSources/WebCore/InternalSettingsGenerated.h   \
70         DerivedSources/WebCore/JSMallocStatistics.cpp \
71         DerivedSources/WebCore/JSMallocStatistics.h   \
72         DerivedSources/WebCore/JSInternals.cpp \
73         DerivedSources/WebCore/JSInternals.h   \
74         DerivedSources/WebCore/JSInternalSettings.cpp \
75         DerivedSources/WebCore/JSInternalSettings.h   \
76         DerivedSources/WebCore/JSInternalSettingsGenerated.cpp \
77         DerivedSources/WebCore/JSInternalSettingsGenerated.h \
78         DerivedSources/WebCore/JSTypeConversions.cpp \
79         DerivedSources/WebCore/JSTypeConversions.h
80
81 nodist_libWebCoreInternals_la_SOURCES = $(libwebcoreinternals_built_sources)
82 BUILT_SOURCES += $(libwebcoreinternals_built_sources)
83
84 libWebCoreInternals_la_CPPFLAGS = \
85         $(global_cppflags) \
86         $(webcore_cppflags) \
87         $(webcoregtk_cppflags) \
88         $(javascriptcore_cppflags) \
89         $(CAIRO_CFLAGS) \
90         $(FREETYPE_CFLAGS) \
91         $(LIBSOUP_CFLAGS) \
92         $(PANGO_CFLAGS) \
93         -I$(top_builddir)/DerivedSources \
94         -I$(top_builddir)/DerivedSources/WebCore
95
96 libWebCoreInternals_la_CXXFLAGS = \
97         $(global_cxxflags) \
98         $(libWebCoreInternals_la_CFLAGS)
99
100 libWebCoreInternals_la_CFLAGS = \
101         -fno-strict-aliasing \
102         $(javascriptcore_cflags)
103
104 # DumpRenderTree
105 Programs_DumpRenderTree_CPPFLAGS = \
106         $(global_cppflags) \
107         -DTOP_LEVEL_DIR=\"${shell pwd}/${srcdir}\" \
108         -I$(srcdir)/Tools/DumpRenderTree \
109         -I$(srcdir)/Tools/DumpRenderTree/atk \
110         -I$(srcdir)/Tools/DumpRenderTree/cairo \
111         -I$(srcdir)/Tools/DumpRenderTree/gtk \
112         -I$(srcdir)/Source/WebKit/gtk \
113         -I$(srcdir)/Source/WebCore/platform/gtk \
114         -I$(srcdir)/Source/WebCore/testing/js \
115         -I$(top_builddir)/DerivedSources \
116         -I$(top_builddir)/Source/WebKit/gtk \
117         $(javascriptcore_cppflags) \
118         $(platformgtk_cppflags) \
119         $(webcore_cppflags)
120
121 if TARGET_X11
122 Programs_DumpRenderTree_CPPFLAGS += \
123         -DTEST_PLUGIN_DIR=\"${shell pwd}/${top_builddir}/TestNetscapePlugin/.libs\" \
124         -DFONTS_CONF_DIR=\"${shell pwd}/${srcdir}/Tools/DumpRenderTree/gtk/fonts\"
125 endif
126
127 Programs_DumpRenderTree_SOURCES = \
128         Tools/DumpRenderTree/DumpRenderTree.h \
129         Tools/DumpRenderTree/DumpRenderTreeCommon.cpp \
130         Tools/DumpRenderTree/DumpRenderTreePrefix.h \
131         Tools/DumpRenderTree/AccessibilityController.cpp \
132         Tools/DumpRenderTree/AccessibilityController.h \
133         Tools/DumpRenderTree/AccessibilityTextMarker.cpp \
134         Tools/DumpRenderTree/AccessibilityTextMarker.h \
135         Tools/DumpRenderTree/AccessibilityUIElement.cpp \
136         Tools/DumpRenderTree/AccessibilityUIElement.h \
137         Tools/DumpRenderTree/CyclicRedundancyCheck.cpp \
138         Tools/DumpRenderTree/CyclicRedundancyCheck.h \
139         Tools/DumpRenderTree/GCController.cpp \
140         Tools/DumpRenderTree/GCController.h \
141         Tools/DumpRenderTree/JavaScriptThreading.h \
142         Tools/DumpRenderTree/TestRunner.cpp \
143         Tools/DumpRenderTree/TestRunner.h \
144         Tools/DumpRenderTree/PixelDumpSupport.cpp \
145         Tools/DumpRenderTree/PixelDumpSupport.h \
146         Tools/DumpRenderTree/WorkQueue.cpp \
147         Tools/DumpRenderTree/WorkQueue.h \
148         Tools/DumpRenderTree/WorkQueueItem.h \
149         Tools/DumpRenderTree/config.h \
150         Tools/DumpRenderTree/atk/AccessibilityCallbacks.h \
151         Tools/DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp \
152         Tools/DumpRenderTree/atk/AccessibilityControllerAtk.cpp \
153         Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp \
154         Tools/DumpRenderTree/cairo/PixelDumpSupportCairo.cpp \
155         Tools/DumpRenderTree/cairo/PixelDumpSupportCairo.h \
156         Tools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp \
157         Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp \
158         Tools/DumpRenderTree/gtk/DumpRenderTree.cpp \
159         Tools/DumpRenderTree/gtk/DumpRenderTreeGtk.h \
160         Tools/DumpRenderTree/gtk/EditingCallbacks.h \
161         Tools/DumpRenderTree/gtk/EditingCallbacks.cpp \
162         Tools/DumpRenderTree/gtk/EventSender.h \
163         Tools/DumpRenderTree/gtk/EventSender.cpp \
164         Tools/DumpRenderTree/gtk/GCControllerGtk.cpp \
165         Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp \
166         Tools/DumpRenderTree/gtk/PixelDumpSupportGtk.cpp \
167         Tools/DumpRenderTree/gtk/SelfScrollingWebKitWebView.cpp \
168         Tools/DumpRenderTree/gtk/SelfScrollingWebKitWebView.h \
169         Tools/DumpRenderTree/gtk/TextInputController.h \
170         Tools/DumpRenderTree/gtk/TextInputController.cpp \
171         Tools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp \
172         Source/Platform/gtk/GtkVersioning.c
173
174 Programs_DumpRenderTree_CXXFLAGS = \
175         $(global_cxxflags) \
176         $(Programs_DumpRenderTree_CFLAGS)
177
178 Programs_DumpRenderTree_CFLAGS = \
179         -fno-strict-aliasing \
180         $(global_cflags) \
181         $(GLOBALDEPS_CFLAGS) \
182         $(CAIRO_CFLAGS) \
183         $(GTK_CFLAGS) \
184         $(LIBSOUP_CFLAGS)
185
186 Programs_DumpRenderTree_LDADD = \
187         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
188         libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
189         libWebCorePlatform.la \
190         libWebCoreModules.la \
191         libWebCoreInternals.la \
192         $(GLOBALDEPS_LIBS) \
193         $(CAIRO_LIBS) \
194         $(GTK_LIBS) \
195         $(GLIB_LIBS) \
196         $(LIBSOUP_LIBS) \
197         $(FREETYPE_LIBS) \
198         $(WINMM_LIBS) \
199         $(XRENDER_LIBS) \
200         $(XT_LIBS)
201
202 Programs_DumpRenderTree_LDFLAGS = \
203         -no-fast-install \
204         -no-install
205
206 # ImageDiff
207 Programs_ImageDiff_CPPFLAGS = $(global_cppflags)
208
209 Programs_ImageDiff_SOURCES = \
210    Tools/ImageDiff/gtk/ImageDiff.cpp
211
212 Programs_ImageDiff_CXXFLAGS = \
213    $(global_cxxflags) \
214    $(global_cppflags) \
215    $(Programs_ImageDiff_CFLAGS)
216
217 Programs_ImageDiff_CFLAGS = \
218    -fno-strict-aliasing \
219    $(global_cflags) \
220    $(GLOBALDEPS_CFLAGS) \
221    $(GTK_CFLAGS)
222
223 Programs_ImageDiff_LDADD = \
224    $(GTK_LIBS)
225
226 Programs_ImageDiff_LDFLAGS = \
227    -no-fast-install \
228    -no-install
229
230 # clean target
231 CLEANFILES += \
232         Programs/DumpRenderTree \
233         Programs/GtkLauncher \
234         Programs/ImageDiff
235
236 if TARGET_X11
237
238 # Build TestNetscapePlugin only for X11
239 # since we don't support plugins for non-X11 builds at the moment.
240 noinst_LTLIBRARIES += \
241         TestNetscapePlugin/libtestnetscapeplugin.la
242
243 TestNetscapePlugin_libtestnetscapeplugin_la_CPPFLAGS = \
244         -I$(srcdir)/Tools/DumpRenderTree \
245         -I$(srcdir)/Source/WebCore \
246         -I$(srcdir)/Source/WebCore/bridge \
247         -I$(srcdir)/Source/WebCore/plugins \
248         -I$(srcdir)/Tools/DumpRenderTree/TestNetscapePlugIn \
249         -I$(srcdir)/Tools/DumpRenderTree/TestNetscapePlugIn/unix/ForwardingHeaders \
250         $(global_cppflags) \
251         $(javascriptcore_cppflags)
252
253 # For the Gtk port we want to use XP_UNIX both on X11 and Mac
254 if !TARGET_WIN32
255 TestNetscapePlugin_libtestnetscapeplugin_la_CPPFLAGS += -DXP_UNIX
256 endif
257
258 # Add MOZ_X11 only for X11 targets
259 if TARGET_X11
260 TestNetscapePlugin_libtestnetscapeplugin_la_CPPFLAGS += -DMOZ_X11
261 endif
262
263 TestNetscapePlugin_libtestnetscapeplugin_la_SOURCES = \
264         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/DocumentOpenInDestroyStream.cpp \
265         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSAfterRemovingPluginElement.cpp \
266         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/FormValue.cpp \
267         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetURLNotifyWithURLThatFailsToLoad.cpp \
268         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetURLWithJavaScriptURL.cpp \
269         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp \
270         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp \
271         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/LogNPPSetWindow.cpp \
272         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp \
273         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPPNewFails.cpp \
274         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPPSetWindowCalledDuringDestruction.cpp \
275     Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeCallsWithNullNPP.cpp \
276         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp \
277         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeRemoveProperty.cpp \
278         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NullNPPGetValuePointer.cpp \
279         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp \
280         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PluginScriptableNPObjectInvokeDefault.cpp \
281         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PrivateBrowsing.cpp \
282         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/x11/CallInvalidateRectWithNullNPPArgument.cpp \
283         Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp \
284         Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h \
285         Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp \
286         Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.h \
287         Tools/DumpRenderTree/TestNetscapePlugIn/TestObject.cpp \
288         Tools/DumpRenderTree/TestNetscapePlugIn/TestObject.h \
289         Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp \
290         Tools/DumpRenderTree/TestNetscapePlugIn/unix/ForwardingHeaders/WebKit/npapi.h \
291         Tools/DumpRenderTree/TestNetscapePlugIn/unix/ForwardingHeaders/WebKit/npfunctions.h \
292         Tools/DumpRenderTree/TestNetscapePlugIn/unix/ForwardingHeaders/WebKit/npruntime.h
293
294 TestNetscapePlugin_libtestnetscapeplugin_la_LDFLAGS = \
295         -rpath ${shell pwd}/$(top_builddir)/../unix/TestNetscapePlugin/.libs \
296         $(no_undefined) \
297         -avoid-version \
298         -module
299
300 CLEANFILES += TestNetscapePlugin/libtestnetscapeplugin.la
301 endif
302
303 check-local:
304         $(top_srcdir)/Tools/Scripts/run-gtk-tests --timeout=-1
305
306 EXTRA_DIST += \
307         Tools/gtk/common.py \
308         Tools/gtk/generate-feature-defines-files \
309         Tools/gtk/generate-gtkdoc \
310         Tools/gtk/gtkdoc.py \
311         Tools/jhbuild/jhbuildutils.py \
312         Tools/Scripts/VCSUtils.pm \
313         Tools/Scripts/run-gtk-tests \
314         Tools/Scripts/webkit-build-directory \
315         Tools/Scripts/webkitdirs.pm
316
317 docs: docs-build.stamp
318 .PHONY : docs
319 DISTCLEANFILES += docs-build.stamp
320
321 docs_build_stamp_list = \
322         Source/WebKit/gtk/docs/webkitenvironment.xml
323
324 if ENABLE_WEBKIT1
325 docs_build_stamp_list += \
326         libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
327         Source/WebKit/gtk/docs/webkitgtk-docs.sgml \
328         Source/WebKit/gtk/docs/webkitgtk-sections.txt
329 endif
330
331 if ENABLE_WEBKIT2
332 docs_build_stamp_list += \
333         libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
334         Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml \
335         Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt
336 endif
337
338 docs-build.stamp: $(doc_build_stamp_list)
339         CC=$(CC) $(srcdir)/Tools/gtk/generate-gtkdoc
340         @touch docs-build.stamp
341
342 clean-local: doc-clean-local
343 doc-clean-local:
344         @rm -f Documentation/webkitgtk/*~ Documentation/webkitgtk*.bak
345         @rm -f Documentation/webkit2gtk/*~ Documentation/webkit2gtk*.bak
346 distclean-local: doc-distclean-local
347 doc-distclean-local:
348         @rm -rf Documentation
349 maintainer-clean-local: doc-maintainer-clean-local
350 doc-maintainer-clean-local: clean
351         @rm -rf Documentation/webkitgtk Documentation/webkit2gtk
352         -@rmdir Documentation
353
354 install-data-local:
355 if ENABLE_WEBKIT1
356         @installfiles=`echo ./Documentation/webkitgtk/html/*`; \
357         if test "$$installfiles" = './Documentation/webkitgtk/html/*'; \
358         then echo 1>&2 'No documentation to install' ; \
359         else \
360           DOC_MODULE_VERSION=`cat ./Documentation/webkitgtk/version.xml`; \
361           if test -n "$(DOC_MODULE_VERSION)"; then \
362             installdir="$(DESTDIR)$(HTML_DIR)/webkitgtk-$(DOC_MODULE_VERSION)"; \
363           else \
364             installdir="$(DESTDIR)$(HTML_DIR)/webkitgtk"; \
365           fi; \
366           $(mkinstalldirs) $${installdir} ; \
367           for i in $$installfiles; do \
368             echo ' $(INSTALL_DATA) '$$i ; \
369             $(INSTALL_DATA) $$i $${installdir}; \
370           done; \
371           if test -n "$(DOC_MODULE_VERSION)"; then \
372             mv -f $${installdir}/webkitgtk.devhelp2 \
373               $${installdir}/webkitgtk-$(DOC_MODULE_VERSION).devhelp2; \
374           fi; \
375         fi
376 endif
377 if ENABLE_WEBKIT2
378         @installfiles=`echo ./Documentation/webkit2gtk/html/*`; \
379         if test "$$installfiles" = './Documentation/webkit2gtk/html/*'; \
380         then echo 1>&2 'No documentation to install' ; \
381         else \
382           DOC_MODULE_VERSION=`cat ./Documentation/webkit2gtk/version.xml`; \
383           if test -n "$(DOC_MODULE_VERSION)"; then \
384             installdir="$(DESTDIR)$(HTML_DIR)/webkit2gtk-$(DOC_MODULE_VERSION)"; \
385           else \
386             installdir="$(DESTDIR)$(HTML_DIR)/webkit2gtk"; \
387           fi; \
388           $(mkinstalldirs) $${installdir} ; \
389           for i in $$installfiles; do \
390             echo ' $(INSTALL_DATA) '$$i ; \
391             $(INSTALL_DATA) $$i $${installdir}; \
392           done; \
393           if test -n "$(DOC_MODULE_VERSION)"; then \
394             mv -f $${installdir}/webkit2gtk.devhelp2 \
395               $${installdir}/webkit2gtk-$(DOC_MODULE_VERSION).devhelp2; \
396           fi; \
397         fi
398 endif
399         @$(AM_V_GEN)$(PYTHON) $(srcdir)/Tools/gtk/generate-gtkdoc --rebase --virtual-root=$${DESTDIR}
400
401 uninstall-local:
402 if ENABLE_WEBKIT1
403         @DOC_MODULE_VERSION=`cat ./Documentation/webkitgtk/version.xml`; \
404         if test -n "$(DOC_MODULE_VERSION)"; then \
405           installdir="$(DESTDIR)$(HTML_DIR)/webkitgtk-$(DOC_MODULE_VERSION)"; \
406         else \
407           installdir="$(DESTDIR)$(HTML_DIR)/webkitgtk"; \
408         fi; \
409         rm -rf $${installdir}
410 endif
411 if ENABLE_WEBKIT2
412         @DOC_MODULE_VERSION=`cat ./Documentation/webkit2gtk/version.xml`; \
413         if test -n "$(DOC_MODULE_VERSION)"; then \
414           installdir="$(DESTDIR)$(HTML_DIR)/webkit2gtk-$(DOC_MODULE_VERSION)"; \
415         else \
416           installdir="$(DESTDIR)$(HTML_DIR)/webkit2gtk"; \
417         fi; \
418         rm -rf $${installdir}
419 endif
420
421 if ENABLE_GTK_DOC
422 all: docs-build.stamp
423 endif
424