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:
makefile
foo.b
There is a very different answer that allows you to use your if statements as you envisioned them in one shell:
if
.ONESHELL: foo.bak: foo.bar echo "foo" if [ -d "~/Dropbox" ]; then echo "Dir exists" fi
Note that the only difference is the ONESHELL special target.