This library provides a Scheme version of the standard unix make utility. Its syntax is intended to simulate regular unix make in Scheme.

The idea is to explain how to generate some project you have from a collection of source files that go through several stages of processing.

For example, let's say that you are writing soem project that has three input files (that you create and maintain) called a.input, b.input, and c.input. Further, there are two stages of processing -- first you run a particular tool make-output that takes an input file and produces and output file, and second you combine the input files into a single file using output. Using make, you might write this:

Once you've put those above lines in a file called Makefile, you can issue the command:

make total

that builds your entire project. The Makefile consists of several lines that tell `make' how to create each piece. The first two lines say that a.output depends on a.input and the command for making a.output from a.input is

make-output a.input a.ouput

The point of this exercise is that the make utility looks at the file creation dates of the various files and only re-builds what is necessary. Make is based on building things with shell programs. If, on the other hand, you want to build similar things with various Scheme programs, you can use the make collection.

If you were to fill in the ellipses above with calls to system, you'd have the exact same thing as the original Makefile. In addition, if you use make/proc, you can abstract over the various make lines (for example, the a.output, b.output, and c.output lines are very similar and it would be good to write a program to generate those lines).

To make a target, MAKE/PROC is first called on each of the target's dependencies. If a target is not in the spec and it exists, then the target is considered made. If a target is older than any of its dependencies, the corresponding COMMAND-THUNK is invoked. The COMMAND-THUNK is optional; a MAKE-LINE without a COMMAND-THUNK is useful as a target for making a number of other targets (the dependencies).

[parameter]make-print-checking

If #f, make only prints when it is making a target. Otherwise, it prints when it is checking the dependancies of a target. Defaultly #t.

[parameter]make-print-dep-no-line

If #f, make only prints "checking..." lines for dependancies that have a corresponding make line. Defaultly #f.

[parameter]make-print-reasons

If #t, make prints the reason for each dependancy that fires. Defaultly #t.