|
Boost-Build : |
From: Jurko GospodnetiÄ (jurko.gospodnetic_at_[hidden])
Date: 2008-02-20 19:43:00
Hi Alex.
> Hi, I've done it before - in my embedsql rule I convert <include>
> generated by bjam to "-I" option required by cpre compiler:
>
> type.register ESQL : SC ;
> generators.register-standard embedsql.embedsql : ESQL : CPP ;
>
> rule embedsql ( target : source : properties * )
> {
> local r = [ property.select <include> : $(properties) ] ;
> if $(r)
> {
> # Extract <include> directories from $(properties)
> # and replace "<include>" with "-I" to pass to cpre
> local r_ = [ regex.replace-list $(r) : "<include>" : "-I" ] ;
> PREFIX_OPT on $(<) = $(r_) ;
> }
> }
>
> actions embedsql
> {
> cpre $(PREFIX_OPT) -Cansi_c -O$(<) $(>)
> }
Ick... this seems ugly. I do not use ESQL so I do not understand the
code completely but the idea od manually changing Boost Build's
generated properties seems 'strange'.
If you really found a need for this then could you please explain it
in more detail? And possibly add a bug report/feature request?
Could you not have used the Boost Build flag support to propagate
those <include> feature values to your actions - similar to how C++
compiler and linker actions do this? For an example see the
tools/msvc.jam file and how it handles the <include> properties by using
the flags rule to make their values available in the action as the
INCLUDES target variable.
Many thanks.
Best regards,
Jurko GospodnetiÄ
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