3 ms·
The author presents some non-trivial makefiles meant for C/C++ as proof that there are no simple makefiles. That's a bit disingenuous. I think the problem here
by josteink 9y ago
The author presents some non-trivial makefiles meant for C/C++ as proof that there are no simple makefiles. That's a bit disingenuous.
I think the problem here is the complexity of C, C++ and the building of such, not the makefile itself. Make can make simple things simple, but it can't take away genuine, real complexity as if it never existed.
I have lots of makefiles I use and am super-happy with. But none of them are for C-based projects. When you take away the complexity that C/C++ brings, you no longer need to bring that along to your makefile.
And you know what you have then? Apparently what the author refers to as a "unicorn": A nice and super-simple makefile. The unicorn is suddenly real.
- hzhou321 9y agoMake sense. Then, it is because of the complexity we want to use the makefile. The include files is a mess for c/c++ because it poses no restrictions and people do abuse it. In my practice, I never put header files in the makefile. They are either stable or I need deliberately ponder on its design. When necessary, I simply touch the c source to trigger rebuild. So my makefile remain simple and I always need know roughly how my header files are used, which is a necessary responsibility.
- JdeBP 9y agoIndeed, not all uses of make are as a "build tool" for "projects". * https://news.ycombinator.com/item?id=11942498 https://news.ycombinator.com/item?id=11942498