12
GNU Make - Unconditionally run a target before any other targets
(www.bahmanm.com)
A general programming discussion community.
You may like an approach I came up with some time ago.
In my
include
d file that's common among myMakefile
s:At the top of a
Makefile
that I want to ensure certain variables are set before it runs:I usually do these checks in sub-Makefiles to ensure someone didn't break the top level Makefile by not passing down a required macro.