Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I never got the hate for Makefiles. Granted I mostly use them for simple projects, but compiling C project takes just a few lines of code (compile .c to .o, .o to executable, optionally provide some PHONY convenience utils) and is very readable and hackable. What's not to love?

I'm sure I'm missing something, and it's possible that they don't scale well, but I prefer it to any other could system for small C projects.



With autotools you get DESTDIR, --prefix and a bunch of other things that work the same across all projects. With Makefiles everybody is rolling their own thing and you never know what to expect, or frequently have to implement those things yourself.

That said, autotools, with its multiple layers of file generation, makes debugging rather annoying. And it's generally much easier to fix a broken Makefile than figuring out why autotools goes wrong.


Problem is that you have a wide range of makes with different syntax. It has gotten better nowadays where GNU make is available pretty much everywhere, but two decades ago you'd have a range of incompatible makes on different UNIX systems, plus a bunch of incompatible makes on Windows as each compiler would come with its own make.

Assuming you can ignore Windows you'd typically end up with two makefiles (Makefile and GNUMakefile) and a bunch of includes sharing code all make variants understand.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: