Subject: Re: make: removing/replace spaces in expansion?
To: None <>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-toolchain
Date: 05/20/2002 16:26:52
> After ideas.  Given:

> LIST=one two
> LIST+= three

> how does one output one,two,three or one|two|three since make insists
> on separating the words with space.

Near as I can tell, one hacks on make. :-(  (Or resorts to kludges like
your example, though I think it may be easier to do something like
"@x='${LIST}'; echo "$x" | tr \  \|".)

On reading over var.c, it looks as though it would be fairly easy to
add something like, say, W ("whole") that says that further modifiers
should be applied with the whole value treated as a single string, with
spaces potentially embedded in it.  You just need to keep a state bit
and then frob VarModify to use it.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B