1 ##Copyright (C) 1991-2024 Free Software Foundation, Inc.
3 # Makefile for GDB documentation.
4 # This file is part of GDB.
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.
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.
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/>.
25 datarootdir
= @datarootdir@
31 man1dir = $(mandir)/man1
32 man5dir = $(mandir)/man5
34 transform
= @program_transform_name@
36 include $(srcdir)/..
/silent-rules.mk
43 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
44 INSTALL_DATA
= @INSTALL_DATA@
46 SYSTEM_GDBINIT
= @SYSTEM_GDBINIT@
47 SYSTEM_GDBINIT_DIR
= @SYSTEM_GDBINIT_DIR@
49 mkinstalldirs
= $(SHELL
) $(srcdir)/..
/..
/mkinstalldirs
51 # main GDB source directory
54 # where to find texinfo; GDB dist should include a recent one
55 TEXIDIR
=${gdbdir}/..
/texinfo
57 # where to find makeinfo, preferably one designed for texinfo-2
59 MAKEINFOFLAGS
= @MAKEINFOFLAGS@
60 MAKEINFO_EXTRA_FLAGS
= @MAKEINFO_EXTRA_FLAGS@
61 MAKEINFO_CMD
= $(MAKEINFO
) $(MAKEINFOFLAGS
) $(MAKEINFO_EXTRA_FLAGS
)
63 MAKEHTML
= $(MAKEINFO_CMD
) --html
66 # where to find texi2roff, ditto
69 # Where to find texi2dvi. The use of --build and --build-dir options
70 # mean that at least texinfo 4.9 is required.
72 TEXI2DVI_TMPDIR
=texi2dvi_tmpdir
73 TEXI2DVI_CMD
= rm -fr
$(TEXI2DVI_TMPDIR
)/$(subst .
,_
,$@
) \
74 && mkdir
-p
$(TEXI2DVI_TMPDIR
)/$(subst .
,_
,$@
) \
75 && $(TEXI2DVI
) --build
=tidy \
76 --build-dir
=$(TEXI2DVI_TMPDIR
)/$(subst .
,_
,$@
)
78 # Package to install the docs under
81 # Package version and bug-reporting URL.
82 PKGVERSION
= @PKGVERSION@
83 BUGURL_TEXI
= @REPORT_BUGS_TEXI@
85 # Where is the source dir for the READLINE library doc?
86 # Traditionally readline is in .. or .
87 READLINE_DIR
= ${gdbdir}/..
/readline
/readline
/doc
88 READLINE_TEXI_INCFLAG
= @READLINE_TEXI_INCFLAG@
90 # The GDB/MI docs come from a sibling directory ../mi
91 GDBMI_DIR
= ${gdbdir}/mi
94 TEXINPUTS
=${TEXIDIR}:.
:$(srcdir):$(READLINE_DIR
):$(GDBMI_DIR
):$$TEXINPUTS
96 # Files which should be generated via 'info' and installed by 'install-info'
97 INFO_DEPS
= gdb.
info stabs.
info annotate.
info
99 # Files which should be generated via 'dvi' and installed by 'install-dvi'
100 DVIFILES
= gdb.
dvi stabs.
dvi refcard.
dvi annotate.
dvi
101 # Files which should be generated via 'pdf' and installed by 'install-pdf'
102 PDFFILES
= gdb.pdf stabs.pdf refcard.pdf annotate.pdf
103 # Files which should be generated via 'html' and installed by 'install-html'
104 HTMLFILES
= gdb
/index.html stabs
/index.html annotate
/index.html
105 HTMLFILES_INSTALL
= gdb stabs annotate
107 # There may be alternate predefined collections of switches to configure
108 # the GDB manual. Normally this is not done in synch with the software
109 # config system, since this choice tends to be independent; most people
110 # want a doc config of `all' for a generic manual, regardless of sw config.
113 # This list of sed edits will edit the GDB reference card
114 # for what fonts and what papersize to use.
115 # By default (NO edits applied), the refcard uses:
116 # - Computer Modern (CM) fonts
117 # - US letter paper (8.5x11in)
118 # List some of the following files for alternative fonts and paper:
119 # a4rc.sed use A4 paper (297 x 210 mm)
120 # psrc.sed use PostScript fonts (Karl Berry short TeX names)
121 # lpsrc.sed use PostScript fonts (full PostScript names in TeX)
122 # e.g. for A4, Postscript: REFEDITS = a4rc.sed psrc.sed
123 # for A4, CM fonts: REFEDITS = a4rc.sed
124 # for US, PS fonts: REFEDITS = psrc.sed
128 # Don Knuth's TeX formatter
132 # Program to generate Postscript files from DVI files.
136 READLINE_SYSTEM_DOC_INCLUDES
=
137 READLINE_INTREE_DOC_INCLUDES
= $(READLINE_DIR
)/rluser.texi
$(READLINE_DIR
)/hsuser.texi
138 READLINE_DOC_SOURCE_INCLUDES
= @READLINE_DOC_SOURCE_INCLUDES@
141 # Note that this unconditionally includes the readline texi files,
142 # even when --with-system-readline is used. This is harmless because
143 # these are only used as dependencies.
144 GDB_DOC_SOURCE_INCLUDES
= \
147 $(srcdir)/agentexpr.texi \
148 $(READLINE_DOC_SOURCE_INCLUDES
)
149 GDB_DOC_BUILD_INCLUDES
= \
153 $(srcdir)/gdb.texinfo \
154 $(srcdir)/guile.texi \
155 $(srcdir)/python.texi \
156 $(GDB_DOC_SOURCE_INCLUDES
) \
157 $(GDB_DOC_BUILD_INCLUDES
)
159 # Stabs manual: All files
160 STABS_DOC_SOURCE_INCLUDES
= \
162 STABS_DOC_BUILD_INCLUDES
= \
166 $(srcdir)/stabs.texinfo \
167 $(STABS_DOC_SOURCE_INCLUDES
) \
168 $(STABS_DOC_BUILD_INCLUDES
)
170 # Annotate migration document
171 ANNOTATE_DOC_SOURCE_INCLUDES
= \
173 ANNOTATE_DOC_BUILD_INCLUDES
= \
176 ANNOTATE_DOC_FILES
= \
177 $(srcdir)/annotate.texinfo \
178 $(ANNOTATE_DOC_SOURCE_INCLUDES
) \
179 $(ANNOTATE_DOC_BUILD_INCLUDES
)
181 # Options to extract the man page from gdb.texinfo
184 TEXI2POD
= perl
$(srcdir)/..
/..
/etc
/texi2pod.pl \
185 $(MAKEINFOFLAGS
) $(MAKEINFO_EXTRA_FLAGS
) -I
$(srcdir)
188 POD2MAN
= pod2man
--center
="GNU Development Tools"
190 # List of man pages generated from gdb.texi
191 MAN1S
= gdb
.1 gdbserver
.1 gcore
.1 gstack
.1 gdb-add-index
.1
193 MANS
= $(MAN1S
) $(MAN5S
)
195 # The pod files that are generated as a side effect of creating the
197 POD_FILE_TMPS
= $(patsubst %.1,%.pod
,$(MAN1S
)) \
198 $(patsubst %.5,%.pod
,$(MAN5S
))
200 HAVE_NATIVE_GCORE_TARGET
= @HAVE_NATIVE_GCORE_TARGET@
201 HAVE_NATIVE_GCORE_HOST
= @HAVE_NATIVE_GCORE_HOST@
202 HAVE_GSTACK
= @HAVE_GSTACK@
210 ps
: gdb.ps stabs.ps refcard.ps annotate.ps
216 doxyedit
= sed
-e
's,@srcdir\@,$(srcdir),g'
218 doxy
: doxy
/index.html \
219 doxy
/gdb-api
/index.html \
220 doxy
/gdb-xref
/index.html \
221 doxy
/gdbserver
/index.html
223 doxy
/index.html
: $(srcdir)/doxy-index.in
225 cp
$(srcdir)/doxy-index.in doxy
/index.html
227 doxy
/gdb-api
/index.html
: Doxyfile-gdb-api Doxyfile-base
229 $(DOXYGEN
) Doxyfile-gdb-api
231 doxy
/gdb-xref
/index.html
: Doxyfile-gdb-xref Doxyfile-base
233 $(DOXYGEN
) Doxyfile-gdb-xref
235 doxy
/gdbserver
/index.html
: Doxyfile-gdbserver Doxyfile-base
237 $(DOXYGEN
) Doxyfile-gdbserver
239 Doxyfile-base
: $(srcdir)/Doxyfile-base.in
240 $(doxyedit
) $(srcdir)/Doxyfile-base.in
>Doxyfile-base
242 Doxyfile-gdb-api
: $(srcdir)/Doxyfile-gdb-api.in
243 $(doxyedit
) $(srcdir)/Doxyfile-gdb-api.in
>Doxyfile-gdb-api
245 Doxyfile-gdb-xref
: $(srcdir)/Doxyfile-gdb-xref.in
246 $(doxyedit
) $(srcdir)/Doxyfile-gdb-xref.in
>Doxyfile-gdb-xref
248 Doxyfile-gdbserver
: $(srcdir)/Doxyfile-gdbserver.in
249 $(doxyedit
) $(srcdir)/Doxyfile-gdbserver.in
>Doxyfile-gdbserver
251 all-doc
: info man
dvi ps pdf html
254 install-info
: $(INFO_DEPS
)
255 $(SHELL
) $(srcdir)/..
/..
/mkinstalldirs
$(DESTDIR
)$(infodir)
256 @list
='$(INFO_DEPS)'; \
257 for file in
$$list; do \
258 if
test -f
$$file; then d
=.
; else d
=$(srcdir); fi
; \
259 for ifile in
`cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
260 if
test -f
$$d/$$ifile; then \
261 echo
" $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
262 $(INSTALL_DATA
) $$d/$$ifile $(DESTDIR
)$(infodir)/$$ifile; \
267 @if
$(SHELL
) -c
'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev
/null
2>&1; then \
268 list
='$(INFO_DEPS)'; \
269 for file in
$$list; do \
270 echo
" install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
271 install-info
--info-dir
=$(DESTDIR
)$(infodir) $(DESTDIR
)$(infodir)/$$file ||
:;\
277 @if
$(SHELL
) -c
'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev
/null
2>&1; then \
280 list
='$(INFO_DEPS)'; \
281 for file in
$$list; do \
283 || install-info
--info-dir
=$(DESTDIR
)$(infodir) --remove
$$file; \
286 list
='$(INFO_DEPS)'; \
287 for file in
$$list; do \
288 (cd
$(DESTDIR
)$(infodir) && rm -f
$$file $$file-[0-9] $$file-[0-9][0-9]); \
291 html__strip_dir
= `echo $$p | sed -e 's|^.*/||'`;
293 install-html
: $(HTMLFILES
)
295 test -z
"$(htmldir)" ||
$(mkinstalldirs
) "$(DESTDIR)$(htmldir)"
296 @list
='$(HTMLFILES_INSTALL)'; for p in
$$list; do \
297 if
test -f
"$$p" ||
test -d
"$$p"; then d
=""; else d
="$(srcdir)/"; fi
; \
298 f
=$(html__strip_dir
) \
299 if
test -d
"$$d$$p"; then \
300 echo
" $(mkinstalldirs) '$(DESTDIR)$(htmldir)/$$f'"; \
301 $(mkinstalldirs
) "$(DESTDIR)$(htmldir)/$$f" || exit
1; \
302 echo
" $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
303 $(INSTALL_DATA
) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
305 echo
" $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
306 $(INSTALL_DATA
) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
310 dvi__strip_dir
= `echo $$p | sed -e 's|^.*/||'`;
312 install-dvi
: $(DVIFILES
)
314 test -z
"$(dvidir)" ||
$(mkinstalldirs
) "$(DESTDIR)$(dvidir)"
315 @list
='$(DVIFILES)'; for p in
$$list; do \
316 if
test -f
"$$p"; then d
=; else d
="$(srcdir)/"; fi
; \
317 f
=$(dvi__strip_dir
) \
318 echo
" $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(dvidir)/$$f'"; \
319 $(INSTALL_DATA
) "$$d$$p" "$(DESTDIR)$(dvidir)/$$f"; \
322 pdf__strip_dir
= `echo $$p | sed -e 's|^.*/||'`;
324 install-pdf
: $(PDFFILES
)
326 test -z
"$(pdfdir)" ||
$(mkinstalldirs
) "$(DESTDIR)$(pdfdir)"
327 @list
='$(PDFFILES)'; for p in
$$list; do \
328 if
test -f
"$$p"; then d
=; else d
="$(srcdir)/"; fi
; \
329 f
=$(pdf__strip_dir
) \
330 echo
" $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
331 $(INSTALL_DATA
) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
334 install-man
: install-man1 install-man5
336 install-man1
: $(MAN1S
)
337 test -z
"$(man1dir)" ||
$(mkinstalldirs
) "$(DESTDIR)$(man1dir)"
338 @list
='$(MAN1S)'; for p in
$$list; do \
339 if
test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" = x \
340 -a
"$$p" = gcore
.1; then \
343 if
test "x$(HAVE_GSTACK)" = x \
344 -a
"$$p" = gstack
.1; then \
347 if
test -f
"$$p"; then d
=; else d
="$(srcdir)/"; fi
; \
348 f
=`echo $$p | sed -e 's|^.*/||' -e '$(transform)'`; \
349 echo
" $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(man1dir)/$$f'"; \
350 $(INSTALL_DATA
) "$$d$$p" "$(DESTDIR)$(man1dir)/$$f"; \
353 install-man5
: $(MAN5S
)
354 test -z
"$(man5dir)" ||
$(mkinstalldirs
) "$(DESTDIR)$(man5dir)"
355 @list
='$(MAN5S)'; for p in
$$list; do \
356 if
test -f
"$$p"; then d
=; else d
="$(srcdir)/"; fi
; \
357 f
=`echo $$p | sed -e 's|^.*/||' -e '$(transform)'`; \
358 echo
" $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(man5dir)/$$f'"; \
359 $(INSTALL_DATA
) "$$d$$p" "$(DESTDIR)$(man5dir)/$$f"; \
362 uninstall-man
: uninstall-man1 uninstall-man5
365 @
test -n
"$(man1dir)" || exit
0; \
366 files
=`{ l2='$(MAN1S)'; for i in $$l2; do \
367 if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" = x \
368 -a "$$i" = gcore.1; then \
371 if test "x$(HAVE_GSTACK)" = x \
372 -a "$$i" = gstack.1; then \
377 sed -n '/\.1[a-z]*$$/p'; \
378 } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
379 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
380 test -z
"$$files" ||
{ \
381 echo
" ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
382 cd
"$(DESTDIR)$(man1dir)" && rm -f
$$files; }
385 @
test -n
"$(man5dir)" || exit
0; \
386 files
=`{ l2='$(MAN5S)'; for i in $$l2; do echo "$$i"; done | \
387 sed -n '/\.5[a-z]*$$/p'; \
388 } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
389 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
390 test -z
"$$files" ||
{ \
391 echo
" ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \
392 cd
"$(DESTDIR)$(man5dir)" && rm -f
$$files; }
394 STAGESTUFF
= *.
info* gdb-all.texi GDBvn.texi
*.ps
*.
dvi *.pdf
*.1 *.5
396 # Copy the object files from a particular stage into a subdirectory.
399 -mv
$(STAGESTUFF
) stage1
403 -mv
$(STAGESTUFF
) stage2
407 -mv
$(STAGESTUFF
) stage3
412 for i in
$(STAGESTUFF
) ; do cmp
$$i $(against
)/$$i ; done
415 -(cd stage1
; mv
-f
* ..
)
419 -(cd stage2
; mv
-f
* ..
)
423 -(cd stage3
; mv
-f
* ..
)
427 sedref.
tex : refcard.
tex $(REFEDITS
)
428 $(SILENCE
) echo
> refcard.sed
429 $(SILENCE
) for f in x
$(REFEDITS
) ; do \
430 test x
$$f = xx
&& continue
; \
431 cat
$(srcdir)/$$f >>refcard.sed
; \
433 $(ECHO_GEN
) sed
-f refcard.sed
$(srcdir)/refcard.
tex >$@
434 $(SILENCE
) rm -f refcard.sed
437 # GDB QUICK REFERENCE (dvi output)
438 refcard.
dvi : sedref.
tex
439 $(SILENCE
) rm -f sedref_dvi.
*
440 $(SILENCE
) cp
$< sedref_dvi.
tex
441 $(ECHO_TEX
) $(SET_TEXINPUTS
) $(TEX
) sedref_dvi.
tex && \
444 refcard.ps
: refcard.
dvi
445 $(ECHO_DVIPS
) $(DVIPS
) $(SILENT_Q_FLAG
) -t landscape
-o
$@
$?
447 refcard.pdf
: sedref.
tex
448 $(SILENCE
) rm -f sedref_pdf.
*
449 $(SILENCE
) cp
$< sedref_pdf.
tex
450 $(ECHO_PDFTEX
) $(SET_TEXINPUTS
) $(PDFTEX
) sedref_pdf.
tex && \
453 # File to record current GDB version number.
455 # It is important that version.subst be the first dependency so that
456 # $< can be used in the recipe, this allows us to find version.subst
457 # in either the source tree or the build tree as this file is
458 # included, pre-built, as part of a release.
459 GDBvn.texi
: version.
subst
461 $(SILENCE
) echo
"@set GDBVN `sed q $<`" > .
/GDBvn.new
462 $(SILENCE
) if
[ -n
"$(PKGVERSION)" ]; then \
463 echo
"@set VERSION_PACKAGE $(PKGVERSION)" >> .
/GDBvn.new
; \
465 $(SILENCE
) echo
"@set BUGURL $(BUGURL_TEXI)" >> .
/GDBvn.new
466 $(SILENCE
) if
[ "$(BUGURL_TEXI)" = "@uref{http://www.gnu.org/software/gdb/bugs/}" ]; then \
467 echo
"@set BUGURL_DEFAULT" >> .
/GDBvn.new
; \
469 $(SILENCE
) if
test -z
"$(READLINE_TEXI_INCFLAG)"; then \
470 echo
"@set SYSTEM_READLINE" >> .
/GDBvn.new
; \
472 $(SILENCE
) if
[ -n
"$(SYSTEM_GDBINIT)" ]; then \
473 escaped_system_gdbinit
=`echo $(SYSTEM_GDBINIT) | sed 's/@/@@/g'`; \
474 echo
"@set SYSTEM_GDBINIT $$escaped_system_gdbinit" >> .
/GDBvn.new
; \
476 $(SILENCE
) if
[ -n
"$(SYSTEM_GDBINIT_DIR)" ]; then \
477 escaped_system_gdbinit_dir
=`echo $(SYSTEM_GDBINIT_DIR) | sed 's/@/@@/g'`; \
478 echo
"@set SYSTEM_GDBINIT_DIR $$escaped_system_gdbinit_dir" >> .
/GDBvn.new
; \
480 $(SILENCE
) mv GDBvn.new GDBvn.texi
482 version.
subst: $(gdbdir
)/version.in
$(gdbdir
)/..
/bfd
/version.h
483 $(ECHO_GEN
) date
=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$$/\1/p' $(gdbdir)/../bfd/version.h`; \
484 sed
-e
"s/DATE/$$date/" < $(gdbdir
)/version.in
> version.
subst
487 .PRECIOUS
: GDBvn.texi
489 # Choose configuration for GDB manual (normally `all'; normally not tied into
490 # `configure' script because most users prefer generic version of manual,
491 # not one for their binary config---which may not be specifically
493 gdb-cfg.texi
: ${srcdir}/${DOC_CONFIG}-cfg.texi
494 $(ECHO_GEN
) (test "$(LN_S)" = "ln -s" && \
495 ln
-s
${srcdir}/${DOC_CONFIG}-cfg.texi gdb-cfg.texi
) || \
496 ln
${srcdir}/${DOC_CONFIG}-cfg.texi gdb-cfg.texi || \
497 cp
${srcdir}/${DOC_CONFIG}-cfg.texi gdb-cfg.texi
499 # GDB MANUAL: TeX dvi file
500 gdb.
dvi: ${GDB_DOC_FILES}
501 $(ECHO_TEXI2DVI
) $(TEXI2DVI_CMD
) $(SILENT_Q_FLAG
) \
502 $(READLINE_TEXI_INCFLAG
) -I
${GDBMI_DIR} -I
$(srcdir) \
503 $(srcdir)/gdb.texinfo
506 $(ECHO_DVIPS
) $(DVIPS
) $(SILENT_Q_FLAG
) -o
$@
$?
508 gdb.pdf
: ${GDB_DOC_FILES}
509 $(ECHO_TEXI2DVI
) $(TEXI2DVI_CMD
) $(SILENT_Q_FLAG
) --pdf \
510 $(READLINE_TEXI_INCFLAG
) -I
${GDBMI_DIR} -I
$(srcdir) \
511 $(srcdir)/gdb.texinfo
513 # GDB MANUAL: info file
514 gdb.
info: ${GDB_DOC_FILES}
515 $(ECHO_MAKEINFO
) $(MAKEINFO_CMD
) $(READLINE_TEXI_INCFLAG
) -I
${GDBMI_DIR} -I
$(srcdir) \
516 -o gdb.
info $(srcdir)/gdb.texinfo
518 # GDB MANUAL: roff translations
519 # Try to use a recent texi2roff. v2 was put on prep in jan91.
520 # If you want an index, see texi2roff doc for postprocessing
521 # and add -i to texi2roff invocations below.
522 # Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
523 # corresponding -e lines when later texi2roff's are current)
524 # + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
525 # + @c's deleted explicitly because texi2roff sees texinfo commands in them
526 # + @ (that's at-BLANK) not recognized by texi2roff, turned into blank
527 # + @alphaenumerate is ridiculously new, turned into @enumerate
529 # texi2roff doesn't have a notion of include dirs, so we have to fake
530 # it out for gdb manual's include files---but only if not configured
532 links2roff
: $(GDB_DOC_SOURCE_INCLUDES
)
533 $(ECHO_GEN
) if
[ ! -f gdb.texinfo
]; then \
534 (test "$(LN_S)" = "ln -s" && ln
-s
$(GDB_DOC_SOURCE_INCLUDES
) .
) || \
535 ln
$(GDB_DOC_SOURCE_INCLUDES
) . || \
536 cp
$(GDB_DOC_SOURCE_INCLUDES
) .
; \
538 $(SILENCE
) touch links2roff
540 # gdb manual suitable for [gtn]roff -me
541 gdb.me
: $(GDB_DOC_FILES
) links2roff
542 $(ECHO_GEN
) sed
-e
'/\\input texinfo/d' \
543 -e
'/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
544 -e
'/^@ifinfo/,/^@end ifinfo/d' \
548 -e
's/^@alphaenumerate/@enumerate/g' \
549 -e
's/^@end alphaenumerate/@end enumerate/g' \
550 $(srcdir)/gdb.texinfo | \
552 sed
-e
's/---/\\(em/g' \
555 # gdb manual suitable for [gtn]roff -ms
556 gdb.ms
: $(GDB_DOC_FILES
) links2roff
557 $(ECHO_GEN
) sed
-e
'/\\input texinfo/d' \
558 -e
'/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
559 -e
'/^@ifinfo/,/^@end ifinfo/d' \
563 -e
's/^@alphaenumerate/@enumerate/g' \
564 -e
's/^@end alphaenumerate/@end enumerate/g' \
565 $(srcdir)/gdb.texinfo | \
567 sed
-e
's/---/\\(em/g' \
570 # gdb manual suitable for [tn]roff -mm
571 # '@noindent's removed due to texi2roff-2 mm bug; if yours is newer,
572 # try leaving them in
573 gdb.mm
: $(GDB_DOC_FILES
) links2roff
574 $(ECHO_GEN
) sed
-e
'/\\input texinfo/d' \
575 -e
'/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
576 -e
'/^@ifinfo/,/^@end ifinfo/d' \
581 -e
's/^@alphaenumerate/@enumerate/g' \
582 -e
's/^@end alphaenumerate/@end enumerate/g' \
583 $(srcdir)/gdb.texinfo | \
585 sed
-e
's/---/\\(em/g' \
588 # GDB MANUAL: HTML file
590 gdb
/index.html
: ${GDB_DOC_FILES}
591 $(ECHO_GEN
) $(MAKEHTML
) $(MAKEHTMLFLAGS
) \
593 $(READLINE_TEXI_INCFLAG
) -I
${GDBMI_DIR} -I
$(srcdir) \
594 $(srcdir)/gdb.texinfo
596 stabs.
info: $(STABS_DOC_FILES
)
597 $(ECHO_MAKEINFO
) $(MAKEINFO_CMD
) -I
$(srcdir) -o stabs.
info $(srcdir)/stabs.texinfo
599 # STABS DOCUMENTATION: HTML file
601 stabs
/index.html
: $(STABS_DOC_FILES
)
602 $(ECHO_GEN
) $(MAKEHTML
) $(MAKEHTMLFLAGS
) \
605 $(srcdir)/stabs.texinfo
607 # STABS DOCUMENTATION: TeX dvi file
608 stabs.
dvi : $(STABS_DOC_FILES
)
609 $(ECHO_TEXI2DVI
) $(TEXI2DVI_CMD
) $(SILENT_Q_FLAG
) -I
$(srcdir) \
610 $(srcdir)/stabs.texinfo
613 $(ECHO_DVIPS
) $(DVIPS
) $(SILENT_Q_FLAG
) -o
$@
$?
615 stabs.pdf
: $(STABS_DOC_FILES
)
616 $(ECHO_TEXI2DVI
) $(TEXI2DVI_CMD
) $(SILENT_Q_FLAG
) --pdf
-I
$(srcdir) \
617 $(srcdir)/stabs.texinfo
619 # ANNOTATE DOCUMENTATION: TeX dvi file
620 annotate.
dvi : $(ANNOTATE_DOC_FILES
)
621 $(ECHO_TEXI2DVI
) $(TEXI2DVI_CMD
) $(SILENT_Q_FLAG
) -I
$(srcdir) \
622 $(srcdir)/annotate.texinfo
624 annotate.ps
: annotate.
dvi
625 $(ECHO_DVIPS
) $(DVIPS
) $(SILENT_Q_FLAG
) -o
$@
$?
627 annotate.pdf
: $(ANNOTATE_DOC_FILES
)
628 $(ECHO_TEXI2DVI
) $(TEXI2DVI_CMD
) $(SILENT_Q_FLAG
) --pdf
-I
$(srcdir) \
629 $(srcdir)/annotate.texinfo
631 annotate.
info: $(ANNOTATE_DOC_FILES
)
632 $(ECHO_MAKEINFO
) $(MAKEINFO_CMD
) -I
$(srcdir) -o annotate.
info $(srcdir)/annotate.texinfo
634 annotate
/index.html
: $(ANNOTATE_DOC_FILES
)
635 $(ECHO_MAKEHTML
) $(MAKEHTML
) $(MAKEHTMLFLAGS
) \
638 $(srcdir)/annotate.texinfo
640 # Man pages. The TEXI2POD and TEXI2MAN steps are performed within a
641 # single recipe to support how we distribute GDB releases. A release
642 # includes the .1 and .5 man pages in the source tree, but not the
645 # When building and installing a release of GDB it should not be
646 # necessary to rebuild the .1 or .5 man page files, nor should it be
647 # necessary to rebuild the .pod files.
649 # If we split the .pod creation from the creation of the .1 and .5
650 # pages, then the .pod files must become a dependency, this will
651 # trigger an attempt to rebuild these files while building and
652 # installing a release of GDB, which is something we don't want.
654 # It is important that version.subst be the first dependency so that
655 # $< can be used in the recipe, this allows us to find version.subst
656 # in either the source tree or the build tree as this file is
657 # included, pre-built, as part of a release.
658 $(MAN1S
) $(MAN5S
) : version.
subst $(GDB_DOC_FILES
)
659 $(ECHO_TEXI2POD
) $(TEXI2POD
) $(MANCONF
) -D
$(basename $@
) \
660 < $(srcdir)/gdb.texinfo
> $(basename $@
).pod
661 $(ECHO_TEXI2MAN
) ($(POD2MAN
) --section
=$(subst .
,,$(suffix $@
)) \
662 --release
="gdb-`sed q $<`" $(basename $@
).pod | \
663 sed
-e
'/^.if n .na/d' > $@.T
$$$$ && \
664 mv
-f
$@.T
$$$$ $@
) ||
(rm -f
$@.T
$$$$ && exit
1)
665 $(SILENCE
) rm -f
$(basename $@
).pod
669 Makefile
: Makefile.in
$(host_makefile_frag
) ..
/config.status
670 $(ECHO_GEN
) cd ..
&& $(SHELL
) .
/config.status
$(SILENT_FLAG
) doc
/Makefile
673 # The "least clean" level of cleaning. Get rid of files which are
674 # automatically generated files that are just intermediate files,
677 rm -f gdb.mm gdb.ms gdb.me links2roff
678 rm -fr
$(TEXI2DVI_TMPDIR
)
679 rm -f refcard.sed sedref.
tex sedref_dvi.
* sedref_pdf.
*
680 rm -f
$(POD_FILE_TMPS
)
688 # GDBvn.texi, the dvi files, the info files, and the postscript files,
689 # are all part of the distribution, so it should not be removed by
690 # "clean" or "distclean". Use maintainer-clean to remove them.
692 maintainer-clean
realclean: distclean
693 rm -f GDBvn.texi version.
subst *.
info* *.
dvi *.ps
*.html
*.pdf
$(MANS
)
695 install: install-info install-man
697 uninstall: uninstall-info uninstall-man
699 # Disable implicit make rules.
700 include $(srcdir)/..
/disable-implicit-rules.mk