3 ms·
> The multi-million line makefile is real Of course you quickly get to million-line Makefiles in bigger projects. In C++, if you depend on stuff like Boost, a
by deng 7y ago
> The multi-million line makefile is real
Of course you quickly get to million-line Makefiles in bigger projects. In C++, if you depend on stuff like Boost, a single file can easily depend on thousands of header files, and every single one must be tracked by Make.
But of course, nobody in his right mind would write these dependencies by hand. At my dayjob, the core Makefile is 700 lines. These 700 lines do cross-compilation with gcc/clang for various platforms, unit testing, valgrind, cppcheck, clang-tidy, coverage, and several other things. It is completely non-recursive, runs in parallel without problems, tracks all dependencies, and also works on Windows.
Of course this stuff is complicated. Make is very low-level compared to a build-generator like CMake. But if you want a bespoke build system for your project which lets you control every last detail of your build, it is still a good choice.
- nesadi 7y agoDo you know any resources on how to use Make in a sensible/sane way?