Pristine Ack-5.5
[Ack-5.5.git] / doc / Makefile
1 # $Id: Makefile,v 1.35 1996/12/04 14:03:12 ceriel Exp $
2
3 # This Makefile is not supposed to be used in the doc source directory.
4 # Instead, it is supposed to be copied to the target doc directory.
5
6 SUF=dit
7 PRINT=dis
8 NROFF=troff
9 MS=-ms
10 OPR=dip
11
12 RESFILES= \
13         toolkit.$(SUF) install.$(SUF) em.$(SUF) ack.$(SUF) v7bugs.$(SUF) \
14         peep.$(SUF) cg.$(SUF) ncg.$(SUF) regadd.$(SUF) LLgen.$(SUF) \
15         basic.$(SUF) crefman.$(SUF) pascal.$(SUF) pcref.$(SUF) val.$(SUF) \
16         ansi_C.$(SUF) \
17         6500.$(SUF) i80.$(SUF) z80.$(SUF) top.$(SUF) ego.$(SUF) \
18         m68020.$(SUF) occam.$(SUF) m2ref.$(SUF) ceg.$(SUF) nopt.$(SUF) \
19         sparc.$(SUF) int.$(SUF) lint.$(SUF)
20
21 .SUFFIXES: .doc .$(SUF) .lpr .out
22
23 .doc.$(SUF):
24                 $(NROFF) $(MS) $< > $@
25
26 # directly to the printer:
27 .doc.lpr:
28                 $(NROFF) $(MS) $< | $(OPR)
29
30 # to standard output
31 .doc.out:
32                 @$(NROFF) $(MS) $<
33
34 # Exceptions, to be run without -ms
35
36 v7bugs.$(SUF):  v7bugs.doc
37                 $(NROFF) v7bugs.doc >$@
38
39 v7bugs.lpr:     v7bugs.doc
40                 $(NROFF) v7bugs.doc | $(OPR)
41
42 v7bugs.out:     v7bugs.doc
43                 @$(NROFF) v7bugs.doc
44
45 pcref.$(SUF):   pcref.doc
46                 $(NROFF) pcref.doc >$@
47
48 pcref.lpr:      pcref.doc
49                 $(NROFF) pcref.doc | $(OPR)
50
51 pcref.out:      pcref.doc
52                 @$(NROFF) pcref.doc
53
54 val.$(SUF):     val.doc
55                 $(NROFF) val.doc >$@
56
57 val.lpr:        val.doc
58                 $(NROFF) val.doc | $(OPR)
59
60 val.out:        val.doc
61                 @$(NROFF) val.doc
62
63 pr:
64                 @make "SUF="$(SUF) "NROFF="$(NROFF) "MS="$(MS) \
65                         $(RESFILES) >make.pr.out 2>&1
66                 @$(PRINT) $(RESFILES)
67
68 # The 'opr' entry creates a lot of paper ... but the user must be able
69 # to write the doc directory. I hope that this limits the users of
70 # this entry to persons that know what they are doing.
71 opr:
72                 @make "SUF="$(SUF) "NROFF="$(NROFF) "MS="$(MS) $(RESFILES) 
73                 $(OPR) $(RESFILES)
74
75 clean:
76                 -rm -f $(RESFILES)
77
78 # The distr entry is only used when making a distribution tree.
79 # It makes a version of the installation manual, suitable for a simple
80 # line printer.
81 distr:          install.doc
82                 tbl install.doc | nroff -Tlp $(MS) >install.pr