Are you passing some arguments as e.g. CUDA_HOME?
Do you have the output of your last build?
Also, since you want to clean your build, could you alternatively remove all files defined in .gitignore manually (reference code 1).