delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/05/19/10:57:44

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <39255756.45A007B@ece.gatech.edu>
Date: Fri, 19 May 2000 11:01:42 -0400
From: "Charles S. Wilson" <cwilson AT ece DOT gatech DOT edu>
X-Mailer: Mozilla 4.7 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Jeremy Sheeley <jeremy AT sourcegear DOT com>
CC: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: cygdrive, pwd, and windows apps
References: <392553C7 DOT 66AE6190 AT sourcegear DOT com>

PWD = `pwd`
ROOT = `cygpath -w $PWD`

Jeremy Sheeley 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 AT sourceware DOT cygnus DOT com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019