qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Quote extra_cflags in config-host.mak


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] Quote extra_cflags in config-host.mak
Date: Wed, 11 Sep 2013 17:06:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

Il 11/09/2013 17:01, Gabriel Kerneis ha scritto:
> On Wed, Sep 11, 2013 at 04:53:35PM +0200, Paolo Bonzini wrote:
>> Oh, then it's this line in configure that has to be changed to do proper
>> quoting.
>>
>> printf "# Configured with:" >> $config_host_mak
>> printf " '%s'" "$0" "$@" >> $config_host_mak
> 
> No, this line has absolutely nothing to do with it. It's purely a
> comment that is not executed later.

Actually it is... :)  See here:

   sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh

and relate it to your error message:

   config-host.mak is out-of-date, running configure
   sh: 1: Syntax error: "(" unexpected
   make: *** [config-host.mak] Error 2

Your argument is using '', so it conflicts with configure's own use of
'' to quote the arguments.

> The line that has to be fixed is
> really the line starting with "extra_cflags=" in config-host.mak (well,
> at least in my experience - my patch does not touch the first line, at
> it still solves the issue).

Yeah, what I'm missing now is why your patch works.

> Unfortunately, %q is not portable and we probably need something along
> the lines of your proposal above (note that it doesn't handle "("
> though, which is precisely the one causing an issue in my example).

It doesn't need to handle it, because it is not a special character
within quotes.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]