by WesolyKubeczek · 3y ago · 0 comments
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.
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.
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.
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.