Boost logo

Boost-Build :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2002-08-06 05:03:32


Vladimir Prus wrote:
>
> OK. Guess I should go into some details. In order to perform any build
> action, the build system loads appropriate toolset file (is it msvc in your
> case?).

It's msvc, gcc and IBM AIX later on.

> It then uses "flags" rule to create a variables based on required
> properties, which variables are used in build actions.
>
> Precisely, you have <linkflags>x
> msvs-tools.jam has
> flags LINKFLAGS <linkflags> ;
> which cause all values of <linkflags> properties to be added the the variable
> LINKFLAGS. Then, rule called
> vc-Link uses that variable.
>
> Now, how is it all related to your question. I think that order ot options
> will be retained in any case. If you look at vc-Link rule you'll notice that
> it uses LINKFLAGS not in the end of command line. Don't know why, actually --
> I actually have no idea about options order even for gcc :-)
>
> You can try moving LINKFLAGS to the end of command line in vc-Link and see if
> this works. Otherwise,
> a new variable would have to be introduced, similar to LINKFLAGS.

Aha, I think I can work it out now. Let's see...

rule link-oci-libs ( toolset variant : properties * )
{
switch $(toolset)
{
case gcc* :
{
return $(properties) <linkflags>"blah blah" ;
}
case msvc* :
{
return $(properties) <find-library>ociw32 ;
}
}
}

exe foo : $(CPP_SOURCES).cpp : link_oci_libs ;

Hmm, is there any way to execute a shell command from within
a rule? Something like $(SHELL: make -f somefile echo_libs).

>
> - Volodya

Thanks a lot for your help!
Markus

 


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