[Omake] Annoying spaces in sequence-to-string conversion
David Kågedal
david at virtutech.se
Mon Sep 18 03:15:55 PDT 2006
This is a distilled testcase from one of my OMakefiles:
mod = $(addprefix MOD:,test)
println(mod = >>$(mod)<<)
XX = $(string MODNAME=\"$(mod)\")
YY = $(string MODNAME=\"$(string $(mod))\")
println(XX = >>$(XX)<<)
println(YY = >>$(YY)<<)
The output looks like this:
mod = >>MOD:test<<
XX = >>MODNAME=" MOD:test "<<
YY = >>MODNAME="MOD:test"<<
As you can see, there are two spaces added to the XX case which seem
rather surprising (and annoying) to me.
In my case, I can easily fix it, since the addprefix call should
probably be something else. But I'm trying to understand if this is
really the intended behaviour. It seems to be a consequence of the
fact that addprefix returns a sequence. The strange thing is that
when that is converted to a string in the first println call, it does
not add any spaces, but when it is converted using $(string), the
strings are added.
--
David Kågedal, Virtutech
More information about the Omake
mailing list