Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Applied Patch: YABM - Yet Another Build Model

I have committed some greenfields work that we've done on the build model.  I have put this code in new packages under the build folder in cdt.core (and cdt.ui.tests) called org.eclipse.cdt.core.build.managed and org.eclipse.cdt.internal.core.build.managed.  Unfortunately new folders don't get picked up by the Create Patch mechanism (not sure why yet).  But they are in CVS now.

 

The main objective of this model is to be as generic as possible to allow many different types of tools to be included in the CDT managed build process, e.g. yacc, lex, gcj, etc.  Our next steps will be to finish implementation of the model, build UI components around this, and then create builders that generate makefiles and that run the tools directly.  Wherever it makes sense, we will integrate components from the Timesys build system to ensure we don't lose the great ideas that Sam has come up with.

 

Please forward comments/questions to the cdt-dev list.

 

Cheers,

Doug Schaefer

Senior Staff Software Engineer

Rational Software - IBM Software Group

Ottawa (Kanata), Ontario, Canada

 

Index: plugin.xml
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/plugin.xml,v
retrieving revision 1.19
diff -u -r1.19 plugin.xml
--- plugin.xml	28 Feb 2003 21:29:44 -0000	1.19
+++ plugin.xml	7 Apr 2003 02:35:18 -0000
@@ -11,9 +11,6 @@
          <export name="*"/>
       </library>
    </runtime>
-<!-- ======================================================================= -->
-<!-- The C Plugin                                                            -->
-<!-- ======================================================================= -->
    <requires>
       <import plugin="org.eclipse.core.resources"/>
       <import plugin="org.eclipse.core.runtime"/>
@@ -30,12 +27,12 @@
    <extension-point id="CBuildModel" name="%CBuilder.name"/>
    <extension-point id="ProcessList" name="%ProcessList.name" schema="schema/ProcessList.exsd"/>
    <extension-point id="BinaryParser" name="BinaryParser"/>
-
    <extension-point id="CToolchain" name="C/C++ Toolchain Provider" schema="schema/CToolchain.exsd"/>
    <extension-point id="CBuildConfiguration" name="C/C++ Build Configuration" schema="schema/CBuildConfiguration.exsd"/>
    <extension-point id="CTool" name="C/C++ Tool" schema="schema/CTool.exsd"/>
    <extension-point id="CBuildVariable" name="C/C++ Build Variable" schema="schema/CBuildVariable.exsd"/>
    <extension-point id="CToolType" name="C/C++ Tool Type" schema="schema/CToolType.exsd"/>
+   <extension-point id="ManagedBuildInfo" name="Managed Build Tools" schema="schema/ManagedBuildTools.exsd"/>
 
    <extension
          point="org.eclipse.cdt.core.CToolType">
@@ -76,20 +73,27 @@
             id="org.eclipse.cdt.core.tool.strip">
       </type>
    </extension>
-
-   <!-- Define the list of the Binary Parser provided by the CDT -->
-   <extension id="ELF" name="Elf Parser" point="org.eclipse.cdt.core.BinaryParser">
-     <cextension>
-       <run class="org.eclipse.cdt.internal.core.model.parser.ElfParser"/>
-     </cextension>
-  </extension>
-
-  <extension id="PE" name="PE Windows Parser" point="org.eclipse.cdt.core.BinaryParser">
-    <cextension>
-      <run class="org.eclipse.cdt.internal.core.model.parser.PEParser"> </run>
-    </cextension>
-  </extension>
-
+<!-- Define the list of the Binary Parser provided by the CDT -->
+   <extension
+         id="ELF"
+         name="Elf Parser"
+         point="org.eclipse.cdt.core.BinaryParser">
+      <cextension>
+         <run
+               class="org.eclipse.cdt.internal.core.model.parser.ElfParser">
+         </run>
+      </cextension>
+   </extension>
+   <extension
+         id="PE"
+         name="PE Windows Parser"
+         point="org.eclipse.cdt.core.BinaryParser">
+      <cextension>
+         <run
+               class="org.eclipse.cdt.internal.core.model.parser.PEParser">
+         </run>
+      </cextension>
+   </extension>
    <extension
          id="cbuilder"
          name="C Builder"
