bug in cygwin build of Make
Jason Pearce
jason.pearce@ieee.org
Wed Jan 14 09:41:00 GMT 2004
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}
dir1/Makefile:
--------------
VARIABLE = $(shell echo $$PWD)
sources :
@echo VARIABLE set to ${VARIABLE}
Then, from dir2 run "make target" and I get the following output:
make -C ../dir1 sources
make[1]: Entering directory `/tmp/Make/dir1'
VARIABLE set to /tmp/Make/dir2
make[1]: Leaving directory `/tmp/Make/dir1'
VARIABLE set to /tmp/Make/dir2
You see that the sub-make's VARIABLE is set to "/tmp/Make/dir2" not
"/tmp/Make/dir1". Running the same thing from Linux gets the result I
expected.
(Example and cycheck output are atatched)
Jason
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make.tar.gz
Type: application/x-gzip
Size: 4539 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20040114/09e1fc5b/attachment.bin>
-------------- next part --------------
--
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