WebKit: Back to old version - new version didn't build
[openembedded.git] / recipes / webkit / webkit-gtk / GNUmakefile.am
index 13cf5ee..399f7a4 100644 (file)
 srcdir = @srcdir@
 VPATH = @srcdir@
 
+DISTCHECK_CONFIGURE_FLAGS = \
+       --enable-introspection  \
+       --enable-gtk-doc
+
 # Directory for autogenerated sources
 GENSOURCES := $(top_builddir)/DerivedSources
 GENPROGRAMS := $(top_builddir)/Programs
@@ -36,46 +40,109 @@ GENPROGRAMS := $(top_builddir)/Programs
 # Script for creating hash tables
 CREATE_HASH_TABLE = $(srcdir)/JavaScriptCore/create_hash_table
 
+# Programs to run the WebKitGtk unit tests
+GTESTER = gtester
+GTESTER_REPORT = gtester-report
+
 # Libraries and support components
 bin_PROGRAMS :=
-
 noinst_PROGRAMS :=
-
 noinst_HEADERS :=
-
+noinst_LTLIBRARIES :=
 lib_LIBRARIES :=
-
 IDL_BINDINGS :=
-
 TEST_PROGS :=
-
-# Global flags to CPP
+POFILES :=
+MOFILES :=
+javascriptcore_h_api :=
+javascriptcore_cppflags:=
+javascriptcore_sources :=
+javascriptcore_built_sources :=
+javascriptcore_built_nosources :=
+javascriptcore_dist :=
+webcore_cppflags :=
+webcore_sources :=
+webcore_libadd :=
+webcore_built_sources :=
+webcore_built_nosources :=
+webcore_dist :=
+webcoregtk_cppflags :=
+webcoregtk_sources :=
+webkitgtk_h_api :=
+webkitgtk_sources :=
+webkitgtk_cppflags :=
+webkitgtk_built_sources :=
+webkitgtk_built_nosources :=
+webkitgtk_cleanfiles :=
 global_cppflags :=
+global_cflags :=
+global_cxxflags :=
+corekit_cflags :=
+corekit_cppflags :=
+JSCORE_GIRSOURCES :=
+WEBKIT_GIRSOURCES :=
+typelibsdir :=
+typelibs_DATA :=
+EXTRA_DIST :=
+BUILT_SOURCES :=
+CLEANFILES :=
+DISTCLEANFILES :=
+MAINTAINERCLEANFILES :=
+
+# CFLAGS/CXXFLAGS used by WebCore and WebKit
+#
+# gtk+.pc already include glib, cairo, freetype and pango CFLAGS
+# Don't include them for now to reduce the noise when compiling
+# $(GLIB_CFLAGS) $(CAIRO_CFLAGS) $(PANGO_CFLAGS)  $(FREETYPE_CFLAGS)
+corekit_cflags += \
+       -fno-strict-aliasing \
+       $(COVERAGE_CFLAGS) \
+       $(ENCHANT_CFLAGS) \
+       $(GAIL_CFLAGS) \
+       $(GEOCLUE_CFLAGS) \
+       $(GLIB_CFLAGS) \
+       $(GSTREAMER_CFLAGS) \
+       $(GTK_CFLAGS) \
+       $(HILDON_CFLAGS) \
+       $(LIBSOUP_CFLAGS) \
+       $(LIBXML_CFLAGS) \
+       $(LIBXSLT_CFLAGS) \
+       $(SQLITE3_CFLAGS) \
+       $(UNICODE_CFLAGS) \
+       $(XT_CFLAGS)
 
-global_cppflags += \
-       -DWTF_USE_ICU_UNICODE=1
+# When building webcore/webkit, we want WebCore/config.h and NOT
+# JavaScriptCore/config.h, hence, it's important that WebCore/ should come first
+# before JavaScriptCore in the include path.
+corekit_cppflags += \
+       $(global_cppflags) \
+       $(webcore_cppflags) \
+       $(webcoregtk_cppflags) \
+       $(javascriptcore_cppflags)
+
+# For the Gtk port we want to use XP_UNIX both in X11 and Mac
+if !TARGET_WIN32
+corekit_cppflags += -DXP_UNIX
+endif
 
 # Default compiler flags
-global_cflags := \
+global_cflags += \
        -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
        -Wformat -Wformat-security -Wno-format-y2k -Wundef \
        -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
        -Wno-unused-parameter -Wno-parentheses \
        -fno-exceptions
 
-global_cxxflags := \
+global_cxxflags += \
+       $(global_cflags) \
        $(SYMBOL_VISIBILITY_INLINES) \
        -fno-rtti
 
-if !ENABLE_DEBUG
-global_cflags += \
-       $(SYMBOL_VISIBILITY)
-endif
-
 # -no-undefined required for building DLLs on Windows
 # It breaks the build on other platforms, so we use it conditionally
 if OS_WIN32
 no_undefined = -no-undefined
