- Recompiling programs residing in several files, and
- Testing programs.
Since we are using Modula-3, which has its own make-like facility, this document will focus on using make for testing.
There are many versions of make in use. This tutorial assumes GNU Make, distributed freely by the Free Software Foundation. It has a number of features which make it more attractive than the standard Unix make.
Rules
Make uses instructions found in a file named makefile or Makefile to determine what actions to take in order to satisfy some requirement. A simple makefile consists of "rules" or "recipes" that describe how to create a particular target. Each rule has the following shape:
target... : dependencies ...
command
...
...
A target may be either a file to be generated by make or an identifier for an action to be carried out. Make determines that it needs to build a target if one or more dependencies have changed since the target was last built.