tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: make: sysV subst with variables



On Thu, 2 Jun 2011 21:31:46 +0100, David Laight writes:
>I can think that it might be useful to generate a list of modifiers
>and then apply it - when the above translation can't be done.
>
>    MOD=tl:
>    MOD+=S/^/blah/
>    ${FOO:${MOD}}
>
>might be more reasonable - but probably suffers if 'blah' is actually a variab
>le
>that contains '/' since it probably expanded at the wrong time.
>
>Or is the expansion of ${MOD} in my example one of the few places where make
>doesn't do a recursive expansion?

If you made it

MOD=tl
MOD+= S/^/blah/

${FOO:${MOD:ts:}}

it would work (with or without patch), but without the :ts: 
you'd get a space after tl: which would muck up the parsing.


Home | Main Index | Thread Index | Old Index