Bill Hoffman wrote:
>
> Not really true, cygwin has its own symlinks.  See here:
> http://www.cygwin.com/cygwin-ug-net/using.html

That's not a symlink.  That's a mount point.

And it does not effect anything I said. Just try putting such a mount point on PATH (which is special). It will get translated automatically whenever you call a DOS or windows app to an actual UNC or DOS path.

>
> Also see here:
>
> http://www.mingw.org/MinGWiki/index.php/Shells%2C%20terminals%20and%20MSYS
>

Again, no contradiction to what I said. cmake must run from one top shell or console, regardless of how many are nested. That's the one you look as reference. That's why I said looking at the envvar is a hack, while doing it with win32api is the proper way.

>
> So, even if you figured out what shell you were running from, you still could not write to /usr/local because that directory does not exist to a windows program.
>

No.  Did you read what I wrote?

Here's some code which may be easier. I have MSYS and a standalone Ruby NOT compiled for msys.

$ cat /etc/fstab
c:/msys/1.0/mingw       /mingw
c:/ActiveState/perl     /perl

$ echo $PATH
/usr/local/bin:/mingw/bin:/bin:/perl

# here i print path from ruby
$ /C/ruby/bin/ruby.exe -e "puts ENV['PATH']"
C:\msys\1.0\local\bin;c:\msys\1.0\mingw\bin;C:\msys\1.0\bin;c:\ActiveState\perl

# here I find sh.exe in path
$ /C/ruby/bin/ruby.exe -e "puts ENV['PATH'].split(';').find {|dir| File.exists?( dir + '/sh.exe' ) }"
C:\msys\1.0\bin

# here I get /usr/local
$ /C/ruby/bin/ruby.exe -e "puts ENV['PATH'].split(';').find {|dir| File.exists?( dir + '/sh.exe' ) } + '../local'"
C:\msys\1.0\bin\..\local

Explanation:

Find 'sh.exe' in $PATH. PATH already has a DOS or UNC path from the MSYS/CYGWIN paths, regardless of how many mount points or 'symlinks' msys or cygwin uses.

From it, you have /usr/local by doing ../local ( or just .. if sh.exe happens to weirdly be in (ROOT)/local/bin which you can know from the word local in it). Under any Unix (Linux) layer, sh.exe is not supposed to be installed ANYWHERE else and must exist in some form.

MSYS and CYGWIN *MUST* translate PATH to a windows equivalent or else child programs would not work correctly. Other vars, like LD_LIBRARY_PATH don't get this special treatment.

--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Kubuntu Edgy
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to