Boost logo

Boost-Build :

Subject: Re: [Boost-build] [Boost-users] [boost-build]how to configure custom targets
From: Sandeep Gupta (gupta.sandeep_at_[hidden])
Date: 2009-01-27 14:58:08


On Tue, Jan 27, 2009 at 11:29 AM, Vladimir Prus
<vladimir_at_[hidden]> wrote:
> Sandeep Gupta wrote:
>
>> On Tue, Jan 27, 2009 at 10:08 AM, Vladimir Prus <ghost_at_[hidden]> wrote:
>>
>>>
>>> On Tuesday 27 January 2009 09:40:32 Sandeep Gupta wrote:
>>> > Hi Steven,
>>> > Thanks. I should be able to fix it using this info. However I have hit
>>> > another, but somewhat related, roadblock. Tried the documentation but
>>> > failed to find relevant snippets.
>>> >
>>> > Using generators i have created these two custom rules
>>> > 1) mp a : a.gp ;
>>> > which converts a.gp to a.mp
>>> > 2) mps a : a.mp
>>> > which converts a.mp to a.mps
>>> >
>>> > Invoking bjam complains "unable to find target a.mp". The problem is that I
>>> > am unable to specify that "a.mp is generated by rule 1".
>>> > In case i am missing something obvious please point me to relevant portion
>>> > of the documentation.
>>>
>>>
>>> Sandeep,
>>>
>>> Please provide a minimal project reproducing this problem. The above description
>>> leaves enough freedom to make it impossible to diagnose the problem.
>>>
>>> Thanks,
>>> Volodya
>>>
>>>
>>
>>
>> Hi Volodya,
>>
>> Let me explain the project:
>> File mpTOmps.jam has following entry
>> import type ;
>> type.register MP : mp ;
>> type.register MPS : mps ;
>> import generators ;
>> generators.register-standard mp.inline-file : MP : MPS ;
>> actions inline-file
>> {
>> "./tomps.sh" $(>) $(<)
>> }
>>
>>
>> This allows me to write in jamfile:
>> mps a : a.mp ;
>>
>> Similarly file gpTOmp.jam has following entry
>> import mpTOmps;
>> import type ;
>> type.register GP : gp ;
>> import generators ;
>> generators.register-standard gp.inline-file : GP : MP ;
>> actions inline-file
>> {
>> "gnuplot" $(>)
>> }
>> Hence i can write mp a : x.gp ; where "gnuplot x.gp" will produce a.mp.
>>
>> Now I am getting error "No best alternative for a". I think the
>> problem is that somehow i have to express that a.mps is dependent upon
>> a.mp. It could be that I am wrong and overlooking something very
>> trivial.
>
> When you define two targets with the same name, as you do here, Boost.Build
> believe these are two alternatives, to be used in different cases. Does:
>
> mps a.mps : a.mp ;
> msp a.mp : x.gp ;
>
> work?
>
> - Volodya
>

Yes it work. Thanks so much and more so for the prompt reply. I was
under wrong impression that
"mp a" and "mps a" would be considered as separate target since type
mp and mps automatically signify different output-file namely a.mp and
a.mps.

Thanks,
Sandeep


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk