Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-03-27 03:11:46


Hi Rene,

> I'm porting over my build system from BBv1 to BBv2, and to be nice, I'm
> trying to not hack things up too much. One of the patterns I'm seeing is
> that in writing library targets I end up duplicating many of the
> requirements into the usage-requirements.
>
> * That seems like a waste of typing resources :-)
>
> * It's prone to errors when I need to change one of them and forget to
> change the other.

I agree this can be usability and maintenance issue.

> If it's not already possible to remove that duplication my suggestion
> would be to:
>
> 1. Allow both kinds of requirements in the requirements section.
>
> 2. To tag requirements that are both regular requirements and
> usage-requirements with <*>.

Like Dave, I'm a bit concerned about using <*> which means something
completely different in V1. Maybe, we can just use '*' without '<>'? Or
maybe, some keyword, like "usage". Using just '*' can look like black magic.

> For example:
>
> lib foo
>
> funky.cpp
>
> <define>COOL=1
> <*><define>ENABLE_LOG=1
> <threading>multi:<*><define>THREAD_SAFE=1

As a minor issue, it would be better to put '*' before conditional:

     <*><threading>multi:<define>THREAD_SAFE=1

it might simplify the logic somewhat, as you'll be able to detect such
requirements right at declaration time.

- Volodya

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build V2: http://boost.org/boost-build2

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