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