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 Date: Wed, 4 May 2005 09:27:15 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: John Williams cc: cygwin AT cygwin DOT com Subject: Re: pwd vs $PWD, bash, cygwin vs Linux In-Reply-To: <42785B91.6060601@itee.uq.edu.au> Message-ID: References: <4278209B DOT 1050903 AT itee DOT uq DOT edu DOT au> <20050504011021 DOT GC23476 AT trixie DOT casa DOT cgf DOT cx> <42785047 DOT 2020505 AT itee DOT uq DOT edu DOT au> <20050504045236 DOT GF24661 AT trixie DOT casa DOT cgf DOT cx> <42785B91 DOT 6060601 AT itee DOT uq DOT edu DOT au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 4 May 2005, John Williams wrote: > Christopher Faylor wrote: > > > > > 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! > > > > > 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. > > > > Again, it *isn't* the same shell. You have now learned that it isn't > > the same shell and you now know that this is the reason for the > > inconsistency. ash isn't normally used as /bin/sh on linux. A > > stripped down version of ash is used as /bin/sh for performance > > purposes on cygwin. ash does not set PWD. > > OK - I see the confusion. Make is spawning ash as the subshell, not > bash. Now everything you said makes sense. Out of interest, can that > behaviour be modified at the runtime/user/Makefile level? In addition to what Gary said, you could also try the following (WARNING: untested), which isn't as drastic: mount -u -f -b -x "`cygpath -aw /bin/bash.exe`" /bin/sh.exe mount -u -f -b -x "`cygpath -aw /bin/bash`" /bin/sh make umount -u /bin/sh.exe umount -u /bin/sh I may have gotten some flags slightly wrong -- "man mount" should help with that. HTH, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "The Sun will pass between the Earth and the Moon tonight for a total Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT -- 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/