From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-01-24 03:06:06
> >>The rule should match this prototype:
> >> rule name ( name : type ? : property-set )
> > Volodya, could you please add an example for this ?
> > I admit I'm lost :-)
> # debug/release pseudo-code
> rule variant-target ( name : type ? : property-set )
> modifier = "-";
> if <variant> in property-set
> switch property-set:<variant>
> case "release" : name += "r" ;
> case "debug" : name += "d" ;
> case "profile" : name += "p" ;
> if "$(modifier)" == "-"
> modifier = "" ; # no modifiers selected
> return name + modifier ;
That's almost what 'stage.rename' rules does ;-)
> exe app1 : ... : <tag>@rule.simple-target ;
> exe hello : .. : <tag>@rule.variant-target ;
> stage dist : app1 hello ;
> bjam release gcc-3.3
> will produce:
> bjam debug gcc-3.3
> will produce:
> Is this right?
> >>Things left to do:
> >>- rename 'stage' to 'install'
> >>- implement proper versioning support for dynamic libraries
> > That would be cool.
> Seconded. I would also like to propose having a default <tag> rule, like
> my simple-target above, as well as having several common implementations
> (in a target.jam?) This would make it easier to say:
> exe app : ... : <tag>@target.boost-target ; # -dm-gcc3_3
The 'stage' rule provides two rules for you: 'add-variant' and
'add-variant-and-compiler'. The first adds just debug/release/threading
letters, the second also adds toolset name.
> Also, how about having <tag> being heirarchial, where you can specify it
> in a project decleration to say all targets in this project use these
> rules (e.g. boost), while allowing you to override this in sub-projects
> (e.g. examples use standard-target rules), targets (this target uses
> variant-target rules) and stage rules (e.g. this stage uses boost naming
> rules). Thoughts?
This can be implemented is needed. Simple things first ;-)
> It might be useful to have a short-hand for simple-target, something
> like <tag>"".
You can achieve this effect by not specifying any <tag> at all, I think.
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