Boost logo

Boost-Build :

Subject: Re: [Boost-build] calling child-rules
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2015-03-03 11:44:05


AMDG

On 03/03/2015 04:53 AM, Bart Spiers wrote:
> In our company, we're making the move to b2 as our build system.
> As such, I'm trying to simplify our internal release procedure.
>
> Background:
> We have written a new rule "program" that wraps the exe rule and adds
> a package.install target called "install" so that installing a
> specific application is as easy as calling "b2 install --prefix=<path>".
>
> Of course, when doing a full release we simply want to call "install"
> at the top of the project tree.
> I tried the following in the jamroot:
>
> <so far so good>
>
> local rule install-progs ( id ) {
> for local l in $(all-progs) {
> local prog = [ MATCH .*/(.*) : $(l) ] ;
> install-$(prog) ;
> }
> }
>

So, here's the problem. install-$(prog) is
target, but you're trying to call it like a
rule. Try this (untested):

local rule install-progs ( id ) {
  # Note: MATCH can operate on a list, not just a single element.
  local targets-to-install = [ MATCH .*/(.*) : $(all-progs) ] ;
  alias $(id) : install-$(targets-to-install) ;
}

> <snip>
>
> This however creates the following error :
> rule install-action_fill_pool unknown in module
> Jamfile</home/bisnode/workspace>
>
> <snip>
>
> I also tried working with a modified version of boostcpp.jam, but that
> seems to remove the defauilt-build properties of the programs. Some
> applications must be compiled with <threading>=multi, some not.

If an application *must* be compiled in a specific way,
then you should use requirements rather than default-build.

> Sadly, I lack the knowledge in boost.build to understand how the
> targets generated in boostcpp.jam can use the local aliases.
> I think that understanding this might help in modifying it to allow
> the retention of the application-specific properties.
>

In Christ,
Steven Watanabe


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