2010-08-26 Martin Robinson <mrobinson@igalia.com>
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Aug 2010 16:16:10 +0000 (16:16 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Aug 2010 16:16:10 +0000 (16:16 +0000)
        Reviewed by Xan Lopez.

        [GTK] The GNUmakefile.am files contain a myriad of confusing preprocessor and compiler flag definitions
        https://bugs.webkit.org/show_bug.cgi?id=44624

        Clean up GNUmakefile.am.

        * GNUmakefile.am: Make the comments describing the global_* variables more readable and
        correct. Move WebKit-specific include lines and definitions out of webkitgtk_cppflags,
        corekit_cppflags and webcoregtk_cppflags and straight to the appropriate CPPFLAGS definition.
        Use global_cppflags for compiler flags that apply to both C++ and C code. Move some JavaScriptCore
        specific includes to the appropriate sub-directory GNUmakefile.am. Make sure the tests build
        with the global CPP flags as well.
2010-08-26  Martin Robinson  <mrobinson@igalia.com>

        Reviewed by Xan Lopez.

        [GTK] The GNUmakefile.am files contain a myriad of confusing preprocessor and compiler flag definitions
        https://bugs.webkit.org/show_bug.cgi?id=44624

        Clean up GNUmakefile.am.

        * GNUmakefile.am: Alphabetize the include order in javascriptcore_cppflags. Move
        a couple include lines from the top-level GNUmakefile.am.
2010-08-26  Martin Robinson  <mrobinson@igalia.com>

        Reviewed by Xan Lopez.

        [GTK] The GNUmakefile.am files contain a myriad of confusing preprocessor and compiler flag definitions
        https://bugs.webkit.org/show_bug.cgi?id=44624

        Clean up GNUmakefile.am.

        * GNUmakefile.am: Remove some WebKit includes from webcore_cppflags. These
        includes are added to the build line by the top-level GNUmakefile.am, since
        WebCore isn't build as an intermediate library.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@66108 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
GNUmakefile.am
JavaScriptCore/ChangeLog
JavaScriptCore/GNUmakefile.am
WebCore/ChangeLog
WebCore/GNUmakefile.am

index f13459a..d4c39ca 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2010-08-26  Martin Robinson  <mrobinson@igalia.com>
+
+        Reviewed by Xan Lopez.
+
+        [GTK] The GNUmakefile.am files contain a myriad of confusing preprocessor and compiler flag definitions
+        https://bugs.webkit.org/show_bug.cgi?id=44624
+
+        Clean up GNUmakefile.am.
+
+        * GNUmakefile.am: Make the comments describing the global_* variables more readable and
+        correct. Move WebKit-specific include lines and definitions out of webkitgtk_cppflags,
+        corekit_cppflags and webcoregtk_cppflags and straight to the appropriate CPPFLAGS definition.
+        Use global_cppflags for compiler flags that apply to both C++ and C code. Move some JavaScriptCore
+        specific includes to the appropriate sub-directory GNUmakefile.am. Make sure the tests build
+        with the global CPP flags as well.
+
 2010-08-25  Kwang Yul Seo  <skyul@company100.net>
 
         Reviewed by Kevin Ollivier.
index 1ca3cdf..8840852 100644 (file)
 # webcore_sources, gtk port API and WebCoreSupport parts to webkitgtk_sources,
 # etc... The only exceptions are the global variables. See Global Variables
 # below.
-#
-# Global Variables
-#
-# global_cppflags   = CPPFLAGS that apply to JSC, WebCore, and to any
-#                     specific port
-# global_cflags     = CFLAGS that apply to JSC, WebCore, and to
-#                     any specific port
-# global_cxxflags   = CXXFLAGS that apply to JSC, WebCore, and to any
-#                     specific port
+
+# Global Variables Reference
+# global_cppflags   = CPPFLAGS that apply to all C/C++ files that are built for any project.
+# global_cflags     = CFLAGS that apply to all C files that are built for any project.
+# global_cxxflags   = CXXFLAGS that apply to all C++ files that are bult for any project.
 
 srcdir = @srcdir@
 VPATH = @srcdir@
@@ -66,8 +62,8 @@ webcore_sources :=
 webcore_libadd :=
 webcore_built_sources :=
 webcore_built_nosources :=
-webcoregtk_cppflags :=
 webcoregtk_sources :=
+webcoregtk_cppflags :=
 webkitgtk_built_h_api :=
 webkitgtk_static_h_api :=
 webkitgtk_h_api :=
@@ -79,8 +75,6 @@ webkitgtk_built_nosources :=
 global_cppflags :=
 global_cflags :=
 global_cxxflags :=
-corekit_cflags :=
-corekit_cppflags :=
 JSCORE_GIRSOURCES :=
 WEBKIT_GIRSOURCES :=
 typelibsdir :=
@@ -91,49 +85,7 @@ CLEANFILES :=
 DISTCLEANFILES :=
 MAINTAINERCLEANFILES :=
 
-webcoregtk_cppflags += \
-       -I$(top_builddir)/DerivedSources/webkit \
-       -I$(srcdir)/WebCore/bindings \
-       -I$(srcdir)/WebCore/bindings/gobject
-
-# 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)
-
-# 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_cppflags += \
        -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
        -Wformat -Wformat-security -Wno-format-y2k -Wundef \
        -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
@@ -141,7 +93,6 @@ global_cflags += \
        -fno-exceptions
 
 global_cxxflags += \
-       $(global_cflags) \
        $(SYMBOL_VISIBILITY_INLINES) \
        -fno-rtti
 
@@ -164,15 +115,6 @@ lib_LTLIBRARIES += \
 noinst_LTLIBRARIES += \
        libJavaScriptCore.la
 
-# JavaScriptCore
-javascriptcore_cppflags += \
-       -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/JavaScriptCore
-
 nodist_EXTRA_libJavaScriptCore_la_SOURCES = \
        $(javascriptcore_built_nosources)
 
@@ -227,17 +169,53 @@ libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOUR
        $(webkitgtk_sources)
 
 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS = \
-       $(global_cxxflags) \
-       $(corekit_cflags)
+       $(global_cxxflags)
 
 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CFLAGS = \
-       $(global_cflags) \
-       $(corekit_cflags)
+       $(global_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.
 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS = \
-       $(corekit_cppflags) \
-       $(webkitgtk_cppflags) \
-       $(HILDON_CPPFLAGS)
+       -DBUILDING_WEBKIT \
+       -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
+       -DDATA_DIR=\"${datadir}\" \
+       -I$(top_builddir)/DerivedSources/webkit \
+       -I$(srcdir)/WebCore/bindings \
+       -I$(srcdir)/WebCore/bindings/gobject \
+       -I$(srcdir)/WebKit/gtk \
+       -I$(srcdir)/WebKit/gtk/WebCoreSupport \
+       -I$(srcdir)/WebKit/gtk/webkit \
+       -I$(top_builddir)/WebKit/gtk \
+       -I$(top_builddir)/WebKit/gtk/webkit \
+       -I$(GENSOURCES_WEBKIT) \
+       $(global_cppflags) \
+       $(webcore_cppflags) \
+       $(webcoregtk_cppflags) \
+       $(javascriptcore_cppflags) \
+       -fno-strict-aliasing \
+       $(HILDON_CPPFLAGS) \
+       $(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)
+
+# For the Gtk port we want to use XP_UNIX both in X11 and Mac
+if !TARGET_WIN32
+libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS += \
+       -DXP_UNIX
+endif
 
 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LDFLAGS = \
        -version-info @LIBWEBKITGTK_VERSION@ \
@@ -294,7 +272,7 @@ endif
 # GTK+ 2.x/3.x support
 # ----
 if GTK_API_VERSION_2
-global_cflags += \
+global_cppflags += \
        -DGTK_API_VERSION_2=1
 endif
 
@@ -302,13 +280,12 @@ if !ENABLE_DEBUG
 global_cppflags += -DNDEBUG
 global_cflags += $(SYMBOL_VISIBILITY)
 else
-webcoregtk_cppflags += \
+global_cppflags += \
        -DG_DISABLE_DEPRECATED \
        -DGDK_PIXBUF_DISABLE_DEPRECATED \
        -DGDK_DISABLE_DEPRECATED \
        -DGTK_DISABLE_DEPRECATED \
        -DPANGO_DISABLE_DEPRECATED
-
 # Might be useful in the future
 #      -DGDK_MULTIHEAD_SAFE \
 #      -DGTK_MULTIHEAD_SAFE
@@ -823,17 +800,6 @@ gdom_feature_defines := $(filter-out ENABLE-SVG%, $(FEATURE_DEFINES))
 DerivedSources/webkit/WebKitDOM%.cpp DerivedSources/webkit/WebKitDOM%.h DerivedSources/webkit/WebKitDOM%Private.h:: %.idl $(SCRIPTS_BINDINGS) $(WebCore)/bindings/scripts/CodeGeneratorGObject.pm
        $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl --include $(WebCore)/dom --include $(WebCore)/html --include $(WebCore)/css --include $(WebCore)/page --include $(WebCore)/xml --include $(WebCore)/svg --outputDir "$(GENSOURCES_WEBKIT)" --defines "LANGUAGE_GOBJECT=1 $(gdom_feature_defines)" --generator GObject $<
 
-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 \
-       -I$(top_builddir)/WebKit/gtk/webkit \
-       -I$(GENSOURCES_WEBKIT)
-
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = WebKit/gtk/@WEBKITGTK_PC_NAME@-@WEBKITGTK_API_VERSION@.pc
 
@@ -994,6 +960,7 @@ webkit_tests_cflags = \
        -I$(top_builddir)/DerivedSources \
        -I$(top_srcdir)/WebCore/bindings \
        -I$(top_srcdir)/WebCore/bindings/gobject \
+       $(global_cppflags) \
        $(global_cflags) \
        $(GLIB_CFLAGS) \
        $(GTK_CFLAGS) \
@@ -1001,7 +968,7 @@ webkit_tests_cflags = \
 
 webkit_tests_ldadd = \
        libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
-       $(GTK_LIBS)     \
+       $(GTK_LIBS) \
        $(GLIB_LIBS) \
        $(LIBSOUP_LIBS)
 
index da10895..a4b4042 100644 (file)
@@ -1,3 +1,15 @@
+2010-08-26  Martin Robinson  <mrobinson@igalia.com>
+
+        Reviewed by Xan Lopez.
+
+        [GTK] The GNUmakefile.am files contain a myriad of confusing preprocessor and compiler flag definitions
+        https://bugs.webkit.org/show_bug.cgi?id=44624
+
+        Clean up GNUmakefile.am.
+
+        * GNUmakefile.am: Alphabetize the include order in javascriptcore_cppflags. Move
+        a couple include lines from the top-level GNUmakefile.am.
+
 2010-08-25  Xan Lopez  <xlopez@igalia.com>
 
         Reviewed by Kent Tamura.
index ecd7ffe..bbdc8b1 100644 (file)
@@ -1,24 +1,28 @@
 javascriptcore_cppflags += \
        -I$(srcdir)/JavaScriptCore \
        -I$(srcdir)/JavaScriptCore/API \
-       -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
-       -I$(srcdir)/JavaScriptCore/interpreter \
+       -I$(srcdir)/JavaScriptCore/assembler \
        -I$(srcdir)/JavaScriptCore/bytecode \
        -I$(srcdir)/JavaScriptCore/bytecompiler \
        -I$(srcdir)/JavaScriptCore/debugger \
+       -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
+       -I$(srcdir)/JavaScriptCore/interpreter \
+       -I$(srcdir)/JavaScriptCore/jit \
        -I$(srcdir)/JavaScriptCore/jit \
+       -I$(srcdir)/JavaScriptCore/parser \
        -I$(srcdir)/JavaScriptCore/pcre \
        -I$(srcdir)/JavaScriptCore/profiler \
        -I$(srcdir)/JavaScriptCore/runtime \
-       -I$(srcdir)/JavaScriptCore/jit \
-       -I$(srcdir)/JavaScriptCore/assembler \
        -I$(srcdir)/JavaScriptCore/wtf \
+       -I$(srcdir)/JavaScriptCore/wtf \
+       -I$(srcdir)/JavaScriptCore/wtf/gobject \
+       -I$(srcdir)/JavaScriptCore/wtf/gtk \
        -I$(srcdir)/JavaScriptCore/wtf/text \
        -I$(srcdir)/JavaScriptCore/wtf/unicode \
        -I$(srcdir)/JavaScriptCore/yarr \
        -I$(top_builddir)/JavaScriptCore \
-       -I$(top_builddir)/JavaScriptCore/pcre \
        -I$(top_builddir)/JavaScriptCore/parser \
+       -I$(top_builddir)/JavaScriptCore/pcre \
        -I$(top_builddir)/JavaScriptCore/runtime
 
 javascriptcore_h_api += \
index 268cd7b..b703339 100644 (file)
@@ -1,3 +1,16 @@
+2010-08-26  Martin Robinson  <mrobinson@igalia.com>
+
+        Reviewed by Xan Lopez.
+
+        [GTK] The GNUmakefile.am files contain a myriad of confusing preprocessor and compiler flag definitions
+        https://bugs.webkit.org/show_bug.cgi?id=44624
+
+        Clean up GNUmakefile.am.
+
+        * GNUmakefile.am: Remove some WebKit includes from webcore_cppflags. These
+        includes are added to the build line by the top-level GNUmakefile.am, since
+        WebCore isn't build as an intermediate library.
+
 2010-08-26  Yury Semikhatsky  <yurys@chromium.org>
 
         Unreviewed. Revert r66103 since Qt tests are failing.
index dac604b..656697c 100644 (file)
@@ -5,9 +5,6 @@ WEBCORE_CSS_PROPERTY_NAMES := $(WebCore)/css/CSSPropertyNames.in
 WEBCORE_CSS_VALUE_KEYWORDS := $(WebCore)/css/CSSValueKeywords.in
 
 webcore_cppflags += \
-       -I$(srcdir)/WebKit/gtk \
-       -I$(srcdir)/WebKit/gtk/WebCoreSupport \
-       -I$(srcdir)/WebKit/gtk/webkit \
        -I$(srcdir)/WebCore \
        -I$(srcdir)/WebCore/accessibility \
        -I$(srcdir)/WebCore/bindings/generic \