Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <42785047.2020505@itee.uq.edu.au> Date: Wed, 04 May 2005 14:32:07 +1000 From: John Williams Reply-To: jwilliams AT itee DOT uq DOT edu DOT au User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040316 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: pwd vs $PWD, bash, cygwin vs Linux References: <4278209B DOT 1050903 AT itee DOT uq DOT edu DOT au> <20050504011021 DOT GC23476 AT trixie DOT casa DOT cgf DOT cx> In-Reply-To: <20050504011021.GC23476@trixie.casa.cgf.cx> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checked: This message probably not SPAM X-Spam-Score: 0 X-IsSubscribed: yes Note-from-DJ: This may be spam Christopher Faylor wrote: > 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. Thanks for the quick response and workaround. While what you say might be a true statement, "better off" means different things to different people! It's easy for me to say, but it seems cleaner for the compatability layer (e.g. Cygwin) to model the expected behaviour (even behaviour which might be considered buggy), than to push changes on fairly standard and widely distributed source/build packages. What surprised me was that the same shell, and same make, resulted in different behaviour. I guess this is just reflecting differences in the underlying process architectures of Linux vs Windows. Cheers, John -- 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/