Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-02-14 02:25:52


On Friday 11 February 2005 19:24, David Abrahams wrote:

> >> if (<toolset>foo || <toolset>bar)
> >> {
> >> build /lib//lib1
> >> build /lib//lib2
> >> ...
> >> }
> >
> > Can be approximated with
> >
> > alias others : /libs//lib1 /libs//lib2 ;
> > explicit others ;
> > alias build_others : others : <toolset>foo ;
> > alias build_others : others : <toolset>bar ;
> > alias build_others ; # catch-all do-nothing alternative
>
> Just on a stylistic note: I think some users of other build systems
> (like Scons) may find it a little disturbing that we aren't giving
> them a "nice, procedural way" to describe what should happen.
> Personally I'm all for declarative DSLs, but I know that not everybody
> thinks that way.

We sure have building blocks for "nice, procedural way" -- everything in
"tools" directory is procedural code -- but we don't expose those building
blocks via nice UI.

We have only one low-level rule -- the 'make' rule, and that's not enough. We
might want a rule that gives the user more control over the build process
without the need to declare a generator. Say:

generate a : a.cpp : my-rule ;

rule my-rule ( # Same parameters as for generator.run
)
{
}

This will first construct source targets ('a.cpp') and them pass them to the
'my-rule' rule, which will have the same parameters as generator.run and can
do everything a generator can. The only difference is that it's more
lightweight for the user.

This is just a half-baked idea, maybe we need something else.

- Volodya

 


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