4 ms·
For me, make has two fatal flaws: 1) the lack of a builtin scripting language 2) poor recursion support The problem with the lack of a scripting language is th
by norir 2y ago
For me, make has two fatal flaws:
1) the lack of a builtin scripting language
2) poor recursion support
The problem with the lack of a scripting language is that I either have to do horrible shell contortions to do simple things like using a temporary file in a recipe or write a standalone script that doesn't live in the Makefile which is needless indirection. This is exacerbated by Make interpreting newlines in the recipe as a separate shell invocation, which I consider a poor design choice. It also requires needless forking for many small tasks which could be done more efficiently in process.
The lack of proper recursion means that I either have to use recursive make, which is largely considered an anti-pattern, or I have to use a flat directory structure.
What Make does have going for it is ubiquity and good performance for small projects. It is the tool most projects should probably start with and only switch to something more advanced when its scalability issues become a genuine problem.
- saurik 2y agoYou can use .ONESHELL: to switch to the shell behavior you are wanting. https://www.gnu.org/software/make/manual/html_node/One-Shell.html https://www.gnu.org/software/make/manual/html_node/One-Shell...
- spc476 2y agoThat's for GNU make, not POSIX make [1]. For some people, they either won't, or can't, use GNU make. [1] https://pubs.opengroup.org/onlinepubs/9799919799/utilities/make.html https://pubs.opengroup.org/onlinepubs/9799919799/utilities/m...
- saurik 2y agoWho even implements an alternative implementation to GNU make? FWIW, no one "can't" use GNU make... even Apple uses GNU make (hell: they even ship GNU make, lol).
- tmtvl 2y agoBSD Make exists. Also, are you saying that no one is developing software under a contract where they aren't allowed to install software on the target machine? I'm also unsure whether GNU Make works on embedded systems.