bug in cygwin build of Make

Christopher Faylor cgf-no-personal-reply-please@cygwin.com
Wed Jan 14 22:10:00 GMT 2004


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/



More information about the Cygwin mailing list