Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] [CDT Internal Builder] how to handling several tools with the same input?

Hi all,

I would like to use MBS in the following way:
We have 4 file extensions (ext_a, ext_b, ext_c & ext_d)
and 3 tools:
ext_a --> ext_b (intermediate tool)
ext_b --> ext_c (final tool 1)
ext_b --> ext_d (final tool 2)
I declare "final tool 1" as the target tool of my toolchain, and I use the secondaryOutputs attribute to require the "ext_d" file generation.

I create a new CDT project using this toolchain, and I create a "test.ext_a" source file. When I launch the build, "test.ext_b" and "test.ext_c" files are correctly generated, but nothing is done for "test.ext_d".

I noticed that if I go to the project properties --> C/C++ build --> Tool chain editor --> Select Tools, the UI warns me about a tool conflict between "final tool 1" & "final tool 2"

I guess it is due to the fact that they require the same file extension as an input... I surely missed something in the configuration...

But know, how can I tune MBS in order to make it do what I want?

Thanks in advance.
David

---------------------------------------------
Please find below an extract of my plugin.xml

<extension
         point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
      <tool
            command="cmd /c copy"
            commandLinePattern="${COMMAND} ${INPUTS} ${OUTPUT}"
            id="DummyMBSExtender.toolbase"
            isAbstract="true"
            name="Base tool">
      </tool>
      <projectType
            buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe"
            id="DummyMBSExtender.projectType1"
            isAbstract="false">
         <configuration
               artifactExtension="ext_c"
               id="DummyMBSExtender.configuration1"
               name="Dummy Configuration">
            <toolChain
                  id="DummyMBSExtender.toolChain1"
                  isAbstract="false"
                  name="Dummy Toolchain"
                  secondaryOutputs="DummyMBSExtender.outputType.ext_d"
                  targetTool="DummyMBSExtender.finalTool1">
               <builder
                     id="DummyMBSExtender.builder1"
                     isAbstract="false"
                     isVariableCaseSensitive="false"
                     superClass="org.eclipse.cdt.build.core.internal.builder">
               </builder>
               <tool
                     id="DummyMBSExtender.finalTool1"
                     isAbstract="false"
                     name="Final Tool"
                     superClass="DummyMBSExtender.toolbase">
                  <inputType
                        id="DummyMBSExtender.inputType.ext_b"
                        name="ext_b input"
                        primaryInput="true"
                        sources="ext_b">
                  </inputType>
                  <outputType
                        id="DummyMBSExtender.outputType.ext_c"
                        name="ext_c output"
                        outputs="ext_c"
                        primaryOutput="true">
                  </outputType>
               </tool>
               <tool
                     id="DummyMBSExtender.tool3"
                     isAbstract="false"
                     name="Intermediate tool"
                     superClass="DummyMBSExtender.toolbase">
                  <inputType
                        id="DummyMBSExtender.inputType.ext_a"
                        name="ext_a input"
                        primaryInput="true"
                        sources="ext_a">
                  </inputType>
                  <outputType
                        id="DummyMBSExtender.outputType.ext_b"
                        name="ext_b output"
                        outputs="ext_b"
                        primaryOutput="true">
                  </outputType>
               </tool>
               <tool
                     id="DummyMBSExtender.finalTool2"
                     isAbstract="false"
                     name="Other Final Tool"
                     superClass="DummyMBSExtender.toolbase">
                  <inputType
                        id="DummyMBSExtender.inputType.ext_b.2"
                        name="ext_b input"
                        primaryInput="true"
                        sources="ext_b">
                  </inputType>
                  <outputType
                        id="DummyMBSExtender.outputType.ext_d"
                        name="ext_d output"
                        outputs="ext_d"
                        primaryOutput="true">
                  </outputType>
               </tool>
            </toolChain>
         </configuration>
      </projectType>
   </extension>



Back to the top