Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost-build] building dependencies that use makefiles
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2014-03-23 19:08:55


AMDG

On 03/23/2014 11:24 AM, Mauricio Carneiro wrote:
> I am using boost-build to build my project, but I have added a static
> library as a dependency that is built using GNU make. If I build this
> library manually, I can link it to my project in boost build using this
> simple Jamfile:
>
> lib hts
> :
> : <link>static <file>lib/lib.a
> :
> : <include>lib_headers
> ;
>
> Is there a way to tell boost-build to run make on the directory if the
> lib/lib.a is not present there?
>

You'll need a custom rule that runs make:

path-constant make-dir : path/to/makefile/directory ;
actions external-make
{
    cd $(make-dir) && make
}

make lib.a : : @external-make : <location>directory/of/lib.a ;

alias hts : lib.a : <link>static : : <include>lib_headers ;

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net