Home | History | Annotate | Download | only in gtk
      1 
      2 # Programs to run the WebKitGtk unit tests
      3 GTESTER = gtester
      4 GTESTER_REPORT = gtester-report
      5 
      6 lib_LTLIBRARIES += \
      7 	libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
      8 
      9 nodist_libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
     10 	$(webkitgtk_built_sources)
     11 
     12 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_ladir = $(prefix)/include/webkit-@WEBKITGTK_API_VERSION@/webkit
     13 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_HEADERS = \
     14 	$(webkitgtk_static_h_api)
     15 
     16 nodist_libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_HEADERS = \
     17 	$(webkitgtk_built_h_api) \
     18 	$(GENSOURCES_WEBKIT)/webkitenumtypes.h
     19 
     20 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
     21 	$(webcoregtk_sources) \
     22 	$(webkitgtk_sources)
     23 
     24 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS = \
     25 	$(SYMBOL_VISIBILITY_INLINES) \
     26 	$(global_cxxflags)
     27 
     28 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CFLAGS = \
     29 	$(SYMBOL_VISIBILITY) \
     30 	$(global_cflags)
     31 
     32 if ENABLE_SPELLCHECK
     33 webkitgtk_cppflags += \
     34 	-DENABLE_SPELLCHECK=1
     35 
     36 webkitgtk_sources += \
     37 	Source/WebKit/gtk/WebCoreSupport/TextCheckerClientEnchant.cpp \
     38 	Source/WebKit/gtk/WebCoreSupport/TextCheckerClientEnchant.h
     39 endif
     40 
     41 # When building WebCore/WebKit, we want WebCore/config.h and NOT JavaScriptCore/config.h,
     42 # hence, it's important that WebCore/ should come first before JavaScriptCore in the
     43 # include path.
     44 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS = \
     45 	-DBUILDING_WEBKIT \
     46 	-DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
     47 	-DDATA_DIR=\"${datadir}\" \
     48 	-I$(WebCore)/bindings \
     49 	-I$(WebCore)/bindings/gobject \
     50 	-I$(WebKit) \
     51 	-I$(WebKit)/WebCoreSupport \
     52 	-I$(WebKit)/webkit \
     53 	-I$(GENSOURCES_WEBKIT) \
     54 	-ISource/WebKit/gtk/webkit \
     55 	$(global_cppflags) \
     56 	$(webcore_cppflags) \
     57 	$(webcoregtk_cppflags) \
     58 	$(javascriptcore_cppflags) \
     59 	$(webkitgtk_cppflags) \
     60 	-fno-strict-aliasing \
     61 	$(HILDON_CPPFLAGS) \
     62 	$(COVERAGE_CFLAGS) \
     63 	$(ENCHANT_CFLAGS) \
     64 	$(GAIL_CFLAGS) \
     65 	$(GEOCLUE_CFLAGS) \
     66 	$(GLIB_CFLAGS) \
     67 	$(GSTREAMER_CFLAGS) \
     68 	$(GTK_CFLAGS) \
     69 	$(HILDON_CFLAGS) \
     70 	$(LIBSOUP_CFLAGS) \
     71 	$(LIBXML_CFLAGS) \
     72 	$(LIBXSLT_CFLAGS) \
     73 	$(SQLITE3_CFLAGS) \
     74 	$(UNICODE_CFLAGS) \
     75 	$(XT_CFLAGS)
     76 
     77 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LDFLAGS = \
     78 	-version-info @LIBWEBKITGTK_VERSION@ \
     79 	$(version_script) \
     80 	$(no_undefined)
     81 
     82 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD = \
     83 	-lpthread \
     84 	libWebCore.la \
     85 	libJavaScriptCore.la \
     86 	$(webcore_ldflags) \
     87 	$(CAIRO_LIBS) \
     88 	$(COVERAGE_LDFLAGS) \
     89 	$(ENCHANT_LIBS) \
     90 	$(FREETYPE_LIBS) \
     91 	$(GAIL_LIBS) \
     92 	$(GEOCLUE_LIBS) \
     93 	$(GLIB_LIBS) \
     94 	$(GSTREAMER_LIBS) \
     95 	$(GTK_LIBS) \
     96 	$(HILDON_LIBS) \
     97 	$(JPEG_LIBS) \
     98 	$(LIBSOUP_LIBS) \
     99 	$(LIBXML_LIBS) \
    100 	$(LIBXSLT_LIBS) \
    101 	$(OPENGL_LIBS) \
    102 	$(PANGO_LIBS) \
    103 	$(PNG_LIBS) \
    104 	$(SQLITE3_LIBS) \
    105 	$(UNICODE_LIBS) \
    106 	$(XRENDER_LIBS) \
    107 	$(XT_LIBS) \
    108 	$(WINMM_LIBS) \
    109 	$(SHLWAPI_LIBS) \
    110 	$(OLE32_LIBS)
    111 
    112 webkitgtk_static_h_api += \
    113 	$(srcdir)/Source/WebKit/gtk/webkit/webkit.h \
    114 	$(srcdir)/Source/WebKit/gtk/webkit/webkitapplicationcache.h \
    115 	$(srcdir)/Source/WebKit/gtk/webkit/webkitdefines.h \
    116 	$(srcdir)/Source/WebKit/gtk/webkit/webkitdownload.h \
    117 	$(srcdir)/Source/WebKit/gtk/webkit/webkiterror.h \
    118 	$(srcdir)/Source/WebKit/gtk/webkit/webkitgeolocationpolicydecision.h \
    119 	$(srcdir)/Source/WebKit/gtk/webkit/webkitglobals.h \
    120 	$(srcdir)/Source/WebKit/gtk/webkit/webkithittestresult.h \
    121 	$(srcdir)/Source/WebKit/gtk/webkit/webkiticondatabase.h \
    122 	$(srcdir)/Source/WebKit/gtk/webkit/webkitnetworkrequest.h \
    123 	$(srcdir)/Source/WebKit/gtk/webkit/webkitnetworkresponse.h \
    124 	$(srcdir)/Source/WebKit/gtk/webkit/webkitsecurityorigin.h \
    125 	$(srcdir)/Source/WebKit/gtk/webkit/webkitsoupauthdialog.h \
    126 	$(srcdir)/Source/WebKit/gtk/webkit/webkitviewportattributes.h \
    127 	$(srcdir)/Source/WebKit/gtk/webkit/webkitwebbackforwardlist.h \
    128 	$(srcdir)/Source/WebKit/gtk/webkit/webkitwebdatabase.h \
    129 	$(srcdir)/Source/WebKit/gtk/webkit/webkitwebdatasource.h \
    130 	$(srcdir)/Source/WebKit/gtk/webkit/webkitwebframe.h \
    131 	$(srcdir)/Source/WebKit/gtk/webkit/webkitwebhistoryitem.h \
    132 	$(srcdir)/Source/WebKit/gtk/webkit/webkitwebinspector.h \
    133 	$(srcdir)/Source/WebKit/gtk/webkit/webkitwebnavigationaction.h \
    134 	$(srcdir)/Source/WebKit/gtk/webkit/webkitwebplugin.h \
    135 	$(srcdir)/Source/WebKit/gtk/webkit/webkitwebplugindatabase.h \
    136 	$(srcdir)/Source/WebKit/gtk/webkit/webkitwebpolicydecision.h \
    137 	$(srcdir)/Source/WebKit/gtk/webkit/webkitwebresource.h \
    138 	$(srcdir)/Source/WebKit/gtk/webkit/webkitwebsettings.h \
    139 	$(srcdir)/Source/WebKit/gtk/webkit/webkitwebwindowfeatures.h \
    140 	$(srcdir)/Source/WebKit/gtk/webkit/webkitwebview.h
    141 
    142 webkitgtk_built_h_api += \
    143 	Source/WebKit/gtk/webkit/webkitversion.h
    144 
    145 webkitgtk_h_api += \
    146 	$(webkitgtk_built_h_api) \
    147 	$(webkitgtk_static_h_api)
    148 
    149 # webkitenumtypes.{h,cpp} cannot be in webkitgtk_built_h_api, because
    150 # the rule that builds it depends on webkitgtk_built_h_api (circular dependency).
    151 webkitgtk_built_sources += \
    152 	DerivedSources/webkit/webkitenumtypes.cpp \
    153 	DerivedSources/webkit/webkitenumtypes.h \
    154 	DerivedSources/webkit/webkitmarshal.cpp \
    155 	DerivedSources/webkit/webkitmarshal.h \
    156 	$(webkitgtk_built_h_api) \
    157 	$(webkitgtk_gdom_built_sources) 
    158 BUILT_SOURCES += $(webkitgtk_built_sources)
    159 
    160 webkitgtk_sources += \
    161 	Source/WebCore/bindings/gobject/ConvertToUTF8String.cpp \
    162 	Source/WebCore/bindings/gobject/ConvertToUTF8String.h \
    163 	Source/WebCore/bindings/gobject/DOMObjectCache.cpp \
    164 	Source/WebCore/bindings/gobject/DOMObjectCache.h \
    165 	Source/WebCore/bindings/gobject/GObjectEventListener.cpp \
    166 	Source/WebCore/bindings/gobject/GObjectEventListener.h \
    167 	Source/WebCore/bindings/gobject/WebKitDOMBinding.cpp \
    168 	Source/WebCore/bindings/gobject/WebKitDOMBinding.h \
    169 	Source/WebCore/bindings/gobject/WebKitDOMEventTarget.cpp \
    170 	Source/WebCore/bindings/gobject/WebKitDOMEventTarget.h \
    171 	Source/WebCore/bindings/gobject/WebKitDOMEventTargetPrivate.h \
    172 	Source/WebCore/bindings/gobject/WebKitDOMObject.cpp \
    173 	Source/WebCore/bindings/gobject/WebKitDOMObject.h \
    174 	Source/WebCore/bindings/gobject/WebKitHTMLElementWrapperFactory.cpp \
    175 	Source/WebCore/bindings/gobject/WebKitHTMLElementWrapperFactory.h \
    176 	Source/WebKit/gtk/WebCoreSupport/AssertMatchingEnums.cpp \
    177 	Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
    178 	Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
    179 	Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
    180 	Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
    181 	Source/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp \
    182 	Source/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.h \
    183 	Source/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
    184 	Source/WebKit/gtk/WebCoreSupport/DragClientGtk.h \
    185 	Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp \
    186 	Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h \
    187 	Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
    188 	Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
    189 	Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
    190 	Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
    191 	Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.h \
    192 	Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp \
    193 	Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h \
    194 	Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
    195 	Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
    196 	Source/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp \
    197 	Source/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h \
    198 	Source/WebKit/gtk/webkit/webkitapplicationcache.cpp \
    199 	Source/WebKit/gtk/webkit/webkitdownload.cpp \
    200 	Source/WebKit/gtk/webkit/webkitdownloadprivate.h \
    201 	Source/WebKit/gtk/webkit/webkiterror.cpp \
    202 	Source/WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp \
    203 	Source/WebKit/gtk/webkit/webkitgeolocationpolicydecisionprivate.h \
    204 	Source/WebKit/gtk/webkit/webkitglobals.cpp \
    205 	Source/WebKit/gtk/webkit/webkitglobals.h \
    206 	Source/WebKit/gtk/webkit/webkitglobalsprivate.h \
    207 	Source/WebKit/gtk/webkit/webkithittestresult.cpp \
    208 	Source/WebKit/gtk/webkit/webkithittestresultprivate.h \
    209 	Source/WebKit/gtk/webkit/webkiticondatabase.cpp \
    210 	Source/WebKit/gtk/webkit/webkitnetworkrequest.cpp \
    211 	Source/WebKit/gtk/webkit/webkitnetworkrequestprivate.h \
    212 	Source/WebKit/gtk/webkit/webkitnetworkresponse.cpp \
    213 	Source/WebKit/gtk/webkit/webkitnetworkresponseprivate.h \
    214 	Source/WebKit/gtk/webkit/webkitsecurityorigin.cpp \
    215 	Source/WebKit/gtk/webkit/webkitsecurityoriginprivate.h \
    216 	Source/WebKit/gtk/webkit/webkitsoupauthdialog.c \
    217 	Source/WebKit/gtk/webkit/webkitversion.cpp \
    218 	Source/WebKit/gtk/webkit/webkitviewportattributes.cpp \
    219 	Source/WebKit/gtk/webkit/webkitviewportattributesprivate.h \
    220 	Source/WebKit/gtk/webkit/webkitwebbackforwardlist.cpp \
    221 	Source/WebKit/gtk/webkit/webkitwebbackforwardlistprivate.h \
    222 	Source/WebKit/gtk/webkit/webkitwebdatabase.cpp \
    223 	Source/WebKit/gtk/webkit/webkitwebdatasource.cpp \
    224 	Source/WebKit/gtk/webkit/webkitwebdatasourceprivate.h \
    225 	Source/WebKit/gtk/webkit/webkitwebframe.cpp \
    226 	Source/WebKit/gtk/webkit/webkitwebframeprivate.h \
    227 	Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp \
    228 	Source/WebKit/gtk/webkit/webkitwebhistoryitemprivate.h \
    229 	Source/WebKit/gtk/webkit/webkitwebinspector.cpp \
    230 	Source/WebKit/gtk/webkit/webkitwebinspectorprivate.h \
    231 	Source/WebKit/gtk/webkit/webkitwebnavigationaction.cpp \
    232 	Source/WebKit/gtk/webkit/webkitwebnavigationactionprivate.h \
    233 	Source/WebKit/gtk/webkit/webkitwebpolicydecision.cpp \
    234 	Source/WebKit/gtk/webkit/webkitwebpolicydecisionprivate.h \
    235 	Source/WebKit/gtk/webkit/webkitwebresource.cpp \
    236 	Source/WebKit/gtk/webkit/webkitwebresourceprivate.h \
    237 	Source/WebKit/gtk/webkit/webkitwebplugin.cpp \
    238 	Source/WebKit/gtk/webkit/webkitwebpluginprivate.h \
    239 	Source/WebKit/gtk/webkit/webkitwebplugindatabase.cpp \
    240 	Source/WebKit/gtk/webkit/webkitwebplugindatabaseprivate.h \
    241 	Source/WebKit/gtk/webkit/webkitwebsettings.cpp \
    242 	Source/WebKit/gtk/webkit/webkitwebsettingsprivate.h \
    243 	Source/WebKit/gtk/webkit/webkitwebview.cpp \
    244 	Source/WebKit/gtk/webkit/webkitwebviewprivate.h \
    245 	Source/WebKit/gtk/webkit/webkitwebwindowfeatures.cpp \
    246 	Source/WebKit/gtk/webkit/webkitwebwindowfeaturesprivate.h
    247 
    248 pkgconfigdir = $(libdir)/pkgconfig
    249 pkgconfig_DATA = Source/WebKit/gtk/@WEBKITGTK_PC_NAME@-@WEBKITGTK_API_VERSION@.pc
    250 
    251 if ENABLE_INTROSPECTION
    252 
    253 JSCore-@WEBKITGTK_API_VERSION@.gir: $(top_builddir)/Source/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir
    254 	$(AM_V_GEN)cp $(top_builddir)/Source/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir $(top_builddir)/
    255 
    256 JSCORE_GIRSOURCES += JSCore-@WEBKITGTK_API_VERSION@.gir
    257 WEBKIT_GIRSOURCES += WebKit-@WEBKITGTK_API_VERSION@.gir
    258 
    259 $(WEBKIT_GIRSOURCES): $(G_IR_SCANNER) $(JSCORE_GIRSOURCES) libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
    260 	$(AM_V_GEN)$(G_IR_SCANNER) -v --warn-all \
    261 	     --symbol-prefix=webkit \
    262 	     --identifier-prefix=WebKit \
    263 	     --namespace=WebKit \
    264 	     --nsversion=@WEBKITGTK_API_VERSION@ \
    265 	     --include=GObject-2.0 \
    266 	     --include=Gtk-@GTK_API_VERSION@ \
    267 	     --include=JSCore-@WEBKITGTK_API_VERSION@ \
    268 	     --include=Soup-2.4 \
    269 	     --library=webkitgtk-@WEBKITGTK_API_VERSION@ \
    270 	     --libtool="$(LIBTOOL)" \
    271 	     --pkg=gobject-2.0 \
    272 	     --pkg=gtk+-@GTK_API_VERSION@ \
    273 	     --pkg=libsoup-2.4 \
    274 	     --output=$@ \
    275 	     --add-include-path=$(WebKit) \
    276 	     --add-include-path=$(top_builddir) \
    277 	     -I$(srcdir)/Source \
    278 	     -I$(WebKit) \
    279 	     -I$(GENSOURCES) \
    280 	     -I$(GENSOURCES_WEBKIT) \
    281 	     -I$(top_builddir)/Source/WebKit/gtk \
    282 	     -I$(top_srcdir)/Source/JavaScriptCore/ForwardingHeaders \
    283 	     -I$(top_srcdir) \
    284 	     $(GENSOURCES_WEBKIT)/webkitenumtypes.h \
    285 	     $(webkitgtk_h_api) \
    286 	     $(WebKit)/webkit/*.cpp \
    287 	     $(WebKit)/webkit/*.c
    288 
    289 girdir = $(datadir)/gir-1.0
    290 gir_DATA = $(WEBKIT_GIRSOURCES) $(JSCORE_GIRSOURCES)
    291 
    292 typelibsdir += $(libdir)/girepository-1.0
    293 typelibs_DATA += $(JSCORE_GIRSOURCES:.gir=.typelib) $(WEBKIT_GIRSOURCES:.gir=.typelib)
    294 
    295 %.typelib: %.gir $(G_IR_COMPILER)
    296 	$(AM_V_GEN)$(G_IR_COMPILER) --includedir $(WebKit) --includedir $(top_builddir) $< -o $@
    297 
    298 CLEANFILES += $(JSCORE_GIRSOURCES) $(WEBKIT_GIRSOURCES) $(typelibs_DATA)
    299 
    300 endif
    301 
    302 EXTRA_DIST += $(top_builddir)/Source/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir
    303 
    304 WEBKIT_MARSHAL_LIST = $(WebKit)/webkitmarshal.list
    305 $(GENSOURCES_WEBKIT)/webkitmarshal.cpp: stamp-webkitmarshal.cpp
    306 	@true
    307 $(GENSOURCES_WEBKIT)/webkitmarshal.h: stamp-webkitmarshal.h
    308 	@true
    309 
    310 stamp-webkitmarshal.cpp: $(WEBKIT_MARSHAL_LIST)
    311 	$(AM_V_GEN) echo "extern \"C\" {" > $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
    312 	$(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
    313 	echo '}' >> $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
    314 	echo timestamp > $(@F)
    315 
    316 stamp-webkitmarshal.h: $(WEBKIT_MARSHAL_LIST)
    317 	$(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(GENSOURCES_WEBKIT)/webkitmarshal.h && \
    318 	echo timestamp > $(@F)
    319 
    320 $(GENSOURCES_WEBKIT)/webkitenumtypes.h: stamp-webkitenumtypes.h
    321 	@true
    322 stamp-webkitenumtypes.h: $(webkitgtk_h_api) $(WebKit)/GNUmakefile.am
    323 	$(AM_V_GEN)glib-mkenums \
    324 			--fhead "#ifndef WEBKIT_ENUM_TYPES_H\n" \
    325 			--fhead "#define WEBKIT_ENUM_TYPES_H\n\n" \
    326 			--fhead "#include <glib-object.h>\n\n" \
    327 			--fhead "#include <webkit/webkitdefines.h>\n\n" \
    328 			--fhead "G_BEGIN_DECLS\n\n" \
    329 			--ftail "G_END_DECLS\n\n" \
    330 			--ftail "#endif\n" \
    331 			--fprod "#include <webkit/@basename@>\n\n" \
    332 			--eprod "#define WEBKIT_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n\n" \
    333 			--eprod "WEBKIT_API GType\n@enum_name@_get_type(void);\n\n" \
    334 		$(webkitgtk_h_api) | \
    335 		sed 's,web_kit,webkit,' | \
    336 		sed 's,WEBKIT_TYPE_KIT,WEBKIT_TYPE,' \
    337 		> xgen-gth \
    338 	&& (cmp -s xgen-gth $(GENSOURCES_WEBKIT)/webkitenumtypes.h || cp xgen-gth $(GENSOURCES_WEBKIT)/webkitenumtypes.h) \
    339 	&& rm -f xgen-gth \
    340 	&& echo timestamp > $(@F)
    341 
    342 $(GENSOURCES_WEBKIT)/webkitenumtypes.cpp: $(webkitgtk_h_api) $(WebKit)/GNUmakefile.am
    343 	$(AM_V_GEN)glib-mkenums \
    344 			--fhead "#include <config.h>\n" \
    345 			--fhead "#include <glib-object.h>\n" \
    346 			--fhead "#include \"$(GENSOURCES_WEBKIT)/webkitenumtypes.h\"\n\n" \
    347 			--fhead "extern \"C\" {\n\n" \
    348 			--fprod "\n/* enumerations from \"@filename@\" */" \
    349 			--vhead "static const G@Type@Value _@enum_name@_values[] = {" \
    350 			--vprod "    { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
    351 			--vtail "    { 0, NULL, NULL }\n};\n\n" \
    352 			--vtail "GType @enum_name@_get_type(void)\n{\n" \
    353 			--vtail "    static GType type = 0;\n\n" \
    354 			--vtail "    if (!type)\n" \
    355 			--vtail "        type = g_@type@_register_static(\"@EnumName@\", _@enum_name@_values);\n\n" \
    356 			--vtail "    return type;\n}\n\n" \
    357 			--ftail "}\n" \
    358 		$(webkitgtk_h_api) | \
    359 		sed 's,web_kit,webkit,' \
    360 		> xgen-gtc \
    361 	&& cp xgen-gtc $@ \
    362 	&& rm -f xgen-gtc
    363 
    364 # GSettings
    365 gsettings_SCHEMAS = $(top_builddir)/Source/WebKit/gtk/org.webkitgtk-@WEBKITGTK_API_VERSION (a] .gschema.xml
    366 @GSETTINGS_RULES@
    367 
    368 EXTRA_DIST += \
    369 	$(WebKit)/ChangeLog \
    370 	$(WebKit)/NEWS \
    371 	$(WebKit)/webkitmarshal.list \
    372 	$(WebKit)/docs/GNUmakefile.* \
    373 	$(WebKit)/docs/webkitenvironment.xml \
    374 	$(WebKit)/docs/webkitgtk-docs.sgml \
    375 	$(WebKit)/docs/webkitgtk-sections.txt \
    376 	$(WebKit)/docs/version.xml.in \
    377 	$(WebKit)/po/* \
    378 	$(WebKit)/resources/* \
    379 	$(WebKit)/tests/resources/* \
    380 	$(WebKit)/tests/test_utils.h \
    381 	$(WebKit)/org.webkitgtk.gschema.xml.in
    382 
    383 # extra resource files
    384 resourcesdir = ${datadir}/webkit-@WEBKITGTK_API_VERSION@/resources
    385 dist_resources_DATA = \
    386 	$(shell ls $(srcdir)/Source/WebKit/gtk/resources/*.html)
    387 
    388 # Build unit tests
    389 noinst_PROGRAMS += $(TEST_PROGS)
    390 webkit_tests_cflags = \
    391 	-fno-strict-aliasing \
    392 	-I$(srcdir)/Source/JavaScriptCore/ForwardingHeaders \
    393 	-I$(WebKit) \
    394 	-I$(GENSOURCES) \
    395 	-I$(top_builddir)/Source/WebKit/gtk \
    396 	-I$(top_srcdir)/Source/WebCore/bindings \
    397 	-I$(top_srcdir)/Source/WebCore/bindings/gobject \
    398 	$(global_cppflags) \
    399 	$(global_cflags) \
    400 	$(javascriptcore_cppflags) \
    401 	$(GLIB_CFLAGS) \
    402 	$(GTK_CFLAGS) \
    403 	$(LIBSOUP_CFLAGS)
    404 
    405 webkit_tests_ldadd = \
    406 	libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
    407 	$(GTK_LIBS) \
    408 	$(GLIB_LIBS) \
    409 	$(LIBSOUP_LIBS)
    410 
    411 webkit_tests_ldflags = \
    412 	-no-install \
    413 	-no-fast-install
    414 
    415 TEST_PROGS += \
    416 	Programs/unittests/testapplicationcache \
    417 	Programs/unittests/testdomdocument \
    418 	Programs/unittests/testdomdomwindow \
    419 	Programs/unittests/testdomnode \
    420 	Programs/unittests/testhttpbackend \
    421 	Programs/unittests/testloading \
    422 	Programs/unittests/testglobals \
    423 	Programs/unittests/testmimehandling \
    424 	Programs/unittests/testnetworkrequest \
    425 	Programs/unittests/testnetworkresponse \
    426 	Programs/unittests/testwebframe \
    427 	Programs/unittests/testwebbackforwardlist \
    428 	Programs/unittests/testwebhistoryitem \
    429 	Programs/unittests/testwindow \
    430 	Programs/unittests/testdownload \
    431 	Programs/unittests/testatk \
    432 	Programs/unittests/testatkroles \
    433 	Programs/unittests/testhittestresult \
    434 	Programs/unittests/testwebsettings \
    435 	Programs/unittests/testwebresource \
    436 	Programs/unittests/testwebdatasource \
    437 	Programs/unittests/testwebplugindatabase \
    438 	Programs/unittests/testwebview \
    439 	Programs/unittests/testkeyevents \
    440 	Programs/unittests/testcopyandpaste
    441 
    442 # Add additional tests here
    443 Programs_unittests_testapplicationcache_SOURCES = Source/WebKit/gtk/tests/testapplicationcache.c
    444 Programs_unittests_testapplicationcache_CFLAGS = $(webkit_tests_cflags)
    445 Programs_unittests_testapplicationcache_LDADD = $(webkit_tests_ldadd)
    446 Programs_unittests_testapplicationcache_LDFLAGS = $(webkit_tests_ldflags)
    447 
    448 Programs_unittests_testdomdocument_SOURCES = Source/WebKit/gtk/tests/testdomdocument.c
    449 Programs_unittests_testdomdocument_CFLAGS = $(webkit_tests_cflags)
    450 Programs_unittests_testdomdocument_LDADD = $(webkit_tests_ldadd)
    451 Programs_unittests_testdomdocument_LDFLAGS = $(webkit_tests_ldflags)
    452 
    453 Programs_unittests_testdomdomwindow_SOURCES = Source/WebKit/gtk/tests/testdomdomwindow.c
    454 Programs_unittests_testdomdomwindow_CFLAGS = $(webkit_tests_cflags)
    455 Programs_unittests_testdomdomwindow_LDADD = $(webkit_tests_ldadd)
    456 Programs_unittests_testdomdomwindow_LDFLAGS = $(webkit_tests_ldflags)
    457 
    458 Programs_unittests_testdomnode_SOURCES = Source/WebKit/gtk/tests/testdomnode.c
    459 Programs_unittests_testdomnode_CFLAGS = $(webkit_tests_cflags)
    460 Programs_unittests_testdomnode_LDADD = $(webkit_tests_ldadd)
    461 Programs_unittests_testdomnode_LDFLAGS = $(webkit_tests_ldflags)
    462 
    463 Programs_unittests_testhttpbackend_SOURCES = Source/WebKit/gtk/tests/testhttpbackend.c
    464 Programs_unittests_testhttpbackend_CFLAGS = $(webkit_tests_cflags)
    465 Programs_unittests_testhttpbackend_LDADD = $(webkit_tests_ldadd)
    466 Programs_unittests_testhttpbackend_LDFLAGS = $(webkit_tests_ldflags)
    467 
    468 Programs_unittests_testglobals_SOURCES = Source/WebKit/gtk/tests/testglobals.c
    469 Programs_unittests_testglobals_CFLAGS = $(webkit_tests_cflags)
    470 Programs_unittests_testglobals_LDADD = $(webkit_tests_ldadd)
    471 Programs_unittests_testglobals_LDFLAGS = $(webkit_tests_ldflags)
    472 
    473 Programs_unittests_testloading_SOURCES = Source/WebKit/gtk/tests/testloading.c
    474 Programs_unittests_testloading_CFLAGS = $(webkit_tests_cflags)
    475 Programs_unittests_testloading_LDADD = $(webkit_tests_ldadd)
    476 Programs_unittests_testloading_LDFLAGS = $(webkit_tests_ldflags)
    477 
    478 Programs_unittests_testmimehandling_SOURCES = Source/WebKit/gtk/tests/testmimehandling.c Source/WebKit/gtk/tests/test_utils.c
    479 Programs_unittests_testmimehandling_CFLAGS = $(webkit_tests_cflags)
    480 Programs_unittests_testmimehandling_LDADD = $(webkit_tests_ldadd)
    481 Programs_unittests_testmimehandling_LDFLAGS = $(webkit_tests_ldflags)
    482 
    483 Programs_unittests_testnetworkrequest_SOURCES = Source/WebKit/gtk/tests/testnetworkrequest.c
    484 Programs_unittests_testnetworkrequest_CFLAGS = $(webkit_tests_cflags)
    485 Programs_unittests_testnetworkrequest_LDADD = $(webkit_tests_ldadd)
    486 Programs_unittests_testnetworkrequest_LDFLAGS = $(webkit_tests_ldflags)
    487 
    488 Programs_unittests_testnetworkresponse_SOURCES = Source/WebKit/gtk/tests/testnetworkresponse.c
    489 Programs_unittests_testnetworkresponse_CFLAGS = $(webkit_tests_cflags)
    490 Programs_unittests_testnetworkresponse_LDADD = $(webkit_tests_ldadd)
    491 Programs_unittests_testnetworkresponse_LDFLAGS = $(webkit_tests_ldflags)
    492 
    493 Programs_unittests_testwebframe_SOURCES = Source/WebKit/gtk/tests/testwebframe.c
    494 Programs_unittests_testwebframe_CFLAGS = $(webkit_tests_cflags)
    495 Programs_unittests_testwebframe_LDADD = $(webkit_tests_ldadd)
    496 Programs_unittests_testwebframe_LDFLAGS = $(webkit_tests_ldflags)
    497 
    498 Programs_unittests_testwebplugindatabase_SOURCES = Source/WebKit/gtk/tests/testwebplugindatabase.c
    499 Programs_unittests_testwebplugindatabase_CFLAGS = -DTEST_PLUGIN_DIR=\"${shell pwd}/${top_builddir}/TestNetscapePlugin/.libs\" $(webkit_tests_cflags)
    500 Programs_unittests_testwebplugindatabase_LDADD = $(webkit_tests_ldadd)
    501 Programs_unittests_testwebplugindatabase_LDFLAGS = $(webkit_tests_ldflags)
    502 
    503 Programs_unittests_testwebbackforwardlist_SOURCES = Source/WebKit/gtk/tests/testwebbackforwardlist.c
    504 Programs_unittests_testwebbackforwardlist_CFLAGS = $(webkit_tests_cflags)
    505 Programs_unittests_testwebbackforwardlist_LDADD = $(webkit_tests_ldadd)
    506 Programs_unittests_testwebbackforwardlist_LDFLAGS = $(webkit_tests_ldflags)
    507 
    508 Programs_unittests_testwebhistoryitem_SOURCES = Source/WebKit/gtk/tests/testwebhistoryitem.c
    509 Programs_unittests_testwebhistoryitem_CFLAGS = $(webkit_tests_cflags)
    510 Programs_unittests_testwebhistoryitem_LDADD = $(webkit_tests_ldadd)
    511 Programs_unittests_testwebhistoryitem_LDFLAGS = $(webkit_tests_ldflags)
    512 
    513 Programs_unittests_testwindow_SOURCES = Source/WebKit/gtk/tests/testwindow.c
    514 Programs_unittests_testwindow_CFLAGS = $(webkit_tests_cflags)
    515 Programs_unittests_testwindow_LDADD = $(webkit_tests_ldadd)
    516 Programs_unittests_testwindow_LDFLAGS = $(webkit_tests_ldflags)
    517 
    518 Programs_unittests_testdownload_SOURCES = Source/WebKit/gtk/tests/testdownload.c
    519 Programs_unittests_testdownload_CFLAGS = $(webkit_tests_cflags)
    520 Programs_unittests_testdownload_LDADD = $(webkit_tests_ldadd)
    521 Programs_unittests_testdownload_LDFLAGS = $(webkit_tests_ldflags)
    522 
    523 Programs_unittests_testatk_SOURCES = Source/WebKit/gtk/tests/testatk.c
    524 Programs_unittests_testatk_CFLAGS = $(webkit_tests_cflags)
    525 Programs_unittests_testatk_LDADD = $(webkit_tests_ldadd)
    526 Programs_unittests_testatk_LDFLAGS = $(webkit_tests_ldflags)
    527 
    528 Programs_unittests_testatkroles_SOURCES = Source/WebKit/gtk/tests/testatkroles.c
    529 Programs_unittests_testatkroles_CFLAGS = $(webkit_tests_cflags)
    530 Programs_unittests_testatkroles_LDADD = $(webkit_tests_ldadd)
    531 Programs_unittests_testatkroles_LDFLAGS = $(webkit_tests_ldflags)
    532 
    533 Programs_unittests_testwebsettings_SOURCES = Source/WebKit/gtk/tests/testwebsettings.c
    534 Programs_unittests_testwebsettings_CFLAGS = $(webkit_tests_cflags)
    535 Programs_unittests_testwebsettings_LDADD = $(webkit_tests_ldadd)
    536 Programs_unittests_testwebsettings_LDFLAGS = $(webkit_tests_ldflags)
    537 
    538 Programs_unittests_testwebresource_SOURCES = Source/WebKit/gtk/tests/testwebresource.c
    539 Programs_unittests_testwebresource_CFLAGS = $(webkit_tests_cflags)
    540 Programs_unittests_testwebresource_LDADD = $(webkit_tests_ldadd)
    541 
    542 Programs_unittests_testwebdatasource_SOURCES = Source/WebKit/gtk/tests/testwebdatasource.c
    543 Programs_unittests_testwebdatasource_CFLAGS = $(webkit_tests_cflags)
    544 Programs_unittests_testwebdatasource_LDADD = $(webkit_tests_ldadd)
    545 
    546 Programs_unittests_testwebview_SOURCES = Source/WebKit/gtk/tests/testwebview.c Source/WebKit/gtk/tests/test_utils.c
    547 Programs_unittests_testwebview_CFLAGS = $(webkit_tests_cflags)
    548 Programs_unittests_testwebview_LDADD = $(webkit_tests_ldadd)
    549 Programs_unittests_testwebview_LDFLAGS = $(webkit_tests_ldflags)
    550 
    551 Programs_unittests_testhittestresult_SOURCES = Source/WebKit/gtk/tests/testhittestresult.c
    552 Programs_unittests_testhittestresult_CFLAGS = $(webkit_tests_cflags)
    553 Programs_unittests_testhittestresult_LDADD = $(webkit_tests_ldadd)
    554 
    555 Programs_unittests_testkeyevents_SOURCES = Source/WebKit/gtk/tests/testkeyevents.c
    556 Programs_unittests_testkeyevents_CFLAGS = $(webkit_tests_cflags)
    557 Programs_unittests_testkeyevents_LDADD = $(webkit_tests_ldadd)
    558 Programs_unittests_testkeyevents_LDFLAGS = $(webkit_tests_ldflags)
    559 
    560 Programs_unittests_testcopyandpaste_SOURCES = Source/WebKit/gtk/tests/testcopyandpaste.c \
    561 	Source/WebCore/platform/gtk/GtkVersioning.c
    562 Programs_unittests_testcopyandpaste_CFLAGS = $(webkit_tests_cflags) \
    563 	-I$(srcdir)/Source/WebCore/platform/gtk \
    564 	-I$(srcdir)/Source/WebCore
    565 Programs_unittests_testcopyandpaste_LDADD = $(webkit_tests_ldadd)
    566 Programs_unittests_testcopyandpaste_LDFLAGS = $(webkit_tests_ldflags)
    567 
    568 # Project-wide clean rules
    569 # Files that will be cleaned
    570 CLEANFILES += \
    571 	$(BUILT_SOURCES) \
    572 	$(top_builddir)/stamp-webkitmarshal.cpp \
    573 	$(top_builddir)/stamp-webkitmarshal.h \
    574 	$(top_builddir)/stamp-webkitenumtypes.cpp \
    575 	$(top_builddir)/stamp-webkitenumtypes.h \
    576 	$(top_builddir)/Programs/GtkLauncher
    577 
    578 DISTCLEANFILES += \
    579 	$(top_builddir)/Source/WebKit/gtk/docs/version.xml \
    580 	$(top_builddir)/Source/WebKit/gtk/docs/GNUmakefile \
    581 	$(top_builddir)/Source/WebKit/gtk/@WEBKITGTK_PC_NAME@-@WEBKITGTK_API_VERSION@.pc \
    582 	$(top_builddir)/Source/WebKit/gtk/org.webkitgtk-@WEBKITGTK_API_VERSION (a] .gschema.xml \
    583 	$(top_builddir)/Source/WebKit/gtk/webkit/webkitversion.h
    584 
    585 dist-hook:
    586 	cp $(WebKit)/NEWS $(distdir)
    587 install-data-local: po-install-data-local
    588 installdirs-data-local: po-installdirs-data-local
    589 uninstall-local: po-uninstall-local
    590 
    591 # Run all tests in cwd
    592 # FIXME: we should run this under xvfb
    593 test: $(TEST_PROGS)
    594 	$(GTESTER) --verbose $(TEST_PROGS);
    595 
    596 # test-report: run tests in cwd and generate report
    597 # full-report: run tests in cwd with -m perf and -m slow and generate report
    598 # perf-report: run tests in cwd with -m perf and generate report
    599 test-report full-report perf-report: $(TEST_PROGS)
    600 	@ case $@ in \
    601 	  test-report) test_options="-k";; \
    602 	  full-report) test_options="-k -m=perf";; \
    603 	  perf-report) test_options="-k -m=perf -m=slow";; \
    604 	  esac ; \
    605 	  $(GTESTER) --verbose $$test_options -o test-report.xml $(TEST_PROGS); \
    606 	  $(GTESTER_REPORT) test-report.xml > test-report.html ;
    607 
    608 .PHONY: test test-report perf-report full-report
    609 check-local: test
    610