[project @ 1996-07-19 18:36:04 by partain]
[ghc-hetmet.git] / ghc / docs / NOTES.part-of-book
1 E.g., for the typechecker sources of the compiler.
2
3 % cd compiler/typechecker/
4
5 * make a Jmakefile that is NOT plugged into the overall make-world
6   system; it will probably look like this:
7
8 ------------------------------
9 /* this is a standalone Jmakefile; NOT part of ghc "make world" */
10
11 LitDocRootTargetWithNamedOutput(root,lit,root-standalone)
12 ------------------------------
13
14 * make a "root file", root.lit, to glue the modules together.
15
16   At the beginning you'll have something like:
17
18     \begin{onlystandalone}
19     \documentstyle[11pt,literate,a4wide]{article}
20     \begin{document}
21     \title{The Glasgow \Haskell{} typechecker}
22     \author{The GRASP team}
23     \date{October 1991}
24     \maketitle
25     \tableofcontents
26     \end{onlystandalone}
27
28     \begin{onlypartofdoc}
29     \section[Typechecker]{The typechecker}
30     \downsection
31     \end{onlypartofdoc}
32
33   At the end of the file, you'll need something like:
34
35     \begin{onlypartofdoc}
36     \upsection
37     \end{onlypartofdoc}
38
39     \begin{onlystandalone}
40     \printindex
41     \end{document}
42     \end{onlystandalone}
43
44   In between, simply \input all the modules, possibly adding some
45   sectioning hierarchy:
46
47     \section[Typechecker-core]{Typechecking the abstract syntax}
48     \downsection
49     \input{XXXXXXX.lhs}
50     \input{YYYYYYY.lhs}
51     \upsection
52
53     \section[Typechecker-support]{Typechecker: supporting modules}
54     \downsection
55     \input{AAAAAAAAAAA.lhs}
56     \input{BBBBBBBBBBB.lhs}
57     \upsection
58
59 * To make your Makefile, do:
60
61     % jmkmf -P ghc
62
63   (because of a bug, you may have to do it twice :-)
64
65 * Then do "make depend".
66
67 * Now you are ready for business:
68
69     % make root.info
70     
71     or
72     
73     % make root.dvi