tech-toolchain archive

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

Re: make :Q breakage



In article <20180526004352.GJ1039%pony.stderr.spb.ru@localhost>,
Valery Ushakov  <uwe%stderr.spb.ru@localhost> wrote:
>
>I'm confused.  Let's change my example to
>
>p=XXX
>FOO=doit $p "$$@"
>default:
>        p=ZZZ; foo=${FOO:Q}; echo foo=$$foo
>
>
>It was doing
>
>  p=ZZZ; foo=doit\ XXX\ \"\$@\"; echo foo=$foo
>
>before, and it does
>
>  p=ZZZ; foo=doit\ XXX\ \"\$\$@\"; echo foo=$foo
>
>now.
>
>So why $p is expanded and $$ (that expands to "$") is not expanded?
>When does :Q logically happen w.r.t. expandion?

I see what you mean. The issue here is that the current expansion scheme
for $$ makes it impossible to pass variables that contain $'s though multiple
layers of ${MAKE} using :Q. Perhaps the way to fix it is to add a different
modifier that preserves $$'s.

christos




Home | Main Index | Thread Index | Old Index