3 ms·
Make is great, and I use it all the time for task orchestration. I wouldn't use a hand-written Makefile as the top-level build tool on a library or program - C
by nrclark 7y ago
Make is great, and I use it all the time for task orchestration.
I wouldn't use a hand-written Makefile as the top-level build tool on a library or program - CMake or Autotools is a much better fit there. But on a build that pulls down and compiles a few libraries and then a final package, Make is a great wrapper around the usual "cd $SUBDIR && ./configure && make && make install" kind of thing I have to do all the time.
Make is just a fantastic tool for managing builds that look something like "Run other some weird project-specific build tool, then take the outputs and do some post-processing and copying." I also use it for automating deployment tasks, and for automating one-off "do some things to a bunch of files" kinds of tasks such as resizing images.
Make is available everywhere, and it's very lightweight. It integrates nicely with the shell. It comes with out-of-the-box tab completion. It provides dependency management, and is more standardized than a pile of "build.sh, install.sh, deploy.sh, etc". You can trigger Make's tasks one-at-a-time and trust Make to deal with whatever dependencies it needs to fill.
Make (especially GNU Make) is a weird language with some weird features. And yes - we can all complain about tab delimited fields and other oddities of the language and tool. The tradeoffs are totally worth it in my opinion. Also, getting good at Make will really level you up in your ability to script and orchestrate shell tasks.
GNU Make 4.3 just came out with some cool new features. I hope Make continues to be maintained and used - it's really a fantastic tool for a lot of use-cases.