Bug 132190 - [GTK] Generate Eclipse project + ninja build for GTK+ if Eclipse in available in the PATH
Summary: [GTK] Generate Eclipse project + ninja build for GTK+ if Eclipse in available...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Enhancement
Assignee: Nobody
URL:
Keywords:
: 132062 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-04-25 04:51 PDT by Enrique Ocaña
Modified: 2014-08-26 11:12 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.68 KB, patch)
2014-04-25 04:59 PDT, Enrique Ocaña
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enrique Ocaña 2014-04-25 04:51:50 PDT
Now that cmake is being used, it should be trivial to use the 'Eclipse CDT4 - Ninja' generator, which does the same as the 'Ninja' generator currently in use, but also creates .project and .cproject files suitable for Eclipse. This would be much better than the approach used in Autotools+Makefile times, where the source code import had some troubles.
Comment 1 Enrique Ocaña 2014-04-25 04:59:19 PDT
Created attachment 230167 [details]
Patch
Comment 2 Enrique Ocaña 2014-04-25 05:06:35 PDT
Just for the record, I've been used this patch successfully in my box for some time.

The only thing needed is to create two symbolic links:

.project -> WebKitBuild/Release/.project
.cproject -> WebKitBuild/Release/.cproject

This is because the project file must be in the root directory of the project (WebKit).

After that, just create the project in Eclipse via File, Import, General, Existing projects into workspace. Select the WebKit root dir and perform the import.

Enjoy!
Comment 3 Gustavo Noronha (kov) 2014-04-25 05:25:51 PDT
Comment on attachment 230167 [details]
Patch

Looks OK to me.
Comment 4 Martin Robinson 2014-04-25 07:39:49 PDT
This seems risky. There are probably people who have eclipse in their path who don't want to use Eclipse to build.
Comment 5 Enrique Ocaña 2014-04-25 08:10:18 PDT
The eclipse target is a superset of the ninja target. It also generates ninja files, so you can build it "the ninja way". That's how I build it.

Assuming that you want to use eclipse if you have it in your path is as risky as assuming that you want to use ninja if you have it in your path (the current approach).
Comment 6 Martin Robinson 2014-04-25 08:11:12 PDT
Are the ninja files generated for the eclipse target the same as for the ninja target?
Comment 7 Enrique Ocaña 2014-04-25 10:44:10 PDT
The rules.ninja files are equal. In the build.ninja files, some rules are in different places in the file (some are before, some are after, but I think that's irrelevant for ninja).

I know it's not orthodox, but I've "sort"ed both versions of build.ninja and "diff"ed them after that to bypass the place shifting differences. The resulting diff showed 3393 different lines out of 31633. Examining them closely, the main part of them just differ in the position of lib/libANGLESupport.a in the argument list (it's even missing in some of the blocks generated by the Eclipse Ninja target). Apart from that, the "build build.ninja" line is different, as it calls different cmake system files, some only related to Eclipse.
Comment 8 Martin Robinson 2014-04-25 10:51:39 PDT
Okay. Sound safe, but we should be ready to only do this when requested if it causes issues.
Comment 9 WebKit Commit Bot 2014-04-29 08:17:37 PDT
Comment on attachment 230167 [details]
Patch

Clearing flags on attachment: 230167

Committed r167932: <http://trac.webkit.org/changeset/167932>
Comment 10 WebKit Commit Bot 2014-04-29 08:17:40 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Brendan Long 2014-08-26 11:12:52 PDT
*** Bug 132062 has been marked as a duplicate of this bug. ***