]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/doc/Makefile.in
Update Copyright year range in all files maintained by GDB.
[thirdparty/binutils-gdb.git] / gdb / doc / Makefile.in
CommitLineData
ecd75fc8 1##Copyright (C) 1991-2014 Free Software Foundation, Inc.
c906108c
SS
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
a1715244 8# the Free Software Foundation; either version 3 of the License, or
c906108c 9# (at your option) any later version.
a1715244 10#
c906108c
SS
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.
a1715244 15#
c906108c 16# You should have received a copy of the GNU General Public License
a1715244 17# along with this program. If not, see <http://www.gnu.org/licenses/>.
c906108c
SS
18
19srcdir = @srcdir@
20VPATH = @srcdir@
21
22prefix = @prefix@
23
24infodir = @infodir@
26e251b6
JM
25datarootdir = @datarootdir@
26docdir = @docdir@
89a34d1b
JM
27pdfdir = @pdfdir@
28htmldir = @htmldir@
43662968
JK
29mandir = @mandir@
30man1dir = $(mandir)/man1
31man5dir = $(mandir)/man5
c906108c
SS
32
33SHELL = @SHELL@
34
39ec5655
EZ
35LN_S = @LN_S@
36
c906108c
SS
37INSTALL = @INSTALL@
38INSTALL_PROGRAM = @INSTALL_PROGRAM@
39INSTALL_DATA = @INSTALL_DATA@
40
43662968
JK
41SYSTEM_GDBINIT = @SYSTEM_GDBINIT@
42
9453113a
DJ
43mkinstalldirs = $(SHELL) $(srcdir)/../../mkinstalldirs
44
c906108c
SS
45# main GDB source directory
46gdbdir = $(srcdir)/..
47
48# where to find texinfo; GDB dist should include a recent one
49TEXIDIR=${gdbdir}/../texinfo
50
51# where to find makeinfo, preferably one designed for texinfo-2
5048e516
JK
52MAKEINFO = @MAKEINFO@
53MAKEINFOFLAGS = @MAKEINFOFLAGS@
54MAKEINFO_EXTRA_FLAGS = @MAKEINFO_EXTRA_FLAGS@
55MAKEINFO_CMD = $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS)
c906108c 56
5048e516 57MAKEHTML = $(MAKEINFO_CMD) --html
2b831889 58MAKEHTMLFLAGS =
085dd6e6 59
c906108c
SS
60# where to find texi2roff, ditto
61TEXI2ROFF=texi2roff
62
be298bcc
AC
63# where to find texi2dvi, ditto
64TEXI2DVI=texi2dvi
65
c16158bc
JM
66# Package version and bug-reporting URL.
67PKGVERSION = @PKGVERSION@
68BUGURL_TEXI = @REPORT_BUGS_TEXI@
69
c906108c
SS
70# Where is the source dir for the READLINE library doc?
71# Traditionally readline is in .. or .
72READLINE_DIR = ${gdbdir}/../readline/doc
39037522 73READLINE_TEXI_INCFLAG = @READLINE_TEXI_INCFLAG@
c906108c 74
7162c0ca
EZ
75# The GDB/MI docs come from a sibling directory ../mi
76GDBMI_DIR = ${gdbdir}/mi
77
78SET_TEXINPUTS = \
79 TEXINPUTS=${TEXIDIR}:.:$(srcdir):$(READLINE_DIR):$(GDBMI_DIR):$$TEXINPUTS
c906108c 80
63ac3005 81# Files which should be generated via 'info' and installed by 'install-info'
0a7cfe2c 82INFO_DEPS = gdb.info stabs.info annotate.info
63ac3005 83
9453113a 84# Files which should be generated via 'pdf' and installed by 'install-pdf'
0a7cfe2c 85PDFFILES = gdb.pdf stabs.pdf refcard.pdf annotate.pdf
2b831889 86# Files which should be generated via 'html' and installed by 'install-html'
0a7cfe2c
SS
87HTMLFILES = gdb/index.html stabs/index.html annotate/index.html
88HTMLFILES_INSTALL = gdb stabs annotate
9453113a 89
c906108c
SS
90# There may be alternate predefined collections of switches to configure
91# the GDB manual. Normally this is not done in synch with the software
92# config system, since this choice tends to be independent; most people
93# want a doc config of `all' for a generic manual, regardless of sw config.
94DOC_CONFIG = all
95
96# This list of sed edits will edit the GDB reference card
97# for what fonts and what papersize to use.
98# By default (NO edits applied), the refcard uses:
99# - Computer Modern (CM) fonts
100# - US letter paper (8.5x11in)
101# List some of the following files for alternative fonts and paper:
102# a4rc.sed use A4 paper (297 x 210 mm)
103# psrc.sed use PostScript fonts (Karl Berry short TeX names)
104# lpsrc.sed use PostScript fonts (full PostScript names in TeX)
105# e.g. for A4, Postscript: REFEDITS = a4rc.sed psrc.sed
106# for A4, CM fonts: REFEDITS = a4rc.sed
107# for US, PS fonts: REFEDITS = psrc.sed
108# for default:
109REFEDITS =
110
111# Don Knuth's TeX formatter
112TEX = tex
9453113a 113PDFTEX = pdftex
c906108c 114
c906108c
SS
115# Program to generate Postscript files from DVI files.
116DVIPS = dvips
117
b0787093 118# Main GDB manual
39037522
TT
119# Note that this unconditionally includes the readline texi files,
120# even when --with-system-readline is used. This is harmless because
121# these are only used as dependencies.
b0787093 122GDB_DOC_SOURCE_INCLUDES = \
aab4e0ec 123 $(srcdir)/fdl.texi \
b0787093 124 $(srcdir)/gpl.texi \
f418dd93 125 $(srcdir)/agentexpr.texi \
5bdf8622 126 $(READLINE_DIR)/rluser.texi \
cc88a640 127 $(READLINE_DIR)/hsuser.texi
b0787093
AC
128GDB_DOC_BUILD_INCLUDES = \
129 gdb-cfg.texi \
130 GDBvn.texi
131GDB_DOC_FILES = \
132 $(srcdir)/gdb.texinfo \
133 $(GDB_DOC_SOURCE_INCLUDES) \
134 $(GDB_DOC_BUILD_INCLUDES)
135
b0787093 136# Stabs manual: All files
e5249f67
AC
137STABS_DOC_SOURCE_INCLUDES = \
138 $(srcdir)/fdl.texi
b0787093
AC
139STABS_DOC_BUILD_INCLUDES =
140STABS_DOC_FILES = \
141 $(srcdir)/stabs.texinfo \
142 $(STABS_DOC_SOURCE_INCLUDES) \
143 $(STABS_DOC_BUILD_INCLUDES)
c906108c 144
e6f672d2
AC
145# Annotate migration document
146ANNOTATE_DOC_SOURCE_INCLUDES = \
147 $(srcdir)/fdl.texi
148ANNOTATE_DOC_BUILD_INCLUDES = \
23db03a6
JZ
149 gdb-cfg.texi \
150 GDBvn.texi
e6f672d2
AC
151ANNOTATE_DOC_FILES = \
152 $(srcdir)/annotate.texinfo \
153 $(ANNOTATE_DOC_SOURCE_INCLUDES) \
154 $(ANNOTATE_DOC_BUILD_INCLUDES)
155
43662968
JK
156# Options to extract the man page from gdb.texinfo
157MANCONF = -Dman
158
159TEXI2POD = perl $(srcdir)/../../etc/texi2pod.pl \
160 $(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS)
161
162POD2MAN1 = pod2man --center="GNU Development Tools" \
01208463 163 --release="gdb-`sed q version.subst`" --section=1
43662968 164POD2MAN5 = pod2man --center="GNU Development Tools" \
01208463 165 --release="gdb-`sed q version.subst`" --section=5
43662968
JK
166
167# List of man pages generated from gdb.texi
b292c783 168MAN1S = gdb.1 gdbserver.1 gcore.1
43662968
JK
169MAN5S = gdbinit.5
170MANS = $(MAN1S) $(MAN5S)
171
b292c783
JK
172# Host-dependent makefile fragment comes in here.
173@host_makefile_frag@
174# End of host-dependent makefile fragment
175HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@
176
c906108c
SS
177###
178
35db0260 179all:
c906108c 180
63ac3005 181info: $(INFO_DEPS)
0a7cfe2c
SS
182dvi: gdb.dvi stabs.dvi refcard.dvi annotate.dvi
183ps: gdb.ps stabs.ps refcard.ps annotate.ps
2b831889 184html: $(HTMLFILES)
9453113a 185pdf: $(PDFFILES)
43662968 186man: $(MANS)
449f3b6c 187all-doc: info dvi ps # pdf
43662968 188diststuff: info man
42ea3d7a 189 rm -f gdb-cfg.texi GDBvn.texi
c906108c 190
63ac3005 191install-info: $(INFO_DEPS)
c938e9b0 192 $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(infodir)
63ac3005
EZ
193 @list='$(INFO_DEPS)'; \
194 for file in $$list; do \
195 if test -f $$file; then d=.; else d=$(srcdir); fi; \
196 for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
197 if test -f $$d/$$ifile; then \
c938e9b0
L
198 echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
199 $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
63ac3005
EZ
200 else : ; fi; \
201 done; \
202 done
c166cdc7 203 $(POST_INSTALL)
d3229ae3 204 @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
63ac3005 205 list='$(INFO_DEPS)'; \
d3229ae3 206 for file in $$list; do \
5843504f
EZ
207 echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
208 install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
d3229ae3
EZ
209 done; \
210 else : ; fi
c906108c 211
c166cdc7
EZ
212uninstall-info:
213 $(PRE_UNINSTALL)
214 @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
215 ii=yes; \
216 else ii=; fi; \
217 list='$(INFO_DEPS)'; \
218 for file in $$list; do \
219 test -z "$$ii" \
220 || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
221 done
222 $(NORMAL_UNINSTALL)
223 list='$(INFO_DEPS)'; \
224 for file in $$list; do \
225 (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
226 done
227
2b831889
JM
228html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
229
230install-html: $(HTMLFILES)
231 @$(NORMAL_INSTALL)
232 test -z "$(htmldir)" || $(mkinstalldirs) "$(DESTDIR)$(htmldir)"
233 @list='$(HTMLFILES_INSTALL)'; for p in $$list; do \
234 if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
235 f=$(html__strip_dir) \
236 if test -d "$$d$$p"; then \
237 echo " $(mkinstalldirs) '$(DESTDIR)$(htmldir)/$$f'"; \
238 $(mkinstalldirs) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
239 echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
240 $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
241 else \
242 echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
243 $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
244 fi; \
085dd6e6
JM
245 done
246
9453113a
DJ
247pdf__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
248
249install-pdf: $(PDFFILES)
250 @$(NORMAL_INSTALL)
251 test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)"
252 @list='$(PDFFILES)'; for p in $$list; do \
253 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
254 f=$(pdf__strip_dir) \
255 echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
256 $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
257 done
258
43662968
JK
259install-man: install-man1 install-man5
260
261install-man1: $(MAN1S)
262 test -z "$(man1dir)" || $(mkinstalldirs) "$(DESTDIR)$(man1dir)"
0ed630cb 263 @list='$(MAN1S)'; for p in $$list; do \
b292c783
JK
264 if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" = x \
265 -a "$$p" = gcore.1; then \
266 continue; \
267 fi; \
43662968
JK
268 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
269 f=`echo $$p | sed -e 's|^.*/||'`; \
270 echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(man1dir)/$$f'"; \
271 $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(man1dir)/$$f"; \
272 done
273
274install-man5: $(MAN5S)
275 test -z "$(man5dir)" || $(mkinstalldirs) "$(DESTDIR)$(man5dir)"
0ed630cb 276 @list='$(MAN5S)'; for p in $$list; do \
43662968
JK
277 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
278 f=`echo $$p | sed -e 's|^.*/||'`; \
279 echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(man5dir)/$$f'"; \
280 $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(man5dir)/$$f"; \
281 done
282
283uninstall-man: uninstall-man1 uninstall-man5
284
285uninstall-man1:
286 @test -n "$(man1dir)" || exit 0; \
b292c783
JK
287 files=`{ l2='$(MAN1S)'; for i in $$l2; do \
288 if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" = x \
289 -a "$$i" = gcore.1; then \
290 continue; \
291 fi; \
292 echo "$$i"; \
293 done | \
43662968
JK
294 sed -n '/\.1[a-z]*$$/p'; \
295 } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
296 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
297 test -z "$$files" || { \
298 echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
299 cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
300
301uninstall-man5:
302 @test -n "$(man5dir)" || exit 0; \
0ed630cb 303 files=`{ l2='$(MAN5S)'; for i in $$l2; do echo "$$i"; done | \
43662968
JK
304 sed -n '/\.5[a-z]*$$/p'; \
305 } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
306 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
307 test -z "$$files" || { \
308 echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \
309 cd "$(DESTDIR)$(man5dir)" && rm -f $$files; }
310
311STAGESTUFF = *.info* gdb-all.texi GDBvn.texi *.ps *.dvi *.pdf *.1 *.5
c906108c
SS
312
313# Copy the object files from a particular stage into a subdirectory.
314stage1: force
315 -mkdir stage1
316 -mv $(STAGESTUFF) stage1
317
318stage2: force
319 -mkdir stage2
320 -mv $(STAGESTUFF) stage2
321
322stage3: force
323 -mkdir stage3
324 -mv $(STAGESTUFF) stage3
325
326against=stage2
327
328comparison: force
329 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
330
331de-stage1: force
332 -(cd stage1 ; mv -f * ..)
333 -rmdir stage1
334
335de-stage2: force
336 -(cd stage2 ; mv -f * ..)
337 -rmdir stage2
338
339de-stage3: force
340 -(cd stage3 ; mv -f * ..)
341 -rmdir stage3
342
c906108c
SS
343# GDB QUICK REFERENCE (dvi output)
344refcard.dvi : refcard.tex $(REFEDITS)
dfa249fb
AC
345 echo > tmp.sed
346 for f in x $(REFEDITS) ; do \
347 test x$$f = xx && continue ; \
348 cat $(srcdir)/$$f >>tmp.sed ; \
349 done
350 sed -f tmp.sed $(srcdir)/refcard.tex >sedref.tex
c906108c
SS
351 $(SET_TEXINPUTS) $(TEX) sedref.tex
352 mv sedref.dvi refcard.dvi
353 rm -f sedref.log sedref.tex tmp.sed
354
355refcard.ps : refcard.dvi
356 $(DVIPS) -t landscape -o $@ $?
357
9453113a
DJ
358refcard.pdf : refcard.tex $(REFEDITS)
359 echo > tmp.sed
360 for f in x $(REFEDITS) ; do \
361 test x$$f = xx && continue ; \
362 cat $(srcdir)/$$f >>tmp.sed ; \
363 done
364 sed -f tmp.sed $(srcdir)/refcard.tex >sedref.tex
365 $(SET_TEXINPUTS) $(PDFTEX) sedref.tex
366 mv sedref.pdf refcard.pdf
367 rm -f sedref.log sedref.tex tmp.sed
368
01208463
TT
369# File to record current GDB version number.
370GDBvn.texi : version.subst
371 echo "@set GDBVN `sed q version.subst`" > ./GDBvn.new
c16158bc
JM
372 if [ -n "$(PKGVERSION)" ]; then \
373 echo "@set VERSION_PACKAGE $(PKGVERSION)" >> ./GDBvn.new; \
374 fi
375 echo "@set BUGURL $(BUGURL_TEXI)" >> ./GDBvn.new
376 if [ "$(BUGURL_TEXI)" = "@uref{http://www.gnu.org/software/gdb/bugs/}" ]; then \
377 echo "@set BUGURL_DEFAULT" >> ./GDBvn.new; \
378 fi
39037522
TT
379 if test -z "$(READLINE_TEXI_INCFLAG)"; then \
380 echo "@set SYSTEM_READLINE" >> ./GDBvn.new; \
381 fi
43662968
JK
382 if [ -n "$(SYSTEM_GDBINIT)" ]; then \
383 echo "@set SYSTEM_GDBINIT $(SYSTEM_GDBINIT)" >> ./GDBvn.new; \
384 fi
c906108c
SS
385 mv GDBvn.new GDBvn.texi
386
d6c2da54 387version.subst: $(gdbdir)/version.in $(gdbdir)/../bfd/version.h
01208463 388 date=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$$/\1/p' $(gdbdir)/../bfd/version.h`; \
d6c2da54 389 sed -e "s/DATE/$$date/" < $(gdbdir)/version.in > version.subst
01208463 390
c906108c
SS
391# Updated atomically
392.PRECIOUS: GDBvn.texi
393
394# Choose configuration for GDB manual (normally `all'; normally not tied into
395# `configure' script because most users prefer generic version of manual,
396# not one for their binary config---which may not be specifically
397# defined anyways).
398gdb-cfg.texi: ${srcdir}/${DOC_CONFIG}-cfg.texi
44e2be90 399 (test "$(LN_S)" = "ln -s" && \
39ec5655 400 ln -s ${srcdir}/${DOC_CONFIG}-cfg.texi gdb-cfg.texi) || \
c906108c
SS
401 ln ${srcdir}/${DOC_CONFIG}-cfg.texi gdb-cfg.texi || \
402 cp ${srcdir}/${DOC_CONFIG}-cfg.texi gdb-cfg.texi
403
404# GDB MANUAL: texinfo source, using @set/@clear/@value/@ifset/@ifclear
405# If your texinfo or makeinfo don't support these, get a new texinfo release
406#
407# The nonsense with GDBvn.texi gets this to run with both Sun and GNU make.
408# Note that we can *generate* GDBvn.texi, but since we distribute one in the
409# source directory for the benefit of people who *don't* use this makefile,
410# VPATH will often tell make not to bother building it, because the one
411# in the srcdir is up to date. (if not, then make should build one here).
412
46d8b1c3
AC
413# Clean these up before each run. Avoids a catch 22 with not being
414# able to re-generate these files (to fix a corruption) because these
415# files contain a corruption.
b0787093
AC
416GDB_TEX_TMPS = gdb.aux gdb.cp* gdb.fn* gdb.ky* gdb.log gdb.pg* gdb.toc \
417 gdb.tp* gdb.vr*
418
c906108c 419# GDB MANUAL: TeX dvi file
b0787093 420gdb.dvi: ${GDB_DOC_FILES}
c906108c 421 if [ ! -f ./GDBvn.texi ]; then \
44e2be90 422 (test "$(LN_S)" = "ln -s" && ln -s $(srcdir)/GDBvn.texi .) || \
c906108c
SS
423 ln $(srcdir)/GDBvn.texi . || \
424 cp $(srcdir)/GDBvn.texi . ; else true; fi
b0787093 425 rm -f $(GDB_TEX_TMPS)
39037522 426 $(TEXI2DVI) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) \
26e251b6 427 $(srcdir)/gdb.texinfo
c906108c
SS
428
429gdb.ps: gdb.dvi
430 $(DVIPS) -o $@ $?
431
b0787093 432gdb.pdf: ${GDB_DOC_FILES}
449f3b6c 433 if [ ! -f ./GDBvn.texi ]; then \
44e2be90 434 (test "$(LN_S)" = "ln -s" && ln -s $(srcdir)/GDBvn.texi .) || \
449f3b6c
AC
435 ln $(srcdir)/GDBvn.texi . || \
436 cp $(srcdir)/GDBvn.texi . ; else true; fi
b0787093 437 rm -f $(GDB_TEX_TMPS)
39037522 438 $(TEXI2DVI) --pdf $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) \
26e251b6 439 $(srcdir)/gdb.texinfo
449f3b6c 440
c906108c 441# GDB MANUAL: info file
b0787093 442gdb.info: ${GDB_DOC_FILES}
5048e516 443 $(MAKEINFO_CMD) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) \
a7b40f07 444 -o gdb.info $(srcdir)/gdb.texinfo
c906108c
SS
445
446# GDB MANUAL: roff translations
447# Try to use a recent texi2roff. v2 was put on prep in jan91.
448# If you want an index, see texi2roff doc for postprocessing
449# and add -i to texi2roff invocations below.
450# Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
451# corresponding -e lines when later texi2roff's are current)
452# + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
453# + @c's deleted explicitly because texi2roff sees texinfo commands in them
454# + @ (that's at-BLANK) not recognized by texi2roff, turned into blank
455# + @alphaenumerate is ridiculously new, turned into @enumerate
456
457# texi2roff doesn't have a notion of include dirs, so we have to fake
458# it out for gdb manual's include files---but only if not configured
459# in main sourcedir.
b0787093 460links2roff: $(GDB_DOC_SOURCE_INCLUDES)
c906108c 461 if [ ! -f gdb.texinfo ]; then \
44e2be90 462 (test "$(LN_S)" = "ln -s" && ln -s $(GDB_DOC_SOURCE_INCLUDES) .) || \
b0787093
AC
463 ln $(GDB_DOC_SOURCE_INCLUDES) . || \
464 cp $(GDB_DOC_SOURCE_INCLUDES) . ; \
c906108c
SS
465 fi
466 touch links2roff
467
c906108c 468# gdb manual suitable for [gtn]roff -me
b0787093 469gdb.me: $(GDB_DOC_FILES) links2roff
c906108c
SS
470 sed -e '/\\input texinfo/d' \
471 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
472 -e '/^@ifinfo/,/^@end ifinfo/d' \
473 -e '/^@c /d' \
474 -e 's/{.*,,/{/' \
475 -e 's/@ / /g' \
476 -e 's/^@alphaenumerate/@enumerate/g' \
477 -e 's/^@end alphaenumerate/@end enumerate/g' \
478 $(srcdir)/gdb.texinfo | \
479 $(TEXI2ROFF) -me | \
480 sed -e 's/---/\\(em/g' \
481 >gdb.me
482
483# gdb manual suitable for [gtn]roff -ms
b0787093 484gdb.ms: $(GDB_DOC_FILES) links2roff
c906108c
SS
485 sed -e '/\\input texinfo/d' \
486 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
487 -e '/^@ifinfo/,/^@end ifinfo/d' \
488 -e '/^@c /d' \
489 -e 's/{.*,,/{/' \
490 -e 's/@ / /g' \
491 -e 's/^@alphaenumerate/@enumerate/g' \
492 -e 's/^@end alphaenumerate/@end enumerate/g' \
493 $(srcdir)/gdb.texinfo | \
494 $(TEXI2ROFF) -ms | \
495 sed -e 's/---/\\(em/g' \
496 >gdb.ms
497
498# gdb manual suitable for [tn]roff -mm
499# '@noindent's removed due to texi2roff-2 mm bug; if yours is newer,
500# try leaving them in
b0787093 501gdb.mm: $(GDB_DOC_FILES) links2roff
c906108c
SS
502 sed -e '/\\input texinfo/d' \
503 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
504 -e '/^@ifinfo/,/^@end ifinfo/d' \
505 -e '/^@c /d' \
506 -e 's/{.*,,/{/' \
507 -e '/@noindent/d' \
508 -e 's/@ / /g' \
509 -e 's/^@alphaenumerate/@enumerate/g' \
510 -e 's/^@end alphaenumerate/@end enumerate/g' \
511 $(srcdir)/gdb.texinfo | \
512 $(TEXI2ROFF) -mm | \
513 sed -e 's/---/\\(em/g' \
514 >gdb.mm
515
085dd6e6
JM
516# GDB MANUAL: HTML file
517
2b831889 518gdb/index.html: ${GDB_DOC_FILES}
39037522 519 $(MAKEHTML) $(MAKEHTMLFLAGS) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo
085dd6e6 520
b0787093 521stabs.info: $(STABS_DOC_FILES)
5048e516 522 $(MAKEINFO_CMD) -I $(srcdir) -o stabs.info $(srcdir)/stabs.texinfo
c906108c 523
085dd6e6
JM
524# STABS DOCUMENTATION: HTML file
525
2b831889 526stabs/index.html: $(STABS_DOC_FILES)
26e251b6 527 $(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/stabs.texinfo
085dd6e6 528
46d8b1c3
AC
529# Clean these up before each run. Avoids a catch 22 with not being
530# able to re-generate these files (to fix a corruption) because these
531# files contain a corruption.
b0787093
AC
532STABS_TEX_TMPS = stabs.aux stabs.cp* stabs.fn* stabs.ky* \
533 stabs.log stabs.pg* stabs.toc stabs.tp* stabs.vr*
534
c906108c 535# STABS DOCUMENTATION: TeX dvi file
b0787093
AC
536stabs.dvi : $(STABS_DOC_FILES)
537 rm -f $(STABS_TEX_TMPS)
26e251b6 538 $(TEXI2DVI) -I $(srcdir) $(srcdir)/stabs.texinfo
c906108c
SS
539
540stabs.ps: stabs.dvi
541 $(DVIPS) -o $@ $?
542
b0787093
AC
543stabs.pdf: $(STABS_DOC_FILES)
544 rm -f $(STABS_TEX_TMPS)
26e251b6 545 $(TEXI2DVI) --pdf -I $(srcdir) $(srcdir)/stabs.texinfo
449f3b6c 546
e6f672d2
AC
547# Clean these up before each run. Avoids a catch 22 with not being
548# able to re-generate these files (to fix a corruption) because these
549# files contain a corruption.
550ANNOTATE_TEX_TMPS = annotate.aux annotate.cp* annotate.fn* annotate.ky* \
551 annotate.log annotate.pg* annotate.toc annotate.tp* annotate.vr*
552
553# ANNOTATE DOCUMENTATION: TeX dvi file
554annotate.dvi : $(ANNOTATE_DOC_FILES)
555 rm -f $(ANNOTATE_TEX_TMPS)
26e251b6 556 $(TEXI2DVI) -I $(srcdir) $(srcdir)/annotate.texinfo
e6f672d2
AC
557
558annotate.ps: annotate.dvi
559 $(DVIPS) -o $@ $?
560
561annotate.pdf: $(ANNOTATE_DOC_FILES)
562 rm -f $(ANNOTATE_TEX_TMPS)
26e251b6 563 $(TEXI2DVI) --pdf -I $(srcdir) $(srcdir)/annotate.texinfo
e6f672d2
AC
564
565annotate.info: $(ANNOTATE_DOC_FILES)
5048e516 566 $(MAKEINFO_CMD) -I $(srcdir) -o annotate.info $(srcdir)/annotate.texinfo
e6f672d2 567
2b831889 568annotate/index.html: $(ANNOTATE_DOC_FILES)
26e251b6 569 $(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/annotate.texinfo
e6f672d2 570
43662968
JK
571# Man pages
572gdb.1: $(GDB_DOC_FILES)
573 touch $@
afe1492b 574 -$(TEXI2POD) $(MANCONF) -Dgdb < $(srcdir)/gdb.texinfo > gdb.pod
43662968
JK
575 -($(POD2MAN1) gdb.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
576 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
577 rm -f gdb.pod
578
579gdbserver.1: $(GDB_DOC_FILES)
580 touch $@
afe1492b 581 -$(TEXI2POD) $(MANCONF) -Dgdbserver < $(srcdir)/gdb.texinfo > gdbserver.pod
43662968
JK
582 -($(POD2MAN1) gdbserver.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
583 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
584 rm -f gdbserver.pod
585
b292c783
JK
586gcore.1: $(GDB_DOC_FILES)
587 touch $@
588 -$(TEXI2POD) $(MANCONF) -Dgcore < $(srcdir)/gdb.texinfo > gcore.pod
589 -($(POD2MAN1) gcore.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
590 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
591 rm -f gcore.pod
592
43662968
JK
593gdbinit.5: $(GDB_DOC_FILES)
594 touch $@
afe1492b 595 -$(TEXI2POD) $(MANCONF) -Dgdbinit < $(srcdir)/gdb.texinfo > gdbinit.pod
43662968
JK
596 -($(POD2MAN5) gdbinit.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
597 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
598 rm -f gdbinit.pod
599
c906108c
SS
600force:
601
5ae98d25
TT
602Makefile: Makefile.in $(host_makefile_frag) ../config.status
603 cd .. && $(SHELL) ./config.status doc/Makefile
46d8b1c3
AC
604
605
606# The "least clean" level of cleaning. Get rid of files which are
607# automatically generated files that are just intermediate files,
608
609mostlyclean:
610 rm -f gdb.mm gdb.ms gdb.me links2roff
611 rm -f $(GDB_TEX_TMPS)
46d8b1c3 612 rm -f $(STABS_TEX_TMPS)
e6f672d2 613 rm -f $(ANNOTATE_TEX_TMPS)
46d8b1c3 614 rm -f sedref.dvi sedref.tex tmp.sed
01208463 615 rm -f version.subst
46d8b1c3
AC
616
617clean: mostlyclean
42ea3d7a 618 rm -f gdb-cfg.texi GDBvn.texi
46d8b1c3
AC
619
620distclean: clean
5ae98d25 621 rm -f Makefile
46d8b1c3
AC
622
623# GDBvn.texi, the dvi files, the info files, and the postscript files,
624# are all part of the distribution, so it should not be removed by
625# "clean" or "distclean". Use maintainer-clean to remove them.
626
627maintainer-clean realclean: distclean
43662968 628 rm -f GDBvn.texi *.info* *.dvi *.ps *.html *.pdf $(MANS)
46d8b1c3 629
43662968 630install: install-info install-man
c166cdc7 631
43662968 632uninstall: uninstall-info uninstall-man