Next: one-file-many-purposes
Prev: hierarchical-structure
Up: Glasgow-objectives
Top: Top
0.1.1.7. "Separate compilation" for large programs/documents
This really follows from the size of project we're trying to support;
it's just too slow to have to slurp in the whole program
text and do anything... (It's pretty slow as it is :-)
Separate compilation of the embedded code: Use the normal mechanisms
of your programming language. For example, if you have a literate C
file, `foo.lc', then you would extract the code into `foo.c'
(command: `lit2pgm foo.lc') and compile as normal (`gcc -c foo.c').
"Separate compilation" of the (LaTeX and (Tex)info)
document-generating tasks: this is harder and quite a lot of work has to be done at "link time". What happens: the initial
"separate compilations" of all the individual files in a
program/document (e.g., `lit2texi -c foo.lc' or
`lit2latex -c foo.lc') produce intermediate files (`*.itxi' and
`*.itex' files, respectively). These are then consulted when
a "link" is done (e.g., `lit2latex root.lit', where `root.lit'
`\inputs' the other files).
(It's complicated: use Makefiles!)