I configed TeamCity's "Build Runner" with "Command Line" mode. And set working directory to /home/myproject. My makefile lays right under /home/myproject, which uses $(PWD) to get project root.
But when I have the build triggered, I found the make was executed always under buildAgent's home directory, on my platform is "/buildAgent". That makes my $(PWD) contains /buildAgent instead of /home/myproject, which makes the build failed.
How could I fix this issue?