Patch for typgen, adding -x option

I wanted to pass typegen an option that informs it for which
OROCOS_TARGET it needs to find the .pc files, while still keeping the
'normal' name for looking up the .tlb files.

The minor patch in attachment adds such an option, -x <target>

Ok to apply ?

Peter

AttachmentSize
0001-typegen-add-x-target-option-to-make-i-target-aware.patch2.43 KB

Patch for typgen, adding -x option

On 02/01/2013 12:19 PM, Peter Soetens wrote:
> I wanted to pass typegen an option that informs it for which
> OROCOS_TARGET it needs to find the .pc files, while still keeping the
> 'normal' name for looking up the .tlb files.
>
> The minor patch in attachment adds such an option, -x <target>
>
> Ok to apply ?
You should create a toplevel imports array, gather all the -i options
and resolve them at once after the call to parser.parse. Otherwise, the
place of the -x option will matter.

Moreover, there is already an Orocos::Generation.orocos_target attribute
that picks up the OROCOS_TARGET envvar automatically. You should
probably use that by default, and set it within the -x option.

Sylvain

Patch for typgen, adding -x option

On Fri, Feb 1, 2013 at 2:01 PM, Sylvain Joyeux <sylvain [dot] joyeux [..] ...> wrote:
> On 02/01/2013 12:19 PM, Peter Soetens wrote:
>>
>> I wanted to pass typegen an option that informs it for which
>> OROCOS_TARGET it needs to find the .pc files, while still keeping the
>> 'normal' name for looking up the .tlb files.
>>
>> The minor patch in attachment adds such an option, -x <target>
>>
>> Ok to apply ?
>
> You should create a toplevel imports array, gather all the -i options and
> resolve them at once after the call to parser.parse. Otherwise, the place of
> the -x option will matter.

I know, the -h docs of -x mention this...I'll see if I have the ruby
skills to implement this

>
> Moreover, there is already an Orocos::Generation.orocos_target attribute
> that picks up the OROCOS_TARGET envvar automatically. You should probably
> use that by default, and set it within the -x option.

I see, but you mean: override it with the -x option ?

>
> Sylvain

Peter

Patch for typgen, adding -x option

On 02/01/2013 02:08 PM, Peter Soetens wrote:
>
> I see, but you mean: override it with the -x option ?
Yes. Use Orocos::Generation.orocos_target instead of your target_suf
variable and set Orocos::Generation.orocos_target = argument_value in -x.

Sylvain