bar = foo = $(bar) all: ifdef foo echo "foo is defined" endif ifdef bar echo "but bar is not" endif