|
Boost-Build : |
From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2007-07-23 14:03:48
Roland Schwarz wrote:
> But I seriosuly doubt this is allowed.
Hmm, but it does work.
I came up with something in the attached file. I would be very pleased
if someone could have a look at it, and tell me if this is fragile code
or if there are any other pitfalls I don't see yet.
The code for the actual tagging is missing yet, but this could be made
along Volodyas proposal.
Thank you so much.
Roland
import "common" : format-name ;
import property-set ;
import errors ;
import type ;
import generators ;
import "class" : new ;
import feature ;
type.register BOOST_LIB : : SEARCHED_LIB ;
class boost-lib-generator : searched-lib-generator
{
rule __init__ ( )
{
# bypassing the base class init is questionable, but it seems to work ...
generator.__init__ boost-lib-generator : : BOOST_LIB ;
}
rule run ( project name ? : property-set : sources * : multiple ? )
{
local real-name = [ feature.get-values <name> : [ $(property-set).raw ] ] ;
if $(real-name)-not-empty
{
errors.error The <name> property is illegal in boost-lib ;
}
# TODO: now determine the real name of the library and assign to real-name
real-name = $(name)_now_the_really_real_name ;
return [ searched-lib-generator.run
$(project) $(name)
: [ $(property-set).add-raw <name>$(real-name) ]
: $(sources)
: $(multiple)
] ;
}
}
generators.register [ new boost-lib-generator ] ;
project boost ;
boost-lib boost_thread ;
boost-lib boost_program_options ;
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