Library Dependencies (n00b question)

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

Library Dependencies (n00b question)

by demised :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey all,

I am trying to create a library that depends on a large number of other library files.  In Visual Studio, I simply specify all the libraries like so: ../dependencies/libs/*.a

In the Jamfile, I am simulating that like this:

lib dependencies :
        : <file>$(env)/custom/lib1.a
                <file>$(env)/custom/lib2.a
                <file>$(env)/custom/lib3.a
# and so on...
        ;

Is there any way I can do a glob command instead?  The other option I tried was to simply provide a <linkflag> option to my library, but that didn't work either.

Any ideas?

Thanks!

---Mike

Re: Library Dependencies (n00b question)

by Phillip Seaver :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

demised wrote:

> Hey all,
>
> I am trying to create a library that depends on a large number of other
> library files.  In Visual Studio, I simply specify all the libraries like
> so: ../dependencies/libs/*.a
>
> In the Jamfile, I am simulating that like this:
>
> lib dependencies :
>         : <file>$(env)/custom/lib1.a
>                 <file>$(env)/custom/lib2.a
>                 <file>$(env)/custom/lib3.a
> # and so on...
>         ;
>
> Is there any way I can do a glob command instead?  The other option I tried
> was to simply provide a <linkflag> option to my library, but that didn't
> work either.
>
> Any ideas?
>
> Thanks!
>
> ---Mike
>  

How about this?

    local mydeps = [ glob $(env)/custom/lib*.a ] ;
    lib dependencies :
        : <file>$(mydeps)
    ;


Because of the way Jam works, that will get expanded to
"<file>$(env)/custom/lib1.a <file>$(env)/custom/lib2.a ..."  As far as I
know, you have to use a variable, because "<file>[ glob
$(env)/custom/lib*.a ]" won't work the same way.

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

Re: Library Dependencies (n00b question)

by demised :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Phillip,

That did the trick!  Thanks so much!

--Mike

On Sun, 13 Jan 2008 17:28:11 -0800, Phillip Seaver <phil@...> wrote:

> demised wrote:
>> Hey all,
>>
>> I am trying to create a library that depends on a large number of other
>> library files.  In Visual Studio, I simply specify all the libraries  
>> like
>> so: ../dependencies/libs/*.a
>>
>> In the Jamfile, I am simulating that like this:
>>
>> lib dependencies :
>>         : <file>$(env)/custom/lib1.a
>>                 <file>$(env)/custom/lib2.a
>>                 <file>$(env)/custom/lib3.a
>> # and so on...
>>         ;
>>
>> Is there any way I can do a glob command instead?  The other option I  
>> tried
>> was to simply provide a <linkflag> option to my library, but that didn't
>> work either.
>>
>> Any ideas?
>>
>> Thanks!
>>
>> ---Mike
>>
>
> How about this?
>
>     local mydeps = [ glob $(env)/custom/lib*.a ] ;
>     lib dependencies :
>         : <file>$(mydeps)
>     ;
>
>
> Because of the way Jam works, that will get expanded to
> "<file>$(env)/custom/lib1.a <file>$(env)/custom/lib2.a ..."  As far as I
> know, you have to use a variable, because "<file>[ glob
> $(env)/custom/lib*.a ]" won't work the same way.
>
> Phillip
> _______________________________________________
> Unsubscribe & other changes:  
> http://lists.boost.org/mailman/listinfo.cgi/boost-build


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