On Wed, Jun 04, 2008 at 02:37:17AM +0000, Bryan Henderson wrote:
I'd like to point out a serious flaw in Miller's paper. It's somewhat of a strawman argument, as he describes half a dozen ways to do recursive make incorrectly and concludes that recursive make is bad.
It is bad. Why would you want to run make recursively in the first place?
To do recursive make correctly, you have to invoke make on every dependency that is in another directory. Make either rebuilds the dependency or determines that it doesn't have to be rebuilt.
Good luck implementing that correctly. Besides, the multiple invocations will slow things down considerably.
So I maintain recursive make is not incorrect per se.
The drawback is a whole lot of makes (not builds, just makes) of the same thing in a single run. And it takes extra rules to make this happen and I've seen plenty of projects that don't have them.
This would be both a performance and maintenance disaster. You're basically saying that you can either do things correctly or fix a broken strategy with a lot of kludging and then hope for the best.
It's worth noting that Miller's paper was fairly well known 10 years ago, and I believe the use of recursive make has only increased since then. So he apparently didn't convince a lot of people.
It is not quite as well-known as it should be, yes. However, this excuses nothing. People have simply gotten accustomed to running make clean or distclean all the time because they have come to distrust all the broken make systems. It's a real shame. Diego