Building software is complicated because source code must be very specifically processed to create a program that works—let alone a program that works well! The make(1)
program makes building software easily reproducible, so that a program can be built exactly as the software author intends. make
takes its instructions from a configuration file, or makefile, which tells make
exactly how to build a program from source. You don’t need to know the internals of a makefile, so we’re not going to dissect one here.
A makefile includes one or more targets and a set of instructions to carry out. For example, typing make install
tells make
to check the makefile for a procedure called install
and, if found, to execute it. A target’s name usually relates to what make
should be doing. The make install
process, for example, usually installs the software built by previous steps. You’ll find targets to install, configure, and uninstall most software, and make
handles a huge variety of functions, some of which far outstrip the creators’ original intentions.