RESOLVED FIXED 110293
[GTK] Move feature overriding to the configure phase
https://bugs.webkit.org/show_bug.cgi?id=110293
Summary [GTK] Move feature overriding to the configure phase
Martin Robinson
Reported 2013-02-19 19:23:39 PST
Currently feature overriding happens while autogen.sh is called. This bug tracks moving it to the configure phase, so that it can be shared more easily with the gyp build.
Attachments
Patch (28.44 KB, patch)
2013-02-19 22:55 PST, Martin Robinson
gustavo: review+
Martin Robinson
Comment 1 2013-02-19 22:55:00 PST
Martin Robinson
Comment 2 2013-02-19 23:09:28 PST
For the sake of reviewers, here is a high-level overview of how the new feature overriding system works: 1. The feature profile for releases is defined in SetupWebKitFeatures.m4. This is what you get when you run configure from the tarball. 2. build-webkit writes WebKitFeatureOverrides.txt in the build directory. This is the developer feature profile (modified by any command-line arguments passed to build-webkit) described as a simple list of key value pairs like: ENABLE_3D_RENDERING=0 ENABLE_ACCELERATED_2D_CANVAS=0 ENABLE_BATTERY_STATUS=0... 3. configure takes the features defined in SetupWebKitFeatures.m4 and command-line arguments and passes that as an argument to generate-feature-defines-files. 4. generate-feature-defines-files overrides its command-line arguments (the defaults from step 3) with the contents of WebKitFeatureOverrides.txt, if it exists. It writes two files: * WebKitFeatures.h: A header that has all the features as compiler defines. Before these were passed as command-line arguments to the compiler. This header is included in the autotoolconfig.h header. If it changes, it will trigger a full rebuild. * WebKitFeatures.txt: A key-value pair list of the resolved features that are passed to code generators. This used to be generated by the WebCore GNUmakefile.am. 5. GNUmakefile.am reads WebKitFeatures.txt and passes the contents to all code generators.
Gustavo Noronha (kov)
Comment 3 2013-02-21 04:25:59 PST
Comment on attachment 189251 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=189251&action=review LGTM! > Source/autotools/SetupWebKitFeatures.m4:189 > + dnl Grep the generated GNUmakefile.features.am s/GNUmakefile.features.am/WebKitFeatures.txt/, but I'd just remove the comment, the code is pretty self-explanatory.
Martin Robinson
Comment 4 2013-02-21 08:22:33 PST
Laszlo Gombos
Comment 5 2013-02-24 10:37:05 PST
Martin, can you also update http://trac.webkit.org/wiki/AddingFeatures to reflect this commit ?
Landry Breuil
Comment 6 2013-03-26 06:47:55 PDT
This commit uses read -d which is a bashism for the read builtin. Configure bails out with ksh here. checking for pthread_rwlock_init in -lpthread... yes ./configure[21434]: read: -d: unknown option env: python: No such file or directory
Landry Breuil
Comment 7 2013-03-26 07:19:23 PDT
A more sh-portable option is to use a backslash between each value: read FOO << "EOF" a \ b \ c EOF
Martin Robinson
Comment 8 2013-03-26 12:29:00 PDT
(In reply to comment #7) > A more sh-portable option is to use a backslash between each value: > > read FOO << "EOF" > a \ > b \ > c > EOF Makes sense. Do you mind opening a bug for this and CCing me?
Note You need to log in before you can comment on or make changes to this bug.