Ralf S. Engelschall wrote:
> On Wed, Jun 27, 2007, Mark Hatle wrote:
>
>> This actually points out a bug I found the other day, but haven't been
>> able to figure out how to solve.
>>
>> Using "echo $*" in this way causes variable or argument expansions that
>> include a "space" to fail.
>>
>> We have a few cases where we need to pass in CFLAGS w/ multiple elements
>> or CC='distcc ccache foo-gcc -te500v1'.. which causes a failure to occur.
>>
>> I replaced the args bit with a simple "$@" in the args list to work
>> around the issue.. but I don't know of a way of modifying the arguments
>> in the shell and passing them properly quoted.
>
> Well, just "$@" doesn't fully help. It quotes the stuff just for the
> echo(1) call itself, but after echo(1) outputs the stuff to stdout
> the quotes will be gone anyway. There is only one possibility in
> Bourne-Shell: to use a "for" loop to iterate over the arguments and then
> re-construct the stuff in a quoted way.
Sorry I wasn't clear.. I removed the args processing, and changed out
$args in the configure call w/ "$@" and at least in my case it worked
properly. I'm not exactly sure what we are protecting w/ the sed's in
the args.
I think the alternative is to copy what configure does and properly
quote each of the arguments. There is probably some code we can borrow
from configure itself to do this.
--Mark
Received on Wed Jun 27 23:53:02 2007