c08e6c1a48a1b04443dba8da6eb1edea702364aa
[gnuplot] / docs / makefile.dst
1 #
2 # $Id: makefile.dst,v 1.2 2000/01/22 16:40:27 lhecking Exp $
3 #
4 #
5 # Makefile for GNUPLOT documentation
6 #
7 # Note that the top-level file for documentation is gnuplot.doc.
8 # See README.
9 #
10 # To print manual:
11 #    make gnuplot.dvi             (for latex)
12 #    (print or view gnuplot.dvi)
13 # OR
14 #    make gnuplot.nroff           (for nroff)
15 #    (print or view gnuplot.nroff)
16 #   or
17 #    make "TROFF=itroff" troff    (for troff; use your troff here)
18
19 # usually overridden by ../Makefile
20 HELPDEST = /usr/local/lib
21
22 # substitute your troff command (and any flags) for this one
23 TROFF=troff
24
25 # substitute cp if you do not have the install program
26 INSTALL=install
27
28 # substitute your DVI to PostScript conversion program here
29 DVIPS=dvips
30
31 # Compiler flags
32 # -DSYSV if att sys V
33 # -DMSDOS if MSDOS PS
34 # -traditional -g -O if gcc (set 'CC = gcc')
35 # no extra flags for BSD
36 # HBB: this gets called from the toplevel Makefile, and gets passed some CFLAGS,
37 #   so I changed this to something completely different:
38 DOC_CFLAGS = $(CFLAGS) -s -I../ -I../term/
39 CC = gcc
40
41 # Default information
42 help:
43         @echo "Please do a 'make <TARGET>' where <TARGET> is one of" \
44                 "the following:"
45         @echo
46         @echo "check        check the gnuplot.doc file"
47         @echo "clean        remove all derived files"
48         @echo "dvi          DVI files (gnuplot.dvi gpcard.dvi)"
49         @echo "gih          Unix and MSDOS help file (gnuplot.gih)"
50         @echo "help         make help"
51         @echo "hlp          VMS help file (gnuplot.hlp)"
52         @echo "html         HyperText Markup language (gnuplot.html)"
53         @echo "info         Info documentation (gnuplot.info)"
54         @echo "install-unix Unix and MSDOS install"
55         @echo "install-vms  VMS install"
56         @echo "nroff        nroff documentation (gnuplot.nroff)"
57         @echo "ps           PostScript files (gnuplot.ps gpcard.ps)"
58         @echo "tex          LaTeX documentation (gnuplot.tex)"
59         @echo "troff        troff documentation"
60         @echo "tutorial     LaTeX tutorial (latextut/tutorial.dvi)"
61         @echo
62         @echo "If you are not familiar with makefiles or just want" \
63                 "to know what"
64         @echo "'make <TARGET>' would do without actually doing" \
65                 "anything, then type"
66         @echo "        'make -n <TARGET>'"
67         @echo
68
69 # default is what is needed for interactive gnuplot
70 default: gnuplot.hlp gnuplot.gih
71
72
73 # the converters
74
75 doc2html : doc2html.c termdoc.c xref.c allterm.h
76         $(CC) $(DOC_CFLAGS) -o doc2html doc2html.c termdoc.c xref.c
77
78 doc2ms: doc2ms.c termdoc.c allterm.h
79         $(CC) $(DOC_CFLAGS) -DALL_TERM_DOC -o doc2ms doc2ms.c termdoc.c
80
81 doc2tex: doc2tex.c termdoc.c allterm.h 
82         $(CC) $(DOC_CFLAGS) -DALL_TERM_DOC -o doc2tex doc2tex.c termdoc.c
83
84 doc2hlp: doc2hlp.c termdoc.c
85         $(CC) $(DOC_CFLAGS) -o doc2hlp doc2hlp.c termdoc.c
86
87 doc2gih: doc2gih.c termdoc.c
88         $(CC) $(DOC_CFLAGS) -o doc2gih doc2gih.c termdoc.c
89
90 checkdoc: checkdoc.c termdoc.c allterm.h
91         $(CC) $(DOC_CFLAGS) -DALL_TERM_DOC -o checkdoc checkdoc.c termdoc.c
92
93
94 allterm.h:
95         @echo Hmm - need to concatenate all .trm files into allterm.h
96         @echo should have been done by main makefile
97
98 ### [tn]roff documentation
99 troff: gnuplot.ms titlepag.ms
100         tbl gnuplot.ms | eqn | $(TROFF) -ms
101
102 nroff: gnuplot.nroff
103
104 gnuplot.nroff: gnuplot.ms titlepag.ms
105         tbl gnuplot.ms | neqn | nroff -ms | col > gnuplot.nroff
106
107
108
109 ms: gnuplot.ms
110
111 gnuplot.ms: doc2ms gnuplot.doc
112         ./doc2ms gnuplot.doc gnuplot.ms
113
114
115
116 html: gnuplot.html
117
118 gnuplot.html : doc2html gnuplot.doc allterm.h
119         ./doc2html gnuplot.doc gnuplot.html
120
121
122 ### LaTeX documentation
123
124 tex: gnuplot.tex
125
126 gnuplot.tex: doc2tex gnuplot.doc
127         ./doc2tex gnuplot.doc gnuplot.tex
128
129
130 # this is how to make DVI files
131 dvi: gnuplot.dvi gpcard.dvi
132
133 gnuplot.dvi: gnuplot.tex titlepag.tex toc_entr.sty
134         latex gnuplot
135         latex gnuplot
136
137 gpcard.dvi: gpcard.tex
138         tex gpcard
139
140 # this is how to make PostScript files
141 # if pslatex has been installed, add "times" to titlepage.tex
142 ps: gnuplot.ps gpcard.ps
143
144 gnuplot.ps: gnuplot.dvi
145         $(DVIPS) gnuplot
146
147 gpcard.ps: gpcard.dvi
148         $(DVIPS) gpcard
149
150
151 # this is how to make gnuplot.hlp
152
153 hlp: gnuplot.hlp
154
155 gnuplot.hlp: doc2hlp gnuplot.doc
156         ./doc2hlp gnuplot.doc gnuplot.hlp
157
158
159 # this is how to make gnuplot.gih
160 gih: gnuplot.gih
161
162 gnuplot.gih: doc2gih gnuplot.doc
163         ./doc2gih gnuplot.doc gnuplot.gih
164
165
166 # this is how to make Info documentation
167 info: gnuplot.info
168
169 gnuplot.info: gnuplot.doc
170         perl doc2texi.pl gnuplot.doc > gpltinfo.tex
171         makeinfo +fill-column 80 gpltinfo.tex
172         rm -f gpltinfo.tex
173
174 tutorial: latextut/tutorial.tex
175         ( cd latextut; $(MAKE) )
176
177 # this is how to check the gnuplot.doc file
178 check: checkdoc gnuplot.doc
179         ./checkdoc < gnuplot.doc
180
181
182 # For Unix and MSDOS only
183 install-unix: gnuplot.gih
184         $(INSTALL) gnuplot.gih $(HELPDEST)
185
186 # for VMS only
187 install-vms: gnuplot.hlp
188         $(INSTALL) gnuplot.hlp $(HELPDEST)
189
190 # remove all derived files
191 clean:
192         rm -f doc2ms gnuplot.nroff gnuplot.ms \
193               allterm.h \
194               doc2html gnuplot.html \
195               doc2tex gnuplot.tex gnuplot.dvi \
196               gnuplot.aux gnuplot.log gnuplot.toc \
197               gnuplot.ps gpcard.dvi gpcard.log gpcard.ps \
198               doc2hlp gnuplot.hlp \
199               doc2gih gnuplot.gih \
200               checkdoc *~ *.o core a.out \
201               gnuplot.info* gpltinfo.tex
202         ( cd latextut; $(MAKE) clean )