next up previous print clean
Next: LIFE WITH MISSING INTERMEDIATE FILES Up: Claerbout & Nichols: Why adoc's need cake Previous: INTRODUCTION

EUREKA

A makefile is a UNIX text file in a specialized language that assembles everything that is necessary to produce a ``target'' file which is typically a plot file. Let us consider a one-dimensional example. Consider a simple ratfor program that makes a plot. The files in order of their creation might be called:
prog.r ratfor program
prog.f fortran program
prog.o object
prog.x linked object
plot.float seismogram values
plot.vplot intermediate plot language
plot.ps postscript plot language

More generally there is not a line of files above plot.ps but a {\it tree} of them. The tree includes parameter files, subroutines, headers, etc. But to understand make and cake it is sufficient to think about the linear dependences above. The first thing to notice is that each file in the above list should be younger that the one above and older than the one beneath. If this is not true, then a file is said to be out of date. When a file is out of date, then invoking make or cake will fire off the minimum number of commands needed to bring everything up to date. For example there might be a plot parameter that is used in the creation of the vplot file from the float file. When the parameter file is edited its date changes and thereafter an invocation of make or cake will rebuild only the plot files without recompiling anything. In summary, a makefile is a command sequence with the extra feature that any program will not be run its output is already younger than the program and all its inputs. For example, the command ``make figure.ps'' does nothing to a figure file that is up to date, but otherwise it does everything needed to rebuild the figure. A pushbutton in a figure caption can fire off the make command.


next up previous print clean
Next: LIFE WITH MISSING INTERMEDIATE FILES Up: Claerbout & Nichols: Why adoc's need cake Previous: INTRODUCTION
Stanford Exploration Project
7/20/2006