David Abrahams wrote:
> Rene Rivera <grafikrobot gmail.com> writes:
>
>> It's a bjam bug. I added a test in tools/jam/test
that verifies the
>> problem exists. "$(x )",
when x doesn't have a dir, is returning an
>> empty string instead of an empty list:
>>
>>
C:DevRootsBoostboosttoolsjamtest>..srcbin.ntx86b
jam -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 =$(x )) #
locate y in x's directory
Yeah, ouch :-(
> Unless there's a spec somewhere that details the
behavior of $(x )
> 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. - http://redshift-software
.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
a>
|