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