This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: bug in cygwin build of Make
- From: Christopher Faylor <cgf-no-personal-reply-please at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 14 Jan 2004 16:55:27 -0500
- Subject: Re: bug in cygwin build of Make
- References: <400506B3.6000902@ieee.org>
- Reply-to: cygwin at cygwin dot com
On Wed, Jan 14, 2004 at 09:06:59AM +0000, Jason Pearce wrote:
>I have discovered a problem in cygwin's Make.
>
>I am calling a sub-make that goes to another directory. That bit works
>fine, but the Makefiles have a variable set from a shell command. That
>shell seems to be spawned from the wrong directory. I have created a
>small example illustrating the problem
>
>dir2/Makefile:
>---------------
>VARIABLE = $(shell echo $$PWD)
>
>target :
> ${MAKE} -C ../dir1 sources
> @echo VARIABLE set to ${VARIABLE}
You can't rely on PWD being set correctly. Use something like
$(shell pwd) instead.
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/