Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-12-18 02:09:53


David Abrahams wrote:

> >> It should be very easy to get builtin rule declarations to go into a
> >> specific module. You could even do it by searching for "." in the
> >> name.
> >
> > Interesting. In this case one would not need the IMPORT/EXPORT stuff at
> > all, right?
>
> Well, not for this case.

Ok.

> > But then the only difference with my proposal is that builtin is added
> > to module immediately, whereas for my approach they are hidden unless you
> > call 'NATIVE_RULE'. This allows to leave the original definition of the
> > rule there and just add NATIVE_RULE call after it -- i.e. you can easily
> > switch between C and jam implementation.
>
> Why does it matter which one replaces the other?
> You can always replace the C implementation with the jam one later.

Suppose you have builtin 'difference' added to 'set' module on bjam startup.
Them, if you add

rule difference ( ) { }

to set.jam, the builtin definition is gone forever. So, to use builtin
version, you need either remove jam definition completely, or change name,
say to 'difference_'. This leads to the issues I've described: doc.jam module
won't see the rule, and you can't make NATIVE_RULE gracefully handle the case
where native rule is not available.

- 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