Bug 66852 - [Qt] [PATCH] Improve the handling of $project in webkitdirs.pm
Summary: [Qt] [PATCH] Improve the handling of $project in webkitdirs.pm
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified All
: P3 Normal
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2011-08-24 05:29 PDT by Bartosz Fabianowski
Modified: 2014-02-03 03:18 PST (History)
4 users (show)

See Also:


Attachments
Patch implementing the proposed improvements (3.79 KB, patch)
2011-08-24 05:29 PDT, Bartosz Fabianowski
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bartosz Fabianowski 2011-08-24 05:29:20 PDT
Created attachment 104983 [details]
Patch implementing the proposed improvements

The buildQMakeProject() method in Tools/Scripts/webkitdirs.pm takes a project type as its first parameter. Analogously to the Gtk port's buildGtkProject(), two project types are supported:

* build-webkit uses project type "WebKit"
* build-jsc uses project type "JavaScriptCore"

There are a number of bugs and hacks in the way these project types are handled and evaluated. The attached patch cleans up the handling a bit. The following changes are made:

* A FIXME in build-webkit is addressed by correctly passing "WebKit" instead of "Source/WebKit" as the project type
* The buildQMakeQtProject() method is retired whose only purpose was to sabotage the project type by replacing it with ""
* The handling of the project type in buildQMakeProject() is simplified, reducing it to what is needed for the two project types above only

In addition to the above improvements, buildQMakeQtProject() can be instructed to build the libraries ("JavaScriptCore", "WebCore", "WebKit/qt/Api") only by leaving the project type blank. Tools and examples are omitted from the build in this case. This is useful under e.g. FreeBSD where the Tools depend on an installed version of the Qt WekBit port, leading to circular dependencies.

I have tested this patch by checking that the following work:
* build-jsc -> builds JavaScriptCore only
* build-webkit -> buildQMakeQtProject, Tools, examples
* build-webkit with project type set to "" in the call to buildQMakeQtProject() -> buildQMakeQtProject only

The issues addressed and the general idea of the patch were discussed on #qtwebkit with bbandix who is CC'd on this bug report.
Comment 1 Bartosz Fabianowski 2011-08-24 05:31:57 PDT
There were two typos in my initial submission. The tests performed and their results actually were:

I have tested this patch by checking that the following work:
* build-jsc -> builds JavaScriptCore only
* build-webkit -> builds WebKit libraries, Tools, examples
* build-webkit with project type set to "" in the call to buildQMakeQtProject() -> builds WebKit libraries only
Comment 2 Balazs Kelemen 2011-08-26 15:47:32 PDT
> * build-webkit with project type set to "" in the call to buildQMakeQtProject() -> builds WebKit libraries only

Could we support a "libs" or whatever build option in build-webkit instead of handing over the task of creating a new wrapper script to the embedder? Apart from that, the change looks good to me.
Comment 3 Zoltan Horvath 2011-08-29 00:46:35 PDT
(In reply to comment #1)

> * build-webkit with project type set to "" in the call to buildQMakeQtProject() -> builds WebKit libraries only

Do you mean in the call to buildQMakeProject? Since you have removed buildQMakeQtProject.

If I understand correctly you set the "" parameter by hand to get a library only build. If we really need this then it'd be good to support it in build-webkit with --only-webkit-library parameter.
Comment 4 Andras Becsi 2011-09-02 03:23:26 PDT
The change looks good to me except that I agree with Balazs, adding an extra option like --lib-only or something similar would be a good improvement and would make the lives of developers easier.
Also, every patch needs a ChangeLog, you can read about that on http://trac.webkit.org/wiki/QtWebKitContrib#Submittingapatch

Please submit an updated patch.

(In reply to comment #1)
> There were two typos in my initial submission. The tests performed and their results actually were:
> 
> I have tested this patch by checking that the following work:
> * build-jsc -> builds JavaScriptCore only
> * build-webkit -> builds WebKit libraries, Tools, examples
> * build-webkit with project type set to "" in the call to buildQMakeQtProject() -> builds WebKit libraries only
Comment 5 Andras Becsi 2011-09-02 03:43:49 PDT
Also, you might be interested in https://bugs.webkit.org/show_bug.cgi?id=57324
Comment 6 Bartosz Fabianowski 2011-09-02 03:50:26 PDT
I will submit an updated patch as soon as time permits.
Comment 7 Jocelyn Turcotte 2014-02-03 03:18:45 PST
=== Bulk closing of Qt bugs ===

If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary.

If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.