Accept 16-bit addresses.
[deliverable/binutils-gdb.git] / gdb / doc / Makefile.in
CommitLineData
c906108c
SS
1##Copyright (C) 1991, 1992, 1999 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20srcdir = @srcdir@
21VPATH = @srcdir@
22
23prefix = @prefix@
24
25infodir = @infodir@
085dd6e6 26htmldir = $(prefix)/html
c906108c
SS
27
28SHELL = @SHELL@
29
30INSTALL = @INSTALL@
31INSTALL_PROGRAM = @INSTALL_PROGRAM@
32INSTALL_DATA = @INSTALL_DATA@
33
34# main GDB source directory
35gdbdir = $(srcdir)/..
36
37# where to find texinfo; GDB dist should include a recent one
38TEXIDIR=${gdbdir}/../texinfo
39
40# where to find makeinfo, preferably one designed for texinfo-2
41MAKEINFO=makeinfo
42
085dd6e6
JM
43MAKEHTML = texi2html
44MAKEHTMLFLAGS = -glossary -menu -split_chapter
45
c906108c
SS
46# where to find texi2roff, ditto
47TEXI2ROFF=texi2roff
48
49# Where is the source dir for the READLINE library doc?
50# Traditionally readline is in .. or .
51READLINE_DIR = ${gdbdir}/../readline/doc
52
53SET_TEXINPUTS = TEXINPUTS=${TEXIDIR}:.:$(srcdir):$(READLINE_DIR):$$TEXINPUTS
54
55# There may be alternate predefined collections of switches to configure
56# the GDB manual. Normally this is not done in synch with the software
57# config system, since this choice tends to be independent; most people
58# want a doc config of `all' for a generic manual, regardless of sw config.
59DOC_CONFIG = all
60
61# This list of sed edits will edit the GDB reference card
62# for what fonts and what papersize to use.
63# By default (NO edits applied), the refcard uses:
64# - Computer Modern (CM) fonts
65# - US letter paper (8.5x11in)
66# List some of the following files for alternative fonts and paper:
67# a4rc.sed use A4 paper (297 x 210 mm)
68# psrc.sed use PostScript fonts (Karl Berry short TeX names)
69# lpsrc.sed use PostScript fonts (full PostScript names in TeX)
70# e.g. for A4, Postscript: REFEDITS = a4rc.sed psrc.sed
71# for A4, CM fonts: REFEDITS = a4rc.sed
72# for US, PS fonts: REFEDITS = psrc.sed
73# for default:
74REFEDITS =
75
76# Don Knuth's TeX formatter
77TEX = tex
78
79# auxiliary program for sorting Texinfo indices
80TEXINDEX = texindex
81
82# Program to generate Postscript files from DVI files.
83DVIPS = dvips
84
85# Main GDB manual's source files
104c1213 86SFILES_INCLUDED = gdb-cfg.texi
c906108c
SS
87
88SFILES_LOCAL = $(srcdir)/gdb.texinfo GDBvn.texi $(SFILES_INCLUDED)
89
90SFILES_DOC = $(SFILES_LOCAL) \
7be570e7 91 $(READLINE_DIR)/rluser.texinfo $(READLINE_DIR)/inc-hist.texinfo
c906108c
SS
92
93#### Host, target, and site specific Makefile fragments come in here.
94###
95
96all install:
97
98info: gdb.info gdbint.info stabs.info
99dvi: gdb.dvi gdbint.dvi stabs.dvi refcard.dvi
100ps: gdb.ps gdbint.ps stabs.ps refcard.ps
085dd6e6 101html: gdb_toc.html gdbint_toc.html stabs_toc.html
c906108c 102all-doc: info dvi ps
3555de01 103diststuff: info
c906108c
SS
104
105install-info: info
106 for i in *.info* ; do \
107 $(INSTALL_DATA) $$i $(infodir)/$$i ; \
108 done
109
085dd6e6
JM
110install-html: html
111 for i in *.html ; do \
112 $(INSTALL_DATA) $$i $(htmldir)/$$i ; \
113 done
114
c906108c
SS
115STAGESTUFF = *.info* gdb-all.texi GDBvn.texi *.ps *.dvi
116
117# Copy the object files from a particular stage into a subdirectory.
118stage1: force
119 -mkdir stage1
120 -mv $(STAGESTUFF) stage1
121
122stage2: force
123 -mkdir stage2
124 -mv $(STAGESTUFF) stage2
125
126stage3: force
127 -mkdir stage3
128 -mv $(STAGESTUFF) stage3
129
130against=stage2
131
132comparison: force
133 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
134
135de-stage1: force
136 -(cd stage1 ; mv -f * ..)
137 -rmdir stage1
138
139de-stage2: force
140 -(cd stage2 ; mv -f * ..)
141 -rmdir stage2
142
143de-stage3: force
144 -(cd stage3 ; mv -f * ..)
145 -rmdir stage3
146
147# The "least clean" level of cleaning. Get rid of files which are
148# automatically generated files that are just intermediate files,
149#
150mostlyclean:
151 rm -f gdb.mm gdb.ms gdb.me links2roff
152 rm -f *.aux *.cp* *.fn* *.ky* *.log *.pg* *.toc *.tp* *.vr*
153 rm -f sedref.dvi sedref.tex tmp.sed
154
155clean: mostlyclean
7be570e7 156 rm -f rluser.texinfo inc-hist.texinfo gdb-cfg.texi
c906108c
SS
157
158distclean: clean
159 rm -f Makefile config.status
160
161# GDBvn.texi, the dvi files, the info files, and the postscript files,
162# are all part of the distribution, so it should not be removed by
163# "clean" or "distclean". Use maintainer-clean to remove them.
164
165maintainer-clean realclean: distclean
085dd6e6 166 rm -f GDBvn.texi *.info* *.dvi *.ps *.html
c906108c
SS
167
168# GDB QUICK REFERENCE (dvi output)
169refcard.dvi : refcard.tex $(REFEDITS)
170 if [ -z "$(REFEDITS)" ]; then \
171 cp $(srcdir)/refcard.tex sedref.tex ; \
172 else \
173 echo > tmp.sed ; \
174 for f in "$(REFEDITS)" ; do \
175 cat $(srcdir)/$$f >>tmp.sed ; done ; \
176 sed -f tmp.sed $(srcdir)/refcard.tex >sedref.tex ; \
177 fi
178 $(SET_TEXINPUTS) $(TEX) sedref.tex
179 mv sedref.dvi refcard.dvi
180 rm -f sedref.log sedref.tex tmp.sed
181
182refcard.ps : refcard.dvi
183 $(DVIPS) -t landscape -o $@ $?
184
185# File to record current GDB version number (copied from main dir Makefile.in)
186GDBvn.texi : ${gdbdir}/Makefile.in
187 echo "@set GDBVN `sed <$(srcdir)/../Makefile.in -n 's/^VERSION *= *//p'`" > ./GDBvn.new
188 mv GDBvn.new GDBvn.texi
189
190# Updated atomically
191.PRECIOUS: GDBvn.texi
192
193# Choose configuration for GDB manual (normally `all'; normally not tied into
194# `configure' script because most users prefer generic version of manual,
195# not one for their binary config---which may not be specifically
196# defined anyways).
197gdb-cfg.texi: ${srcdir}/${DOC_CONFIG}-cfg.texi
198 ln -s ${srcdir}/${DOC_CONFIG}-cfg.texi gdb-cfg.texi || \
199 ln ${srcdir}/${DOC_CONFIG}-cfg.texi gdb-cfg.texi || \
200 cp ${srcdir}/${DOC_CONFIG}-cfg.texi gdb-cfg.texi
201
202# GDB MANUAL: texinfo source, using @set/@clear/@value/@ifset/@ifclear
203# If your texinfo or makeinfo don't support these, get a new texinfo release
204#
205# The nonsense with GDBvn.texi gets this to run with both Sun and GNU make.
206# Note that we can *generate* GDBvn.texi, but since we distribute one in the
207# source directory for the benefit of people who *don't* use this makefile,
208# VPATH will often tell make not to bother building it, because the one
209# in the srcdir is up to date. (if not, then make should build one here).
210
211# GDB MANUAL: TeX dvi file
212gdb.dvi: ${SFILES_DOC}
213 if [ ! -f ./GDBvn.texi ]; then \
214 ln -s $(srcdir)/GDBvn.texi . || \
215 ln $(srcdir)/GDBvn.texi . || \
216 cp $(srcdir)/GDBvn.texi . ; else true; fi
217 $(SET_TEXINPUTS) $(TEX) gdb.texinfo
218 $(SET_TEXINPUTS) $(TEX) gdb.texinfo
219 $(TEXINDEX) gdb.??
220 $(SET_TEXINPUTS) $(TEX) gdb.texinfo
221 rm -f gdb.aux gdb.cp* gdb.fn* gdb.ky* gdb.log gdb.pg* gdb.toc \
222 gdb.tp* gdb.vr*
223
224gdb.ps: gdb.dvi
225 $(DVIPS) -o $@ $?
226
227# GDB MANUAL: info file
228# We're using texinfo2, and older makeinfo's may not be able to
229# cope with all the markup.
230gdb.info: ${SFILES_DOC}
231 $(MAKEINFO) -I ${READLINE_DIR} -I $(srcdir) -o ./gdb.info gdb.texinfo
232
233# GDB MANUAL: roff translations
234# Try to use a recent texi2roff. v2 was put on prep in jan91.
235# If you want an index, see texi2roff doc for postprocessing
236# and add -i to texi2roff invocations below.
237# Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
238# corresponding -e lines when later texi2roff's are current)
239# + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
240# + @c's deleted explicitly because texi2roff sees texinfo commands in them
241# + @ (that's at-BLANK) not recognized by texi2roff, turned into blank
242# + @alphaenumerate is ridiculously new, turned into @enumerate
243
244# texi2roff doesn't have a notion of include dirs, so we have to fake
245# it out for gdb manual's include files---but only if not configured
246# in main sourcedir.
247links2roff: $(SFILES_INCLUDED)
248 if [ ! -f gdb.texinfo ]; then \
249 ln -s $(SFILES_INCLUDED) . || \
250 ln $(SFILES_INCLUDED) . || \
251 cp $(SFILES_INCLUDED) . ; \
252 fi
253 touch links2roff
254
255# "Readline" appendices. Get them also due to lack of includes,
256# regardless of whether or not configuring in main sourcedir.
257# @ftable removed due to bug in texi2roff-2; if your texi2roff
258# is newer, try just ln or cp
259rluser.texinfo: ${READLINE_DIR}/rluser.texinfo
260 sed -e 's/^@ftable/@table/g' \
261 -e 's/^@end ftable/@end table/g' \
262 ${READLINE_DIR}/rluser.texinfo > ./rluser.texinfo
263
7be570e7
JM
264inc-hist.texinfo: ${READLINE_DIR}/inc-hist.texinfo
265 ln -s ${READLINE_DIR}/inc-hist.texinfo . || \
266 ln ${READLINE_DIR}/inc-hist.texinfo . || \
267 cp ${READLINE_DIR}/inc-hist.texinfo .
c906108c
SS
268
269# gdb manual suitable for [gtn]roff -me
7be570e7 270gdb.me: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texinfo
c906108c
SS
271 sed -e '/\\input texinfo/d' \
272 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
273 -e '/^@ifinfo/,/^@end ifinfo/d' \
274 -e '/^@c /d' \
275 -e 's/{.*,,/{/' \
276 -e 's/@ / /g' \
277 -e 's/^@alphaenumerate/@enumerate/g' \
278 -e 's/^@end alphaenumerate/@end enumerate/g' \
279 $(srcdir)/gdb.texinfo | \
280 $(TEXI2ROFF) -me | \
281 sed -e 's/---/\\(em/g' \
282 >gdb.me
283
284# gdb manual suitable for [gtn]roff -ms
7be570e7 285gdb.ms: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texinfo
c906108c
SS
286 sed -e '/\\input texinfo/d' \
287 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
288 -e '/^@ifinfo/,/^@end ifinfo/d' \
289 -e '/^@c /d' \
290 -e 's/{.*,,/{/' \
291 -e 's/@ / /g' \
292 -e 's/^@alphaenumerate/@enumerate/g' \
293 -e 's/^@end alphaenumerate/@end enumerate/g' \
294 $(srcdir)/gdb.texinfo | \
295 $(TEXI2ROFF) -ms | \
296 sed -e 's/---/\\(em/g' \
297 >gdb.ms
298
299# gdb manual suitable for [tn]roff -mm
300# '@noindent's removed due to texi2roff-2 mm bug; if yours is newer,
301# try leaving them in
7be570e7 302gdb.mm: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texinfo
c906108c
SS
303 sed -e '/\\input texinfo/d' \
304 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
305 -e '/^@ifinfo/,/^@end ifinfo/d' \
306 -e '/^@c /d' \
307 -e 's/{.*,,/{/' \
308 -e '/@noindent/d' \
309 -e 's/@ / /g' \
310 -e 's/^@alphaenumerate/@enumerate/g' \
311 -e 's/^@end alphaenumerate/@end enumerate/g' \
312 $(srcdir)/gdb.texinfo | \
313 $(TEXI2ROFF) -mm | \
314 sed -e 's/---/\\(em/g' \
315 >gdb.mm
316
085dd6e6
JM
317# GDB MANUAL: HTML file
318
319gdb_toc.html: ${SFILES_DOC}
320 $(MAKEHTML) $(MAKEHTMLFLAGS) -I ${READLINE_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo
321
3fc11d3e
JM
322# GDB GUI MANUAL: TeX dvi file
323gdbgui.dvi : gdbgui.texinfo ${SFILES_DOC}
324 $(SET_TEXINPUTS) $(TEX) gdbgui.texinfo
325 $(TEXINDEX) gdbgui.??
326 $(SET_TEXINPUTS) $(TEX) gdbgui.texinfo
327 rm -f gdbgui.aux gdbgui.cp* gdbgui.fn* gdbgui.ky* \
328 gdbgui.log gdbgui.pg* gdbgui.toc gdbgui.tp* gdbgui.vr*
329
330# GDB GUI MANUAL: info file
331gdb-gui: gdbgui.info
332
333gdbgui.info: gdbgui.texinfo ${SFILES_DOC}
334 $(MAKEINFO) -o gdbgui.info $(srcdir)/gdbgui.texinfo
c906108c
SS
335
336# GDB INTERNALS MANUAL: TeX dvi file
337gdbint.dvi : gdbint.texinfo
338 $(SET_TEXINPUTS) $(TEX) gdbint.texinfo
339 $(TEXINDEX) gdbint.??
340 $(SET_TEXINPUTS) $(TEX) gdbint.texinfo
341 rm -f gdbint.aux gdbint.cp* gdbint.fn* gdbint.ky* \
342 gdbint.log gdbint.pg* gdbint.toc gdbint.tp* gdbint.vr*
343
344gdbint.ps : gdbint.dvi
345 $(DVIPS) -o $@ $?
346
347# GDB INTERNALS MANUAL: info file
348
349gdbint.info: gdbint.texinfo
350 $(MAKEINFO) -o gdbint.info $(srcdir)/gdbint.texinfo
351
085dd6e6
JM
352# GDB INTERNALS MANUAL: HTML file
353
354gdbint_toc.html: gdbint.texinfo
355 $(MAKEHTML) $(MAKEHTMLFLAGS) $(srcdir)/gdbint.texinfo
356
c906108c
SS
357stabs.info: stabs.texinfo
358 $(MAKEINFO) -o stabs.info $(srcdir)/stabs.texinfo
359
085dd6e6
JM
360# STABS DOCUMENTATION: HTML file
361
362stabs_toc.html: stabs.texinfo
363 $(MAKEHTML) $(MAKEHTMLFLAGS) $(srcdir)/stabs.texinfo
364
c906108c
SS
365# STABS DOCUMENTATION: TeX dvi file
366stabs.dvi : stabs.texinfo
367 $(SET_TEXINPUTS) $(TEX) stabs.texinfo
368 $(TEXINDEX) stabs.??
369 $(SET_TEXINPUTS) $(TEX) stabs.texinfo
370 rm -f stabs.aux stabs.cp* stabs.fn* stabs.ky* \
371 stabs.log stabs.pg* stabs.toc stabs.tp* stabs.vr*
372
373stabs.ps: stabs.dvi
374 $(DVIPS) -o $@ $?
375
376force:
377
378Makefile: Makefile.in $(host_makefile_frag) $(target_makefile_frag) config.status
379 $(SHELL) ./config.status
This page took 0.051487 seconds and 4 git commands to generate.