Boost logo

Boost-Build :

Subject: Re: [Boost-build] aliases for sublibraries
From: Karsten Ahnert (karsten.ahnert_at_[hidden])
Date: 2012-01-17 12:59:50


Ok, I solved that problem:

In the top-level module I created

rule project-install ( libraries * )
{
    install dist
            : $(libraries)
            : <variant>debug:<location>$(INSTALL_DIR)/debug
<variant>debug:<dll-path>$(INSTALL_DIR)/debug
              <variant>release:<location>$(INSTALL_DIR)/release
<variant>debug:<dll-path>$(INSTALL_DIR)/release ;
}

Then, I call this rule in every sublibrary to install.

Thank you,

Karsten

On 01/17/2012 02:43 PM, Nogradi, Chris wrote:
> If I understand you question correctly, you are saying that you have something like this in Jamroot:
>
> project MyProject ;
>
> install stuff : ... ;
>
> and you want to invoke that rule from somewhere in the tree below Jamroot. Then you would do this:
>
> bjam /MyProject//stuff
>
>
> Chris
>
>
> -----Original Message-----
> From: boost-build-bounces_at_[hidden] [mailto:boost-build-bounces_at_[hidden]] On Behalf Of Karsten Ahnert
> Sent: Monday, January 16, 2012 4:58 PM
> To: Boost.Build developer's and user's list
> Subject: Re: [Boost-build] aliases for sublibraries
>
> Thanks you, the second version solves this problem very well.
>
> Now, I have another problem:
>
> I have an install rule which copies every library (and some
> applications) into a separate folder. This rule is in the main Jamroot.
> If I call now bjam somewhere in the the library tree it will not find
> this rule. Any ideas how this rule can be made visible there?
>
> Best regards,
>
> Karsten
>
> On 01/16/2012 11:33 PM, Nogradi, Chris wrote:
>> You should use use-project to do in Jamroot:
>>
>> use-project /MyProject/lib1 : libraries/lib1 ;
>>
>> and refer to it in another lib jam file as /MyProject/lib1//lib1
>>
>> alternatively, I think this will work (but not as good), you could use alias like this in your Jamroot:
>>
>> project MyProject ;
>>
>> alias lib1 : libraries/lib1//lib1 ;
>>
>> and then refer to it in another lib jam file as /MyProject//lib1
>>
>>
>> Chris
>>
>>
>> -----Original Message-----
>> From: boost-build-bounces_at_[hidden] [mailto:boost-build-bounces_at_[hidden]] On Behalf Of Karsten Ahnert
>> Sent: Monday, January 16, 2012 2:35 PM
>> To: Boost.Build developer's and user's list
>> Subject: [Boost-build] aliases for sublibraries
>>
>> Hi,
>>
>> I have a tree like structure for a small software project:
>>
>> Root
>> + Jamroot
>> + apps
>> + app1.exe
>> + ...
>> + Jamfile
>> + libsraries
>> + lib1
>> + source1.cpp
>> + ...
>> + Jamfile
>> + lib2
>> + source1.cpp
>> + ...
>> + Jamfile
>>
>> In each of the lib* directories a static or shared library is created.
>> Now, some of these libraries depend on other for example lib2 depends on
>> lib1 and I want to use aliases to reference on the depend library.
>>
>> I created these aliases in the Jamroot, via
>>
>> alias /MyProject/lib1 : ./libraries/lib1//lib1 ;
>> alias /MyProject/lib2 : ./libraries/lib1//lib2 ;
>>
>> but referencing them does not work. If I call bjam from the root
>> directory I obtain:
>>
>> error: Unable to find file or target named
>> error: '/MyProject/lib1'
>> error: referred from project at
>> error: 'libs/lib2'
>>
>> Is there a easy way to create such aliases? Similar to
>> /boost//filesystem ? I played around with different names (leading
>> slashed) and I tried to use appropriate project names but I was unable
>> to figure out how it works in general.
>>
>> Thank you,
>>
>> Karsten
>>
>> _______________________________________________
>> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
>>
>>
>> This e-mail and any attachments may contain confidential material for the sole use of the intended recipient. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please contact the sender and delete all copies.
>>
>> Thank you for your cooperation.
>>
>> _______________________________________________
>> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
>
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build


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