Automating Compilation with Makefiles

When I’m writing a large program, I like to automate as much as possible. There are two reasons for this. First, in the long run, it saves typing—typing the same old commands over and over again as I test and retest my program takes a lot of keystrokes, and I don’t want to wear out my fingers.

Second, I often suspend what I’m working on and go work on some other project. It can be months before I return to a project that I have suspended, and when I return to the project, I’ve usually forgotten how to build the code in my project. make to the rescue!

make is the utility for automating my work—I use it for compiling and distributing my Erlang code. Most of my makefiles[13] are extremely simple, and I ...

Get Programming Erlang, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.