Boost logo

Boost-Build :

From: Pedro Ferreira (pedro.ferreira_at_[hidden])
Date: 2004-12-02 05:37:25


Volodya,

I just had to change

toolset.inherit-flags mog : msvc ;

to

toolset.inherit-flags mog.msvc : msvc ;

Thanks!

Pedro

----- Original Message -----
From: "Vladimir Prus" <ghost_at_[hidden]>
To: <jamboost_at_[hidden]>
Sent: Wednesday, December 01, 2004 8:58 AM
Subject: Re: [jamboost] Re: stage rule on windows problem

>
> On Tuesday 30 November 2004 19:00, Pedro Ferreira wrote:
>> Hi Volodya,
>>
>> I tried out the example you sent and modified it for msvc:
>>
>> --------------------------------------------------------
>> feature.feature mog-linking-generator : on off ;
>>
>> class mog-linking-generator : linking-generator
>> {
>> rule __init__ ( id composing ? : source-types + : target-types + :
>> requirements * )
>> {
>> linking-generator.__init__ $(id) $(composing) : $(source-types) :
>> $(target-types) : $(requirements) ;
>> }
>>
>> ...
>> }
>>
>> generators.register [ new mog-linking-generator mog.msvc.link.dll : OBJ
>> SEARCHED_LIB STATIC_LIB IMPORT_LIB : SHARED_LIB IMPORT_LIB RSP :
>> <toolset>msvc <mog-linking-generator> ] ;
>> generators.override mog.msvc.link.dll : msvc.link.dll ;
>>
>> toolset.inherit-flags mog : msvc ;
>> IMPORT msvc : link.dll : mog : msvc.link.dll : LOCALIZE ;
>>
>> rule mog.msvc.link.dll ( targets * : sources * : properties * )
>> {
>> import common ;
>> msvc.link.dll $(targets) : $(sources) : $(properties) ;
>> }
>>
>> --------------------------------------------------------
>>
>> However, when the 'msvc.link.dll' rule eventually gets called, $(.LD)
>> expands to an empty string.
>> Am I doing something wrong in the imports?
>
> Seems so. I assume this code is in file mog.jam? Then, your generator will
> call action rule using fully qualified name 'mog.msvc.link.dll'. You then
> import msvc.link.dll into the 'mog' module and define your own
> 'mog.msvc.link.dll'. But, the latter definition is in mog module already.
> Fully qualified name of it is mog.mog.msvc.link.dll. As a result, your
> rule
> definition is simply ignored. Try adding ECHO statement to it.
>
> Another issue is that inherit-flags assigns inherited flags to the
> 'mog.link.dll' rule. (The flags are assigned to specific rules). So, those
> flags are not used for 'mog.msvc.link.dll'.
>
> I think if you rename the generator and the rule to "mog.link.dll" things
> will
> work.
>
> - Volodya
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>

 


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