We assume our readers are familiar with the UNIX make utility which is widely used for software maintenance. We use the dialect of the make language called cake because it better expresses the needs of document development.
The main strategy is to isolate the reusable code in two files, SEP.defs that we ``include'' at the beginning of each figure-making cakefile and SEP.idoc.rules that we include at the end. Each of the many figure-building cakefiles starts with
#define USRLIBS SEPCLASSLIB #include <SEP.defs>
The (optional) first line says that linking will include the library used in all Claerbout's classes. If you need additional libraries, add them to the end of this line. SEP.defs also sets up a default location for our figures because it contains the lines
#ifndef FIGDIR #define FIGDIR ./../Fig
which means a sister directory to any of our figure-building directories is named Fig (which is generally a symbolic link to a nonprecious area). Some people prefer to keep their figures in a daughter directory so they start off with
#define FIGDIR ./Fig #include <SEP.defs>
Often people write cakefiles so that if you come into a directory and type a simple cake, you will view a succession of figures emerging from the tube program. In the skeleton cakefile below, typing cake will show two figures named data and spectrum, and it will build them first if they are out-of-date.
#define USRLIBS SEPCLASSLIB #include <SEP.defs> #define FIGLIST data spectrum default& : tube $ comment $ Application dependent stuff described later belongs here. $ clean& : jclean #include <SEP.idoc.rules> #include <SEP.obj.rules> #include <SEP.prog.rules>
The line containing jclean defines the clean-up procedure and will be explained later. At the bottom of this skeleton cakefile we included the compilation and linking rules of Dave Nichols, and we include SEP.idoc.rules, which has grown to about four pages of cake rules that are common to all our figure building and interactive documentation and whose content is our main subject here.