sendmail

sendmailSearch this book
Previous: 2.4 PreliminariesChapter 2
Have a V8
Next: 2.6 Test It
 

2.5 Build

You are now ready to build a runnable version of sendmail. To do so, just run the following command while in the src/obj... directory:

% make

This results in several screens full of output, so you should do this in a scrollable window or something similar, such as emacs(1) or script(1).

cc -I. -O -I/usr/sww/include -DNDBM -DNEWDB -DNIS   -target sun4 -c  alias.c
cc -I. -O -I/usr/sww/include -DNDBM -DNEWDB -DNIS   -target sun4 -c  arpadate.c
cc -I. -O -I/usr/sww/include -DNDBM -DNEWDB -DNIS   -target sun4 -c  clock.c
... and so on.

Although we hope that everything will go smoothly, various things can go wrong at this point. For example, if you forgot to undefine NEWDB you, might get this:

map.c: 46: Can't find include file db.h
*** Error code 2
make: Fatal error: Command failed for target `map.o'

If so, go back to Section 2.4.1, "Eliminate or Keep db Support?", and remove -DNEWDB from the Makefile. Other problems are covered in Chapter 18. If all goes well, you should end up with output looking like this:

... many lines here.
cc -I. -O -I/usr/sww/include/db -DNDBM  -DNEWDB -DNIS   -target sun4 -c  version.c
cc -o sendmail -Bstatic alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.
o  deliver.o domain.o envelope.o err.o headers.o macro.o main.o  map.o mci.o mime.o pa
rseaddr.o queue.o readcf.o recipient.o  savemail.o srvrsmtp.o stab.o stats.o sysexits.
o  trace.o udb.o usersmtp.o util.o version.o  -L/usr/sww/lib -ldb -ldbm -lresolv
%

The result of all this is a brand-new executable sendmail file in the current (src/obj...) directory. You can now copy that new sendmail to any convenient location - perhaps one where you will continue this tutorial. Your home directory is one possibility:

% cp sendmail $HOME

Or you can put a symbolic link to it in ../src:

% ln -s sendmail ../src

Or you can leave it in the src/obj... directory. It really doesn't matter where you put sendmail for this tutorial. We will always refer to it as ./sendmail to keep the examples uniform.


Previous: 2.4 PreliminariessendmailNext: 2.6 Test It
2.4 PreliminariesBook Index2.6 Test It