We used nmake and the following makefile to build this paper:
include scan.mk paper.ps : paper.text troff -mm -mpictures $(*) | dpost >$(<) ghostview lpr : paper.ps $(<) $(OPTIONS) $(*)
We haven't explained how to program nmake's dependency scanner, but there's not much involved in what we did. We borrowed .SCAN.nroff from Scanrules.mk, changed the name to .SCAN.troff, deleted two entries, simplified one, and added a line that recognized a macro named .sX that we used when we wanted to run nmake and include the results in the paper. Our scan rules are shown below:
/* * Scan rule that recognizes .so, .BP, and our own .sX macro. The * The .ATTRIBUTE.%.text definition means using .SCAN.troff * to scan files that have a .text suffix. */ .SCAN.troff : .SCAN I|.so % | I|.BP % | I|.sX % | .ATTRIBUTE.%.text : .SCAN.troff
The .ATTRIBUTE.%.text assertion is more magic that we didn't talk about in the paper, but it's pretty easy. All it does is tell nmake to scan source files that end in .text (in our case it's paper.text) using the rules we defined for .SCAN.troff.