List Info

Thread: Expansion Problem?




Expansion Problem?
user name
2006-09-06 13:03:54
Hi.

Using jam 2.5 - is this normal?

DEFAULT = e f ;
VAR = a b c ;
echo $(VAR:E=$(DEFAULT)) ;

 >jam
a b c a b c
...found 7 target(s)...

The E modifier should only use it's value if the variable
is unset?

No problem with this:

SPACE = " " ;
echo $(VAR:E=e$(SPACE)f) ;

or this:

echo $(VAR:E=e\ f) ;

or even this:

SPACE = " " ;
DEFAULT = e$(SPACE)f ;
echo $(VAR:E=$(DEFAULT)) ;

Craig.
_______________________________________________
jamming mailing list  -  jammingperforce.com
http://maillist.perforce.com/mailman/listinfo/jamming
Expansion Problem?
user name
2006-09-06 16:45:59
| Using jam 2.5 - is this normal?
|
| DEFAULT = e f ;
| VAR = a b c ;
| echo $(VAR:E=$(DEFAULT)) ;
|
|  >jam
| a b c a b c
| ...found 7 target(s)...
|
| The E modifier should only use it's value if the variable
is unset?

It's consistent with the rest of the productizing variable
expansion.

Just as if you said:

	DEFAULT = e f ;
	VAR = ;
	echo xxx-$(VAR:E=$(DEFAULT)) ;

You'd get 

	% jam
	xxx-e xxx-f

That's not to say it is useful or not surprising, but it is
the way the
rest of it works.

Christopher
_______________________________________________
jamming mailing list  -  jammingperforce.com
http://maillist.perforce.com/mailman/listinfo/jamming
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )