Make — A Program for Maintaining Computer Programs

Make — A Program for Maintaining Computer Programs

Revised April, 1986 | S. I. Feldman
The article introduces *Make*, a program designed to automate the maintenance and compilation of computer programs. *Make* simplifies the process of updating and recompiling files after changes are made to the source code. It does this by defining dependencies between files and executing the necessary commands to ensure that all dependent files are up-to-date. The basic operation of *Make* involves finding the target file, checking if its dependencies are current, and creating the target if they are not. The article outlines the key features of *Make*, including its ability to handle macro substitution, command encapsulation, and depth-first search of dependency graphs. It also explains how *Make* uses a description file to define the dependencies and commands, and how it interacts with the file system to determine the last modification times of files. The introduction highlights the common challenges in maintaining large programs, such as managing dependencies, compiling multiple files, and running test scripts. *Make* addresses these issues by providing a simple command, `make`, which can update all necessary files based on the information in the description file. The article details the structure of the description file, which includes macro definitions, dependency information, and executable commands. It also explains how *Make* uses built-in rules to handle various file types and transformations, such as compiling C source files, generating object files, and using macro processors. Finally, the article provides examples and suggestions for using *Make*, including tips on debugging and optimizing the program's behavior. It concludes with acknowledgments and references to related literature.The article introduces *Make*, a program designed to automate the maintenance and compilation of computer programs. *Make* simplifies the process of updating and recompiling files after changes are made to the source code. It does this by defining dependencies between files and executing the necessary commands to ensure that all dependent files are up-to-date. The basic operation of *Make* involves finding the target file, checking if its dependencies are current, and creating the target if they are not. The article outlines the key features of *Make*, including its ability to handle macro substitution, command encapsulation, and depth-first search of dependency graphs. It also explains how *Make* uses a description file to define the dependencies and commands, and how it interacts with the file system to determine the last modification times of files. The introduction highlights the common challenges in maintaining large programs, such as managing dependencies, compiling multiple files, and running test scripts. *Make* addresses these issues by providing a simple command, `make`, which can update all necessary files based on the information in the description file. The article details the structure of the description file, which includes macro definitions, dependency information, and executable commands. It also explains how *Make* uses built-in rules to handle various file types and transformations, such as compiling C source files, generating object files, and using macro processors. Finally, the article provides examples and suggestions for using *Make*, including tips on debugging and optimizing the program's behavior. It concludes with acknowledgments and references to related literature.
Reach us at info@study.space