how to get a different output location for lib and obj files?

View: New views
4 Messages — Rating Filter:   Alert me  

how to get a different output location for lib and obj files?

by Fadi Beyrouti :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

Is there a way to dispatch the object files that make up a library to a
differnt output location that the output directory of a library? To make my
point clearer please consider the following WRONG example (but you get the idea)

lib mylib :
    file1.cpp
    file2.cpp
    file3.cpp
   <location>output/lib
   <object-file-location>output/obj ;

Is there some way to achieve that?

Thanks


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Re: how to get a different output location for lib and obj files?

by Brian Ravnsgaard Riis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Fadi Beyrouti skrev:

> Hello,
>
> Is there a way to dispatch the object files that make up a library to a
> differnt output location that the output directory of a library? To make my
> point clearer please consider the following WRONG example (but you get the idea)
>
> lib mylib :
>     file1.cpp
>     file2.cpp
>     file3.cpp
>    <location>output/lib
>    <object-file-location>output/obj ;
>
> Is there some way to achieve that?

Not directly, I think. However:

lib a ... ;
lib b ... ;
lib c ... ;

install stage
    :   a b c
    :   <location>./stage
    ;

Then "bjam stage" will copy your libraries to ./stage from your project
root (and even build them first if needed).

HTH
 /Brian

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkq2JMEACgkQk1tAOprY6QHzGACfTYqDAo9RvXCSXu2cOOMwC1ar
904AnAnDg/f7Ya4Ys+rh/RD/z7wsRh4B
=YUIo
-----END PGP SIGNATURE-----
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Re: how to get a different output location for lib and obj files?

by Fadi Beyrouti :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Brian Ravnsgaard Riis <brian <at> ravnsgaard.net> writes:

> Not directly, I think. However:
>
> lib a ... ;
> lib b ... ;
> lib c ... ;
>
> install stage
>     :   a b c
>     :   <location>./stage
>     ;
>
> Then "bjam stage" will copy your libraries to ./stage from your project
> root (and even build them first if needed).
>
> HTH
>  /Brian
>
>

I guess that can do the trick :)

Thanks

--
Fadi,





_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Re: how to get a different output location for lib and obj files?

by Matthew Chambers-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Fadi Beyrouti wrote:

> Brian Ravnsgaard Riis <brian <at> ravnsgaard.net> writes:
>
>  
>> Not directly, I think. However:
>>
>> lib a ... ;
>> lib b ... ;
>> lib c ... ;
>>
>> install stage
>>     :   a b c
>>     :   <location>./stage
>>     ;
>>
>> Then "bjam stage" will copy your libraries to ./stage from your project
>> root (and even build them first if needed).
>>
>> HTH
>>  /Brian
>>
>>
>>    
>
> I guess that can do the trick :)
It is possible to do directly, but you must specify an obj target for
each source file:
obj a : a.cpp : <location>obj-location ;

The install rule will copy them to a different location, but not build
them there to begin with. To build them there, you must use the
<location> feature. But moving the libs instead via install is probably
easier.

-Matt
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build