I've been coding c++ for nearly 20 years, still don't know how to write a Makefile. Thanks CMake!
If you have a project where you need to do a thing, you can instead make a Makefile to do the thing:
thing:
some shell command
that's it, now you get to type `make thing`.The power is the generality: it can wrap any command, from jq to curl to whatever. It's perfect for small, weird workflows which don't naturally fit into other build systems.
But don't use it for C++!
It's really easy to specify things incorrectly in a Makefile and not notice for a very long time.
Everyone that equates UNIX with Linux, apparently misses out how much fun (it was not) was writing portable makefiles across all major UNIXes and other non-UNIX platforms during the 90's up to the .COM first wave.