home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Previous Section Next Section

2.3 The Build Script

The first step in compiling sendmail is to establish an object directory and a Makefile that is appropriate to your machine architecture and operating system. You do this by running the Build script in the sendmail source directory:[3]

[3] This same Build script is also used to build all the support programs, such as mailstats, smrsh(1), and mail.local(1). We describe support programs in Chapter 5.

% cd sendmail 
% ./Build -n 
Configuration: pfx=, os=SunOS, rel=4.1.4, rbase=4, rroot=4.1, arch=sun4, sfx=
Using M4=/usr/5bin/m4
Creating ../obj.SunOS.4.1.4.sun4/sendmail using ../devtools/OS/SunOS
   many more lines here
%

Here, Build found that our machine was a sun4, running the SunOS 4.1.4 release of Unix. Build then created the working directory ../obj.SunOS.4.1.4.sun4, set up symbolic links to all the source files in that directory, and finally generated a Makefile there.

The Build program understands several command-line switches that can be used to modify its behavior (see Table 2-2). Any switch or other command-line argument that is not in that table is carried through and passed as is to the make(1) program. For example, specifying the -n switch to Build (in the earlier example) caused Build to pass that switch to make(1), thereby preventing make(1) from actually building sendmail.

Table 2-2. Build command-line switches

Switch

§

Description

-A

-A

Show the architecture for the build.

-c

-c

Clean out an existing object tree.

-E

-E

Pass environment variables to build.

-f

-f

Use site file in alternative directory.

-I

-I

Add additional include directories.

-L

-L

Add additional library directories.

-m

-m

Show but don't create the directory.

-M

-M

Show the name of the object directory.

-O

-O

Specify the path of the object directory.

-Q

-Q

Set prefix for the object directory and Build m4 configuration file.

-S

-S

Skip system-specific configuration.

    Previous Section Next Section