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