+version_script = -export-symbols-regex "^(webkit_|JS).*"
 endif
 
 if OS_GNU
@@ -87,28 +154,18 @@ lib_LTLIBRARIES = \
        libwebkit-1.0.la
 
 # Convenience libraries
-noinst_LTLIBRARIES = \
-       libJavaScriptCore.la \
-       libWebCore.la
+noinst_LTLIBRARIES += \
+       libJavaScriptCore.la
 
-#
 # JavaScriptCore
-javascriptcore_h_api :=
-javascriptcore_cppflags:=
-javascriptcore_sources :=
-javascriptcore_built_sources :=
-javascriptcore_built_nosources :=
-javascriptcore_dist :=
-
 javascriptcore_cppflags += \
-       -I$(srcdir)/JavaScriptCore \
        -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
        -I$(srcdir)/JavaScriptCore/parser \
        -I$(srcdir)/JavaScriptCore/wtf \
+       -I$(srcdir)/JavaScriptCore/wtf/gtk \
+       -I$(srcdir)/JavaScriptCore/wtf/gobject \
        -I$(top_builddir)/DerivedSources
 
-# The variables above are already included below so no need to touch
-# these variables unless you really have to
 nodist_EXTRA_libJavaScriptCore_la_SOURCES = \
        $(javascriptcore_built_nosources)
 
@@ -141,88 +198,12 @@ libJavaScriptCore_la_CPPFLAGS = \
        $(global_cppflags) \
        $(javascriptcore_cppflags)
 
-#
-# WebCore
-webcore_cppflags :=
-webcore_sources :=
-webcore_libadd :=
-webcore_built_sources :=
-webcore_built_nosources :=
-webcore_dist :=
-webcoregtk_cppflags :=
-webcoregtk_sources :=
-
-nodist_EXTRA_libWebCore_la_SOURCES = \
-       $(webcore_built_nosources)
-
-nodist_libWebCore_la_SOURCES = \
-       $(webcore_built_sources)
-
-libWebCore_la_SOURCES = \
-       $(webcore_sources) \
-       $(webcoregtk_sources)
-
-libWebCore_la_CXXFLAGS = \
-       $(global_cxxflags) \
-       $(libWebCore_la_CFLAGS)
-
-libWebCore_la_CFLAGS = \
-       -fno-strict-aliasing \
-       $(global_cflags) \
-       $(GLIB_CFLAGS) \
-       $(UNICODE_CFLAGS) \
-       $(LIBXML_CFLAGS) \
-       $(CAIRO_CFLAGS) \
-       $(PANGO_CFLAGS) \
-       $(GTK_CFLAGS) \
-       $(XT_CFLAGS) \
-       $(LIBSOUP_CFLAGS) \
-       $(FREETYPE_CFLAGS) \
-       $(SQLITE3_CFLAGS) \
-       $(GSTREAMER_CFLAGS) \
-       $(LIBXSLT_CFLAGS) \
-       $(COVERAGE_CFLAGS) \
-       $(HILDON_CFLAGS) \
-       $(GEOCLUE_CFLAGS)
-
-libWebCore_la_CPPFLAGS = \
-       $(global_cppflags) \
-       $(webcore_cppflags) \
-       $(javascriptcore_cppflags) \
-       $(webcoregtk_cppflags) \
-       $(HILDON_CPPFLAGS)
-
-libWebCore_la_LIBADD = \
-       libJavaScriptCore.la \
-       libWebCoreJS.la \
-       $(webcore_libadd) \
-       $(GLIB_LIBS) \
-       $(LIBXML_LIBS) \
-       $(CAIRO_LIBS) \
-       $(PANGO_LIBS) \
-       $(GTK_LIBS) \
-       $(XT_LIBS) \
-       $(LIBSOUP_LIBS) \
-       $(FREETYPE_LIBS) \
-       $(UNICODE_LIBS) \
-       $(SQLITE3_LIBS) \
-       $(GSTREAMER_LIBS) \
-       $(LIBXSLT_LIBS) \
-       $(HILDON_LIBS) \
-       $(JPEG_LIBS) \
-       $(PNG_LIBS) \
-       $(GEOCLUE_LIBS) \
-       -lpthread
-
 # WebKit
-webkitgtk_h_api :=
-webkitgtk_sources :=
-webkitgtk_cppflags :=
-webkitgtk_built_sources :=
-webkitgtk_built_nosources :=
-webkitgtk_cleanfiles :=
+nodist_EXTRA_libwebkit_1_0_la_SOURCES = \
+       $(webcore_built_nosources)
 
 nodist_libwebkit_1_0_la_SOURCES = \
+       $(webcore_built_sources) \
        $(webkitgtk_built_sources)
 
 libwebkit_1_0_ladir = $(prefix)/include/webkit-1.0/webkit
@@ -231,28 +212,52 @@ libwebkit_1_0_la_HEADERS = \
        WebKit/gtk/webkit/webkitenumtypes.h
 
 libwebkit_1_0_la_SOURCES = \
+       $(webcore_sources) \
+       $(webcoregtk_sources) \
        $(webkitgtk_sources)
 
 libwebkit_1_0_la_CXXFLAGS = \
-       $(libWebCore_la_CXXFLAGS)
+       $(global_cxxflags) \
+       $(corekit_cflags)
 
 libwebkit_1_0_la_CFLAGS = \
-       $(libWebCore_la_CFLAGS) \
-       $(GNOMEKEYRING_CFLAGS)
+       $(global_cflags) \
+       $(corekit_cflags)
 
 libwebkit_1_0_la_CPPFLAGS = \
-       $(libWebCore_la_CPPFLAGS) \
-       $(webkitgtk_cppflags)
+       $(corekit_cppflags) \
+       $(webkitgtk_cppflags) \
+       $(HILDON_CPPFLAGS)
 
 libwebkit_1_0_la_LDFLAGS = \
-       $(COVERAGE_LDFLAGS) \
        -version-info @LIBWEBKITGTK_VERSION@ \
        $(version_script) \
        $(no_undefined)
 
 libwebkit_1_0_la_LIBADD = \
-       libWebCore.la \
-       $(GNOMEKEYRING_LIBS)
+       -lpthread \
+       libJavaScriptCore.la \
+       libWebCoreJS.la \
+       $(webcore_ldflags) \
+       $(CAIRO_LIBS) \
+       $(COVERAGE_LDFLAGS) \
+       $(ENCHANT_LIBS) \
+       $(FREETYPE_LIBS) \
+       $(GAIL_LIBS) \
+       $(GEOCLUE_LIBS) \
+       $(GLIB_LIBS) \
+       $(GSTREAMER_LIBS) \
+       $(GTK_LIBS) \
+       $(HILDON_LIBS) \
+       $(JPEG_LIBS) \
+       $(LIBSOUP_LIBS) \
+       $(LIBXML_LIBS) \
+       $(LIBXSLT_LIBS) \
+       $(PANGO_LIBS) \
+       $(PNG_LIBS) \
+       $(SQLITE3_LIBS) \
+       $(UNICODE_LIBS) \
+       $(XT_LIBS)
 
 #
 # Extra checks and flags
@@ -261,17 +266,25 @@ global_cppflags += \
        -DBUILDING_GTK__=1 \
        -DWTF_CHANGES
 
-if !ENABLE_FAST_MALLOC
+if USE_ICU_UNICODE
 global_cppflags += \
-       -DUSE_SYSTEM_MALLOC
+       -DWTF_USE_ICU_UNICODE=1
 endif
 
-if TARGET_X11
-global_cppflags += -DXP_UNIX
+if USE_GLIB_UNICODE
+global_cppflags += \
+       -DWTF_USE_GLIB_UNICODE=1
+endif
+
+if !ENABLE_FAST_MALLOC
+global_cppflags += \
+       -DUSE_SYSTEM_MALLOC
 endif
 
 if !ENABLE_DEBUG
 global_cppflags += -DNDEBUG
+global_cflags += $(SYMBOL_VISIBILITY)
+
 else
 webcoregtk_cppflags += \
        -DG_DISABLE_DEPRECATED \
@@ -285,40 +298,36 @@ webcoregtk_cppflags += \
 #      -DGTK_MULTIHEAD_SAFE
 endif
 
-if !ENABLE_DATABASE
-global_cppflags += -DENABLE_DATABASE=0
-endif
-
-if !ENABLE_ICONDATABASE
-global_cppflags += -DENABLE_ICONDATABASE=0
-endif
-
 if ENABLE_COVERAGE
 global_cppflags += \
        -DGCC_GENERATE_TEST_COVERAGE_FILES \
        -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
 endif
 
-if ENABLE_VIDEO
-webcore_libadd += -lgstinterfaces-0.10 -lgstvideo-0.10
-endif
-
 webkitgtk_h_api += \
