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