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
make.tar.gz
Description: GNU Zip compressed data
-- 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/