Add translations for various sub-directories
[binutils-gdb.git] / gdb / doc / Makefile.in
blobc75714b5de284b51b8e53c2f7b8e15e7cc0047df
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/>.
19 srcdir = @srcdir@
20 VPATH = @srcdir@
22 prefix = @prefix@
24 infodir = @infodir@
25 datarootdir = @datarootdir@
26 docdir = @docdir@
27 dvidir = @dvidir@
28 pdfdir = @pdfdir@
29 htmldir = @htmldir@
30 mandir = @mandir@
31 man1dir = $(mandir)/man1
32 man5dir = $(mandir)/man5
34 transform = @program_transform_name@
36 include $(srcdir)/../silent-rules.mk
38 SHELL = @SHELL@
40 LN_S = @LN_S@
42 INSTALL = @INSTALL@
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
52 gdbdir = $(srcdir)/..
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
58 MAKEINFO = @MAKEINFO@
59 MAKEINFOFLAGS = @MAKEINFOFLAGS@
60 MAKEINFO_EXTRA_FLAGS = @MAKEINFO_EXTRA_FLAGS@
61 MAKEINFO_CMD = $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS)
63 MAKEHTML = $(MAKEINFO_CMD) --html
64 MAKEHTMLFLAGS =
66 # where to find texi2roff, ditto
67 TEXI2ROFF=texi2roff
69 # Where to find texi2dvi. The use of --build and --build-dir options
70 # mean that at least texinfo 4.9 is required.
71 TEXI2DVI=texi2dvi
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
79 PACKAGE = @PACKAGE@
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
93 SET_TEXINPUTS = \
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.
111 DOC_CONFIG = all
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
125 # for default:
126 REFEDITS =
128 # Don Knuth's TeX formatter
129 TEX = tex
130 PDFTEX = pdftex
132 # Program to generate Postscript files from DVI files.
133 DVIPS = dvips
135 # Readline includes.
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@
140 # Main GDB manual
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 = \
145 $(srcdir)/fdl.texi \
146 $(srcdir)/gpl.texi \
147 $(srcdir)/agentexpr.texi \
148 $(READLINE_DOC_SOURCE_INCLUDES)
149 GDB_DOC_BUILD_INCLUDES = \
150 gdb-cfg.texi \
151 GDBvn.texi
152 GDB_DOC_FILES = \
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 = \
161 $(srcdir)/fdl.texi
162 STABS_DOC_BUILD_INCLUDES = \
163 gdb-cfg.texi \
164 GDBvn.texi
165 STABS_DOC_FILES = \
166 $(srcdir)/stabs.texinfo \
167 $(STABS_DOC_SOURCE_INCLUDES) \
168 $(STABS_DOC_BUILD_INCLUDES)
170 # Annotate migration document
171 ANNOTATE_DOC_SOURCE_INCLUDES = \
172 $(srcdir)/fdl.texi
173 ANNOTATE_DOC_BUILD_INCLUDES = \
174 gdb-cfg.texi \
175 GDBvn.texi
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
182 MANCONF = -Dman
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
192 MAN5S = gdbinit.5
193 MANS = $(MAN1S) $(MAN5S)
195 # The pod files that are generated as a side effect of creating the
196 # man pages.
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@
206 all: info
208 info: $(INFO_DEPS)
209 dvi: $(DVIFILES)
210 ps: gdb.ps stabs.ps refcard.ps annotate.ps
211 html: $(HTMLFILES)
212 pdf: $(PDFFILES)
213 man: $(MANS)
215 DOXYGEN = doxygen
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
224 -mkdir -p doxy
225 cp $(srcdir)/doxy-index.in doxy/index.html
227 doxy/gdb-api/index.html: Doxyfile-gdb-api Doxyfile-base
228 -mkdir -p doxy
229 $(DOXYGEN) Doxyfile-gdb-api
231 doxy/gdb-xref/index.html: Doxyfile-gdb-xref Doxyfile-base
232 -mkdir -p doxy
233 $(DOXYGEN) Doxyfile-gdb-xref
235 doxy/gdbserver/index.html: Doxyfile-gdbserver Doxyfile-base
236 -mkdir -p doxy
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
252 diststuff: info man
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; \
263 else : ; fi; \
264 done; \
265 done
266 $(POST_INSTALL)
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 || :;\
272 done; \
273 else : ; fi
275 uninstall-info:
276 $(PRE_UNINSTALL)
277 @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
278 ii=yes; \
279 else ii=; fi; \
280 list='$(INFO_DEPS)'; \
281 for file in $$list; do \
282 test -z "$$ii" \
283 || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
284 done
285 $(NORMAL_UNINSTALL)
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]); \
289 done
291 html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
293 install-html: $(HTMLFILES)
294 @$(NORMAL_INSTALL)
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"; \
304 else \
305 echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
306 $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
307 fi; \
308 done
310 dvi__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
312 install-dvi: $(DVIFILES)
313 @$(NORMAL_INSTALL)
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"; \
320 done
322 pdf__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
324 install-pdf: $(PDFFILES)
325 @$(NORMAL_INSTALL)
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"; \
332 done
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 \
341 continue; \
342 fi; \
343 if test "x$(HAVE_GSTACK)" = x \
344 -a "$$p" = gstack.1; then \
345 continue; \
346 fi; \
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"; \
351 done
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"; \
360 done
362 uninstall-man: uninstall-man1 uninstall-man5
364 uninstall-man1:
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 \
369 continue; \
370 fi; \
371 if test "x$(HAVE_GSTACK)" = x \
372 -a "$$i" = gstack.1; then \
373 continue; \
374 fi; \
375 echo "$$i"; \
376 done | \
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; }
384 uninstall-man5:
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.
397 stage1: force
398 -mkdir stage1
399 -mv $(STAGESTUFF) stage1
401 stage2: force
402 -mkdir stage2
403 -mv $(STAGESTUFF) stage2
405 stage3: force
406 -mkdir stage3
407 -mv $(STAGESTUFF) stage3
409 against=stage2
411 comparison: force
412 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
414 de-stage1: force
415 -(cd stage1 ; mv -f * ..)
416 -rmdir stage1
418 de-stage2: force
419 -(cd stage2 ; mv -f * ..)
420 -rmdir stage2
422 de-stage3: force
423 -(cd stage3 ; mv -f * ..)
424 -rmdir stage3
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 ; \
432 done
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 && \
442 mv sedref_dvi.dvi $@
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 && \
451 mv sedref_pdf.pdf $@
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
460 $(ECHO_GEN)
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
486 # Updated atomically
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
492 # defined anyways).
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
505 gdb.ps: gdb.dvi
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
531 # in main sourcedir.
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' \
545 -e '/^@c /d' \
546 -e 's/{.*,,/{/' \
547 -e 's/@ / /g' \
548 -e 's/^@alphaenumerate/@enumerate/g' \
549 -e 's/^@end alphaenumerate/@end enumerate/g' \
550 $(srcdir)/gdb.texinfo | \
551 $(TEXI2ROFF) -me | \
552 sed -e 's/---/\\(em/g' \
553 >gdb.me
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' \
560 -e '/^@c /d' \
561 -e 's/{.*,,/{/' \
562 -e 's/@ / /g' \
563 -e 's/^@alphaenumerate/@enumerate/g' \
564 -e 's/^@end alphaenumerate/@end enumerate/g' \
565 $(srcdir)/gdb.texinfo | \
566 $(TEXI2ROFF) -ms | \
567 sed -e 's/---/\\(em/g' \
568 >gdb.ms
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' \
577 -e '/^@c /d' \
578 -e 's/{.*,,/{/' \
579 -e '/@noindent/d' \
580 -e 's/@ / /g' \
581 -e 's/^@alphaenumerate/@enumerate/g' \
582 -e 's/^@end alphaenumerate/@end enumerate/g' \
583 $(srcdir)/gdb.texinfo | \
584 $(TEXI2ROFF) -mm | \
585 sed -e 's/---/\\(em/g' \
586 >gdb.mm
588 # GDB MANUAL: HTML file
590 gdb/index.html: ${GDB_DOC_FILES}
591 $(ECHO_GEN) $(MAKEHTML) $(MAKEHTMLFLAGS) \
592 -o gdb \
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) \
603 -o stabs \
604 -I $(srcdir) \
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
612 stabs.ps: stabs.dvi
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) \
636 -o annotate \
637 -I $(srcdir) \
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
643 # .pod files.
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
667 force:
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,
676 mostlyclean:
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)
682 clean: mostlyclean
683 rm -f gdb-cfg.texi
685 distclean: clean
686 rm -f Makefile
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