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

I wonder how Makefiles got such a bad reputation. After decades of reading how bad Makefiles are, I recently tried writing one for a moderately complex build, just for fun. I was pleasantly surprised: make is very fast, it's well-documented, and the execution model is so simple that I found it very easy to figure out how to script the things I needed to do. I'm not saying it's great, but there are a lot worse build systems around that people still actively advocate (cough msbuild).


Over the past 30 years or so, build tools for C and C++ programs have converged to what you see today.

For example, with GCC you can use the -M options, and then you can -include the result in your makefile. This was not always possible. You had to manually specify the .h files for every .c, and if you omitted one, you could get a successful build but a broken program!

Then consider the process of building a shared library, which is different on different platforms, but if you restrict yourself to GCC on Linux with GNU Binutils it’s damn easy.

There are a few other, minor failings of Make. But you’re right, it’s very comprehensible and straightforward. I still say that it’s a low bar, though, by modern standards.


How about significant whitespace with a difference between tabs and spaces, for starters?




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

Search: