Hi Richard,
The question regarding
compiler command substitution is more like an MBS (Managed Build System)-specific
question rather than a New Project Model –specific.
Speaking from the MBS
point of view, there are already several mechanisms implemented that could be
used in your case for the tool command substitution.
E.g. you can use the Build
Macros mechanism, e.g. in your tool definition you can specify the tool command
as “${Some_Macro_Name}” and define the macro that in some
circumstances would be equal to “gcc” while in another
circumstances would be resolved to “ipg_comp –comp gcc”.
You can as well modify
the tool command programmatically by calling the ITool.setToolCommand(String)
method.
>Another useful change
would to allow extension points that
let plugin providers hook into the generated makefile at specific locations.
For instance adding rules to be called as part of the project clean so
generated temporary files are removed correctly or adding dependencies on
option files.
To allow custom
makefile generation you could provide your own BuildfileGenerator. The
Buildfile generator is specified with the builder:buildfileGenerator attribute.
The attribute value should specify the fully-qualified class name implementing
the org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator
interface.
You can also simply
extend the GnuMakefileGenerator supplied with MBS and customize its behavior as
needed.
As for the dynamic clean
command customization, you could modify the clean command programmatically using
the IConfiguration.setCleanCommand() method. You should be also able to use
build macros in the clean command as well.
Mikhail
From:
cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Richard Miskin
Sent: Wednesday, August 02, 2006
5:42 PM
To: CDT
General developers list.
Subject: RE: [cdt-dev] CDT New
Project Model design initial draft
Hi there,
I’ve read through
the draft and I’m not sure if the following idea/suggestion is covered by
it or not. I don’t think it is, but I may have misunderstood the
document.
The company I work for
produces a software testing tool (Cantata++) that works by prefixing the
compile and link commands of a C/C++ compiler with a compiler driver. This
allows our tool to process the source code (adding logging calls etc) and then
pass it directly on to the compiler to produce object code etc and also ensure
our libraries are pulled in at link time.
It’d be nice if
there was an easy way of programmatically changing the compile and link
commands for the user. So if your normal build process uses:
gcc –c source.c
gcc source.o –o
file.exe
The commands would be changed
to:
ipg_comp –comp gcc
–c source.c
ipg_comp –link gcc
source.o file.exe
I’ve seen other
tools that work in the same (or similar) way so this should be applicable to
more than just our product.
I think the alternative
would be for tool integrators to write new build definitions which are just
change the compile and link commands. This would need to be done for every
build type that we wanted to support and as CDT is applicable to more tools
could become an overhead.
Another useful change
would to allow extension points that let plugin providers hook into the
generated makefile at specific locations. For instance adding rules to be
called as part of the project clean so generated temporary files are removed
correctly or adding dependencies on option files.
The guys at Wind River have seen this sort of requirement previously
so they will probably have some useful input on this.
Cheers,
Richard
From:
cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Sennikovsky, Mikhail
Sent: Friday 21 July 2006 15:48
To: CDT
General developers list.
Subject: [cdt-dev] CDT New Project
Model design initial draft
Hi all,
I’ve attached the initial draft of the CDT New
Project Model design to the bugzilla:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=115935
I hope the design could
serve as the base and synchronization point for different enhancements planned
to be done for leveraging the CDT 4.0 in the areas of better multi-language
support, better usability and integrity, etc.
Your comments are highly
appreciated.
Thanks,
Mikhail
The information transmitted is intended only
for the person or entity to which it is addressed and may contain confidential
and/or privileged material. If you are not the addressee, any disclosure,
reproduction, copying, distribution, or other dissemination or use of this
communication is strictly prohibited. If you have received this transmission in
error please notify the sender immediately and then delete this email.
Any representations or commitments expressed
in this email are subject to contract.
This message has been scanned for viruses and
dangerous content. However, it is essential that the recipient also checks this
message using commercially available mail scanning and anti-virus software. IPL
Information Processing Limited accepts no liability for any loss or damage
resulting from any virus or other dangerous content in this message.