add dvi target
[deliverable/binutils-gdb.git] / gdb / doc / Makefile.in
1 ##Copyright (C) 1991, 1992 Free Software Foundation, Inc.
2
3 # Makefile for GDB documentation.
4 # This file is part of GDB.
5
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
20 srcdir = .
21
22 prefix = /usr/local
23
24 infodir = $(prefix)/info
25
26 SHELL = /bin/sh
27
28 INSTALL = install -c
29 INSTALL_PROGRAM = $(INSTALL)
30 INSTALL_DATA = $(INSTALL)
31
32 # main GDB source directory
33 gdbdir = $(srcdir)/..
34
35 # where to find texinfo; GDB dist should include a recent one
36 TEXIDIR=${gdbdir}/../texinfo
37
38 # where to find makeinfo, preferably one designed for texinfo-2
39 MAKEINFO=makeinfo
40
41 # where to find texi2roff, ditto
42 TEXI2ROFF=texi2roff
43
44 # Where is the source dir for the READLINE library doc?
45 # Traditionally readline is in .. or .
46 READLINE_DIR = ${gdbdir}/../readline/doc
47
48 SET_TEXINPUTS = TEXINPUTS=${TEXIDIR}:.:$(srcdir):$(READLINE_DIR):$$TEXINPUTS
49
50 # Don Knuth's TeX formatter
51 TEX = tex
52
53 # auxiliary program for sorting Texinfo indices
54 TEXINDEX = texindex
55
56 # Main GDB manual's source files
57 SFILES_INCLUDED = $(srcdir)/gdb-config.texi $(srcdir)/gdbinv-s.texi
58
59 SFILES_LOCAL = $(srcdir)/gdb.texinfo GDBvn.texi $(SFILES_INCLUDED)
60
61 SFILES_DOC = $(SFILES_LOCAL) \
62 $(READLINE_DIR)/rluser.texinfo $(READLINE_DIR)/inc-hist.texi
63
64 #### Host, target, and site specific Makefile fragments come in here.
65 ###
66
67 all install:
68
69 info: gdb.info gdbint.info stabs.info
70 dvi: gdb.dvi refcard.dvi gdbint.dvi
71 all-doc: gdb.info gdb.dvi refcard.dvi gdb-internals gdbint.dvi
72
73 install-info: info
74 -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
75 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
76 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
77 for i in *.info* ; do \
78 $(INSTALL_DATA) $$i $(infodir)/$$i ; \
79 done
80
81 STAGESTUFF = *.info* gdb-all.texi GDBvn.texi
82
83 # Copy the object files from a particular stage into a subdirectory.
84 stage1: force
85 -mkdir stage1
86 -mv $(STAGESTUFF) stage1
87
88 stage2: force
89 -mkdir stage2
90 -mv $(STAGESTUFF) stage2
91
92 stage3: force
93 -mkdir stage3
94 -mv $(STAGESTUFF) stage3
95
96 against=stage2
97
98 comparison: force
99 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
100
101 de-stage1: force
102 -(cd stage1 ; mv -f * ..)
103 -rmdir stage1
104
105 de-stage2: force
106 -(cd stage2 ; mv -f * ..)
107 -rmdir stage2
108
109 de-stage3: force
110 -(cd stage3 ; mv -f * ..)
111 -rmdir stage3
112
113 clean-info:
114 rm -f gdb.info* gdbint.info* stabs.info*
115
116 clean-dvi:
117 rm -f gdb.dvi refcard.dvi gdbint.dvi stabs.dvi psref.dvi
118
119 mostlyclean: clean-info clean-dvi
120 rm -f gdb.?? gdb.??? gdb.mm gdb.ms gdb.me
121 rm -f links2roff
122 rm -f refcard.ps lrefcard.ps refcard.log psref.* *~
123 rm -f gdbint.?? gdbint.??? stabs.?? stabs.???
124
125 clean: mostlyclean
126 rm -f GDBvn.texi rluser.texinfo inc-hist.texi
127
128 distclean: clean
129 rm -f Makefile config.status
130
131 realclean: distclean
132
133
134 # GDB QUICK REFERENCE (TeX dvi file, CM fonts)
135 refcard.dvi : $(srcdir)/refcard.tex
136 $(SET_TEXINPUTS) $(TEX) refcard.tex; rm -f refcard.log
137 rm -f rcfonts.tex
138
139 # GDB QUICK REFERENCE (PostScript output, common PS fonts)
140 refcard.ps : $(srcdir)/refcard.tex $(srcdir)/psrc.sed
141 sed -f $(srcdir)/psrc.sed $(srcdir)/refcard.tex >psref.tex
142 $(SET_TEXINPUTS) $(TEX) psref.tex
143 dvips -t landscape psref -o; mv psref.ps refcard.ps
144 rm -f psref.dvi psref.log psref.tex
145
146 # GDB QUICK REFERENCE (PostScript output, common PS fonts w/long names)
147 lrefcard.ps : $(srcdir)/refcard.tex $(srcdir)/lpsrc.sed
148 sed -f $(srcdir)/lpsrc.sed $(srcdir)/refcard.tex >psref.tex
149 $(SET_TEXINPUTS) $(TEX) psref.tex
150 dvips -t landscape psref -o; mv psref.ps lrefcard.ps
151 rm -f psref.dvi psref.log psref.tex
152
153 # File to record current GDB version number (copied from main dir Makefile.in)
154 GDBvn.texi : ${gdbdir}/Makefile.in
155 echo "@set GDBVN `sed <$(srcdir)/../Makefile.in -n 's/VERSION = //p'`" > ./GDBvn.texi
156
157 # GDB MANUAL: texinfo source, using @set/@clear/@value/@ifset/@ifclear
158 # If your texinfo or makeinfo don't support these, get a new texinfo release
159 #
160 # The nonsense with GDBvn.texi gets this to run with both Sun and GNU make.
161 # Note that we can *generate* GDBvn.texi, but since we distribute one in the
162 # source directory for the benefit of people who *don't* use this makefile,
163 # VPATH will often tell make not to bother building it, because the one
164 # in the srcdir is up to date. (if not, then make should build one here).
165
166 # GDB MANUAL: TeX dvi file
167 gdb.dvi: ${SFILES_DOC}
168 if [ ! -f ./GDBvn.texi ]; then \
169 ln -s $(srcdir)/GDBvn.texi . || \
170 ln $(srcdir)/GDBvn.texi . || \
171 cp $(srcdir)/GDBvn.texi . ; else true; fi
172 $(SET_TEXINPUTS) $(TEX) gdb.texinfo
173 $(SET_TEXINPUTS) $(TEX) gdb.texinfo
174 $(TEXINDEX) gdb.??
175 $(SET_TEXINPUTS) $(TEX) gdb.texinfo
176 rm -f gdb.?? gdb.log gdb.aux gdb.toc gdb.??s
177
178 # GDB MANUAL: info file
179 # We're using texinfo2, and older makeinfo's may not be able to
180 # cope with all the markup.
181 gdb.info: ${SFILES_DOC}
182 $(MAKEINFO) -I ${READLINE_DIR} -I $(srcdir) -o ./gdb.info gdb.texinfo
183
184 # GDB MANUAL: roff translations
185 # Try to use a recent texi2roff. v2 was put on prep in jan91.
186 # If you want an index, see texi2roff doc for postprocessing
187 # and add -i to texi2roff invocations below.
188 # Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
189 # corresponding -e lines when later texi2roff's are current)
190 # + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
191 # + @c's deleted explicitly because texi2roff sees texinfo commands in them
192 # + @ (that's at-BLANK) not recognized by texi2roff, turned into blank
193 # + @alphaenumerate is ridiculously new, turned into @enumerate
194
195 # texi2roff doesn't have a notion of include dirs, so we have to fake
196 # it out for gdb manual's include files---but only if not configured
197 # in main sourcedir.
198 links2roff: $(SFILES_INCLUDED)
199 if [ ! -f gdb-config.texi ]; then \
200 ln -s $(SFILES_INCLUDED) . || \
201 ln $(SFILES_INCLUDED) . || \
202 cp $(SFILES_INCLUDED) . ; \
203 fi
204 touch links2roff
205
206 # "Readline" appendices. Get them also due to lack of includes,
207 # regardless of whether or not configuring in main sourcedir.
208 # @ftable removed due to bug in texi2roff-2; if your texi2roff
209 # is newer, try just ln or cp
210 rluser.texinfo: ${READLINE_DIR}/rluser.texinfo
211 sed -e 's/^@ftable/@table/g' \
212 -e 's/^@end ftable/@end table/g' \
213 ${READLINE_DIR}/rluser.texinfo > ./rluser.texinfo
214
215 inc-hist.texi: ${READLINE_DIR}/inc-hist.texi
216 ln -s ${READLINE_DIR}/inc-hist.texi . || \
217 ln ${READLINE_DIR}/inc-hist.texi . || \
218 cp ${READLINE_DIR}/inc-hist.texi .
219
220 # gdb manual suitable for [gtn]roff -me
221 gdb.me: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texi
222 sed -e '/\\input texinfo/d' \
223 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
224 -e '/^@ifinfo/,/^@end ifinfo/d' \
225 -e '/^@c /d' \
226 -e 's/{.*,,/{/' \
227 -e 's/@ / /g' \
228 -e 's/^@alphaenumerate/@enumerate/g' \
229 -e 's/^@end alphaenumerate/@end enumerate/g' \
230 $(srcdir)/gdb.texinfo | \
231 $(TEXI2ROFF) -me | \
232 sed -e 's/---/\\(em/g' \
233 >gdb.me
234
235 # gdb manual suitable for [gtn]roff -ms
236 gdb.ms: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texi
237 sed -e '/\\input texinfo/d' \
238 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
239 -e '/^@ifinfo/,/^@end ifinfo/d' \
240 -e '/^@c /d' \
241 -e 's/{.*,,/{/' \
242 -e 's/@ / /g' \
243 -e 's/^@alphaenumerate/@enumerate/g' \
244 -e 's/^@end alphaenumerate/@end enumerate/g' \
245 $(srcdir)/gdb.texinfo | \
246 $(TEXI2ROFF) -ms | \
247 sed -e 's/---/\\(em/g' \
248 >gdb.ms
249
250 # gdb manual suitable for [tn]roff -mm
251 # '@noindent's removed due to texi2roff-2 mm bug; if yours is newer,
252 # try leaving them in
253 gdb.mm: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texi
254 sed -e '/\\input texinfo/d' \
255 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
256 -e '/^@ifinfo/,/^@end ifinfo/d' \
257 -e '/^@c /d' \
258 -e 's/{.*,,/{/' \
259 -e '/@noindent/d' \
260 -e 's/@ / /g' \
261 -e 's/^@alphaenumerate/@enumerate/g' \
262 -e 's/^@end alphaenumerate/@end enumerate/g' \
263 $(srcdir)/gdb.texinfo | \
264 $(TEXI2ROFF) -mm | \
265 sed -e 's/---/\\(em/g' \
266 >gdb.mm
267
268 # GDB INTERNALS MANUAL: TeX dvi file
269 gdbint.dvi : gdbint.texinfo
270 $(SET_TEXINPUTS) $(TEX) gdbint.texinfo
271 $(TEXINDEX) gdbint.??
272 $(SET_TEXINPUTS) $(TEX) gdbint.texinfo
273 rm -f gdbint.?? gdbint.aux gdbint.cps gdbint.fns gdbint.kys \
274 gdbint.log gdbint.pgs gdbint.toc gdbint.tps gdbint.vrs
275
276 # GDB INTERNALS MANUAL: info file
277 gdb-internals: gdbint.info
278
279 gdbint.info: gdbint.texinfo
280 $(MAKEINFO) -o gdbint.info $(srcdir)/gdbint.texinfo
281
282 stabs.info: stabs.texinfo
283 $(MAKEINFO) -o stabs.info $(srcdir)/stabs.texinfo
284
285 # STABS DOCUMENTATION: TeX dvi file
286 stabs.dvi : stabs.texinfo
287 $(SET_TEXINPUTS) $(TEX) stabs.texinfo
288 $(TEXINDEX) stabs.??
289 $(SET_TEXINPUTS) $(TEX) stabs.texinfo
290 rm -f stabs.?? stabs.aux stabs.cps stabs.fns stabs.kys \
291 stabs.log stabs.pgs stabs.toc stabs.tps stabs.vrs
292
293 stabs.ps: stabs.dvi
294 dvips -o stabs.ps stabs
295
296 force:
297
298 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
299 $(SHELL) ./config.status
This page took 0.036676 seconds and 5 git commands to generate.