Related: make obviously makes a big dependency graph to keep track of this stuff. Is there a good way to make it show this? How do you debug these kinds of constructions?
If you use GNU make, check out remake http://bashdb.sourceforge.net/remake/ which is GNU make patched with debugging support