[<-] [ ^ ] [->] Previous: References Up: The Role of Literate Computing in Undergraduate Curricula
TR-CS-94-01 Next: About this document ...
Multiple Compilation and WEB
The options are as follows:
-
Create a single monolithic document. Use the @O option to force TANGLE
to create separate files for independent compilation units.
Making the include files is now
rather convoluted. The entire program formats correctly, but there is no
way of typesetting an individual compilation unit[+].
-
For typesetting purposes work with a single document, but include each
compilation unit
using @I or @i from a separate file. Each individual unit may or may not be typeset depending upon the
setting of the I switch on the FWEB command line. This is not
ideal, since one ought in principal to be able to typeset an individual
unit with an appropriate make command without any source editing.
-
Include all header files as WEB. This will typeset each module correctly.
The whole program can be typeset by making these includes dependent upon
the command line switch. But it has the distinct disadvantage of including
code instead of declarations which can lead to all sorts of problems. From
a philosophical point of view it would seem to be better to let the
compilation phases work within their established system ( .h, .c and
appropriate make operations).
-
Create separate compilation units with all the appropriate
declarations in those files. But
make the .o files using @O to redirect the output. This solves all the
problems, but it creates an extra (dummy) output file.
-
The solution we use is to create .root files, analogous to SliTeX
which are used purely for the typesetting phase and contain the
declarations relevant for that phase as discussed in the body of the report.