[jamming] Expansion Problem?

Kai Backman kaib at google.com
Thu Sep 7 03:08:08 PDT 2006


With :E this isn't particularly useful but I could see cases where you
wanted to say something like:

local DIRS = foo bar ;
local FILES = test1 test2 ;

ECHO $(FILES:D=$(DIRS)) ;

> foo/test1 foo/test2 bar/test1 bar/test2

IMHO the expansion works correctly but there is a problem with the
order in case of conditional modifiers like :E and :R. We would expect
the order to be the following:

1. Check conditional
2. Apply expansion in case conditional passed

instead of the current order:

1. Apply expansion
2. Check conditional

Can we do this in one pass or do we need to add a separate pass to
check conditionals from the outside in? For :E we already have ?= but
for R there doesn't seem to be an equivalent?

K


On 9/7/06, David Turner <dturner at nds.com> wrote:
> I would consider this a bug, it breaks the principle of least surprise,
> and I don't see anyone using
> this "feature" for anything really useful.



-- 
Kai Backman, Software Engineer, kaib at google.com


More information about the jamming mailing list