Thanks! 

I'm sure it will all make sense after it sinks through my dense skull.

Regards,
Mark

Vladimir Prus <ghost@cs.msu.su> wrote:
On Thursday 26 January 2006 15:36, Mark Evans wrote:
> First of all, I'd like to extend my gratitude and admiration to the
> creators of this cool toolset. I'm sold on the concept.
>
> Now as I said in an earlier email I'm in the process of defining a new
> toolset for HP NonStop (think Tandem) compilers. I'm wresting with the
> following problem:
>
> The choice of linker tool (ld, nld, eld) for a given program or library
> depends on target architecture variant and an attribute (pic=yes|no) that
> can vary within the source tree. My toolset "nsk" init rule, thus, cannot
> fix the linker program for the entire source tree. I can employ a perl
> script that looks through the flags and then invokes the appropriate
> linker. But how would you experts tackle this problem with bjam rules?
> Is there an example in the tools directory or elsewhere that illustrates a
> good pattern for this?

I'd take the simple approach:

rule init
{
.ld = your-detection-code-for-ld-binary-location ;
.nld = your-detection-code-for-nld-binary-location ;
}

rule compile ( targets * : sources * : properties * )
{
if true in $(properties)
{
TOOL on $(targets) = $(.nld) ;
}
else
{
TOOL on $(targets) = $(.ld) ;
}
}

action compile
{
$(TOOL) -o $(<) $(>)
}


> I would search the bjam archives but there doesn't seem to be a search
> function at the website.

Hmm, do we indeed have no search on lists.boost.org? Anybody has any ideas if
this can be added?

- Volodya
_______________________________________________
Boost-build mailing list
Boost-build@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-build