Search code examples
makefilegnu-make

Resources for learning GNUMake?


I'm trying to learn GNUMake for a small project I'm working on. So far, even the "basic" tutorials seem pretty rough and I've yet to make sense of the makefile syntax.

Does anyone have some good resources for an absolute beginner to get familiar with GNUMake?


Solution

  • The definitive guide is http://www.gnu.org/software/make/manual/make.html
    There is an o'reilly book "Managing Projects with GNU Make" which has more explanation. You can also uses the earlier editions, they don't cover GnuMake specifically but are a lot thinner.

    Make is a dirty secret among developers - none of us understand it, we just borrow a make script from somebody else and change it. I imagine only one script was ever written from scratch (probably by the creator of the tool).

    When you need to do more than the simple example most people either switch to a more modern build system like Ant or roll their own in Perl/Python/etc.