-       WebKit/gtk/webkit/webkit.h \
-       WebKit/gtk/webkit/webkitdefines.h \
-       WebKit/gtk/webkit/webkitdownload.h \
-       WebKit/gtk/webkit/webkitnetworkrequest.h \
-       WebKit/gtk/webkit/webkitsoupauthdialog.h \
-       WebKit/gtk/webkit/webkitversion.h \
-       WebKit/gtk/webkit/webkitwebbackforwardlist.h \
-       WebKit/gtk/webkit/webkitwebframe.h \
-       WebKit/gtk/webkit/webkitwebhistoryitem.h \
-       WebKit/gtk/webkit/webkitwebinspector.h \
-       WebKit/gtk/webkit/webkitwebnavigationaction.h \
-       WebKit/gtk/webkit/webkitwebpolicydecision.h \
-       WebKit/gtk/webkit/webkitwebsettings.h \
-       WebKit/gtk/webkit/webkitwebwindowfeatures.h \
-       WebKit/gtk/webkit/webkitwebview.h
+       $(srcdir)/WebKit/gtk/webkit/webkit.h \
+       $(srcdir)/WebKit/gtk/webkit/webkitdefines.h \
+       $(srcdir)/WebKit/gtk/webkit/webkitdownload.h \
+       $(srcdir)/WebKit/gtk/webkit/webkiterror.h \
+       $(srcdir)/WebKit/gtk/webkit/webkithittestresult.h \
+       $(srcdir)/WebKit/gtk/webkit/webkitnetworkrequest.h \
+       $(srcdir)/WebKit/gtk/webkit/webkitnetworkresponse.h \
+       $(srcdir)/WebKit/gtk/webkit/webkitsoupauthdialog.h \
+       $(srcdir)/WebKit/gtk/webkit/webkitwebbackforwardlist.h \
+       $(srcdir)/WebKit/gtk/webkit/webkitwebdatasource.h \
+       $(srcdir)/WebKit/gtk/webkit/webkitwebframe.h \
+       $(srcdir)/WebKit/gtk/webkit/webkitwebhistoryitem.h \
+       $(srcdir)/WebKit/gtk/webkit/webkitwebinspector.h \
+       $(srcdir)/WebKit/gtk/webkit/webkitwebnavigationaction.h \
+       $(srcdir)/WebKit/gtk/webkit/webkitwebpolicydecision.h \
+       $(srcdir)/WebKit/gtk/webkit/webkitgeolocationpolicydecision.h \
+       $(srcdir)/WebKit/gtk/webkit/webkitwebresource.h \
+       $(srcdir)/WebKit/gtk/webkit/webkitwebsettings.h \
+       $(srcdir)/WebKit/gtk/webkit/webkitwebwindowfeatures.h \
+       $(srcdir)/WebKit/gtk/webkit/webkitwebview.h \
+       $(srcdir)/WebKit/gtk/webkit/webkitwebdatabase.h \
+       $(srcdir)/WebKit/gtk/webkit/webkitsecurityorigin.h \
+       $(top_builddir)/WebKit/gtk/webkit/webkitversion.h
 
 webkitgtk_built_sources += \
        DerivedSources/webkitenumtypes.cpp \
@@ -331,6 +340,8 @@ webkitgtk_sources += \
        WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
        WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
        WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
+       WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp \
+       WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.h \
        WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
        WebKit/gtk/WebCoreSupport/DragClientGtk.h \
        WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
@@ -341,42 +352,98 @@ webkitgtk_sources += \
        WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
        WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp \
        WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h \
+       WebKit/gtk/webkit/webkitapplicationcache.cpp \
+       WebKit/gtk/webkit/webkitdownload.cpp \
+       WebKit/gtk/webkit/webkiterror.cpp \
+       WebKit/gtk/webkit/webkithittestresult.cpp \
        WebKit/gtk/webkit/webkitnetworkrequest.cpp \
+       WebKit/gtk/webkit/webkitnetworkresponse.cpp \
        WebKit/gtk/webkit/webkitprivate.cpp \
        WebKit/gtk/webkit/webkitprivate.h \
        WebKit/gtk/webkit/webkitsoupauthdialog.c \
        WebKit/gtk/webkit/webkitversion.cpp \
        WebKit/gtk/webkit/webkitwebbackforwardlist.cpp \
+       WebKit/gtk/webkit/webkitwebdatasource.cpp \
        WebKit/gtk/webkit/webkitwebframe.cpp \
        WebKit/gtk/webkit/webkitwebhistoryitem.cpp \
        WebKit/gtk/webkit/webkitwebinspector.cpp \
        WebKit/gtk/webkit/webkitwebnavigationaction.cpp \
        WebKit/gtk/webkit/webkitwebpolicydecision.cpp \
+       WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp \
+       WebKit/gtk/webkit/webkitwebresource.cpp \
+       WebKit/gtk/webkit/webkitwebdatabase.cpp \
+       WebKit/gtk/webkit/webkitsecurityorigin.cpp \
        WebKit/gtk/webkit/webkitwebsettings.cpp \
-       WebKit/gtk/webkit/webkitdownload.cpp \
        WebKit/gtk/webkit/webkitwebview.cpp \
-       WebKit/gtk/webkit/webkitwebwindowfeatures.cpp
+       WebKit/gtk/webkit/webkitwebwindowfeatures.cpp \
+       WebKit/gtk/webkit/webkitworkers.cpp
 
 webkitgtk_cppflags += \
        -DBUILDING_WEBKIT \
+       -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
+       -DDATA_DIR=\"${datadir}\" \
        -I$(srcdir)/WebKit/gtk \
        -I$(srcdir)/WebKit/gtk/WebCoreSupport \
        -I$(srcdir)/WebKit/gtk/webkit \
        -I$(top_builddir)/WebKit/gtk/webkit
 
 webkitgtk_cleanfiles += \
