Boost logo

Boost-Build :

From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2006-09-27 19:21:39

David Abrahams wrote:
> Rene Rivera <grafikrobot_at_[hidden]> writes:
>> It's a bjam bug. I added a test in tools/jam/test that verifies the
>> problem exists. "$(x:D)", when x doesn't have a dir, is returning an
>> empty string instead of an empty list:
>> C:\DevRoots\Boost\boost\tools\jam\test>..\src\bin.ntx86\bjam -f test.jam
>> --- Testing SHELL builtin...
>> --- Testing W32_GETREGNAMES builtin...
>> --- Testing var expansion...
>> --- Testing var on target semantics...
>> --- Testing var expansion...
>> var_expand.jam:14: error: [FAILED] '' (==)
>> --- Complete: PASSED(25) *FAILED(1)*
> Oooooooooh. I ran some tests, but I never considered the possibility
> that there would be no directory. Whether or not that's a bug is
> certainly open to debate, though. Consider:
> $(y:D=$(x:D)) # locate y in x's directory

Yeah, ouch :-(

> Unless there's a spec somewhere that details the behavior of $(x:D)
> when x has no "/" in it (and maybe even if there is),

There is no spec I know about, meaning nothing in the original jam docs.
But it's not just the "D" that exhibits the behavior. This applies to
any of the value selection keys, they return an empty string instead of
an empty list.

> I think we
> should leave the jam core alone to avoid breaking code.

I tend to agree. And that we should document the current behavior in
this case. Makes some things less than convenient/intuitive, oh well :-\

-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. -
-- rrivera/ - grafik/
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

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