Changeset 143604 in webkit


Ignore:
Timestamp:
Feb 21, 2013 8:19:47 AM (11 years ago)
Author:
Martin Robinson
Message:

[GTK] Move feature overriding to the configure phase
https://bugs.webkit.org/show_bug.cgi?id=110293

Reviewed by Gustavo Noronha Silva.

.:

Rework the feature overrides logic so all feature defines go into a
header rather than the command line. This has a few benefits. Most
notably, we can reuse the header in the gyp build. Another nice result
is that changes to the configuration automatically result in a full
rebuild and Debug and Release builds can have different configurations.

All feature define processing happens now during the configuration phase,
instead of when running autogen.sh. This means that we need to distribute
the feature processing script.

  • GNUmakefile.am: Read feature defines from WebKitFeatures.txt when kicking

off a build. Also include generate-feature-defines-files in the distribution.

  • Source/autotools/SetupAutoconfHeader.m4: Remove an extra ENABLE_3D_RENDERING

from the autoconf header, as it is already provided by the feature configuration.

  • Source/autotools/SetupWebKitFeatures.m4: Added.
  • Source/autotools/webkitfeature.m4: Removed. The functionality has been moved

to SetupWebKitFeatures.m4.

  • autogen.sh: Remove the call to override-feature-defines.
  • configure.ac: Now include SetupWebKitFeatures.

Source/WebCore:

  • GNUmakefile.am: No longer include GNUmakefile.features.am. We don't

have to process the result of this file or do any modification of
feature_defines_override, because this variable is gone.

Tools:

  • Scripts/webkitdirs.pm:

(runAutogenForAutotoolsProjectIfNecessary): Rename the feature file to
WebKitFeatureOverrides.txt to better match the other filenames used in
the new feature processing.

  • gtk/generate-feature-defines-files: Added. A script which takes as an argument

the default features, overrides them with the contents of WebKitFeatureOverrrides.txt
and writes WebKitFeatures.txt and WebKitFeatures.h.

  • gtk/override-feature-defines: Removed.
