This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATH with spaces


On 30/01/2011 12:56, Tim Prince wrote:
> On 1/30/2011 6:34 AM, Sunoki wrote:
>>
>> $ make
>> cygwin warning:
>>    MS-DOS style path detected: /usr/local/bin/C:\Program
>>    Preferred POSIX equivalent is: /usr/local/bin/C:/Program
>>    CYGWIN environment variable option "nodosfilewarning" turns off this
>> warning.
>>    Consult the user's guide for more details about POSIX paths:
>>      http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
>> Can't find C:\Program on PATH.

> Yes, the warning comes about in part due to the use of an unquoted path
> with spaces.

  Not directly it doesn't.  My PATH has spaces in it and everything works just
fine.  The shell knows to only separate $PATH at colons.

  That "Can't find" error message doesn't look like anything make itself would
output to me, and how did /usr/local/bin get concatenated to C:\Program
anyway?  (Note that it doesn't have a trailing slash in the path, so something
has done this deliberately.)

  I think the problem is likely to be that the makefile itself is doing some
kind of string processing on the PATH, or perhaps that it is being passed on a
commandline somewhere unquoted and ending up looking like multiple words to
the receiving program.

  Sunoki, if that isn't enough of a clue to work out what's going wrong,
there's a really useful version of make with a source-level debugger built in
called 'remake' that you can get from http://bashdb.sourceforge.net/remake/.
(Last time I checked, it was a straightforward "configure && make && make
install" to build out-of-the-box, so it should be easy to try out if you want.)

    cheers,
      DaveK



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]