In his answer @Grundlefleck explains how to check whether a directory exists or not. I tried some to use this inside a makefile as follow:
foo.b
Try this:
.PHONY: all
something:
echo "hi"
all:
test -d "Documents" && something
This will execute the commands under something only if Documents exists.
In order to address the problem noted in the comments, you can make a variable like this:
PATH_TEST = ~/SomeDirectory
test -d $(PATH_TEST) && something