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 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@
209 ps
: gdb.ps stabs.ps refcard.ps annotate.ps
215 doxyedit
= sed
-e
's,@srcdir\@,$(srcdir),g'
217 doxy
: doxy
/index.html \
218 doxy
/gdb-api
/index.html \
219 doxy
/gdb-xref
/index.html \
220 doxy
/gdbserver
/index.html
222 doxy
/index.html
: $(srcdir)/doxy-index.in
224 cp
$(srcdir)/doxy-index.in doxy
/index.html
226 doxy
/gdb-api
/index.html
: Doxyfile-gdb-api Doxyfile-base
228 $(DOXYGEN
) Doxyfile-gdb-api
230 doxy
/gdb-xref
/index.html
: Doxyfile-gdb-xref Doxyfile-base
232 $(DOXYGEN
) Doxyfile-gdb-xref
234 doxy
/gdbserver
/index.html
: Doxyfile-gdbserver Doxyfile-base
236 $(DOXYGEN
) Doxyfile-gdbserver
238 Doxyfile-base
: $(srcdir)/Doxyfile-base.in
239 $(doxyedit
) $(srcdir)/Doxyfile-base.in
>Doxyfile-base
241 Doxyfile-gdb-api
: $(srcdir)/Doxyfile-gdb-api.in
242 $(doxyedit
) $(srcdir)/Doxyfile-gdb-api.in
>Doxyfile-gdb-api
244 Doxyfile-gdb-xref
: $(srcdir)/Doxyfile-gdb-xref.in
245 $(doxyedit
) $(srcdir)/Doxyfile-gdb-xref.in
>Doxyfile-gdb-xref
247 Doxyfile-gdbserver
: $(srcdir)/Doxyfile-gdbserver.in
248 $(doxyedit
) $(srcdir)/Doxyfile-gdbserver.in
>Doxyfile-gdbserver
250 all-doc
: info man
dvi ps pdf html
253 install-info
: $(INFO_DEPS
)
254 $(SHELL
) $(srcdir)/..
/..
/mkinstalldirs
$(DESTDIR
)$(infodir)
255 @list
='$(INFO_DEPS)'; \
256 for file in
$$list; do \
257 if
test -f
$$file; then d
=.
; else d
=$(srcdir); fi
; \
258 for ifile in
`cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
259 if
test -f
$$d/$$ifile; then \
260 echo
" $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
261 $(INSTALL_DATA
) $$d/$$ifile $(DESTDIR
)$(infodir)/$$ifile; \
266 @if
$(SHELL
) -c
'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev
/null
2>&1; then \
267 list
='$(INFO_DEPS)'; \
268 for file in
$$list; do \
269 echo
" install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
270 install-info
--info-dir
=$(DESTDIR
)$(infodir) $(DESTDIR
)$(infodir)/$$file ||
:;\
276 @if
$(SHELL
) -c
'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev
/null
2>&1; then \
279 list
='$(INFO_DEPS)'; \
280 for file in
$$list; do \
282 || install-info
--info-dir
=$(DESTDIR
)$(infodir) --remove
$$file; \
285 list
='$(INFO_DEPS)'; \
286 for file in
$$list; do \
287 (cd
$(DESTDIR
)$(infodir) && rm -f
$$file $$file-[0-9] $$file-[0-9][0-9]); \
290 html__strip_dir
= `echo $$p | sed -e 's|^.*/||'`;
292 install-html
: $(HTMLFILES
)
294 test -z
"$(htmldir)" ||
$(mkinstalldirs
) "$(DESTDIR)$(htmldir)"
295 @list
='$(HTMLFILES_INSTALL)'; for p in
$$list; do \
296 if
test -f
"$$p" ||
test -d
"$$p"; then d
=""; else d
="$(srcdir)/"; fi
; \
297 f
=$(html__strip_dir
) \
298 if
test -d
"$$d$$p"; then \
299 echo
" $(mkinstalldirs) '$(DESTDIR)$(htmldir)/$$f'"; \
300 $(mkinstalldirs
) "$(DESTDIR)$(htmldir)/$$f" || exit
1; \
301 echo
" $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
302 $(INSTALL_DATA
) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
304 echo
" $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
305 $(INSTALL_DATA
) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
309 dvi__strip_dir
= `echo $$p | sed -e 's|^.*/||'`;
311 install-dvi
: $(DVIFILES
)
313 test -z
"$(dvidir)" ||
$(mkinstalldirs
) "$(DESTDIR)$(dvidir)"
314 @list
='$(DVIFILES)'; for p in
$$list; do \
315 if
test -f
"$$p"; then d
=; else d
="$(srcdir)/"; fi
; \
316 f
=$(dvi__strip_dir
) \
317 echo
" $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(dvidir)/$$f'"; \
318 $(INSTALL_DATA
) "$$d$$p" "$(DESTDIR)$(dvidir)/$$f"; \
321 pdf__strip_dir
= `echo $$p | sed -e 's|^.*/||'`;
323 install-pdf
: $(PDFFILES
)
325 test -z
"$(pdfdir)" ||
$(mkinstalldirs
) "$(DESTDIR)$(pdfdir)"
326 @list
='$(PDFFILES)'; for p in
$$list; do \
327 if
test -f
"$$p"; then d
=; else d
="$(srcdir)/"; fi
; \
328 f
=$(pdf__strip_dir
) \
329 echo
" $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
330 $(INSTALL_DATA
) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
333 install-man
: install-man1 install-man5
335 install-man1
: $(MAN1S
)
336 test -z
"$(man1dir)" ||
$(mkinstalldirs
) "$(DESTDIR)$(man1dir)"
337 @list
='$(MAN1S)'; for p in
$$list; do \
338 if
test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" = x \
339 -a
"$$p" = gcore
.1; then \
342 if
test -f
"$$p"; then d
=; else d
="$(srcdir)/"; fi
; \
343 f
=`echo $$p | sed -e 's|^.*/||' -e '$(transform)'`; \
344 echo
" $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(man1dir)/$$f'"; \
345 $(INSTALL_DATA
) "$$d$$p" "$(DESTDIR)$(man1dir)/$$f"; \
348 install-man5
: $(MAN5S
)
349 test -z
"$(man5dir)" ||
$(mkinstalldirs
) "$(DESTDIR)$(man5dir)"
350 @list
='$(MAN5S)'; for p in
$$list; do \
351 if
test -f
"$$p"; then d
=; else d
="$(srcdir)/"; fi
; \
352 f
=`echo $$p | sed -e 's|^.*/||' -e '$(transform)'`; \
353 echo
" $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(man5dir)/$$f'"; \
354 $(INSTALL_DATA
) "$$d$$p" "$(DESTDIR)$(man5dir)/$$f"; \
357 uninstall-man
: uninstall-man1 uninstall-man5
360 @
test -n
"$(man1dir)" || exit
0; \
361 files
=`{ l2='$(MAN1S)'; for i in $$l2; do \
362 if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" = x \
363 -a "$$i" = gcore.1; then \
368 sed -n '/\.1[a-z]*$$/p'; \
369 } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
370 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
371 test -z
"$$files" ||
{ \
372 echo
" ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
373 cd
"$(DESTDIR)$(man1dir)" && rm -f
$$files; }
376 @
test -n
"$(man5dir)" || exit
0; \
377 files
=`{ l2='$(MAN5S)'; for i in $$l2; do echo "$$i"; done | \
378 sed -n '/\.5[a-z]*$$/p'; \
379 } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
380 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
381 test -z
"$$files" ||
{ \
382 echo
" ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \
383 cd
"$(DESTDIR)$(man5dir)" && rm -f
$$files; }
385 STAGESTUFF
= *.
info* gdb-all.texi GDBvn.texi
*.ps
*.
dvi *.pdf
*.1 *.5
387 # Copy the object files from a particular stage into a subdirectory.
390 -mv
$(STAGESTUFF
) stage1
394 -mv
$(STAGESTUFF
) stage2
398 -mv
$(STAGESTUFF
) stage3
403 for i in
$(STAGESTUFF
) ; do cmp
$$i $(against
)/$$i ; done
406 -(cd stage1
; mv
-f
* ..
)
410 -(cd stage2
; mv
-f
* ..
)
414 -(cd stage3
; mv
-f
* ..
)
418 sedref.
tex : refcard.
tex $(REFEDITS
)
419 $(SILENCE
) echo
> refcard.sed
420 $(SILENCE
) for f in x
$(REFEDITS
) ; do \
421 test x
$$f = xx
&& continue
; \
422 cat
$(srcdir)/$$f >>refcard.sed
; \
424 $(ECHO_GEN
) sed
-f refcard.sed
$(srcdir)/refcard.
tex >$@
425 $(SILENCE
) rm -f refcard.sed
428 # GDB QUICK REFERENCE (dvi output)
429 refcard.
dvi : sedref.
tex
430 $(SILENCE
) rm -f sedref_dvi.
*
431 $(SILENCE
) cp
$< sedref_dvi.
tex
432 $(ECHO_TEX
) $(SET_TEXINPUTS
) $(TEX
) sedref_dvi.
tex && \
435 refcard.ps
: refcard.
dvi
436 $(ECHO_DVIPS
) $(DVIPS
) $(SILENT_Q_FLAG
) -t landscape
-o
$@
$?
438 refcard.pdf
: sedref.
tex
439 $(SILENCE
) rm -f sedref_pdf.
*
440 $(SILENCE
) cp
$< sedref_pdf.
tex
441 $(ECHO_PDFTEX
) $(SET_TEXINPUTS
) $(PDFTEX
) sedref_pdf.
tex && \
444 # File to record current GDB version number.
446 # It is important that version.subst be the first dependency so that
447 # $< can be used in the recipe, this allows us to find version.subst
448 # in either the source tree or the build tree as this file is
449 # included, pre-built, as part of a release.
450 GDBvn.texi
: version.
subst
452 $(SILENCE
) echo
"@set GDBVN `sed q $<`" > .
/GDBvn.new
453 $(SILENCE
) if
[ -n
"$(PKGVERSION)" ]; then \
454 echo
"@set VERSION_PACKAGE $(PKGVERSION)" >> .
/GDBvn.new
; \
456 $(SILENCE
) echo
"@set BUGURL $(BUGURL_TEXI)" >> .
/GDBvn.new
457 $(SILENCE
) if
[ "$(BUGURL_TEXI)" = "@uref{http://www.gnu.org/software/gdb/bugs/}" ]; then \
458 echo
"@set BUGURL_DEFAULT" >> .
/GDBvn.new
; \
460 $(SILENCE
) if
test -z
"$(READLINE_TEXI_INCFLAG)"; then \
461 echo
"@set SYSTEM_READLINE" >> .
/GDBvn.new
; \
463 $(SILENCE
) if
[ -n
"$(SYSTEM_GDBINIT)" ]; then \
464 escaped_system_gdbinit
=`echo $(SYSTEM_GDBINIT) | sed 's/@/@@/g'`; \
465 echo
"@set SYSTEM_GDBINIT $$escaped_system_gdbinit" >> .
/GDBvn.new
; \
467 $(SILENCE
) if
[ -n
"$(SYSTEM_GDBINIT_DIR)" ]; then \
468 escaped_system_gdbinit_dir
=`echo $(SYSTEM_GDBINIT_DIR) | sed 's/@/@@/g'`; \
469 echo
"@set SYSTEM_GDBINIT_DIR $$escaped_system_gdbinit_dir" >> .
/GDBvn.new
; \
471 $(SILENCE
) mv GDBvn.new GDBvn.texi
473 version.
subst: $(gdbdir
)/version.in
$(gdbdir
)/..
/bfd
/version.h
474 $(ECHO_GEN
) date
=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$$/\1/p' $(gdbdir)/../bfd/version.h`; \
475 sed
-e
"s/DATE/$$date/" < $(gdbdir
)/version.in
> version.
subst
478 .PRECIOUS
: GDBvn.texi
480 # Choose configuration for GDB manual (normally `all'; normally not tied into
481 # `configure' script because most users prefer generic version of manual,
482 # not one for their binary config---which may not be specifically
484 gdb-cfg.texi
: ${srcdir}/${DOC_CONFIG}-cfg.texi
485 $(ECHO_GEN
) (test "$(LN_S)" = "ln -s" && \
486 ln
-s
${srcdir}/${DOC_CONFIG}-cfg.texi gdb-cfg.texi
) || \
487 ln
${srcdir}/${DOC_CONFIG}-cfg.texi gdb-cfg.texi || \
488 cp
${srcdir}/${DOC_CONFIG}-cfg.texi gdb-cfg.texi
490 # GDB MANUAL: TeX dvi file
491 gdb.
dvi: ${GDB_DOC_FILES}
492 $(ECHO_TEXI2DVI
) $(TEXI2DVI_CMD
) $(SILENT_Q_FLAG
) \
493 $(READLINE_TEXI_INCFLAG
) -I
${GDBMI_DIR} -I
$(srcdir) \
494 $(srcdir)/gdb.texinfo
497 $(ECHO_DVIPS
) $(DVIPS
) $(SILENT_Q_FLAG
) -o
$@
$?
499 gdb.pdf
: ${GDB_DOC_FILES}
500 $(ECHO_TEXI2DVI
) $(TEXI2DVI_CMD
) $(SILENT_Q_FLAG
) --pdf \
501 $(READLINE_TEXI_INCFLAG
) -I
${GDBMI_DIR} -I
$(srcdir) \
502 $(srcdir)/gdb.texinfo
504 # GDB MANUAL: info file
505 gdb.
info: ${GDB_DOC_FILES}
506 $(ECHO_MAKEINFO
) $(MAKEINFO_CMD
) $(READLINE_TEXI_INCFLAG
) -I
${GDBMI_DIR} -I
$(srcdir) \
507 -o gdb.
info $(srcdir)/gdb.texinfo
509 # GDB MANUAL: roff translations
510 # Try to use a recent texi2roff. v2 was put on prep in jan91.
511 # If you want an index, see texi2roff doc for postprocessing
512 # and add -i to texi2roff invocations below.
513 # Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
514 # corresponding -e lines when later texi2roff's are current)
515 # + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
516 # + @c's deleted explicitly because texi2roff sees texinfo commands in them
517 # + @ (that's at-BLANK) not recognized by texi2roff, turned into blank
518 # + @alphaenumerate is ridiculously new, turned into @enumerate
520 # texi2roff doesn't have a notion of include dirs, so we have to fake
521 # it out for gdb manual's include files---but only if not configured
523 links2roff
: $(GDB_DOC_SOURCE_INCLUDES
)
524 $(ECHO_GEN
) if
[ ! -f gdb.texinfo
]; then \
525 (test "$(LN_S)" = "ln -s" && ln
-s
$(GDB_DOC_SOURCE_INCLUDES
) .
) || \
526 ln
$(GDB_DOC_SOURCE_INCLUDES
) . || \
527 cp
$(GDB_DOC_SOURCE_INCLUDES
) .
; \
529 $(SILENCE
) touch links2roff
531 # gdb manual suitable for [gtn]roff -me
532 gdb.me
: $(GDB_DOC_FILES
) links2roff
533 $(ECHO_GEN
) sed
-e
'/\\input texinfo/d' \
534 -e
'/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
535 -e
'/^@ifinfo/,/^@end ifinfo/d' \
539 -e
's/^@alphaenumerate/@enumerate/g' \
540 -e
's/^@end alphaenumerate/@end enumerate/g' \
541 $(srcdir)/gdb.texinfo | \
543 sed
-e
's/---/\\(em/g' \
546 # gdb manual suitable for [gtn]roff -ms
547 gdb.ms
: $(GDB_DOC_FILES
) links2roff
548 $(ECHO_GEN
) sed
-e
'/\\input texinfo/d' \
549 -e
'/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
550 -e
'/^@ifinfo/,/^@end ifinfo/d' \
554 -e
's/^@alphaenumerate/@enumerate/g' \
555 -e
's/^@end alphaenumerate/@end enumerate/g' \
556 $(srcdir)/gdb.texinfo | \
558 sed
-e
's/---/\\(em/g' \
561 # gdb manual suitable for [tn]roff -mm
562 # '@noindent's removed due to texi2roff-2 mm bug; if yours is newer,
563 # try leaving them in
564 gdb.mm
: $(GDB_DOC_FILES
) links2roff
565 $(ECHO_GEN
) sed
-e
'/\\input texinfo/d' \
566 -e
'/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
567 -e
'/^@ifinfo/,/^@end ifinfo/d' \
572 -e
's/^@alphaenumerate/@enumerate/g' \
573 -e
's/^@end alphaenumerate/@end enumerate/g' \
574 $(srcdir)/gdb.texinfo | \
576 sed
-e
's/---/\\(em/g' \
579 # GDB MANUAL: HTML file
581 gdb
/index.html
: ${GDB_DOC_FILES}
582 $(ECHO_GEN
) $(MAKEHTML
) $(MAKEHTMLFLAGS
) \
584 $(READLINE_TEXI_INCFLAG
) -I
${GDBMI_DIR} -I
$(srcdir) \
585 $(srcdir)/gdb.texinfo
587 stabs.
info: $(STABS_DOC_FILES
)
588 $(ECHO_MAKEINFO
) $(MAKEINFO_CMD
) -I
$(srcdir) -o stabs.
info $(srcdir)/stabs.texinfo
590 # STABS DOCUMENTATION: HTML file
592 stabs
/index.html
: $(STABS_DOC_FILES
)
593 $(ECHO_GEN
) $(MAKEHTML
) $(MAKEHTMLFLAGS
) \
596 $(srcdir)/stabs.texinfo
598 # STABS DOCUMENTATION: TeX dvi file
599 stabs.
dvi : $(STABS_DOC_FILES
)
600 $(ECHO_TEXI2DVI
) $(TEXI2DVI_CMD
) $(SILENT_Q_FLAG
) -I
$(srcdir) \
601 $(srcdir)/stabs.texinfo
604 $(ECHO_DVIPS
) $(DVIPS
) $(SILENT_Q_FLAG
) -o
$@
$?
606 stabs.pdf
: $(STABS_DOC_FILES
)
607 $(ECHO_TEXI2DVI
) $(TEXI2DVI_CMD
) $(SILENT_Q_FLAG
) --pdf
-I
$(srcdir) \
608 $(srcdir)/stabs.texinfo
610 # ANNOTATE DOCUMENTATION: TeX dvi file
611 annotate.
dvi : $(ANNOTATE_DOC_FILES
)
612 $(ECHO_TEXI2DVI
) $(TEXI2DVI_CMD
) $(SILENT_Q_FLAG
) -I
$(srcdir) \
613 $(srcdir)/annotate.texinfo
615 annotate.ps
: annotate.
dvi
616 $(ECHO_DVIPS
) $(DVIPS
) $(SILENT_Q_FLAG
) -o
$@
$?
618 annotate.pdf
: $(ANNOTATE_DOC_FILES
)
619 $(ECHO_TEXI2DVI
) $(TEXI2DVI_CMD
) $(SILENT_Q_FLAG
) --pdf
-I
$(srcdir) \
620 $(srcdir)/annotate.texinfo
622 annotate.
info: $(ANNOTATE_DOC_FILES
)
623 $(ECHO_MAKEINFO
) $(MAKEINFO_CMD
) -I
$(srcdir) -o annotate.
info $(srcdir)/annotate.texinfo
625 annotate
/index.html
: $(ANNOTATE_DOC_FILES
)
626 $(ECHO_MAKEHTML
) $(MAKEHTML
) $(MAKEHTMLFLAGS
) \
629 $(srcdir)/annotate.texinfo
631 # Man pages. The TEXI2POD and TEXI2MAN steps are performed within a
632 # single recipe to support how we distribute GDB releases. A release
633 # includes the .1 and .5 man pages in the source tree, but not the
636 # When building and installing a release of GDB it should not be
637 # necessary to rebuild the .1 or .5 man page files, nor should it be
638 # necessary to rebuild the .pod files.
640 # If we split the .pod creation from the creation of the .1 and .5
641 # pages, then the .pod files must become a dependency, this will
642 # trigger an attempt to rebuild these files while building and
643 # installing a release of GDB, which is something we don't want.
645 # It is important that version.subst be the first dependency so that
646 # $< can be used in the recipe, this allows us to find version.subst
647 # in either the source tree or the build tree as this file is
648 # included, pre-built, as part of a release.
649 $(MAN1S
) $(MAN5S
) : version.
subst $(GDB_DOC_FILES
)
650 $(ECHO_TEXI2POD
) $(TEXI2POD
) $(MANCONF
) -D
$(basename $@
) \
651 < $(srcdir)/gdb.texinfo
> $(basename $@
).pod
652 $(ECHO_TEXI2MAN
) ($(POD2MAN
) --section
=$(subst .
,,$(suffix $@
)) \
653 --release
="gdb-`sed q $<`" $(basename $@
).pod | \
654 sed
-e
'/^.if n .na/d' > $@.T
$$$$ && \
655 mv
-f
$@.T
$$$$ $@
) ||
(rm -f
$@.T
$$$$ && exit
1)
656 $(SILENCE
) rm -f
$(basename $@
).pod
660 Makefile
: Makefile.in
$(host_makefile_frag
) ..
/config.status
661 $(ECHO_GEN
) cd ..
&& $(SHELL
) .
/config.status
$(SILENT_FLAG
) doc
/Makefile
664 # The "least clean" level of cleaning. Get rid of files which are
665 # automatically generated files that are just intermediate files,
668 rm -f gdb.mm gdb.ms gdb.me links2roff
669 rm -fr
$(TEXI2DVI_TMPDIR
)
670 rm -f refcard.sed sedref.
tex sedref_dvi.
* sedref_pdf.
*
671 rm -f
$(POD_FILE_TMPS
)
679 # GDBvn.texi, the dvi files, the info files, and the postscript files,
680 # are all part of the distribution, so it should not be removed by
681 # "clean" or "distclean". Use maintainer-clean to remove them.
683 maintainer-clean
realclean: distclean
684 rm -f GDBvn.texi version.
subst *.
info* *.
dvi *.ps
*.html
*.pdf
$(MANS
)
686 install: install-info install-man
688 uninstall: uninstall-info uninstall-man
690 # Disable implicit make rules.
691 include $(srcdir)/..
/disable-implicit-rules.mk