TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Recursive Make Considered Harmful

18 pointsby thealphanerdover 11 years ago

5 comments

shadowmintover 11 years ago
I honestly consider any project that is complex enough to require more than a single trivial makefile (eg. lua, say) to be unsuitable for using make at all.<p>Everything else I&#x27;ve seen that tries is exactly as bad as this paper suggests.<p>This &#x27;modern makefiles&#x27; stuff from the android NDK is one of the worst offenders; those makefiles are almost without fail difficult to debug and problematic (just search SO for &#x27;ndk&#x27;, &#x27;makefile&#x27; if you don&#x27;t believe me), but because it&#x27;s android, I&#x27;ve actually had people advocate we use that approach for other projects too.<p>Craziness.
评论 #6701778 未加载
Nursieover 11 years ago
The last project I worked on used recursive make. I did a lot of work on that system to get the damn thing to build properly. However at the end it did work, and just as well as an include-based make we&#x27;ve used on previous projects.<p>He mentions in the paper that dependency generation using gcc -MM, well you can do the same in your recursive system with roughly the same amount of pain. And (I do hate to say this) some of the other concerns are really rather inconsequential with the speed of modern computers.<p>It&#x27;s a very good paper and it provides good insight into the problem space, but I&#x27;m not sure it&#x27;s an absolute. See also &#x27;&quot;Considered Harmful&quot; Essays considered harmful&#x27; - <a href="http://meyerweb.com/eric/comment/chech.html" rel="nofollow">http:&#x2F;&#x2F;meyerweb.com&#x2F;eric&#x2F;comment&#x2F;chech.html</a><p>On balance I think include-based make is probably a better way of doing things, and you can still have your module level files, they just become included rather than executed.<p>Of course what all this fussing about with dependency scripts really shows is that what most people try to do with make could be automated by other systems.
RyanZAGover 11 years ago
Surely maintaining a single build file for enormous code projects worked on by many different teams would cause more harm than good?<p>The paper writes this issue off as &#x27;same stuff in one or many files, same complexity&#x27;, but obviously this isn&#x27;t the case when multiple teams are involved who don&#x27;t understand the work or requirements of other teams. The paper feels far too theoretical and is likely why nobody has taken much note and recursive makefiles are still the most used form for very large projects 10+ years after the paper.
评论 #6701799 未加载
snarfyover 11 years ago
Nobody wants to write Makefiles and recursive Makefiles are easier to write.<p>If it&#x27;s truly the same information in multiple recursive Makefiles as it would be in one monolithic Makefile, then there should be a tool that converts recursive makefiles into monolithic makefiles. Humans should not have to reason about the entire project scope at once.
评论 #6701703 未加载
kephraover 11 years ago
I would call this nested Makefiles. Recursive Makefile is more what I&#x27;m doing with my MakeHereCMS, where every Makefile is a symlink to the same top level Makefile.
评论 #6704639 未加载