4 ms·
I never understood why there are typically two commands and not just “make”. Is this a historical accident?
by catlifeonmars 6y ago
I never understood why there are typically two commands and not just “make”. Is this a historical accident?
- millstone 6y agoI think it is simply that make is too crufty to extend. It has perma-broken behavior around space handling, which nobody dares touch [1]. But you can't replace it because it is entrenched, so Makefiles must be wrapped, by configure or CMake or whatever. And these in turn have their own cruft, so must be wrapped, by autoconf and...well someone please wrap CMake! The C and C++ ecosystem is crying out for a new build system, but there is no mechanism to converge on one. It's bad. 1: http://savannah.gnu.org/bugs/?712 http://savannah.gnu.org/bugs/?712
- jnxx 6y agoMake does what it does surprisingly well: It runs commands on files based on a description of dependencies. There is no shortage of would-be successors of make, but so far none of them has succeeded, which supports the hypothesis that "make" has hit a sweet spot. There is one alternative to make which I think is worth mentioning, because of its simplicity, brilliance, and excellent support for correctness: it is redo, as in Apenwarrs redo: https://redo.readthedocs.io/en/latest/ https://redo.readthedocs.io/en/latest/ And redo works with autotools!
- jnxx 6y agoThis is by construction and is nicely explained by the slides I linked before. Basically, autoconf generates a makefile which will work for your architecture. It does that via a script which is called "configure", which generates that makefile. The configure script is independent of your hardware and platform and does only require a standard POSIX shell, and it generates code for the version of "make" that is present on your platform. This means that in difference to other build systems, one does not have to install (and build!) the build system for the own platform, and also that there are no compatibility problems because the configure script always matches the source code distribution. On top of that, the "configure" script is also automatically generated, typically using two files "config.ac" and "makefile.am", via a command which is now called "autoreconf", but this normally happens only on the developer's system.