Boost logo

Boost-Build :

Subject: Re: [Boost-build] Target OS preprocessor macro
From: mareq (mq_at_[hidden])
Date: 2012-09-05 20:27:26


> > import feature ;
> > import feature : feature ;
> Stylistic comment: no need really to do 'import feature : feature ;'
> here - thats really just an expensive way to shorten the name for the
> rule already available as 'feature.feature'.

Thanks, I was myself looking at it, thinking that it seems kind of strange,
but I did not give it too much thought since it seems to work - calling
feature.feature instead of importing feature : feature looks more natural

> > if ! $(define-prefix) {
> > define-prefix = "" ;
> > }
> This whole if construct can be simply be written as:
> 'define-prefix ?= "" ;'.

Good point as well.

> On the other hand, after adding a simple target to build in this
> Jamroot file, this example shows that free properties are not passed to
> indirect conditional rules.
> I do not know if this is intentional or a bug - perhaps someone else
> can elaborate on that or you can do some more digging in the Boost Build
> repository yourself.
> Code causing this is in the targets.jam module in the
> common-properties rule. There all properties except the free ones are
> passed on to the common-properties2 rule (which in turn calls
> evaluate-requirements, which then calls the specified indirect
> conditional rules, all in the same targets.jam module). There is a
> comment in the common-properties rule mentioning something about this
> being done as some sort of an optimization, so perhaps this is all just
> an unfortunate consequence of that (i.e. a fixable bug).

Thank you for this pointer. I was looking into repository and the
common-properties rule was added long long time ago (22. March 2004) in
revision 22542 by vladimir_prus. Comment for the revision is "Improve the
algorithm for computing build properties.". The only change (except comments
and blanks) since then was on last line which now says return [
$($(key)).add-raw $(free) ] ; instead of result = [ ... ] ; However, this
change is not present in version 1.49, which I am using and it does not seem
to affect this behavior in any way (I tried to edit the file manually and
the result is exactly the same - I do not recall really, I am no bjam
expert, but isn't effect of those two commands exactly the same and
therefore the change is only stylistic one?).

I will try to investigate the issue further, tomorrow, but anyway, any
additional comments and/or advice would be much appreciated.

Thanks for help.

View this message in context:
Sent from the Boost - Build mailing list archive at

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at