[Top][All Lists]

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

Re: Spaces in pathnames: forbidden, supported or not tested ?

From: Ralf Wildenhues
Subject: Re: Spaces in pathnames: forbidden, supported or not tested ?
Date: Tue, 30 Aug 2005 09:53:24 +0200
User-agent: Mutt/1.4.1i

Hi Eric,

* Eric PAIRE wrote on Tue, Aug 30, 2005 at 08:51:56AM CEST:
> Thanks for your answer. I have followed your advice to *not* install 
> neither MinGW nor Msys in a path containing spaces (and everything went 
> well). However, this is not a long term answer, as it seems to me 
> difficult to state that autotools forbid the use of paths with spaces.


> The solution I had behind my head (which is somewhat different from 
> yours) would be to write a small program (call it eval_progname) which 
> interface is similar to 'time',  namely that takes a progname and a list 
> of arguments usually passed to the shell for evaluation and execution. 
> 'eval_progname' will take its first argument (which will be the "$LD" 
> for example, quotes are important here) and try to find the location of 
> the first space which preceeding path would lead to a valid executable 
> (with the help of PATH environment variable for relative paths); then it 
> will restore the actual progname as the actual one to be executed, and 
> the rest of the first argument as actual arguments preceeding the 
> original arguments. It finally will 'exec' the computed progname with 
> computed arguments. Of course, such a program could be escaped with 
> "eval" for people who knows that there is no space in their paths (and 
> for evaluation without 'eval_progname'), and it should not break any 
> backward compatibility in the rest of autotools code. I guess that it 
> could also be written as a shell function, but I think that an 
> executable should be much more efficient.

I have not understood this at all, sorry.  But maybe you're thinking of
something similar to (cygwin)
  cygpath -d
?  It will turn your 'C:\Program Files' into 'C:\PROGRA~1'.
If not, maybe you can explain in a small example.  Where is your program
to be called?  From within "configure" or from within "libtool"?  Note
that one usually has to be very careful with the number of evaluations
done on a particular command line.

In any case, you should be able to work around some of the issues by
setting symlinks and/or using alternative names.  You should pass an
appropriate setting of LD as argument to configure, in order to keep
the script from getting confused:
  configure LD='C:\PROGRA~1\...\ld.exe' ...

See notes about in the Autoconf manual if you want to set
default values for configure.

> IMHO, this should bring a solution to the problem of execution, but not 
> for variable evaluation. But I guess that autotools already should 
> handle carefully spaces in variable evaluation, and if they don't, then 
> they should be fixed directly.

My point was: historical baggage makes this _very_ difficult.

> Your comments are welcome, as I intend to validate that this solution 
> works for autotools (this is rather easy with a Windows system and MinGW).

You are always welcome to suggest solutions.  Show what you have, and if
we can make it work without regressions on other systems, we are happy
to proceed here.


reply via email to

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