Location:
trunk
Files:
2 added
3 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r143505 r143604  
     12013-02-21  Martin Robinson  <mrobinson@igalia.com>
     2
     3        [GTK] Move feature overriding to the configure phase
     4        https://bugs.webkit.org/show_bug.cgi?id=110293
     5
     6        Reviewed by Gustavo Noronha Silva.
     7
     8        Rework the feature overrides logic so all feature defines go into a
     9        header rather than the command line. This has a few benefits. Most
     10        notably, we can reuse the header in the gyp build. Another nice result
     11        is that changes to the configuration automatically result in a full
     12        rebuild and Debug and Release builds can have different configurations.
     13
     14        All feature define processing happens now during the configuration phase,
     15        instead of when running autogen.sh. This means that we need to distribute
     16        the feature processing script.
     17
     18        * GNUmakefile.am: Read feature defines from WebKitFeatures.txt when kicking
     19        off a build. Also include generate-feature-defines-files in the distribution.
     20        * Source/autotools/SetupAutoconfHeader.m4: Remove an extra ENABLE_3D_RENDERING
     21        from the autoconf header, as it is already provided by the feature configuration.
     22        * Source/autotools/SetupWebKitFeatures.m4: Added.
     23        * Source/autotools/webkitfeature.m4: Removed. The functionality has been moved
     24        to SetupWebKitFeatures.m4.
     25        * autogen.sh: Remove the call to override-feature-defines.
     26        * configure.ac: Now include SetupWebKitFeatures.
     27
    1282013-02-20  Dirk Schulze  <krit@webkit.org>
    229
  • trunk/GNUmakefile.am

    r142179 r143604  
    6161MOFILES :=
    6262ALL_MOFILES :=
    63 feature_defines_defaults :=
    64 feature_defines_overrides :=
    65 feature_defines :=
    6663dom_binding_idls :=
    6764wtf_sources :=
     
    152149        -fno-rtti
    153150
     151# Read the feature defines file, that's created by generate-feature-defines-files
     152# during configuration (SetupWebKitFeatures.m4).
     153feature_defines := $(shell cat WebKitFeatures.txt)
     154
    154155# -no-undefined required for building DLLs on Windows
    155156# It breaks the build on other platforms, so we use it conditionally
     
    171172EXTRA_DIST += \
    172173        $(srcdir)/Source/autotools/symbols.filter \
     174        $(srcdir)/Tools/generate-feature-defines-files \
    173175        $(srcdir)/Source/WebKit/LICENSE
    174176
  • trunk/Source/WebCore/ChangeLog

    r143603 r143604  
     12013-02-21  Martin Robinson  <mrobinson@igalia.com>
     2
     3        [GTK] Move feature overriding to the configure phase
     4        https://bugs.webkit.org/show_bug.cgi?id=110293
     5
     6        Reviewed by Gustavo Noronha Silva.
     7
     8        * GNUmakefile.am: No longer include GNUmakefile.features.am. We don't
     9        have to process the result of this file or do any modification of
     10        feature_defines_override, because this variable is gone.
     11
    1122013-02-21  Andrey Adaikin  <aandrey@chromium.org>
    213
  • trunk/Source/WebCore/GNUmakefile.am

    r142179 r143604  
    1 include $(srcdir)/Source/WebCore/GNUmakefile.features.am
    21include $(srcdir)/Source/WebCore/GNUmakefile.list.am
    32
     
    138137endif # END TARGET_WIN32
    139138
    140 # ----
    141 # Gamepad support
    142 # ---
    143 if ENABLE_GAMEPAD
    144 feature_defines_overrides += ENABLE_GAMEPAD=1
    145 else
    146 feature_defines_overrides += ENABLE_GAMEPAD=0
    147 endif # END ENABLE_GAMEPAD
    148 
    149 # ----
    150 # Video Support
    151 # ----
    152 if ENABLE_VIDEO
    153 feature_defines_overrides += ENABLE_VIDEO=1
    154 else
    155 feature_defines_overrides += ENABLE_VIDEO=0 ENABLE_VIDEO_TRACK=0
    156 endif # END ENABLE_VIDEO
    157 
    158 # ----
    159 # Filters
    160 # ----
    161 if ENABLE_CSS_FILTERS
    162 feature_defines_overrides += ENABLE_CSS_FILTERS=1
    163 else
    164 feature_defines_overrides += ENABLE_CSS_FILTERS=0
    165 endif # END ENABLE_CSS_FILTERS
    166 
    167 # ----
    168 # Media Stream Support
    169 # ----
    170 if ENABLE_MEDIA_STREAM
    171 feature_defines_overrides += ENABLE_MEDIA_STREAM=1
    172 else
    173 feature_defines_overrides += ENABLE_MEDIA_STREAM=0
    174 endif # END ENABLE_MEDIA_STREAM
    175 
    176139# XPath grammar
    177140$(GENSOURCES_WEBCORE)/XPathGrammar.h: $(GENSOURCES_WEBCORE)/XPathGrammar.cpp
     
    179142        $(AM_V_GEN)
    180143        $(AM_V_at)perl $(WebCore)/css/makegrammar.pl --outputDir $(GENSOURCES_WEBCORE) --bison "$(BISON)" --symbolsPrefix xpathyy $<
    181 
    182 # ----
    183 # XSLT Support
    184 # ----
    185 if ENABLE_XSLT
    186 feature_defines_overrides += ENABLE_XSLT=1
    187 else
    188 feature_defines_overrides += ENABLE_XSLT=0
    189 endif # END ENABLE_XSLT
    190 
    191 # ----
    192 # Shaders
    193 # ----
    194 if ENABLE_CSS_SHADERS
    195 feature_defines_overrides += ENABLE_CSS_SHADERS=1
    196 else
    197 feature_defines_overrides += ENABLE_CSS_SHADERS=0
    198 endif # END ENABLE_CSS_SHADERS
    199 
    200 # ----
    201 # Geolocation
    202 # ----
    203 if ENABLE_GEOLOCATION
    204 feature_defines_overrides += ENABLE_GEOLOCATION=1
    205 else
    206 feature_defines_overrides += ENABLE_GEOLOCATION=0
    207 endif # END ENABLE_GEOLOCATION
    208144
    209145# MathML tag and attribute names, and element factory
     
    246182        $(UNICODE_CFLAGS)
    247183
    248 feature_defines_overrides += ENABLE_SVG=1
    249184WEBCORE_CSS_PROPERTY_NAMES += $(WebCore)/css/SVGCSSPropertyNames.in
    250185WEBCORE_CSS_VALUE_KEYWORDS += $(WebCore)/css/SVGCSSValueKeywords.in
    251 # SVG Features
    252 if ENABLE_SVG_FONTS
    253 feature_defines_overrides += ENABLE_SVG_FONTS=1
    254 else
    255 feature_defines_overrides += ENABLE_SVG_FONTS=0
    256 endif
    257 else
    258 feature_defines_overrides += ENABLE_SVG=0 ENABLE_SVG_FONTS=0
    259 endif # END ENABLE_SVG
     186
     187endif # END_ENABLE_SVG
    260188
    261189# SVG tag and attribute names (need to pass an extra flag if svg experimental features are enabled)
     
    271199        $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $< --attrs $(WebCore)/svg/xlinkattrs.in --outputDir "$(GENSOURCES_WEBCORE)"
    272200
    273 # ----
    274 # Web Audio Support
    275 # ----
    276 if ENABLE_WEB_AUDIO
    277 feature_defines_overrides += ENABLE_WEB_AUDIO=1
    278 else
    279 feature_defines_overrides += ENABLE_WEB_AUDIO=0
    280 endif
    281 
    282 # ---
    283 # 3D canvas (WebGL) support
    284 # ---
    285 if ENABLE_WEBGL
    286 feature_defines_overrides += ENABLE_WEBGL=1
    287 else
    288 feature_defines_overrides += ENABLE_WEBGL=0
    289 endif  # END ENABLE_WEBGL
    290 
    291 # ---
    292 # Accelerated compositing support
    293 # ---
    294 if USE_ACCELERATED_COMPOSITING
    295 feature_defines_overrides += ENABLE_3D_RENDERING=1
    296 else
    297 feature_defines_overrides += ENABLE_3D_RENDERING=0
    298 endif  # END USE_ACCELERATED_COMPOSITING
    299 
    300201if USE_TEXTURE_MAPPER_CAIRO
    301202webcore_cppflags += \
     
    313214        -I$(srcdir)/Source/WebCore/platform/graphics/clutter
    314215endif  # END USE_CLUTTER
    315 
    316 # ---
    317 # Spell check support
    318 # ---
    319 if ENABLE_SPELLCHECK
    320 feature_defines_overrides += ENABLE_SPELLCHECK=1
    321 else
    322 feature_defines_overrides += ENABLE_SPELLCHECK=0
    323 endif  # END ENABLE_SPELLCHECK
    324216
    325217if ENABLE_INDEXED_DATABASE
     
    329221        -I$(srcdir)/Source/ThirdParty/leveldb/include
    330222endif
    331 
    332 # Fill the feature_defines variable with all the defines, making it possible
    333 # to override the default define value (as set in feature_defines_defaults)
    334 # through adding the feature define with the desired value to either
    335 # feature_defines_unstable or feature_defines_overrides.
    336 feature_defines += $(strip $(foreach bare_define, \
    337         $(foreach define,$(feature_defines_defaults), \
    338                 $(foreach fvalue,0 1, \
    339                         $(if $(findstring =$(fvalue),$(define)),$(patsubst %=$(fvalue),%,$(define))) \
    340                 ) \
    341         ), \
    342         $(if $(findstring $(bare_define)=, $(feature_defines_overrides)), \
    343                 $(filter $(bare_define)=%,$(feature_defines_overrides)), \
    344                 $(filter $(bare_define)=%,$(feature_defines_defaults)) \
    345         ) \
    346 ))
    347 
    348 # Add the feature defines to webcore_cppflags in macro form.
    349 webcore_cppflags += $(foreach define,$(feature_defines),-D$(define))
    350 
    351223
    352224$(WEBCORE_CSS_PROPERTY_NAMES): $(srcdir)/configure.ac $(srcdir)/Source/WebCore/GNUmakefile.am
  • trunk/Source/autotools/SetupAutoconfHeader.m4

    r142818 r143604  
    8080if test "$enable_accelerated_compositing" = "yes"; then
    8181    AC_DEFINE([WTF_USE_ACCELERATED_COMPOSITING], [1], [ ])
    82     AC_DEFINE([ENABLE_3D_RENDERING], [1], [ ])
    8382
    8483    if test "$with_acceleration_backend" = "none"; then
    85         AC_DEFINE([DWTF_USE_TEXTURE_MAPPER], [1], [ ])
    86         AC_DEFINE([DWTF_USE_TEXTURE_MAPPER_CAIRO], [1], [ ])
     84        AC_DEFINE([WTF_USE_TEXTURE_MAPPER], [1], [ ])
     85        AC_DEFINE([WTF_USE_TEXTURE_MAPPER_CAIRO], [1], [ ])
    8786    fi
    8887
  • trunk/Tools/ChangeLog

    r143572 r143604  
     12013-02-21  Martin Robinson  <mrobinson@igalia.com>
     2
     3        [GTK] Move feature overriding to the configure phase
     4        https://bugs.webkit.org/show_bug.cgi?id=110293
     5
     6        Reviewed by Gustavo Noronha Silva.
     7
     8        * Scripts/webkitdirs.pm:
     9        (runAutogenForAutotoolsProjectIfNecessary): Rename the feature file to
     10        WebKitFeatureOverrides.txt to better match the other filenames used in
     11        the new feature processing.
     12        * gtk/generate-feature-defines-files: Added. A script which takes as an argument
     13        the default features, overrides them with the contents of WebKitFeatureOverrrides.txt
     14        and writes WebKitFeatures.txt and WebKitFeatures.h.
     15        * gtk/override-feature-defines: Removed.
     16
    1172013-02-21  Oswald Buddenhagen  <oswald.buddenhagen@digia.com>
    218
  • trunk/Tools/Scripts/webkitdirs.pm

    r142692 r143604  
    20052005
    20062006        # Run autogen.sh again if either the features overrided by build-webkit or build arguments have changed.
    2007         if (!mustReRunAutogen($sourceDir, "feature-defines-overriding.txt", $joinedOverridableFeatures)
     2007        if (!mustReRunAutogen($sourceDir, "WebKitFeatureOverrides.txt", $joinedOverridableFeatures)
    20082008            && !mustReRunAutogen($sourceDir, "previous-autogen-arguments.txt", $joinedBuildArgs)) {
    20092009            return;
     
    20172017    # when they change and automatically re-run it.
    20182018    if ($project eq 'WebKit') {
    2019         open(OVERRIDABLE_FEATURES, ">feature-defines-overriding.txt");
     2019        open(OVERRIDABLE_FEATURES, ">WebKitFeatureOverrides.txt");
    20202020        print OVERRIDABLE_FEATURES $joinedOverridableFeatures;
    20212021        close(OVERRIDABLE_FEATURES);
  • trunk/autogen.sh

    r137270 r143604  
    1313touch README INSTALL
    1414
    15 Tools/gtk/override-feature-defines $ORIGDIR
    16 
    1715if test -z `which autoreconf`; then
    1816    echo "Error: autoreconf not found, please install it."
  • trunk/configure.ac

    r142284 r143604  
    2727m4_include([Source/autotools/SetupCompilerFlags.m4])
    2828m4_include([Source/autotools/SetupAutoconfHeader.m4])
     29m4_include([Source/autotools/SetupWebKitFeatures.m4])
    2930
    3031# We would put AM_INIT_AUTOMAKE into SetupAutomake.m4, but seems to cause autoconf errors.
Note: See TracChangeset for help on using the changeset viewer.