The Build Script

The Build script[162] is used to compile, link, and install all the programs that are shipped with sendmail. The Build script is run like this:

% ./Build switches what

Here, we execute Build by prefixing its name with a dot and a slash. This trick ensures that you can run it, even if you do not have a dot in your PATH. As an alternative, because Build is a Bourne shell script, you can run the shell and have the shell run it:

% sh Build switches what

The switches change the behavior of Build, causing it, for example, to use different directories or clean out a directory to start over. We show all the Build command-line switches in Table 10-2 (which follows the explanation of what), and explain them in detail in the sections that follow that table.

The what corresponds to the make(1) “targets” on the left side of the Makefile created for each program. If what is missing, the target defaults to all. The possible targets are:

all

This target causes the program to be compiled and linked. It creates an executable file that you can install and run, and also formats the manual pages.

clean

This target causes all the intermediate .o files to be removed, the executable file to be removed, and the formatted manual pages to be removed. This is a good way to reclaim disk space after installing the program. Running it does not, however, create a new Makefile. You should always create a new Makefile whenever you modify your m4 build file. See fresh in the next entry for one way to do that. ...

Get sendmail, 4th 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.