In Makefiles, use $(shell which ...) not $(which ...)