Hi all,
Regarding building outside CDT, here some ideas based on use cases in our embedded (Symbian
and Linux) products, which could make CDT more friendly to external build
systems.
We use,
variously, autotools (though not Jeff's autotools builder, for reasons
mentioned by Doug), qmake, make, and Symbian's build system, but want
stronger and more unified UI integration. We've had to do a lot
of custom and repetitive work for this.
What if, instead of a completely hands-off model, like the
standard make model where the user manually edits Makefiles in an editor, or a completely automated model
like MBS that involves full control of compiler/linker invocation, there were an external build model that
provides architecture for wrapping existing build systems, such as autotools,
qmake, scons, etc. and integrating the build
system's model into the UI?
The goal of such a model, as others
have mentioned, would be to let the user switch back and forth
between the IDE and the command line freely and to let the user share projects from
source control with developers not using IDEs. But
unlike standard make or managed make, it should automate the updating of build scripts from resource changes and update build configuration
data from build script changes, without completely taking over
the work of the build system or relying on build-time parsing to gather
configuration data.
In addition to
the build support, there should be UI integration support
for a custom common project navigator model derived from
the build scripts. I.e. the external build system should be able
to influence or control the way the CDT project navigator model is
generated. We're still hammering out UI issues with presenting the project
model that's really built versus the tree of files that happen to
be living in the project directory. CDT's source folders alone don't cut
it as an organization strategy :) We've resorted to ancillary views
for this, reinventing the wheel to attach copy/rename/move/build actions,
support filtering, etc (gahh).
The builder support, I
think, would
be minimal: a custom command-line builder,
similar to the standard make builder, which controls the build by invoking the
external tool with build scripts/files from the project. It could handle incremental/full/clean
builds similarly to standard make as well,
with appropriate vendor
configuration.
Extensions would be implemented and invoked by CDT
to (1) handle synchronizing changes between the
resource model and the build scripts by interpreting resource change
events, (2) generate build configuration
data and indexer settings by parsing build scripts, (3) react to modification, creation, and deletion of build scripts, (4) analyze resource change events to determine
whether a recompile or relink or reindex is needed, and (5) generate/modify the CDT's project navigator
model.
These extensions, in fact, need not be tied whatsoever
to the external build model.
Of course, a lot of
work must go into the implementation of the extensions, to handle parsing and rewriting build
scripts. But by being standard extensions to CDT, standard
implementations could be written once
(e.g. managed make + standard make, autotools,
qmake, etc).
Would it be appropriate for CDT to provide support
like this? Were you thinking something along these
lines?