4 ms·
Make is very versatile but unfortunately underappreciated today. But just look at buildroot, it’s a ginormous system made with Makefiles. I only wish for somet
by WesolyKubeczek 4y ago
Make is very versatile but unfortunately underappreciated today. But just look at buildroot, it’s a ginormous system made with Makefiles.
I only wish for something which works like Make but has a more ergonomic syntax and an ability to define your own functions to determine if a target is up-to-date.
And for the love of everything that’s good, stop pigeonholing make into being a tool for compiling C-shaped programs. It’s useful for more than that.
- cout 4y agoI think the closest we have today to "make with better syntax" is ninja. It lacks pattern rules and macros and other fancy features because it is expected that ninja files are built with a code generator, but for a tool that just handles specifying targets, rules, and dependencies, it works great (and as a bonus it is faster than make).
- WesolyKubeczek 4y agoWhich makes ninja not that good enough a replacement, as make has the same problem: it’s so layered in arcane that in most cases you rely on tools to generate Makefiles for you anyway. There are “alternatives” like some Python frameworks, but they are more “command runners” rather than graph resolvers, they lack inbuilt or simple ways to determine that a target is up to date, or they promise paralellism* (with fine print that maybe someday in a future version). One thing make is lacking (arcane stuff aside) is dynamic dependency graph, which could have made it viable for things like javascript transpiling and bundling. Even for C projects which are sorta kinda match made in heaven, you need a “makedepend” tool to traverse your sources.
- gjvc 4y agoAnd for the love of everything that’s good, stop pigeonholing make into being a tool for compiling C-shaped programs. It’s useful for more than that. Absolutely. When you need to transform one set of files into another and have the parallelism taken care of and the cleanup able to be expressed as a target, it's a great tool. One of many one uses on the jobsite every day.
- oftenwrong 4y ago>ability to define your own functions to determine if a target is up-to-date. Yes! A modular make-like would allow the tool to fit any scale. Imagine not only being able to define the up-to-date function, but being able to plug into remote build caches, and perform remote execution of build rules. There are already tools like this, such as Bazel, but they are less appropriate for the small scale than Make. The closest that I know of is BuildKit and related projects.