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