Index: schema/ManagedBuildTools.exsd
===================================================================
RCS file: schema/ManagedBuildTools.exsd
diff -N schema/ManagedBuildTools.exsd
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ schema/ManagedBuildTools.exsd	7 Apr 2003 02:35:21 -0000
@@ -0,0 +1,329 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.cdt.core">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.cdt.core" id="ManagedBuildTools" name="Managed Build Tools"/>
+      </appInfo>
+      <documentation>
+         [Enter description of this extension point.]
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <complexType>
+         <sequence>
+            <element ref="target"/>
+            <element ref="tool"/>
+            <element ref="configuration"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="tool">
+      <complexType>
+         <sequence>
+            <element ref="option"/>
+            <element ref="optionCategory"/>
+         </sequence>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="sources" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="outputs" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="dependencyCalculator" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="option">
+      <complexType>
+         <sequence>
+            <element ref="optionEnum"/>
+         </sequence>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="type" use="default" value="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+            <simpleType>
+               <restriction base="string">
+                  <enumeration value="string">
+                  </enumeration>
+                  <enumeration value="enumeration">
+                  </enumeration>
+               </restriction>
+            </simpleType>
+         </attribute>
+         <attribute name="default" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="category" type="string">
+            <annotation>
+               <documentation>
+                  This is the id of the option category for this option.  The id can be the id of the tool which is also a category.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="optionEnum">
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="configuration">
+      <complexType>
+         <sequence>
+            <element ref="toolRef"/>
+         </sequence>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="platform" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="toolRef">
+      <complexType>
+         <sequence>
+            <element ref="optionRef"/>
+         </sequence>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="optionRef">
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="value" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="target">
+      <annotation>
+         <documentation>
+            Represents a type of resource that is the target of the build process, for example, a Linux Library.  A target contains a sequence of tool definitions.  Targets are arranged in an inheritance hierarchy where a target inherits the list of tools from it&apos;s parent and can add to or override tools in this list.
+         </documentation>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="tool"/>
+         </sequence>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="isAbstract" type="boolean" use="default" value="false">
+            <annotation>
+               <documentation>
+                  This is a UI property.  If set to true, users should not be able to create project configurations targeted at this target.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="parent" type="string">
+            <annotation>
+               <documentation>
+                  The id of a target that this tool inherits from.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="optionCategory">
+      <complexType>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         [Enter the first release in which this extension point appears.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         [Enter extension point usage example here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         [Enter API information here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         [Enter information about supplied implementation of this extension point.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         
+      </documentation>
+   </annotation>
+
+</schema>
Index: .classpath
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/.classpath,v
retrieving revision 1.3
diff -u -r1.3 .classpath
--- .classpath	4 Mar 2003 18:25:45 -0000	1.3
+++ .classpath	7 Apr 2003 02:35:55 -0000
@@ -1,19 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
     <classpathentry kind="src" path="src/"/>
-    <classpathentry kind="src" path="ui"/>
-    <classpathentry kind="src" path="core"/>
-    <classpathentry kind="src" path="model"/>
-    <classpathentry kind="src" path="parser"/>
+    <classpathentry kind="src" path="ui/"/>
+    <classpathentry kind="src" path="core/"/>
+    <classpathentry kind="src" path="model/"/>
+    <classpathentry kind="src" path="build"/>
+    <classpathentry kind="src" path="/org.apache.xerces"/>
     <classpathentry kind="src" path="/org.eclipse.core.boot"/>
     <classpathentry kind="src" path="/org.eclipse.core.resources"/>
     <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
     <classpathentry kind="src" path="/org.eclipse.cdt.core"/>
+    <classpathentry kind="src" path="/org.eclipse.cdt.core.linux"/>
+    <classpathentry kind="src" path="/org.eclipse.cdt.core.qnx"/>
+    <classpathentry kind="src" path="/org.eclipse.cdt.core.solaris"/>
+    <classpathentry kind="src" path="/org.eclipse.cdt.core.win32"/>
     <classpathentry kind="src" path="/org.eclipse.cdt.ui"/>
     <classpathentry kind="src" path="/org.eclipse.swt"/>
     <classpathentry kind="src" path="/org.eclipse.ui"/>
     <classpathentry kind="src" path="/org.junit"/>
-    <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
-    <classpathentry kind="src" path="/org.apache.xerces"/>
+    <classpathentry kind="src" path="/org.eclipse.update.core"/>
+    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
     <classpathentry kind="output" path="bin"/>
 </classpath>
Index: .project
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/.project,v
retrieving revision 1.1
diff -u -r1.1 .project
--- .project	20 Aug 2002 16:35:24 -0000	1.1
+++ .project	7 Apr 2003 02:35:55 -0000
@@ -5,12 +5,17 @@
 	<projects>
 		<project>org.apache.xerces</project>
 		<project>org.eclipse.cdt.core</project>
+		<project>org.eclipse.cdt.core.linux</project>
+		<project>org.eclipse.cdt.core.qnx</project>
+		<project>org.eclipse.cdt.core.solaris</project>
+		<project>org.eclipse.cdt.core.win32</project>
 		<project>org.eclipse.cdt.ui</project>
 		<project>org.eclipse.core.boot</project>
 		<project>org.eclipse.core.resources</project>
 		<project>org.eclipse.core.runtime</project>
 		<project>org.eclipse.swt</project>
 		<project>org.eclipse.ui</project>
+		<project>org.eclipse.update.core</project>
 		<project>org.junit</project>
 	</projects>
 	<buildSpec>
Index: plugin.xml
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui.tests/plugin.xml,v
retrieving revision 1.3
diff -u -r1.3 plugin.xml
--- plugin.xml	6 Jan 2003 19:47:36 -0000	1.3
+++ plugin.xml	7 Apr 2003 02:35:55 -0000
@@ -24,4 +24,65 @@
    </requires>
 
 
+   <extension
+         id="buildTest"
+         name="Tools for Build Test"
+         point="org.eclipse.cdt.core.ManagedBuildInfo">
+      <target
+            name="Linux"
+            isAbstract="true"
+            id="linux">
+         <tool
+               name="Compiler"
+               id="linux.compiler">
+            <optionCategory
+                  name="Optimization Options"
+                  id="linux.compiler.optimization">
+            </optionCategory>
+            <option
+                  name="Compiler Flags"
+                  type="string"
+                  id="linux.compiler.flags">
+            </option>
+            <option
+                  default="-O"
+                  name="Optimization Flags"
+                  type="string"
+                  category="linux.compiler.optimization"
+                  id="linux.compiler.optimizationFlags">
+            </option>
+         </tool>
+      </target>
+      <target
+            name="Linux Executable"
+            parent="linux"
+            isAbstract="false"
+            id="linux.exec">
+         <tool
+               name="Linker"
+               id="org.eclipse.cdt.ui.tests.tool.linux.link">
+         </tool>
+      </target>
+      <target
+            name="Linux Shared Library"
+            parent="linux"
+            isAbstract="false"
+            id="linux.so">
+         <tool
+               name="Linker"
+               id="org.eclipse.cdt.ui.tests.tool.linux.solink">
+         </tool>
+      </target>
+      <target
+            name="Linux Static Library"
+            parent="linux"
+            isAbstract="false"
+            id="linux.lib">
+         <tool
+               name="Archiver"
+               id="org.eclipse.cdt.ui.tests.tool.linux.ar">
+         </tool>
+      </target>
+   </extension>
+
 </plugin>

Back to the top