Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Managed Builder: some input from MontaVista

Hi All,

We have been working on an Eclipse-based product here in Montavista for several months already and are about to ship our first release. We realize that we are trying to achieve things which are quite common and would like to participate with the community in this work. Primarily it would concern the managed builder.

Here is a functional explanation of what we did in this area for our Eclipse-based product.

Plugins implementing all the following things are dependent on CDT. Unfortunately I didn't look at the new managed builder for 6 months, so I am quite out of date. I just got a quick look at its UI recently when CDT 1.2 GA has been released. Therefore I am not able to tell how much work is needed to merge our stuff in CDT. However we are willing to go in this direction. I guess we need to discuss the best way to do it.

Let me first introduce you quickly to what we did.

Project Types:

Based on CDT we have 3 project types:
1 - Application Project
2 - Library Project
3 - Imported Project

Application and Library Project are project having a Makefile generator and Dependency generator (more explanation below). The goal is for the user to have only to write its code and nothing else (or close from that)
Imported projects don't have their Makefile generated, however we have a Build configuration customizable by the user (more details below)


Builders

We have three builders:
1 - Dependency generator: it generates a .depends file to track when rebuild is needed
2 - Makefile generator: it generates a Makefile based on the Build Settings
3 - Make builder: it invokes make with the right target(s) (clean, all, ...)


Build settings:
build settings are all parameters needed to generate the makefile which includes:
    - for the compiler: optimization and debug levels, flags, Macro Definition and include paths.
    - for the linker: binary output name, library paths, libraries to link against and flags.
Compiler build settings are organized hierarchically. Which means you can set different settings on any folder or files inside the project. If not specified it uses the one of its container (by default every file/folder use the compiler settings define on the project folder).
Linker settings are only on the project folder.
Also we provide a way to export include paths and library paths for dependent projects to use. By default in each project we have an include directory which exported and the project directory is exported as library path by default as well. This way you can create library and application project with a dependency and build both without having to do much (the user just need to specify the dependency and the library to link with).

Build configuration
The build configuration specifies the list of make target. In case of generated makefile it is not editable/changeable. In case of imported projects however, it allows the user to order the makefile targets, to associate each of them with the build and/or rebuild command, to set environment variable that could be needed by the compilation and to edit the command to be run (make something, ./configure or whatever he wants)

This is just the way we did things. I hope some of these things would be usable by CDT. There is not much details in this email but following your questions I will give you more detailed information.
Also I noted a few things beyond the managed builder spec:
- we would like to be sure that project could be build in console outside eclipse as well (assuming that the generated Makefile is in the project)
- a .depends file included in the Makefile could be useful to manage incremental build and project dependencies without to much work
I guess else, I have not much to add to the spec which is quite complete.


Comments and questions are more than welcome.


Pierre-Alexandre Masse
MontaVista Software Inc.
Office: (408) 328 1942



Back to the top