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