Boost logo

Boost :

From: SourceForge.net (noreply_at_[hidden])
Date: 2006-09-20 12:10:36


Patches item #1558580, was opened at 2006-09-14 07:44
Message generated for change (Comment added) made by grafik
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=307586&aid=1558580&group_id=7586

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Yakov Markovitch (markovitch)
Assigned to: Rene Rivera (grafik)
Summary: jam:"VAR on TARGET ?= values" unconditionally assigns values

Initial Comment:
"VAR on TARGET ?= values" unconditionally assigns
values, i.e. works like "unconditional" assignment.
This bug is extremely insidious, since there is no hint
of wrong behaviour at all (it costed me a full day of
futile debugging of my jam script before it dawned upon
me that it is something wrong with assignment).
Interesting, that documentation actually doesn't
mention that "default assignment" is available on
target, i.e. this is a "feature", but this requires
_very_ attentive reading of documentation and is quite
inconsistent. And even so it is a bug: there should be
at least a syntax error!

There are two ways to fix this bug:

1. Bring code into sync with doc, i.e. patch the syntax
so that "VAR on TARGET ?= values" would be a syntax
error. IMO strange, inconsistent and inconvinient.

2. Patch addsettings so that it handled default
assignment correctly.

The proposed patch implements the latter approach.
The addsettings() function now accepts "setflag"
(VAR_SET, VAR_ADD, VAR_DEFAULT) the same way as
var_set() does, instead of logical "append" parameter.
All addsettings() calls patched accordingly.
Besides, it factors out the logic of converting
ASSIGN_XXX compilation flag into corresponding VAR_XXX
variable set flag into a separate static function.

The patch is against CVS HEAD.

----------------------------------------------------------------------

>Comment By: Rene Rivera (grafik)
Date: 2006-09-20 11:10

Message:
Logged In: YES
user_id=33595

Thanks for the patch :-)

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=307586&aid=1558580&group_id=7586

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-bugs mailing list
Boost-bugs_at_[hidden]
https://lists.sourceforge.net/lists/listinfo/boost-bugs


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk