Subject: Re: [Boost-build] Boost-build Digest, Vol 55, Issue 7
From: Laszlo Marak (ujoimro_at_[hidden])
Date: 2010-03-11 10:59:16
thank you for your answer. The problem is, that in your solution you pre-
suppose, that the new compiler has the same parametrization and usage in
general as gcc. It's only the library that is compatible with gcc. Forgive me
being a little insistive, but isn't there simply a way to make the actions in
my-rule being called before bjam starts to compile the executable file? Also,
where is this extenders manual?
On 2010. March 11. Thursday 13:53:54 boost-build-request_at_[hidden]
> Message: 5
> Date: Thu, 11 Mar 2010 15:13:34 +0300
> From: Vladimir Prus <ghost_at_[hidden]>
> To: "Boost.Build developer's and user's list"
> Subject: Re: [Boost-build] how do I create a new bjam target?
> Message-ID: <4B98DE6E.7020706_at_[hidden]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Marak Laszlo wrote:
> > Dear Boost.build experts,
> > I have a problem with bjam, that has been troubling me for a week. I
> > would like to add a new compiler support to bjam. This compiler returns
> > the same object file as gcc (compatible). Now, I have declared a rule
> > called
> > rule my-rule ( name : source ) ...
> > ...
> > and somewhere in it there is a
> > NOTFILE $(name:G=e) ;
> > do-nothing $(name:G=e) : $(so) ;
> > when I call the rule in the jamfile
> > my-rule npink : src/some_src.cpp
> > nothing happens.
> What is happening here is that your rule tries to declare bjam targets,
> like $(name:G=e). However, when you have:
> exe a : a.cpp ;
> this does not create any bjam targets at all. Rather, it creates a
> metatarget, and only after Jamfiles are parsed, the metatarget is
> generated to create bjam targets.
> Did you read the extender's manual? I think the easiest way to do what you
> want is something like:
> import feature ;
> feature.extends toolset : yougcc ;
> import generators ;
> generators.register $(__name__).compile : OBJ : CPP :
> <toolset>yourgcc ;
> and then, in Jamfile, have this:
> obj a : a.cpp : <toolset>yourgcc ;
> This is untested code, but should be mostly right. Does this help?
> - Volodya
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