Chapter 1
Introduction
This chapter describes MMK. It includes an overview of MMK and basic information on its use.
1.1. Overview
MMK is a tool for building a “software system;” that is, a collection of one or more executable images or other types of files that are related to a particular project. Building a complex system by hand can be a difficult and time-consuming task; using command procedures can make the task easier, but it may still be time-consuming.
With MMK, you create a file called a Makefile or MMS description file to describe your software system: the objects (i.e., source files, object files, etc.) that comprise the system, the dependencies between those objects, and the commands used to build the system. When you invoke MMK, it performs the following steps:
MMK reads and parses the description file, constructing a tree from the objects and dependencies listed in the file.
It then identifies the object to be built (called the target).
The tree of dependencies is traced from the target, and the revision dates for the files in that path are compared. If an object doesn't exist or is older than the object it depends on, the commands to build the object are executed in a subprocess. This continues until all objects along the dependency path have been checked and the target has been brought completely up-to-date.
In this way, MMK can execute the commands to rebuild only those pieces of your software system that need rebuilding due to a change that you have made. This can drastically reduce development time for a project.
1.2. Invoking MMK
Provided that MMK has been installed using the steps laid out in the installation instructions (file AAAREADME.INSTALL in the kit), you can invoke MMK from DCL as a foreign command:
$MMK
Full command syntax is given in MMK. By default, MMK looks for a description file called DESCRIP.MMS in the current directory; if that file does not exist, it then looks for a file called MAKEFILE. If it cannot find that file, an error is signaled. You can use the /DESCRIPTION qualifier to specify a different name for your description file, if needed.
MMK starts by reading the description file and constructing a tree from the objects listed in the description file (e.g., source files, include files, object files, etc.) and a tree of dependencies between those objects. It then identifies the target object to be built, and traverses the dependency tree to identify those objects that need to be built (called intermediate targets) in order to build the target.
MMK compares each target's revision date/time against the objects on which it depends and executes the actions for that building the target only if needed. You can force a complete rebuild by using the /FROM_SOURCES qualifier on the MMK command.