<story><title>Why Use Make (2013)</title><url>https://bost.ocks.org/mike/make/</url></story><parent_chain><item><author>hedora</author><text>People always claim ninja is fast, but I can&amp;#x27;t figure out what they mean by that.  A typical C++ project build uses 10-10,000 CPU core minutes, and make takes (maybe, in some pessimal situation) 100 milliseconds to schedule and coordinate the build invocations.&lt;p&gt;Even if ninja is 100x faster, it really, really doesn&amp;#x27;t matter, at all.</text></item><item><author>ddulaney</author><text>Does ninja fit your needs? It’s available on just about all of the Linux distros and it’s extremely fast with very few bells and whistles. The language is (for better or worse) designed to be generated by a higher-level tool, so it strips out most of the complexity of GNU make, but it might go too far if you’re looking to do list&amp;#x2F;map processing in it.</text></item><item><author>nine_k</author><text>It&amp;#x27;s true, but the compatibility is limited.&lt;p&gt;I had to resort to tricks to make Makefiles which work both on Linux and macOS. I had to mandate the use of GNU make on Macs in other cases.&lt;p&gt;This is on top of having BSD vs GNU coreutils for things like grep, awk, etc, and the ancient bash on macOS.&lt;p&gt;I really wish there was a self-contained tool that could work like make (building a dependency graph and only doing the needed things), with reasonable string &amp;#x2F; list &amp;#x2F; map processing built in. (In a limited way, GNU make is such a tool.)</text></item><item><author>jitl</author><text>The best thing about make is that it’s available &lt;i&gt;everywhere&lt;/i&gt; on POSIX systems. macOS comes with it pre-installed, and every Linux distro or *BSD does too, or offers a package for it that’s often depended on by everything else devtools-wise. This means make skills are super transferable; possibly more so than bash&amp;#x2F;shell skills.&lt;p&gt;Sure there are more user-friendly tools written in the programming language du jour, but those will always need some special snowflake setup process for all of your developers. If you’re cross-platform, now you need encode that in a setup script before your project can build… Maybe you can offer a Makefile just to install `better-make`?</text></item></parent_chain><comment><author>drothlis</author><text>They probably mean incremental builds, where the actual compilation doesn&amp;#x27;t overshadow the &amp;quot;coordination&amp;quot; work.&lt;p&gt;In my (artificial) benchmark, make scaled poorly, taking 70 seconds to process 100k C files worth of dependencies, vs. ninja&amp;#x27;s 1.5 seconds: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;david.rothlis.net&amp;#x2F;ninja-benchmark&amp;#x2F;&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;david.rothlis.net&amp;#x2F;ninja-benchmark&amp;#x2F;&lt;/a&gt;&lt;p&gt;Most of make&amp;#x27;s time was spent processing the &amp;quot;.d&amp;quot; files containing header dependencies (Ninja has a special optimisation for these files, where it reads them the first time they&amp;#x27;re created, inserts the dependency information into a binary database, then deletes them so it doesn&amp;#x27;t have to parse them in future invocations).&lt;p&gt;In real world projects, you often end up &amp;quot;abusing&amp;quot; make to add behaviour such as detecting if the compilation flags have changed, and this can make your makefiles slower; whereas ninja has those features built in. Apparently this made a big difference in build times for Chromium (where ninja was born). See this comment by the ninja&amp;#x27;s author: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;news.ycombinator.com&amp;#x2F;item?id=23182469&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;news.ycombinator.com&amp;#x2F;item?id=23182469&lt;/a&gt;</text></comment>
<story><title>Why Use Make (2013)</title><url>https://bost.ocks.org/mike/make/</url></story><parent_chain><item><author>hedora</author><text>People always claim ninja is fast, but I can&amp;#x27;t figure out what they mean by that.  A typical C++ project build uses 10-10,000 CPU core minutes, and make takes (maybe, in some pessimal situation) 100 milliseconds to schedule and coordinate the build invocations.&lt;p&gt;Even if ninja is 100x faster, it really, really doesn&amp;#x27;t matter, at all.</text></item><item><author>ddulaney</author><text>Does ninja fit your needs? It’s available on just about all of the Linux distros and it’s extremely fast with very few bells and whistles. The language is (for better or worse) designed to be generated by a higher-level tool, so it strips out most of the complexity of GNU make, but it might go too far if you’re looking to do list&amp;#x2F;map processing in it.</text></item><item><author>nine_k</author><text>It&amp;#x27;s true, but the compatibility is limited.&lt;p&gt;I had to resort to tricks to make Makefiles which work both on Linux and macOS. I had to mandate the use of GNU make on Macs in other cases.&lt;p&gt;This is on top of having BSD vs GNU coreutils for things like grep, awk, etc, and the ancient bash on macOS.&lt;p&gt;I really wish there was a self-contained tool that could work like make (building a dependency graph and only doing the needed things), with reasonable string &amp;#x2F; list &amp;#x2F; map processing built in. (In a limited way, GNU make is such a tool.)</text></item><item><author>jitl</author><text>The best thing about make is that it’s available &lt;i&gt;everywhere&lt;/i&gt; on POSIX systems. macOS comes with it pre-installed, and every Linux distro or *BSD does too, or offers a package for it that’s often depended on by everything else devtools-wise. This means make skills are super transferable; possibly more so than bash&amp;#x2F;shell skills.&lt;p&gt;Sure there are more user-friendly tools written in the programming language du jour, but those will always need some special snowflake setup process for all of your developers. If you’re cross-platform, now you need encode that in a setup script before your project can build… Maybe you can offer a Makefile just to install `better-make`?</text></item></parent_chain><comment><author>stabbles</author><text>If you have a slow filesystem and you’re compiling C, make has a “lot” of overhead due to implicit rules. There are many more rules than you write, unless you set stuff like&lt;p&gt;&lt;pre&gt;&lt;code&gt;   .SUFFIXES:
&lt;/code&gt;&lt;/pre&gt;
to nothing</text></comment>