Boost logo

Boost-Build :

From: Phillip Seaver (phil_at_[hidden])
Date: 2008-02-21 07:34:02


Jurko Gospodnetić wrote:
> Hi Eli.
>
>
>> lib name : one.ec two.c : <include>. : : <include>. ;
>>
>> And all is well now.
>>
>
> Glad to hear it. :-)
>
> One more remark... I personally would not use <include>. here as that
> makes presumptions (most like undocumented) on which folder you are
> running your build from. If you really mean
> the-folder-your-Jamfile-is-in I would rather use something like this:
>
> path-constant SOURCE_FOLDER : . ;
>
> lib name
> : one.ec two.c
> : <include>$(SOURCE_FOLDER)
> :
> : <include>$(SOURCE_FOLDER) ;
>
>
> Hope this helps.
>
> Best regards,
> Jurko Gospodnetić

That's unnecessary, actually. Since <include> is a "path" feature, it
keeps track of the correct directory. That's one of the features that
initially attracted me to boost build, since I was sick of updating
paths every time a library changed. :-)

>From
http://boost.org/boost-build2/doc/html/bbv2/reference/definitions.html#bbv2.reference.features.attributes

    The value of a path feature specifies a path. The path is treated as
    relative to the directory of Jamfile where path feature is used and
    is translated appropriately by the build system when the build is
    invoked from a different directory

Phillip


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