delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/05/03/21:10:38

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Tue, 3 May 2005 21:10:21 -0400
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: pwd vs $PWD, bash, cygwin vs Linux
Message-ID: <20050504011021.GC23476@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
References: <4278209B DOT 1050903 AT itee DOT uq DOT edu DOT au>
Mime-Version: 1.0
In-Reply-To: <4278209B.1050903@itee.uq.edu.au>
User-Agent: Mutt/1.5.8i

On Wed, May 04, 2005 at 11:08:43AM +1000, John Williams wrote:
>Essentially under Cygwin the PWD variable seems to be "frozen" at its
>value upon first launching Make from the commandline, while under Linux
>it is being updated for each child process spawned by `make -C XXX`
>
>I know that Cygwin != Linux, however is it a reasonable expectation
>that under the same shells, the same behaviour should apply?

In this case, the operative observation is bash != ash.  PWD is a bash
construct.  You would be much better off just using the gnu make
"CURDIR" variable.  Changing PWD to CURDIR in your examples makes things
work as you'd expect.

cgf

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

- Raw text -


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