This is the mail archive of the cygwin@sourceware.cygnus.com 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]

Re: cygdrive, pwd, and windows apps


So, exactly why are you using Cygwin?  Checkout the Make Utility at
http://www.mingw.org for a Win32 native build of make.

Cheers,
Earnie.
--- Jeremy Sheeley <jeremy@sourcegear.com> wrote:
> I have a problem in that if i try:
> 
> notepad /cygdrive/c/sometextfile.txt
> 
> notepad (being a windows app) has no idea how to find /cygdrive.  So how
> do I easily get the dos-style path?  Here's the full context:
> 
> We have a cross-platform app that uses the same Makefiles on all the
> platforms.  The first thing that we do is set a variable to the source's
> root directory using something like:
> 
> ROOT := $(shell pwd)
> 
> This will, if the source is outside the cygwin hierarchy, set ROOT to
> /cygdrive/c/blah.  Then the compiler (which is cl, the Visual C++
> compiler) won't be able to find the source files.
> 
> one quick fix is to change the line to something like:
> 
> ROOT := $(shell pwd | sed 's/\/cygdrive\/\(.\)\//\1:\\/g')
> 
> which translates /cygdrive/c/ to c:\
> 
> BUT that's ugly, requires too much platform-specific knowledge in the
> Makefile and would require that we change all the Makefiles.  
> 
> So to sum up:  There has to be an easier way!!  Any ideas?
> 
> -Jeremy Sheeley
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com
> 


__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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