+       $(top_builddir)/stamp-webkitmarshal.cpp \
+       $(top_builddir)/stamp-webkitmarshal.h \
+       $(top_builddir)/stamp-webkitenumtypes.cpp \
+       $(top_builddir)/stamp-webkitenumtypes.h \
        $(top_builddir)/Programs/GtkLauncher \
+       $(top_builddir)/WebKit/gtk/docs/version.xml \
+       $(top_builddir)/WebKit/gtk/docs/GNUmakefile \
        $(top_builddir)/WebKit/gtk/webkit-1.0.pc \
-       $(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h
+       $(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h \
+       $(top_builddir)/WebKit/gtk/webkit/webkitversion.h
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = WebKit/gtk/webkit-1.0.pc
 
-stamp_files := \
-       stamp-webkitmarshal.cpp \
-       stamp-webkitmarshal.h \
-       stamp-webkitenumtypes.cpp \
-       stamp-webkitenumtypes.h
+if ENABLE_INTROSPECTION
+JSCORE_GIRSOURCES += JSCore-1.0.gir
+WEBKIT_GIRSOURCES += WebKit-1.0.gir
+
+# JSCore-1.0.gir is handwritten - this is a hack to make the typelib
+# generation work during make dist
+JSCore-1.0.gir: $(srcdir)/WebKit/gtk/JSCore-1.0.gir
+       cp $(srcdir)/WebKit/gtk/JSCore-1.0.gir $(builddir)/
+
+$(WEBKIT_GIRSOURCES): $(JSCORE_GIRSOURCES) $(G_IR_SCANNER) libwebkit-1.0.la
+       $(AM_V_GEN)$(G_IR_SCANNER) -v --namespace WebKit --nsversion=1.0 \
+            --include=GObject-2.0 \
+            --include=Gtk-2.0 \
+            --include=JSCore-1.0 \
+            --include=Soup-2.4 \
+            --library=webkit-1.0 \
+            --libtool="$(LIBTOOL)" \
+            --pkg gobject-2.0 \
+            --pkg gtk+-2.0 \
+            --pkg libsoup-2.4 \
+            --output $@ \
+            --add-include-path $(top_srcdir)/WebKit/gtk \
+            -I$(top_srcdir)/WebKit/gtk \
+            -I$(top_builddir)/WebKit/gtk \
+            -I$(top_srcdir)/JavaScriptCore/ForwardingHeaders \
+            -I$(top_srcdir) \
+            $(webkitgtk_h_api)
+
+girdir = $(GIRDIR)
+gir_DATA = $(WEBKIT_GIRSOURCES) $(JSCORE_GIRSOURCES)
+
+typelibsdir += $(GIRTYPELIBDIR)
+typelibs_DATA += $(JSCORE_GIRSOURCES:.gir=.typelib) $(WEBKIT_GIRSOURCES:.gir=.typelib)
+
+%.typelib: %.gir $(G_IR_COMPILER)
+       $(AM_V_GEN)$(G_IR_COMPILER) --includedir $(top_srcdir)/WebKit/gtk $< -o $@
+
+CLEANFILES += $(JSCORE_GIRSOURCES) $(WEBKIT_GIRSOURCES) $(typelibs_DATA)
+
+endif
+
+EXTRA_DIST += WebKit/gtk/JSCore-1.0.gir
 
 WEBKIT_MARSHAL = $(GENSOURCES)/webkitmarshal
 WEBKIT_MARSHAL_LIST = $(top_srcdir)/WebKit/gtk/webkitmarshal.list
@@ -388,19 +455,18 @@ $(WEBKIT_MARSHAL).h: stamp-webkitmarshal.h
        @true
 
 stamp-webkitmarshal.cpp: $(WEBKIT_MARSHAL_LIST)
-       echo "extern \"C\" {" > $(WEBKIT_MARSHAL).cpp && \
+       $(AM_V_GEN) echo "extern \"C\" {" > $(WEBKIT_MARSHAL).cpp && \
        $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(WEBKIT_MARSHAL).cpp && echo '}' >> $(WEBKIT_MARSHAL).cpp && \
        echo timestamp > $(@F)
 
 stamp-webkitmarshal.h: $(WEBKIT_MARSHAL_LIST)
-       $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(WEBKIT_MARSHAL).h && \
+       $(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(WEBKIT_MARSHAL).h && \
        echo timestamp > $(@F)
 
 WebKit/gtk/webkit/webkitenumtypes.h: stamp-webkitenumtypes.h
        @true
 stamp-webkitenumtypes.h: $(webkitgtk_h_api) GNUmakefile
-       (cd $(srcdir) \
-       && glib-mkenums \
+       $(AM_V_GEN)glib-mkenums \
                        --fhead "#ifndef WEBKIT_ENUM_TYPES_H\n" \
                        --fhead "#define WEBKIT_ENUM_TYPES_H\n\n" \
                        --fhead "#include <glib-object.h>\n\n" \
@@ -408,21 +474,19 @@ stamp-webkitenumtypes.h: $(webkitgtk_h_api) GNUmakefile
                        --fhead "G_BEGIN_DECLS\n\n" \
                        --ftail "G_END_DECLS\n\n" \
                        --ftail "#endif\n" \
-                       --fprod "#include <@filename@>\n\n" \
+                       --fprod "#include <webkit/@basename@>\n\n" \
                        --eprod "#define WEBKIT_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n\n" \
                        --eprod "WEBKIT_API GType\n@enum_name@_get_type(void);\n\n" \
                $(webkitgtk_h_api) | \
-               sed 's,WebKit/gtk/,,' | \
                sed 's,web_kit,webkit,' | \
                sed 's,WEBKIT_TYPE_KIT,WEBKIT_TYPE,' \
-               > xgen-gth \
+               > xgen-gth \
        && (cmp -s xgen-gth WebKit/gtk/webkit/webkitenumtypes.h || cp xgen-gth WebKit/gtk/webkit/webkitenumtypes.h) \
        && rm -f xgen-gth \
        && echo timestamp > $(@F)
 
 DerivedSources/webkitenumtypes.cpp: $(webkitgtk_h_api) GNUmakefile
-       (cd $(srcdir) \
-       && glib-mkenums \
+       $(AM_V_GEN)glib-mkenums \
                        --fhead "#include <config.h>\n" \
                        --fhead "#include <glib-object.h>\n" \
                        --fhead "#include \"$(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h\"\n\n" \
@@ -439,38 +503,48 @@ DerivedSources/webkitenumtypes.cpp: $(webkitgtk_h_api) GNUmakefile
                        --ftail "}\n" \
                $(webkitgtk_h_api) | \
                sed 's,web_kit,webkit,' \
-               > xgen-gtc \
+               > xgen-gtc \
        && cp xgen-gtc $@ \
        && rm -f xgen-gtc
 
-# END WEBKIT GTK+
-#
 # Files that will be distributed
-EXTRA_DIST = \
+EXTRA_DIST += \
+       $(srcdir)/gtk-doc.make \
        WebKit/LICENSE \
        $(javascriptcore_dist) \
        $(webcore_dist) \
        $(srcdir)/autotools/symbols.filter \
        $(srcdir)/WebKit/gtk/ChangeLog \
        $(srcdir)/WebKit/gtk/NEWS \
-       $(srcdir)/WebKit/gtk/webkitmarshal.list
+       $(srcdir)/WebKit/gtk/webkitmarshal.list \
+       $(srcdir)/WebKit/gtk/docs/GNUmakefile.* \
+       $(srcdir)/WebKit/gtk/docs/webkitenvironment.xml \
+       $(srcdir)/WebKit/gtk/docs/webkitgtk-docs.sgml \
+       $(srcdir)/WebKit/gtk/docs/webkitgtk-sections.txt \
+       $(srcdir)/WebKit/gtk/docs/version.xml.in \
+       $(srcdir)/WebKit/gtk/po/* \
+       $(srcdir)/WebKit/gtk/resources/* \
+       $(srcdir)/WebKit/gtk/tests/resources/* \
+       $(srcdir)/WebKit/gtk/tests/test_utils.h
+
+# extra resource files
+resourcesdir = ${datadir}/webkit-1.0/resources
+dist_resources_DATA = \
+       $(shell ls $(srcdir)/WebKit/gtk/resources/*.html)
 
-# Files that will be cleaned
-MAINTAINERCLEANFILES := $(stamp_files) $(BUILT_SOURCES) doltcompile doltlibtool
-DISTCLEANFILES := $(stamp_files) $(BUILT_SOURCES) doltcompile doltlibtool
-CLEANFILES := $(stamp_files) $(BUILT_SOURCES)
+# END WEBKIT GTK+
 
 # Include module makefiles
 include JavaScriptCore/GNUmakefile.am
 include WebCore/GNUmakefile.am
 include WebKitTools/GNUmakefile.am
+include WebKit/gtk/po/GNUmakefile.am
 
 # Build unit tests
 noinst_PROGRAMS += $(TEST_PROGS)
 
 webkit_tests_cflags = \
        -fno-strict-aliasing \
-       -O2 \
        -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
        -I$(srcdir)/WebKit/gtk \
        -I$(top_builddir)/WebKit/gtk \
@@ -485,26 +559,113 @@ webkit_tests_ldadd = \
        $(GLIB_LIBS) \
        $(LIBSOUP_LIBS)
 
-TEST_PROGS += Programs/unittests/testwebframe \
+webkit_tests_ldflags = \
+       -no-install \
+       -no-fast-install
+
+TEST_PROGS += Programs/unittests/testhttpbackend \
+       Programs/unittests/testloading \
+       Programs/unittests/testmimehandling \
+       Programs/unittests/testnetworkrequest \
+       Programs/unittests/testnetworkresponse \
+       Programs/unittests/testwebframe \
        Programs/unittests/testwebbackforwardlist \
-       Programs/unittests/testwebhistoryitem
+       Programs/unittests/testwebhistoryitem \
+       Programs/unittests/testwindow \
+       Programs/unittests/testdownload \
+       Programs/unittests/testatk \
+       Programs/unittests/testhittestresult \
+       Programs/unittests/testwebsettings \
+       Programs/unittests/testwebresource \
+       Programs/unittests/testwebdatasource \
+       Programs/unittests/testwebview \
+       Programs/unittests/testkeyevents
 
 # Add additional tests here
+Programs_unittests_testhttpbackend_SOURCES = WebKit/gtk/tests/testhttpbackend.c
+Programs_unittests_testhttpbackend_CFLAGS = $(webkit_tests_cflags)
+Programs_unittests_testhttpbackend_LDADD = $(webkit_tests_ldadd)
+Programs_unittests_testhttpbackend_LDFLAGS = $(webkit_tests_ldflags)
+
+Programs_unittests_testloading_SOURCES = WebKit/gtk/tests/testloading.c
+Programs_unittests_testloading_CFLAGS = $(webkit_tests_cflags)
+Programs_unittests_testloading_LDADD = $(webkit_tests_ldadd)
+Programs_unittests_testloading_LDFLAGS = $(webkit_tests_ldflags)
+
+Programs_unittests_testmimehandling_SOURCES = WebKit/gtk/tests/testmimehandling.c WebKit/gtk/tests/test_utils.c
+Programs_unittests_testmimehandling_CFLAGS = $(webkit_tests_cflags)
+Programs_unittests_testmimehandling_LDADD = $(webkit_tests_ldadd)
+Programs_unittests_testmimehandling_LDFLAGS = $(webkit_tests_ldflags)
+
+Programs_unittests_testnetworkrequest_SOURCES = WebKit/gtk/tests/testnetworkrequest.c
+Programs_unittests_testnetworkrequest_CFLAGS = $(webkit_tests_cflags)
+Programs_unittests_testnetworkrequest_LDADD = $(webkit_tests_ldadd)
+Programs_unittests_testnetworkrequest_LDFLAGS = $(webkit_tests_ldflags)
+
+Programs_unittests_testnetworkresponse_SOURCES = WebKit/gtk/tests/testnetworkresponse.c
+Programs_unittests_testnetworkresponse_CFLAGS = $(webkit_tests_cflags)
+Programs_unittests_testnetworkresponse_LDADD = $(webkit_tests_ldadd)
+Programs_unittests_testnetworkresponse_LDFLAGS = $(webkit_tests_ldflags)
+
 Programs_unittests_testwebframe_SOURCES = WebKit/gtk/tests/testwebframe.c
 Programs_unittests_testwebframe_CFLAGS = $(webkit_tests_cflags)
 Programs_unittests_testwebframe_LDADD = $(webkit_tests_ldadd)
+Programs_unittests_testwebframe_LDFLAGS = $(webkit_tests_ldflags)
 
 Programs_unittests_testwebbackforwardlist_SOURCES = WebKit/gtk/tests/testwebbackforwardlist.c
 Programs_unittests_testwebbackforwardlist_CFLAGS = $(webkit_tests_cflags)
 Programs_unittests_testwebbackforwardlist_LDADD = $(webkit_tests_ldadd)
+Programs_unittests_testwebbackforwardlist_LDFLAGS = $(webkit_tests_ldflags)
 
 Programs_unittests_testwebhistoryitem_SOURCES = WebKit/gtk/tests/testwebhistoryitem.c
 Programs_unittests_testwebhistoryitem_CFLAGS = $(webkit_tests_cflags)
 Programs_unittests_testwebhistoryitem_LDADD = $(webkit_tests_ldadd)
-
+Programs_unittests_testwebhistoryitem_LDFLAGS = $(webkit_tests_ldflags)
+
+Programs_unittests_testwindow_SOURCES = WebKit/gtk/tests/testwindow.c
+Programs_unittests_testwindow_CFLAGS = $(webkit_tests_cflags)
+Programs_unittests_testwindow_LDADD = $(webkit_tests_ldadd)
+Programs_unittests_testwindow_LDFLAGS = $(webkit_tests_ldflags)
+
+Programs_unittests_testdownload_SOURCES = WebKit/gtk/tests/testdownload.c
+Programs_unittests_testdownload_CFLAGS = $(webkit_tests_cflags)
+Programs_unittests_testdownload_LDADD = $(webkit_tests_ldadd)
+Programs_unittests_testdownload_LDFLAGS = $(webkit_tests_ldflags)
+
+Programs_unittests_testatk_SOURCES = WebKit/gtk/tests/testatk.c
+Programs_unittests_testatk_CFLAGS = $(webkit_tests_cflags)
+Programs_unittests_testatk_LDADD = $(webkit_tests_ldadd)
+Programs_unittests_testatk_LDFLAGS = $(webkit_tests_ldflags)
+
+Programs_unittests_testwebsettings_SOURCES = WebKit/gtk/tests/testwebsettings.c
+Programs_unittests_testwebsettings_CFLAGS = $(webkit_tests_cflags)
+Programs_unittests_testwebsettings_LDADD = $(webkit_tests_ldadd)
+Programs_unittests_testwebsettings_LDFLAGS = $(webkit_tests_ldflags)
+
+Programs_unittests_testwebresource_SOURCES = WebKit/gtk/tests/testwebresource.c
+Programs_unittests_testwebresource_CFLAGS = $(webkit_tests_cflags)
+Programs_unittests_testwebresource_LDADD = $(webkit_tests_ldadd)
+
+Programs_unittests_testwebdatasource_SOURCES = WebKit/gtk/tests/testwebdatasource.c
+Programs_unittests_testwebdatasource_CFLAGS = $(webkit_tests_cflags)
+Programs_unittests_testwebdatasource_LDADD = $(webkit_tests_ldadd)
+
+Programs_unittests_testwebview_SOURCES = WebKit/gtk/tests/testwebview.c WebKit/gtk/tests/test_utils.c
+Programs_unittests_testwebview_CFLAGS = $(webkit_tests_cflags)
+Programs_unittests_testwebview_LDADD = $(webkit_tests_ldadd)
+Programs_unittests_testwebview_LDFLAGS = $(webkit_tests_ldflags)
+
+Programs_unittests_testhittestresult_SOURCES = WebKit/gtk/tests/testhittestresult.c
+Programs_unittests_testhittestresult_CFLAGS = $(webkit_tests_cflags)
+Programs_unittests_testhittestresult_LDADD = $(webkit_tests_ldadd)
+
+Programs_unittests_testkeyevents_SOURCES = WebKit/gtk/tests/testkeyevents.c
+Programs_unittests_testkeyevents_CFLAGS = $(webkit_tests_cflags)
+Programs_unittests_testkeyevents_LDADD = $(webkit_tests_ldadd)
+Programs_unittests_testkeyevents_LDFLAGS = $(webkit_tests_ldflags)
 
 # Autogenerated sources
-BUILT_SOURCES := \
+BUILT_SOURCES += \
        $(javascriptcore_built_sources) \
        $(javascriptcore_built_nosources) \
        $(webcore_built_sources) \
@@ -513,10 +674,20 @@ BUILT_SOURCES := \
        $(webkitgtk_built_nosources)
 
 # Project-wide clean rules
+# Files that will be cleaned
 CLEANFILES += \
+       $(BUILT_SOURCES) \
        $(webkitgtk_cleanfiles)
 
+DISTCLEANFILES += \
+       $(CLEANFILES) \
+       $(builddir)/doltcompile \
+       $(builddir)/doltlibtool
+
 MAINTAINERCLEANFILES += \
+       $(CLEANFILES) \
+       $(builddir)/doltcompile \
+       $(builddir)/doltlibtool \
        $(srcdir)/aconfig.h.in \
        $(srcdir)/autotools/config.* \
        $(srcdir)/autotools/compile \
@@ -531,8 +702,8 @@ MAINTAINERCLEANFILES += \
 
 # Older automake versions (1.7) place Plo files in a different place so we need
 # to create the output directory manually.
-all-local:
-       mkdir -p $(top_builddir)/$(DEPDIR)/DerivedSources
+all-local: stamp-po
+       $(mkdir_p) $(top_builddir)/$(DEPDIR)/DerivedSources
 
 # remove built sources and program directories
 clean-local:
@@ -542,3 +713,29 @@ maintainer-clean-local: distclean-local
 
 distclean-local:
        -rm -rf $(GENSOURCES) $(GENPROGRAMS)
+
+install-data-local: po-install-data-local
+
+installdirs-data-local: po-installdirs-data-local
+
+uninstall-local: po-uninstall-local
+
+# Run all tests in cwd
+# FIXME: we should run this under xvfb
+test: $(TEST_PROGS)
+       $(GTESTER) --verbose $(TEST_PROGS);
+
+# test-report: run tests in cwd and generate report
+# full-report: run tests in cwd with -m perf and -m slow and generate report
+# perf-report: run tests in cwd with -m perf and generate report
+test-report full-report perf-report: $(TEST_PROGS)
+       @ case $@ in \
+         test-report) test_options="-k";; \
+         full-report) test_options="-k -m=perf";; \
+         perf-report) test_options="-k -m=perf -m=slow";; \
+         esac ; \
+         $(GTESTER) --verbose $$test_options -o test-report.xml $(TEST_PROGS); \
+         $(GTESTER_REPORT) test-report.xml > test-report.html ;
+
+.PHONY: test test-report perf-report full-report
+check-local: test