Check if a command exist in Makefile
LS := ; @which ls > /dev/null ifndef LS $(eval ls := $(shell which ls)) else $(eval ls := something/ls endif my-ls: $(ls) -lah