mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
New Project Model Build System docs update:
1. What's new in CDT Build System 2. Tool-chain Migration guide
This commit is contained in:
parent
abc471dd3a
commit
4103ce448d
5 changed files with 1424 additions and 0 deletions
Binary file not shown.
After Width: | Height: | Size: 42 KiB |
|
@ -0,0 +1,250 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns="http://www.w3.org/TR/REC-html40">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type"
|
||||
content="text/html; charset=ISO-8859-1">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
|
||||
<title>Managed Build System Extensibility Document</title>
|
||||
<link rel="stylesheet"
|
||||
href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/cdt-home/cdt.css?cvsroot=Tools_Project"
|
||||
type="text/css">
|
||||
<link rel="stylesheet" href="cdt.css" type="text/css">
|
||||
<style>
|
||||
<!--
|
||||
h3
|
||||
{margin-top:12.0pt;
|
||||
margin-right:0in;
|
||||
margin-bottom:3.0pt;
|
||||
margin-left:0in;
|
||||
page-break-after:avoid;
|
||||
font-size:13.0pt;
|
||||
font-family:Arial}
|
||||
-->
|
||||
</style>
|
||||
<!--[if !mso]>
|
||||
<style>h2
|
||||
{margin-top:12.0pt;
|
||||
margin-right:0in;
|
||||
margin-bottom:3.0pt;
|
||||
margin-left:0in;
|
||||
page-break-after:avoid;
|
||||
font-size:14.0pt;
|
||||
font-family:Arial;
|
||||
font-style:italic}
|
||||
table.MsoTableGrid
|
||||
{border:1.0pt solid windowtext;
|
||||
font-size:10.0pt;
|
||||
font-family:"Times New Roman";
|
||||
}
|
||||
li.MsoNormal
|
||||
{mso-style-parent:"";
|
||||
margin-bottom:.0001pt;
|
||||
font-size:12.0pt;
|
||||
font-family:"Times New Roman";
|
||||
margin-left:0in; margin-right:0in; margin-top:0in}
|
||||
h4
|
||||
{margin-top:12.0pt;
|
||||
margin-right:0in;
|
||||
margin-bottom:3.0pt;
|
||||
margin-left:.6in;
|
||||
text-indent:-.6in;
|
||||
page-break-after:avoid;
|
||||
tab-stops:list .6in;
|
||||
font-size:12.0pt;
|
||||
font-family:"Times New Roman";
|
||||
}
|
||||
table.MsoNormalTable
|
||||
{mso-style-parent:"";
|
||||
font-size:10.0pt;
|
||||
font-family:"Times New Roman";
|
||||
}
|
||||
</style>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<!-- Document Header -->
|
||||
<table border="0" cellpadding="2" width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="left" width="72%"><font class="indextop">Migrating your
|
||||
tool-chain integration to CDT 4.0</font><br>
|
||||
<font class="indexsub">This document describes </font>steps needed to be
|
||||
done to migrate the existing tool-chain integrations to the CDT 4.0</td>
|
||||
<td width="28%"><img src="http://dev.eclipse.org/images/Idea.jpg"
|
||||
alt="" height="86" width="120"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<td width="50%" rowspan="2">Authors</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%"><a href="mailto:mikhail.sennikovsky@intel.com">Mikhail
|
||||
Sennikovsky</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%" rowspan="2">Revision Date</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%">06/21/07 - Version 4.0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%" rowspan="2">Change History</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%">4.0 - Document Creation</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<!-- End of Document Header --><!-- Table of Contents -->
|
||||
<div class="section">Table of Contents</div>
|
||||
<br>
|
||||
<div class="indent"><a href="#_TocSectionIntro">1 </a>
|
||||
<A href="#_TocSectionIntro">Scope of the document</A></div>
|
||||
<div class="indent"><a href="#_TocSectionUIModel">2 Migration Steps</a></div>
|
||||
<!-- End of Table of Contents --><br>
|
||||
<p class="section"><a name="_TocSectionIntro">1 Scope of the document</a></p>
|
||||
<p style="margin-top: 0; margin-bottom: 0">The document describes steps needed to be done to migrate the existing
|
||||
tool-chain integrations to the CDT 4.0. </p>
|
||||
<p style="margin-top: 0; margin-bottom: 0">The documents outlines the main steps
|
||||
needed for migration without focusing on details of the new Build System
|
||||
functionality. For more detail on the new functionality presented in the CDT 4.0
|
||||
please refer to the "What's New in the CDT Build System" document.</p>
|
||||
<p class="section"><a name="_TocSectionUIModel">2 Migration Steps</a></p>
|
||||
<ol>
|
||||
<li>
|
||||
<p class="MsoNormal" style="margin-top:6.0pt">The Build System now supports
|
||||
the per-folder settings. The new interface
|
||||
org.eclipse.cdt.managedbuilder.core.IFolderInfo is presented to represent
|
||||
the folder-specific settings. Thus the implementers of the following
|
||||
interfaces should now expect to receive the IFolderInfo in addition to the
|
||||
IFileInfo (IResourceConfiguration) and IConfiguration as the "IBuildObject
|
||||
configuration" argument:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p class="MsoNormal" style="margin-top:6.0pt">
|
||||
org.eclipse.cdt.managedbuilder.core.IOptionApplicability</p></li>
|
||||
<li>
|
||||
<p class="MsoNormal" style="margin-top:6.0pt">
|
||||
org.eclipse.cdt.managedbuilder.core.IManagedOptionValueHandler</p></li>
|
||||
<li>
|
||||
<p class="MsoNormal" style="margin-top:6.0pt">
|
||||
org.eclipse.cdt.managedbuilder.makegen.IManagedDependencyGenerator2</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p class="MsoNormal" style="margin-top:6.0pt">The new New Project wizard now
|
||||
operates with tool-chains allowing to select the tool-chain(s) to be used on
|
||||
project creation. Also the "Tool-chain editor" functionality now allows to
|
||||
modify/change the tool-chain of the already created project. Thus it is
|
||||
required that all toolChain/tool/builder build definitions representing
|
||||
different tool-chain/tool/builder must have different names as well as
|
||||
toolChain/tool/builder build definitions representing one and the same
|
||||
tool-chain/tool/builder must have identical names.</p>
|
||||
<p class="MsoNormal" style="margin-top:0; margin-bottom:0"><b>
|
||||
Example:</b> to illustrate the above requirement here is how this is handled
|
||||
in the gnu tool-chain definitions:</p>
|
||||
<p class="MsoNormal" style="margin-top:0; margin-bottom:0">
|
||||
The gnu plug-in contains the gcc linker tool on Linux is defined as</p>
|
||||
<p class="MsoNormal" style="margin-top:0; margin-bottom:0">
|
||||
<tool<br>
|
||||
natureFilter="cnature"<br>
|
||||
name="%ToolName.linker.gnu.c"<br>
|
||||
outputFlag="-o"<br>
|
||||
command="gcc"<br>
|
||||
id="cdt.managedbuild.tool.gnu.c.linker"</p>
|
||||
<p class="MsoNormal" style="margin-top:0pt; margin-bottom:0">
|
||||
...</p>
|
||||
<p class="MsoNormal" style="margin-top:0pt; margin-bottom:0">
|
||||
</p>
|
||||
<p class="MsoNormal" style="margin-top:0pt; margin-bottom:0">
|
||||
At the same time the gnu tool-chain definitions refers to the gcc linker by
|
||||
defining a new tool as a super-class of the "cdt.managedbuild.tool.gnu.c.linker"
|
||||
tool</p>
|
||||
<p class="MsoNormal" style="margin-top:6.0pt"> <tool<br>
|
||||
id="cdt.managedbuild.tool.gnu.c.linker.base"<br>
|
||||
superClass="cdt.managedbuild.tool.gnu.c.linker"></p>
|
||||
<p class="MsoNormal" style="margin-top:6.0pt">...</p>
|
||||
<p class="MsoNormal" style="margin-top:6.0pt">Both tool definitions listed
|
||||
above are actually treated as two different tools by the Build System, while
|
||||
both of them refer to one and the same "gcc" executable. To make the
|
||||
build system aware that both tool definitions refer to one and the same tool/executable
|
||||
it is required that both tool definitions specify one and the same name. In
|
||||
the above sample the tool of id="cdt.managedbuild.tool.gnu.c.linker.base"
|
||||
does not specify any name thus making the name to be inherited from the
|
||||
super-class tool, so both tools have the same name.</p>
|
||||
<p class="MsoNormal" style="margin-top:6.0pt">On the other hand the cygwin
|
||||
gcc linker is defined as </p>
|
||||
<p class="MsoNormal" style="margin-top:6.0pt"> <tool<br>
|
||||
id="cdt.managedbuild.tool.gnu.c.linker.cygwin"<br>
|
||||
name="%ToolName.linker.cygwin.gnu.c"<br>
|
||||
superClass="cdt.managedbuild.tool.gnu.c.linker"><br>
|
||||
...</p>
|
||||
<p class="MsoNormal" style="margin-top:6.0pt">although the tool definitions
|
||||
is defined as a super-class of the linux gcc linker, it refers to the
|
||||
different tool(executable) than the Linux linker definition. The cygwin
|
||||
linker definition specifies the name="%ToolName.linker.cygwin.gnu.c" that
|
||||
differs from the one defined by the Linux gcc linker.</p></li>
|
||||
<li>
|
||||
<p class="MsoNormal" style="margin-top:6.0pt">The CDT Build System now
|
||||
support the <a href="../../whats_new/4.0/whats_new_CBS_40.html#_TocSectionUIModel_7">Custom
|
||||
Configuration Builds</a>. For Managed builds (makefiles
|
||||
are generated automatically) this functionality works only in case the buildfile
|
||||
generator implements the
|
||||
org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator2. This
|
||||
interface extends the old IManagedBuilderMakefileGenerator by defining a new
|
||||
initialize() method which accepts IConfiguration and IBuilder rather than
|
||||
IManagedBuildInfo thus removing an assumption that only active configuration can
|
||||
be used for building.</p>
|
||||
<p style="margin-top: 0; margin-bottom: 0">The default GnuMakefileGenerator
|
||||
supplied with the CDT now implements this interface, so in case the builder is
|
||||
using this default implementation, no changes are needed.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="MsoNormal" style="margin-top:6.0pt">There are some modifications
|
||||
in Eclipse Platform's org.eclipse.core.runtime.Path class behavior that
|
||||
might affect some of the current MBS integrations, namely </p>
|
||||
<p class="MsoNormal" style="margin-top:6.0pt">The changes are related to the
|
||||
way the dot ("./") prefix are treated by the path constructors, i.e. with
|
||||
Eclipse 3.2.x the Path(String) constructor and also Path.from*String()
|
||||
methods generate the “./some/path” path given a “./some/path” string<br>
|
||||
<br>
|
||||
With Eclipse 3.3 the above generate “some/path” for the same string (note
|
||||
the “./” stripped)<br>
|
||||
<br>
|
||||
Historically the Managed Build System contains some logic that behaves
|
||||
differently depending on whether the “./” is prefixed or not, e.g.
|
||||
org.eclipse.cdt.managedbuilder.core.IManagedOutputNameProvider is expected
|
||||
to return a one-segment path to force the path to be prepended by the build
|
||||
output [sub]directory path, so returning “./foo.o” and “foo.o” would have
|
||||
different meaning and behavior, i.e. the “./foo.o” would force the foo.o to
|
||||
be located in the root output directory, while “foo.o” would result in
|
||||
putting the foo.o in the output_dir/source/relative/directory/foo.o<br>
|
||||
<br>
|
||||
There was some code in MBS relying on the 3.2 Path behavior, e.g. something
|
||||
like path = Path.fromOSString(“./” + name + extension); Stripping the “./”
|
||||
in eclipse 3.3 resulted in incorrect output calculation for the case the
|
||||
tool wanted to force the output to be located in the build output root
|
||||
directory for.<br>
|
||||
<br>
|
||||
If your tool-chain needs to specify the "./" prefix to the paths, they could
|
||||
do it by using the following construction</p>
|
||||
<p class="MsoNormal" style="margin-top:6.0pt">path = new Path(“./”).append(fileName);</p>
|
||||
<p class="MsoNormal" style="margin-top:6.0pt">instead of </p>
|
||||
<p class="MsoNormal" style="margin-top:6.0pt">path = new Path("./" +
|
||||
fileName);</p></li>
|
||||
<li>
|
||||
<p class="MsoNormal" style="margin-top:6.0pt">Integrating with the new New
|
||||
Project Wizard</p>
|
||||
<p class="MsoNormal" style="margin-top:6.0pt">If no modifications are made
|
||||
the old-style project types should be presented as separate entries in the
|
||||
"Project Types" list of the wizard. In case a tool-integrator is willing to
|
||||
use general project type entries, he/she should refer to the New Project
|
||||
Wizard description for detail.</p></li>
|
||||
</ol>
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
File diff suppressed because it is too large
Load diff
|
@ -7,4 +7,6 @@
|
|||
<topic label="CDT DOM" href="guide/dom/index.html"/>
|
||||
<topic label="Managed Build System Extensibility Document" href="guide/mbs/extensibilityGuide/Managed_Build_Extensibility.html"/>
|
||||
<topic label="Project Template Engine" href="guide/projectTemplateEngine/index.html"/>
|
||||
<topic label="What's new in CDT Build System 4.0" href="guide/cdt_build_system/whats_new/4.0/whats_new_CBS_40.html"/>
|
||||
<topic label="Migrating your tool-chain integration to CDT 4.0" href="guide/cdt_build_system/migration_guides/4.0/migration_guide_40.html"/>
|
||||
</toc>
|
||||
|
|
Loading…
Add table
Reference in a new issue