Message-Id: <200505040559.j445x8pi021647@delorie.com> 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 From: "Gary R. Van Sickle" To: Subject: RE: pwd vs $PWD, bash, cygwin vs Linux Date: Wed, 4 May 2005 01:00:34 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: <42785B91.6060601@itee.uq.edu.au> X-IsSubscribed: yes > 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? > > Cheers, > > John > You could replace the /bin/sh.exe executable with a copy of bash.exe, but that would be at the "everywhere, all the time" level. That used to be a regularly suggested workaround for similar problems back in the proverbial day, but it's been ages since I've done that myself, so I can't tell you what other problems that might cause. -- Gary R. Van Sickle -- 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/