Boost logo

Boost-Build :

From: Rene Rivera (grafik666_at_[hidden])
Date: 2003-07-13 11:39:15

[2003-07-11] Paul Schmidt wrote:

>I have two toolset jam files, one for Metrowerks' Playstation2 tools,
>and one for SN Systems' ProDG Playstation2 system.
>In the SN toolset, I have:
>AS = ps2cc ;
>ASFLAGS = -xassembler-with-cpp -Wa,-al ;
>And in the MW toolset, I have:
>AS = asm_r5900_elf ;
>Independently, they work just fine. But when I run:
>bjam -sTOOLS="snps2 mwps2" -d2
>both toolsets attempt to execute
> asm_r5900_elf -xassembler-with-cpp -Wa,-al -o
>bin\hello.elf\snps2\debug\crt0.o crt0.s
>This behavior doesn't seem right to me - I would have thought the
>variables would have been reset between toolset invocations - but of
>course, I could be doing something wrong. Anyone? Beuhler?

Not explicitly doing anything wrong. Just an assumption about how variables
work and when they get used ;-)

The ones you are using are global variables, hence they only have one value.
When they get used it uses the last value on it which in the above example
is the one for the mwps2 toolset.

To fix... you need to set those variables "on" the target so that they get a
specific different value for each target built with the corresponding
toolset. Lucky for you this is something that has come up many times ;-) And
there's "builtin" way to do that. Instead of just assigning the vars you can
use the "flags" rule to set those variables for you:

flags snps2 AS : ps2cc ;
flags snps2 ASFLAGS : -xassembler-with-cpp -Wa,-al ;

flags mwps2 AS : asm_r5900_elf ;
flags mwps2 ASFLAGS : ????? ;

-- grafik - Don't Assume Anything
-- rrivera (at) - grafik (at)
-- 102708583 (at) icq


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at