Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Adding a new tool to MBS

Chris,

Thanks for the advice, but that doesn't do anything. If I give the inputType a buildVariable, it makes no difference to the generated makefile. However, if I give the outputType a buildVariable, than that is added to the makefile as a secondary_output. Note that what I am trying to do is run objcopy on a generated executable to create and SRECord file.

Here is a snippet from the plugin.xml:
     <tool
      commandLinePattern='${COMMAND} ${FLAGS} ${INPUTS} ${OUTPUT}'
      id='com.crt.objcopy'
      isAbstract='true'
      name='%crt.objcopy.name'
      natureFilter='both'
    >
         <inputType
            sources="%crt.exe.extension"
            sourceContentType="org.eclipse.cdt.managedbuilder.core.executableFile"

dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.internal.DefaultNoDependencyCalculator"
        	multipleOfType="false"
        	primaryInput='true'
        	buildVariable="OBJCOPY"
            id="com.crt.objcopy.input">
         </inputType>
         <outputType
        	outputs="%crt.objcopy.output.ext"
        	primaryInputType="com.crt.objcopy.input"
        	primaryOutput='true'
            id="com.crt.objcopy.output">
         </outputType>

      <optionCategory... etc
    </tool>

and in the toolChain definition, I have

          secondaryOutputs='com.crt.objcopy.output'

the generated makefile contains:
(in makefile)

all: four.exe secondary-outputs
<snip>
secondary-outputs: $(COM_CRT_OBJCOPY_OUTPUT_OUTPUTS)

(in sources.mk)
COM_CRT_OBJCOPY_OUTPUT_OUTPUTS :=


Again, TIA
--
Derek


Chris Recoskie wrote:
You have to specify in the inputType in question to use a variable.  This
can be whatever name you wish, MBS will generate the makefile such that all
files of that type are assigned to that variable name in the makefile.

===========================

Chris Recoskie
Team Lead, IBM CDT Team
IBM Toronto
http://www.eclipse.org/cdt



From: Derek Morris <dmsubs@xxxxxxxxxxxxx> To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx> Date: 04/12/2006 08:00 AM Subject Re: [cdt-dev] Adding a new tool to MBS :



Further to this, I found the 'secondaryOutputs' attribute of a toolchain,
which
looks like what I want.

Unfortunately, I can't get it to work for me.

Looking at the generated makefile, it adds a secondary_outputs target which

references a (generated) buildVariable. Unfortunately the buildVariable is
never
assigned, so it doesn't build my secondaryOutput.

I tried using the EXECUTABLES variable but that cause it to build something

called USER_OBJS instead of my target name...

TIA,
--
Derek


Derek Morris wrote:
Could it be done with a fake tool? For example, from a .exe, I want to
create 3 additional files .a, .b and .c, could I define those three
tools and then a fourth (which is the subject of the TargetTool) which
does nothing, but is dependent on .a, .b and .c?

Thanks
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev



Back to the top