[GTK] Feature enabling/disabling should be possible through build-webkit
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Dec 2012 09:37:28 +0000 (09:37 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Dec 2012 09:37:28 +0000 (09:37 +0000)
commit0825bdee5c78dffa2dca5e84331f7114fa2ba99a
treed46f1cf7d2c6102f9b8c364e111e2693407dbff8
parent3837467409719fee8d5619fc1660c3cc0bcbdeab
[GTK] Feature enabling/disabling should be possible through build-webkit
https://bugs.webkit.org/show_bug.cgi?id=99271

Reviewed by Gustavo Noronha Silva.

.:

The autogen.sh script now calls the Tools/gtk/override-feature-defines script
before calling autoreconf. This ensures that Source/WebCore/GNUmakefile.features.am
is present and properly modified if the build-webkit script intends to override
any feature.

The Source/WebCore/GNUmakefile.features.am file is added to the ignored files list
so it doesn't pop out as a new, untracked file.

* .gitignore:
* autogen.sh:

Source/WebCore:

Move the contents of GNUmakefile.features.am into GNUmakefile.features.am.in.
The former is then copied from the latter but then appropriately modified if
the build-webkit script overrides any of the default feature defines.

No new tests - no new testable functionality.

* GNUmakefile.features.am.in: Renamed from Source/WebCore/GNUmakefile.features.am.

Tools:

Refactor the code in webkitdirs.pm that builds an autotools project to generate
autogen.sh arguments, make arguments and installation prefix from the passed-in
parameters rather than generating all of that in build-webkit. The autogen.sh
arguments now contain only enable/disable flags for options that are actually
configurable in configure.ac, the flag value actually reflecting whether the feature
is enabled or disabled in the feature list.

Other features are overridable through modifying the GNUmakefile.features.am file.
All these features are now stored in the build directory and upon change trigger
a rerun of the autogen.sh script, pretty much like the autogen.sh arguments do.

The override-feature-defines script is called by autogen.sh, before GNUmakefile.in is
generated when calling autoreconf. Its task is to copy the GNUmakefile.features.am.in
into GNUmakefile.features.am and modify it if there's a text file in the build directory
that contains all the feature defines the build-webkit script has written. If the build
is not done through build-webkit (and there's no file in build directory listing all the
feature defines) the script does not advance further from copying.

This approach is taken to overcome the rigidness of the automake system as it's impossible
to effectively generate and use GNUmakefile.features.am or even GNUmakefile.features file
after the autoreconf command execution in autogen.sh.

* Scripts/build-jsc:
(buildMyProject):
* Scripts/build-webkit:
* Scripts/webkitdirs.pm:
(runAutogenForAutotoolsProjectIfNecessary):
(mustReRunAutogen):
(buildAutotoolsProject):
(buildGtkProject):
* Scripts/webkitperl/FeatureList.pm: Update the features that are currently enabled in
Source/WebCore/GNUmakefile.features.am.in but aren't in the feature list.
* Scripts/webkitpy/style/checker.py: Source/WebCore/GNUmakefile.features.am.in is recognized
as a text file and tabulation errors are reported. Skip the file to suppress them.
* gtk/override-feature-defines: Added.
(copy_feature_defines_makefile):
(adjust_feature_defines_makefile):
(adjust_feature_defines_makefile.override_feature_define):
(override_feature_defines):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137270 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
.gitignore
ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.features.am.in [moved from Source/WebCore/GNUmakefile.features.am with 100% similarity]
Tools/ChangeLog
Tools/Scripts/build-jsc
Tools/Scripts/build-webkit
Tools/Scripts/webkitdirs.pm
Tools/Scripts/webkitperl/FeatureList.pm
Tools/Scripts/webkitpy/style/checker.py
Tools/gtk/override-feature-defines [new file with mode: 0755]
autogen.sh