diff options
author | Koen Kooi <koen@openembedded.org> | 2009-06-05 13:07:17 +0200 |
---|---|---|
committer | Koen Kooi <koen@Powerbook-3.local> | 2009-06-05 17:48:14 +0200 |
commit | 33fdd6399af61722a5283a329e0a6b6e0a4b06a0 (patch) | |
tree | f39ead9b82d8a70157f099e25b16fcbc57413d5a /recipes/webkit/webkit-gtk/GNUmakefile.am | |
parent | 9e51e58bd4afba5696959e9ffb0822b81bef7241 (diff) |
webkit: bump SRCREV
Diffstat (limited to 'recipes/webkit/webkit-gtk/GNUmakefile.am')
-rw-r--r-- | recipes/webkit/webkit-gtk/GNUmakefile.am | 298 |
1 files changed, 174 insertions, 124 deletions
diff --git a/recipes/webkit/webkit-gtk/GNUmakefile.am b/recipes/webkit/webkit-gtk/GNUmakefile.am index 957078fb12..c87ee49c14 100644 --- a/recipes/webkit/webkit-gtk/GNUmakefile.am +++ b/recipes/webkit/webkit-gtk/GNUmakefile.am @@ -36,47 +36,93 @@ 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 := - lib_LIBRARIES := - IDL_BINDINGS := - TEST_PROGS := - -# Gettext stuff POFILES := - MOFILES := - -# Global flags to CPP +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 := -global_cppflags += \ - -DWTF_USE_ICU_UNICODE=1 +# 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) \ + $(GEOCLUE_CFLAGS) \ + $(GLIB_CFLAGS) \ + $(GNOMEKEYRING_CFLAGS) \ + $(GSTREAMER_CFLAGS) \ + $(GTK_CFLAGS) \ + $(HILDON_CFLAGS) \ + $(LIBSOUP_CFLAGS) \ + $(LIBXML_CFLAGS) \ + $(LIBXSLT_CFLAGS) \ + $(SQLITE3_CFLAGS) \ + $(UNICODE_CFLAGS) \ + $(XT_CFLAGS) + +# 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) + +if TARGET_X11 +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 @@ -96,24 +142,13 @@ noinst_LTLIBRARIES = \ libJavaScriptCore.la \ libWebCore.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$(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) @@ -146,17 +181,7 @@ 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) @@ -169,65 +194,16 @@ libWebCore_la_SOURCES = \ libWebCore_la_CXXFLAGS = \ $(global_cxxflags) \ - $(libWebCore_la_CFLAGS) + $(corekit_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) \ - $(ENCHANT_CFLAGS) \ - $(GEOCLUE_CFLAGS) + $(corekit_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 + $(corekit_cppflags) # WebKit -webkitgtk_h_api := -webkitgtk_sources := -webkitgtk_cppflags := -webkitgtk_built_sources := -webkitgtk_built_nosources := -webkitgtk_cleanfiles := - nodist_libwebkit_1_0_la_SOURCES = \ $(webkitgtk_built_sources) @@ -240,46 +216,83 @@ libwebkit_1_0_la_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 = \ + -lpthread \ + libJavaScriptCore.la \ libWebCore.la \ + libWebCoreJS.la \ + $(webcore_ldflags) \ + $(CAIRO_LIBS) \ + $(COVERAGE_LDFLAGS) \ $(ENCHANT_LIBS) \ - $(GNOMEKEYRING_LIBS) + $(FREETYPE_LIBS) \ + $(GEOCLUE_LIBS) \ + $(GLIB_LIBS) \ + $(GNOMEKEYRING_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 global_cppflags += \ -DBUILDING_CAIRO__=1 \ -DBUILDING_GTK__=1 \ - -DWTF_CHANGES \ - -DPACKAGE_LOCALE_DIR=\"$(localedir)\" + -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 +# https://bugs.webkit.org/show_bug.cgi?id=15914 +# In patch 1/4 we are compiling a hybrid version of GLib WTF Unicode +# functionality mixed with ICU-based text codecs and TextBreakIterator. +# For the transition, introducing an interim HYBRID macro. +# This macro is required for compiling WTF with GLib Unicode backend, +# but at the same time keeping ICU dependency for codecs and break iterator. +# It will be removed with patch 3/4 of the above bug. +global_cppflags += \ + -DWTF_USE_GLIB_UNICODE=1 \ + -DWTF_USE_GLIB_ICU_UNICODE_HYBRID=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 \ @@ -293,24 +306,12 @@ 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 \ @@ -369,15 +370,25 @@ webkitgtk_sources += \ 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 +if USE_GNOMEKEYRING +webkitgtk_cppflags += \ + -DWTF_USE_GNOMEKEYRING=1 +endif + webkitgtk_cleanfiles += \ + $(top_builddir)/WebKit/gtk/docs/version.xml \ + $(top_builddir)/WebKit/gtk/docs/GNUmakefile \ $(top_builddir)/Programs/GtkLauncher \ $(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 @@ -479,9 +490,9 @@ dist_resources_DATA = \ # END WEBKIT GTK+ # Files that will be cleaned -MAINTAINERCLEANFILES := $(stamp_files) $(BUILT_SOURCES) doltcompile doltlibtool WebKit/gtk/docs/version.xml WebKit/gtk/docs/GNUmakefile -DISTCLEANFILES := $(stamp_files) $(BUILT_SOURCES) doltcompile doltlibtool WebKit/gtk/docs/version.xml WebKit/gtk/docs/GNUmakefile -CLEANFILES := $(stamp_files) $(BUILT_SOURCES) WebKit/gtk/docs/GNUmakefile +MAINTAINERCLEANFILES := $(stamp_files) $(BUILT_SOURCES) doltcompile doltlibtool +DISTCLEANFILES := $(stamp_files) $(BUILT_SOURCES) doltcompile doltlibtool +CLEANFILES := $(stamp_files) $(BUILT_SOURCES) # Include module makefiles include JavaScriptCore/GNUmakefile.am @@ -494,7 +505,6 @@ noinst_PROGRAMS += $(TEST_PROGS) webkit_tests_cflags = \ -fno-strict-aliasing \ - -O2 \ -I$(srcdir)/JavaScriptCore/ForwardingHeaders \ -I$(srcdir)/WebKit/gtk \ -I$(top_builddir)/WebKit/gtk \ @@ -509,27 +519,47 @@ 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/testwebframe \ Programs/unittests/testwebbackforwardlist \ Programs/unittests/testwebhistoryitem \ - Programs/unittests/testdownload + Programs/unittests/testdownload \ + Programs/unittests/testatk # 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_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_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) # Autogenerated sources BUILT_SOURCES := \ @@ -576,3 +606,23 @@ 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 |