r22953 - gnucash/trunk - Quote the python path in case it has blanks in it.

Mike Alexander mta at umich.edu
Sun May 5 18:24:04 EDT 2013


--On May 6, 2013 12:02:59 AM +0200 Christian Stimming 
<christian at cstimming.de> wrote:

> Am Sonntag, 5. Mai 2013, 17:57:36 schrieb Mike Alexander:
>> Author: mta
>> Date: 2013-05-05 17:57:35 -0400 (Sun, 05 May 2013)
>> New Revision: 22953
>> Trac: http://svn.gnucash.org/trac/changeset/22953
>>
>> Modified:
>>    gnucash/trunk/configure.ac
>> Log:
>> Quote the python path in case it has blanks in it.
>
> Thanks, Mike, for adding the quotes back in.
>
> However, I don't quite understand why your original change does
> actually  change anything. We now have
>
> -  if [ "x${PYTHON}" = "x" ]
> +  if test "x${PYTHON}" = "x"
>
> but I thought
>
>> [ STRING = STRING ]
>
> is completely identical to
>
>> test STRING = STRING
>
> Do you know why the former gives you some errors but the latter does
> not?

This has to do with quoting syntax in config scripts.  The [] 
characters are quoting characters for autoconf so the original form 
generates

  if  "x${PYTHON}" = "x"

in the configure script.  I'm not quite sure why this fails in the way 
it did, but it's not what was intended.  I think you could also fix it 
by changing the line in configure.ac to

  if [[ "x${PYTHON}" = "x" ]]

which generates

  if [ "x${PYTHON}" = "x" ]

in configure, but the form using "test" is more common and perhaps less 
confusing.

           Mike
 


More information about the gnucash-devel mailing list