I remember the general gist of writing Makefiles, but, due to CMake, autotools and other such Makefile generators, I've forgotten so many details that, if you were to ask me to write a makefile from scratch for a complex project, well, it would take me a couple of hours at least.There must be many opinions out there, I'm looking for the most informative answer. Considering ninja (Makefiles not intended to be hand-written) and all the automatic generators, does it make any sense to arbitrarily brush up on Makefile syntax, aside from legacy code maintenance?
What uses are there today for manually writing Makefiles?
builds;make;cmake
There's a lot of use in being able to Manually Build a project these days.Whether that's through the use of a makefile, a shell script or a good old fashioned MsDos based batch file, it really doesn't matter.There's not just legacy code maintenance as you point out, what about emergency patches and bug fixes to get systems back up and running.Over the years, I've done a lot of work as a field engineer, and I've lost count of the amount of times I've been stuck in a data center with nothing more than an SSH terminal on the Laptop I have plugged in to some wacky & wonderful custom server system.You don't always have the luxury of your usual tools, especially when your working on custom projects that are currently undergoing integration testing.For that reason and that reason alone, it's always a good idea to be able to work using the barest of development environments, and if that means a copy of GCC, Make and Vim running off an 8gb bootable key chain containing a very basic *nix distro then it's worthwhile keeping the practice up.