From 3ad354fa630f60537a0589bc8e69f38632c9bb7c Mon Sep 17 00:00:00 2001 From: "vestbo@webkit.org" Date: Tue, 3 Jul 2012 15:23:20 +0000 Subject: [PATCH] [Qt] Make use of .qmake.cache for caching features MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Instead of loading() features from the files that need them (and re-running a bunch of checks), we now run feature detection as part of configure.pro, and have build-webkit write the computed feature-defines and CONFIG to .qmake.cache, which is then loaded by qmake _before_ even defaults_pre when building WebKit.pro. At some point we'll be able to selectivly prevent running of config tests in configure.pro, which means we don't need a separate code-path for the build-webkit --help case. We should also move the code in build-webkit that now uses .webkit.config to detect clean builds, to use .qmake.cache, since we now store the same thing there. Original patch by Oswald Buddenhagen https://bugs.webkit.org/show_bug.cgi?id=90461 Reviewed by Tor Arne Vestbø. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121766 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- ChangeLog | 27 +++++++++++++++ Source/QtWebKit.pro | 2 -- Source/WTF/ChangeLog | 24 +++++++++++++ Source/WTF/WTF.pri | 2 -- Source/WebCore/ChangeLog | 27 +++++++++++++++ Source/WebCore/DerivedSources.pri | 2 -- Source/WebCore/WebCore.pri | 2 -- Source/WebKit/qt/ChangeLog | 26 ++++++++++++++ Source/WebKit/qt/declarative/declarative.pro | 2 -- Source/WebKit/qt/declarative/public.pri | 2 -- .../qt/tests/qgraphicswebview/qgraphicswebview.pro | 1 - Source/WebKit2/ChangeLog | 25 ++++++++++++++ Source/WebKit2/DerivedSources.pri | 2 -- Source/WebKit2/Target.pri | 2 -- Source/api.pri | 2 -- Source/tests.pri | 2 -- Tools/ChangeLog | 37 ++++++++++++++++++++ Tools/DumpRenderTree/qt/DumpRenderTree.pro | 2 -- Tools/QtTestBrowser/QtTestBrowser.pro | 2 -- Tools/Scripts/webkitdirs.pm | 40 +++++++++++++++++++--- Tools/Tools.pro | 2 -- .../InjectedBundle/DerivedSources.pri | 2 -- Tools/WebKitTestRunner/InjectedBundle/Target.pri | 2 -- Tools/WebKitTestRunner/Target.pri | 2 -- Tools/qmake/.qmake.conf | 2 ++ Tools/qmake/configure.pro | 17 ++++++++- Tools/qmake/mkspecs/features/default_post.prf | 2 -- Tools/qmake/mkspecs/features/default_pre.prf | 34 ++++++++++++++++-- Tools/qmake/mkspecs/features/features.prf | 24 ++----------- WebKit.pro | 2 -- 30 files changed, 254 insertions(+), 66 deletions(-) create mode 100644 Tools/qmake/.qmake.conf diff --git a/ChangeLog b/ChangeLog index 67d2a76..cb4dde0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,30 @@ +2012-07-03 Tor Arne Vestbø + + [Qt] Make use of .qmake.cache for caching features + + Instead of loading() features from the files that need them (and re-running + a bunch of checks), we now run feature detection as part of configure.pro, + and have build-webkit write the computed feature-defines and CONFIG to + .qmake.cache, which is then loaded by qmake _before_ even defaults_pre + when building WebKit.pro. + + At some point we'll be able to selectivly prevent running of config tests + in configure.pro, which means we don't need a separate code-path for + the build-webkit --help case. + + We should also move the code in build-webkit that now uses .webkit.config + to detect clean builds, to use .qmake.cache, since we now store the same + thing there. + + Original patch by Oswald Buddenhagen + + Reviewed by Tor Arne Vestbø. + + * Source/QtWebKit.pro: + * Source/api.pri: + * Source/tests.pri: + * WebKit.pro: + 2012-07-03 Christophe Dumez [EFL] Enable MICRODATA support diff --git a/Source/QtWebKit.pro b/Source/QtWebKit.pro index 9d63fb8..1cc44a8 100644 --- a/Source/QtWebKit.pro +++ b/Source/QtWebKit.pro @@ -4,8 +4,6 @@ # See 'Tools/qmake/README' for an overview of the build system # ------------------------------------------------------------------- -load(features) - TEMPLATE = subdirs CONFIG += ordered diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog index 54666fa..213213c 100644 --- a/Source/WTF/ChangeLog +++ b/Source/WTF/ChangeLog @@ -1,3 +1,27 @@ +2012-07-03 Tor Arne Vestbø + + [Qt] Make use of .qmake.cache for caching features + + Instead of loading() features from the files that need them (and re-running + a bunch of checks), we now run feature detection as part of configure.pro, + and have build-webkit write the computed feature-defines and CONFIG to + .qmake.cache, which is then loaded by qmake _before_ even defaults_pre + when building WebKit.pro. + + At some point we'll be able to selectivly prevent running of config tests + in configure.pro, which means we don't need a separate code-path for + the build-webkit --help case. + + We should also move the code in build-webkit that now uses .webkit.config + to detect clean builds, to use .qmake.cache, since we now store the same + thing there. + + Original patch by Oswald Buddenhagen + + Reviewed by Tor Arne Vestbø. + + * WTF.pri: + 2012-07-03 Jocelyn Turcotte Joel Dillon [Qt][Win] Fix broken QtWebKit5.lib linking diff --git a/Source/WTF/WTF.pri b/Source/WTF/WTF.pri index 0f99ec0..65b377c 100644 --- a/Source/WTF/WTF.pri +++ b/Source/WTF/WTF.pri @@ -5,8 +5,6 @@ # See 'Tools/qmake/README' for an overview of the build system # ------------------------------------------------------------------- -load(features) - # All external modules should include WTF headers by prefixing with "wtf" (#include ). INCLUDEPATH += $$PWD diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 810e1cd..f6fcfcd 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,30 @@ +2012-07-03 Tor Arne Vestbø + + [Qt] Make use of .qmake.cache for caching features + + Instead of loading() features from the files that need them (and re-running + a bunch of checks), we now run feature detection as part of configure.pro, + and have build-webkit write the computed feature-defines and CONFIG to + .qmake.cache, which is then loaded by qmake _before_ even defaults_pre + when building WebKit.pro. + + At some point we'll be able to selectivly prevent running of config tests + in configure.pro, which means we don't need a separate code-path for + the build-webkit --help case. + + We should also move the code in build-webkit that now uses .webkit.config + to detect clean builds, to use .qmake.cache, since we now store the same + thing there. + + Original patch by Oswald Buddenhagen + + https://bugs.webkit.org/show_bug.cgi?id=90461 + + Reviewed by Tor Arne Vestbø. + + * DerivedSources.pri: + * WebCore.pri: + 2012-07-03 Vsevolod Vlasov inspector/debugger/script-snippet-model.html fails diff --git a/Source/WebCore/DerivedSources.pri b/Source/WebCore/DerivedSources.pri index 48ed801..e90b92d 100644 --- a/Source/WebCore/DerivedSources.pri +++ b/Source/WebCore/DerivedSources.pri @@ -11,8 +11,6 @@ sanitizedFile = $$toSanitizedPath($$_FILE_) equals(sanitizedFile, $$toSanitizedPath($$_PRO_FILE_)):TEMPLATE = derived -load(features) - mac { # FIXME: This runs the perl script every time. Is there a way we can run it only when deps change? fwheader_generator.commands = perl $${ROOT_WEBKIT_DIR}/Source/WebKit2/Scripts/generate-forwarding-headers.pl $${ROOT_WEBKIT_DIR}/Source/WebCore $${ROOT_BUILD_DIR}/Source/include mac diff --git a/Source/WebCore/WebCore.pri b/Source/WebCore/WebCore.pri index 37d1332..16aebbc 100644 --- a/Source/WebCore/WebCore.pri +++ b/Source/WebCore/WebCore.pri @@ -5,8 +5,6 @@ # See 'Tools/qmake/README' for an overview of the build system # ------------------------------------------------------------------- -load(features) - SOURCE_DIR = $${ROOT_WEBKIT_DIR}/Source/WebCore # We enable TextureMapper by default; remove this line to enable GraphicsLayerQt. diff --git a/Source/WebKit/qt/ChangeLog b/Source/WebKit/qt/ChangeLog index 7091b65..335aa2d 100644 --- a/Source/WebKit/qt/ChangeLog +++ b/Source/WebKit/qt/ChangeLog @@ -1,3 +1,29 @@ +2012-07-03 Tor Arne Vestbø + + [Qt] Make use of .qmake.cache for caching features + + Instead of loading() features from the files that need them (and re-running + a bunch of checks), we now run feature detection as part of configure.pro, + and have build-webkit write the computed feature-defines and CONFIG to + .qmake.cache, which is then loaded by qmake _before_ even defaults_pre + when building WebKit.pro. + + At some point we'll be able to selectivly prevent running of config tests + in configure.pro, which means we don't need a separate code-path for + the build-webkit --help case. + + We should also move the code in build-webkit that now uses .webkit.config + to detect clean builds, to use .qmake.cache, since we now store the same + thing there. + + Original patch by Oswald Buddenhagen + + Reviewed by Tor Arne Vestbø. + + * declarative/declarative.pro: + * declarative/public.pri: + * tests/qgraphicswebview/qgraphicswebview.pro: + 2012-07-02 No'am Rosenthal [Qt] Get rid of GraphicsLayerQt diff --git a/Source/WebKit/qt/declarative/declarative.pro b/Source/WebKit/qt/declarative/declarative.pro index e7ed449..7379283 100644 --- a/Source/WebKit/qt/declarative/declarative.pro +++ b/Source/WebKit/qt/declarative/declarative.pro @@ -7,8 +7,6 @@ TEMPLATE = subdirs CONFIG += ordered -load(features) - public_api.file = public.pri public_api.makefile = Makefile.declarative.public SUBDIRS += public_api diff --git a/Source/WebKit/qt/declarative/public.pri b/Source/WebKit/qt/declarative/public.pri index 576ce03..a3feb7d 100644 --- a/Source/WebKit/qt/declarative/public.pri +++ b/Source/WebKit/qt/declarative/public.pri @@ -11,8 +11,6 @@ TARGET.module_name = QtWebKit CONFIG += qt plugin -load(features) - QMLDIRFILE = $${_PRO_FILE_PWD_}/qmldir copy2build.input = QMLDIRFILE copy2build.output = $${ROOT_BUILD_DIR}/imports/$${TARGET.module_name}/qmldir diff --git a/Source/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro b/Source/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro index 1e0ab0a..3e9fb15 100644 --- a/Source/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro +++ b/Source/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro @@ -1,7 +1,6 @@ include(../tests.pri) exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc -load(features) contains(DEFINES, ENABLE_WEBGL=1) { QT += opengl } diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index 4b742b7..d41d9fa 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,28 @@ +2012-07-03 Tor Arne Vestbø + + [Qt] Make use of .qmake.cache for caching features + + Instead of loading() features from the files that need them (and re-running + a bunch of checks), we now run feature detection as part of configure.pro, + and have build-webkit write the computed feature-defines and CONFIG to + .qmake.cache, which is then loaded by qmake _before_ even defaults_pre + when building WebKit.pro. + + At some point we'll be able to selectivly prevent running of config tests + in configure.pro, which means we don't need a separate code-path for + the build-webkit --help case. + + We should also move the code in build-webkit that now uses .webkit.config + to detect clean builds, to use .qmake.cache, since we now store the same + thing there. + + Original patch by Oswald Buddenhagen + + Reviewed by Tor Arne Vestbø. + + * DerivedSources.pri: + * Target.pri: + 2012-07-03 Alexis Menard [Qt] When calling accept() on the FilePickerContextObject with an empty list, early return and call reject(). diff --git a/Source/WebKit2/DerivedSources.pri b/Source/WebKit2/DerivedSources.pri index 319bf7e..ab42707 100644 --- a/Source/WebKit2/DerivedSources.pri +++ b/Source/WebKit2/DerivedSources.pri @@ -11,8 +11,6 @@ sanitizedFile = $$toSanitizedPath($$_FILE_) equals(sanitizedFile, $$toSanitizedPath($$_PRO_FILE_)):TEMPLATE = derived -load(features) - WEBCORE_GENERATED_SOURCES_DIR = ../WebCore/$${GENERATED_SOURCES_DESTDIR} SOURCE_DIR = $${ROOT_WEBKIT_DIR}/Source diff --git a/Source/WebKit2/Target.pri b/Source/WebKit2/Target.pri index 4e86026..6c2dcb5 100644 --- a/Source/WebKit2/Target.pri +++ b/Source/WebKit2/Target.pri @@ -7,8 +7,6 @@ TEMPLATE = lib TARGET = WebKit2 -load(features) - include(WebKit2.pri) WEBKIT += wtf javascriptcore webcore diff --git a/Source/api.pri b/Source/api.pri index 7ae29fc..2823b56 100644 --- a/Source/api.pri +++ b/Source/api.pri @@ -124,8 +124,6 @@ haveQt(5) { runSyncQt() # Generate forwarding headers for the QtWebKit API -load(features) - WEBKIT += wtf !v8:WEBKIT += javascriptcore diff --git a/Source/tests.pri b/Source/tests.pri index 2781578..0042fc5 100644 --- a/Source/tests.pri +++ b/Source/tests.pri @@ -7,8 +7,6 @@ TEMPLATE = subdirs CONFIG += ordered -load(features) - WEBKIT_TESTS_DIR = $$PWD/WebKit/qt/tests SUBDIRS += \ diff --git a/Tools/ChangeLog b/Tools/ChangeLog index a90ae32..293d017 100644 --- a/Tools/ChangeLog +++ b/Tools/ChangeLog @@ -1,3 +1,40 @@ +2012-07-03 Tor Arne Vestbø + + [Qt] Make use of .qmake.cache for caching features + + Instead of loading() features from the files that need them (and re-running + a bunch of checks), we now run feature detection as part of configure.pro, + and have build-webkit write the computed feature-defines and CONFIG to + .qmake.cache, which is then loaded by qmake _before_ even defaults_pre + when building WebKit.pro. + + At some point we'll be able to selectivly prevent running of config tests + in configure.pro, which means we don't need a separate code-path for + the build-webkit --help case. + + We should also move the code in build-webkit that now uses .webkit.config + to detect clean builds, to use .qmake.cache, since we now store the same + thing there. + + Original patch by Oswald Buddenhagen + + Reviewed by Tor Arne Vestbø. + + * DumpRenderTree/qt/DumpRenderTree.pro: + * QtTestBrowser/QtTestBrowser.pro: + * Scripts/webkitdirs.pm: + (qtFeatureDefaults): + (buildQMakeProjects): + * Tools.pro: + * WebKitTestRunner/InjectedBundle/DerivedSources.pri: + * WebKitTestRunner/InjectedBundle/Target.pri: + * WebKitTestRunner/Target.pri: + * qmake/.qmake.conf: Added. + * qmake/configure.pro: + * qmake/mkspecs/features/default_post.prf: + * qmake/mkspecs/features/default_pre.prf: + * qmake/mkspecs/features/features.prf: + 2012-07-03 Jocelyn Turcotte Joel Dillon [Qt][Win] Fix broken QtWebKit5.lib linking diff --git a/Tools/DumpRenderTree/qt/DumpRenderTree.pro b/Tools/DumpRenderTree/qt/DumpRenderTree.pro index 327dc3a..f47fb43 100644 --- a/Tools/DumpRenderTree/qt/DumpRenderTree.pro +++ b/Tools/DumpRenderTree/qt/DumpRenderTree.pro @@ -9,8 +9,6 @@ TEMPLATE = app TARGET = DumpRenderTree DESTDIR = $$ROOT_BUILD_DIR/bin -load(features) - WEBKIT += wtf webcore !v8: WEBKIT += javascriptcore diff --git a/Tools/QtTestBrowser/QtTestBrowser.pro b/Tools/QtTestBrowser/QtTestBrowser.pro index 3bff490..6c9352c 100644 --- a/Tools/QtTestBrowser/QtTestBrowser.pro +++ b/Tools/QtTestBrowser/QtTestBrowser.pro @@ -11,8 +11,6 @@ INCLUDEPATH += \ $${ROOT_WEBKIT_DIR}/Tools/DumpRenderTree/qt/ \ $${ROOT_WEBKIT_DIR}/Source/WTF -load(features) - SOURCES += \ $${ROOT_WEBKIT_DIR}/Tools/DumpRenderTree/qt/QtInitializeTestFonts.cpp \ locationedit.cpp \ diff --git a/Tools/Scripts/webkitdirs.pm b/Tools/Scripts/webkitdirs.pm index c1fb8ee..9e0b7a1 100755 --- a/Tools/Scripts/webkitdirs.pm +++ b/Tools/Scripts/webkitdirs.pm @@ -824,24 +824,40 @@ sub qtFeatureDefaults my $file; my @buildArgs; + my $qconfigs; if (@_) { @buildArgs = (@buildArgs, @{$_[0]}); + $qconfigs = $_[1]; my $dir = File::Spec->catfile(productDir(), "Tools", "qmake"); File::Path::mkpath($dir); chdir $dir or die "Failed to cd into " . $dir . "\n"; $file = File::Spec->catfile($qmakepath, "configure.pro"); } else { # Do a quick check of the features without running the config tests + # FIXME: When Qt supports it, go through configure.pro but without config tests $file = File::Spec->catfile($qmakepath, "mkspecs", "features", "features.prf"); push @buildArgs, "CONFIG+=compute_defaults"; } - my $defaults = `$qmakecommand @buildArgs $file 2>&1`; + my @defaults = `$qmakecommand @buildArgs $file 2>&1`; my %qtFeatureDefaults; - while ($defaults =~ m/(\S+?)=(\S+?)/gi) { - $qtFeatureDefaults{$1}=$2; + for (@defaults) { + if (/ DEFINES: /) { + while (/(\S+?)=(\S+?)/gi) { + $qtFeatureDefaults{$1}=$2; + } + } elsif (/ CONFIG:(.*)$/) { + if (@_) { + $$qconfigs = $1; + } + } elsif (/Done computing defaults/) { + print "\n"; + last; + } elsif (@_) { + print $_; + } } chdir $originalCwd; @@ -2230,6 +2246,7 @@ sub buildQMakeProjects my ($projects, $clean, @buildParams) = @_; my @buildArgs = (); + my $qconfigs = ""; my $make = qtMakeCommand($qmakebin); my $makeargs = ""; @@ -2286,7 +2303,7 @@ sub buildQMakeProjects File::Path::mkpath($dir); chdir $dir or die "Failed to cd into " . $dir . "\n"; - my %defines = qtFeatureDefaults(\@buildArgs); + my %defines = qtFeatureDefaults(\@buildArgs, \$qconfigs); my $svnRevision = currentSVNRevision(); @@ -2295,6 +2312,8 @@ sub buildQMakeProjects my $pathToDefinesCache = File::Spec->catfile($dir, ".webkit.config"); my $pathToOldDefinesFile = File::Spec->catfile($dir, "defaults.txt"); + # FIXME: Get rid of .webkit.config and defaults.txt and move all the logic to .qmake.cache + # Ease transition to new build layout if (-e $pathToOldDefinesFile) { print "Old build layout detected"; @@ -2357,13 +2376,24 @@ sub buildQMakeProjects # After removing WebKitBuild directory, we have to call qtFeatureDefaults() # to run config tests and generate the removed Tools/qmake/.qmake.cache again. - qtFeatureDefaults(\@buildArgs); + qtFeatureDefaults(\@buildArgs, \$qconfigs); #} # Still trigger an incremental build $buildHint = "incremental"; } + if ($buildHint eq "incremental") { + my $qmakeDefines = "DEFINES +="; + foreach my $key (sort keys %defines) { + $qmakeDefines .= " \\\n $key=$defines{$key}"; + } + open(QMAKE_CACHE, ">.qmake.cache") or die "Cannot create .qmake.cache!\n"; + print QMAKE_CACHE "CONFIG += webkit_configured $qconfigs\n"; + print QMAKE_CACHE $qmakeDefines."\n"; + close(QMAKE_CACHE); + } + # Save config up-front so we can detect changes to the build config even # when the user re-configures after aborting the build. open(DEFAULTS, ">$pathToDefinesCache"); diff --git a/Tools/Tools.pro b/Tools/Tools.pro index 7f97eff..5b7b5de 100644 --- a/Tools/Tools.pro +++ b/Tools/Tools.pro @@ -7,8 +7,6 @@ TEMPLATE = subdirs CONFIG += ordered -load(features) - !no_webkit1 { SUBDIRS += QtTestBrowser/QtTestBrowser.pro SUBDIRS += DumpRenderTree/qt/DumpRenderTree.pro diff --git a/Tools/WebKitTestRunner/InjectedBundle/DerivedSources.pri b/Tools/WebKitTestRunner/InjectedBundle/DerivedSources.pri index 651ad22..07cdc67 100644 --- a/Tools/WebKitTestRunner/InjectedBundle/DerivedSources.pri +++ b/Tools/WebKitTestRunner/InjectedBundle/DerivedSources.pri @@ -11,8 +11,6 @@ sanitizedFile = $$toSanitizedPath($$_FILE_) equals(sanitizedFile, $$toSanitizedPath($$_PRO_FILE_)):TEMPLATE = derived -load(features) - IDL_BINDINGS += \ Bindings/AccessibilityController.idl \ Bindings/AccessibilityTextMarker.idl \ diff --git a/Tools/WebKitTestRunner/InjectedBundle/Target.pri b/Tools/WebKitTestRunner/InjectedBundle/Target.pri index 7d382ac..0374352 100644 --- a/Tools/WebKitTestRunner/InjectedBundle/Target.pri +++ b/Tools/WebKitTestRunner/InjectedBundle/Target.pri @@ -52,8 +52,6 @@ DESTDIR = $${ROOT_BUILD_DIR}/lib QT += declarative widgets webkit -load(features) - WEBKIT += wtf javascriptcore webcore CONFIG += plugin rpath diff --git a/Tools/WebKitTestRunner/Target.pri b/Tools/WebKitTestRunner/Target.pri index b9e7a8b..e46906c 100644 --- a/Tools/WebKitTestRunner/Target.pri +++ b/Tools/WebKitTestRunner/Target.pri @@ -27,8 +27,6 @@ DESTDIR = $${ROOT_BUILD_DIR}/bin QT = core gui widgets network declarative testlib quick quick-private webkit -load(features) - WEBKIT += wtf javascriptcore webkit2 DEFINES += USE_SYSTEM_MALLOC=1 diff --git a/Tools/qmake/.qmake.conf b/Tools/qmake/.qmake.conf new file mode 100644 index 0000000..2f0dc89 --- /dev/null +++ b/Tools/qmake/.qmake.conf @@ -0,0 +1,2 @@ +# This file is only here to isolate the configure project +# from the rest of the tree. diff --git a/Tools/qmake/configure.pro b/Tools/qmake/configure.pro index 2da6a1b..c68f54a 100644 --- a/Tools/qmake/configure.pro +++ b/Tools/qmake/configure.pro @@ -1,3 +1,18 @@ +# ------------------------------------------------------------------- +# This file is used by build-webkit to compute the various feature +# defines, which are then cached in .qmake.cache. +# +# See 'Tools/qmake/README' for an overview of the build system +# ------------------------------------------------------------------- + +# Will compute features based on command line arguments, config tests, +# dependency availability, and defaults. load(features) -message($$DEFINES) + +# Compute delta +CONFIG -= $$BASE_CONFIG +DEFINES -= $$BASE_DEFINES + +message(CONFIG: $$CONFIG) +message(DEFINES: $$DEFINES) error("Done computing defaults") diff --git a/Tools/qmake/mkspecs/features/default_post.prf b/Tools/qmake/mkspecs/features/default_post.prf index 56c109c..4e7d2c4 100644 --- a/Tools/qmake/mkspecs/features/default_post.prf +++ b/Tools/qmake/mkspecs/features/default_post.prf @@ -5,8 +5,6 @@ # See 'Tools/qmake/README' for an overview of the build system # ------------------------------------------------------------------- -load(features) - # Flag that we're now done processing the project file. This allows # a feature to distinguish between being processed due to a load() # or include() and a CONFIG += feature. diff --git a/Tools/qmake/mkspecs/features/default_pre.prf b/Tools/qmake/mkspecs/features/default_pre.prf index bb82e15..25593e7 100644 --- a/Tools/qmake/mkspecs/features/default_pre.prf +++ b/Tools/qmake/mkspecs/features/default_pre.prf @@ -27,10 +27,13 @@ ROOT_WEBKIT_DIR = $$replace(IN_PWD, /Tools/qmake/mkspecs/features$,) WEBKIT_SUBDIR = $$replace(_PRO_FILE_PWD_, $${ROOT_WEBKIT_DIR},) ROOT_BUILD_DIR = $$replace(OUT_PWD, $${WEBKIT_SUBDIR}$,) +# Detect if we're running the initial configure step +pro_file_name = $$basename(_PRO_FILE_) +equals(pro_file_name, configure.pro): CONFIG += configure_pass + # We want the QtWebKit API forwarding includes to live in the root build dir, # except when we are running the config.tests in Tools/qmake. -pro_file_name = $$basename(_PRO_FILE_) -!equals(pro_file_name, configure.pro): QMAKE_SYNCQT_OUTDIR = $$ROOT_BUILD_DIR +!configure_pass: QMAKE_SYNCQT_OUTDIR = $$ROOT_BUILD_DIR # Load Qt's defaults after we've resolved the build directory. This will also # run syncqt if there is a sync.profile in the $$_PRO_FILE_PWD_. We never want @@ -123,3 +126,30 @@ haveQt(4) { # Set some defaults for specific platforms CONFIG += include_webinspector + +# Try to locate sqlite3 source (for WebCore) +SQLITE3SRCDIR = $$(SQLITE3SRCDIR) +isEmpty(SQLITE3SRCDIR) { + haveQt(5): SQLITE3SRCDIR = $$QT.core.sources/../3rdparty/sqlite/ + else: SQLITE3SRCDIR = $$[QT_INSTALL_PREFIX]/src/3rdparty/sqlite/ +} + +# --------- Make features available to JSC ------------ + +## Forward enabled feature macros to JavaScript enabled features macros +FEATURE_DEFINES_JAVASCRIPT = LANGUAGE_JAVASCRIPT=1 +v8: FEATURE_DEFINES_JAVASCRIPT += V8_BINDING=1 + +for(define, DEFINES) { + enabled_feature_define = $$find(define, ^ENABLE_.+=1$) + isEmpty(enabled_feature_define): next() + + FEATURE_DEFINES_JAVASCRIPT += $$enabled_feature_define +} + +configure_pass { + # Save the base config and defines so we can compute the delta between + # what features.prf introduced and what was already there. + BASE_CONFIG = $$CONFIG + BASE_DEFINES = $$DEFINES +} diff --git a/Tools/qmake/mkspecs/features/features.prf b/Tools/qmake/mkspecs/features/features.prf index 1e6950a..6d99d11 100644 --- a/Tools/qmake/mkspecs/features/features.prf +++ b/Tools/qmake/mkspecs/features/features.prf @@ -20,13 +20,6 @@ ## load mobilityconfig if mobility is available load(mobilityconfig, true) -# Try to locate sqlite3 source -SQLITE3SRCDIR = $$(SQLITE3SRCDIR) -isEmpty(SQLITE3SRCDIR) { - haveQt(5):SQLITE3SRCDIR = $$QT.core.sources/../3rdparty/sqlite/ - else:SQLITE3SRCDIR = $$[QT_INSTALL_PREFIX]/src/3rdparty/sqlite/ -} - # ---------- Dynamically detect optional features ------------- # # Please note, static feature defaults go in features.pri @@ -220,24 +213,13 @@ for(define, DEFINES) { contains(DEFINES, $$opposite): DEFINES -= $$define } -# --------- Make features available to JSC ------------ - -## Forward enabled feature macros to JavaScript enabled features macros -FEATURE_DEFINES_JAVASCRIPT = LANGUAGE_JAVASCRIPT=1 -v8: FEATURE_DEFINES_JAVASCRIPT += V8_BINDING=1 - -for(define, DEFINES) { - enabled_feature_define = $$find(define, ^ENABLE_.+=1$) - isEmpty(enabled_feature_define): next() - - FEATURE_DEFINES_JAVASCRIPT += $$enabled_feature_define -} - # ---------------------- The end ---------------------- # Used to compute defaults for the build-webkit script # Don't place anything after this! CONFIG(compute_defaults) { - message($$DEFINES) + # FIXME: We should have configure.pro do this when the config tests + # can be selectivly run. + message(DEFINES: $$DEFINES) error("Done computing defaults") } diff --git a/WebKit.pro b/WebKit.pro index 9b4007b..2b2aff6 100644 --- a/WebKit.pro +++ b/WebKit.pro @@ -8,8 +8,6 @@ TEMPLATE = subdirs CONFIG += ordered -load(features) - QMAKEPATH = $$(QMAKEPATH) isEmpty(QMAKEPATH)|!exists($${QMAKEPATH}/mkspecs) { error("The environment variable QMAKEPATH needs to point to $WEBKITSRC/Tools/qmake") -- 2.7.4