]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame_incremental - gdb/doc/Makefile.in
strip: Don't check target_defaulted in input BFD
[thirdparty/binutils-gdb.git] / gdb / doc / Makefile.in
... / ...
CommitLineData
1##Copyright (C) 1991-2025 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
19srcdir = @srcdir@
20VPATH = @srcdir@
21
22prefix = @prefix@
23
24infodir = @infodir@
25datarootdir = @datarootdir@
26docdir = @docdir@
27dvidir = @dvidir@
28pdfdir = @pdfdir@
29htmldir = @htmldir@
30mandir = @mandir@
31man1dir = $(mandir)/man1
32man5dir = $(mandir)/man5
33
34transform = @program_transform_name@
35
36include $(srcdir)/../silent-rules.mk
37
38SHELL = @SHELL@
39
40LN_S = @LN_S@
41
42INSTALL = @INSTALL@
43INSTALL_PROGRAM = @INSTALL_PROGRAM@
44INSTALL_DATA = @INSTALL_DATA@
45
46SYSTEM_GDBINIT = @SYSTEM_GDBINIT@
47SYSTEM_GDBINIT_DIR = @SYSTEM_GDBINIT_DIR@
48
49mkinstalldirs = $(SHELL) $(srcdir)/../../mkinstalldirs
50
51# main GDB source directory
52gdbdir = $(srcdir)/..
53
54# where to find texinfo; GDB dist should include a recent one
55TEXIDIR=${gdbdir}/../texinfo
56
57# where to find makeinfo, preferably one designed for texinfo-2
58MAKEINFO = @MAKEINFO@
59MAKEINFOFLAGS = @MAKEINFOFLAGS@
60MAKEINFO_EXTRA_FLAGS = @MAKEINFO_EXTRA_FLAGS@
61MAKEINFO_CMD = $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS)
62
63MAKEHTML = $(MAKEINFO_CMD) --html
64MAKEHTMLFLAGS =
65
66# where to find texi2roff, ditto
67TEXI2ROFF=texi2roff
68
69# Where to find texi2dvi. The use of --build and --build-dir options
70# mean that at least texinfo 4.9 is required.
71TEXI2DVI=texi2dvi
72TEXI2DVI_TMPDIR=texi2dvi_tmpdir
73TEXI2DVI_CMD = rm -fr $(TEXI2DVI_TMPDIR)/$(subst .,_,$@) \
74 && mkdir -p $(TEXI2DVI_TMPDIR)/$(subst .,_,$@) \
75 && $(TEXI2DVI) --build=tidy \
76 --build-dir=$(TEXI2DVI_TMPDIR)/$(subst .,_,$@)
77
78# Package to install the docs under
79PACKAGE = @PACKAGE@
80
81# Package version and bug-reporting URL.
82PKGVERSION = @PKGVERSION@
83BUGURL_TEXI = @REPORT_BUGS_TEXI@
84
85# Where is the source dir for the READLINE library doc?
86# Traditionally readline is in .. or .
87READLINE_DIR = ${gdbdir}/../readline/readline/doc
88READLINE_TEXI_INCFLAG = @READLINE_TEXI_INCFLAG@
89
90# The GDB/MI docs come from a sibling directory ../mi
91GDBMI_DIR = ${gdbdir}/mi
92
93SET_TEXINPUTS = \
94 TEXINPUTS=${TEXIDIR}:.:$(srcdir):$(READLINE_DIR):$(GDBMI_DIR):$$TEXINPUTS
95
96# Files which should be generated via 'info' and installed by 'install-info'
97INFO_DEPS = gdb.info stabs.info annotate.info
98
99# Files which should be generated via 'dvi' and installed by 'install-dvi'
100DVIFILES = gdb.dvi stabs.dvi refcard.dvi annotate.dvi
101# Files which should be generated via 'pdf' and installed by 'install-pdf'
102PDFFILES = gdb.pdf stabs.pdf refcard.pdf annotate.pdf
103# Files which should be generated via 'html' and installed by 'install-html'
104HTMLFILES = gdb/index.html stabs/index.html annotate/index.html
105HTMLFILES_INSTALL = gdb stabs annotate
106
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.
111DOC_CONFIG = all
112
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:
126REFEDITS =
127
128# Don Knuth's TeX formatter
129TEX = tex
130PDFTEX = pdftex
131
132# Program to generate Postscript files from DVI files.
133DVIPS = dvips
134
135# Readline includes.
136READLINE_SYSTEM_DOC_INCLUDES =
137READLINE_INTREE_DOC_INCLUDES = $(READLINE_DIR)/rluser.texi $(READLINE_DIR)/hsuser.texi
138READLINE_DOC_SOURCE_INCLUDES = @READLINE_DOC_SOURCE_INCLUDES@
139
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.
144GDB_DOC_SOURCE_INCLUDES = \
145 $(srcdir)/fdl.texi \
146 $(srcdir)/gpl.texi \
147 $(srcdir)/agentexpr.texi \
148 $(READLINE_DOC_SOURCE_INCLUDES)
149GDB_DOC_BUILD_INCLUDES = \
150 gdb-cfg.texi \
151 GDBvn.texi
152GDB_DOC_FILES = \
153 $(srcdir)/gdb.texinfo \
154 $(srcdir)/guile.texi \
155 $(srcdir)/python.texi \
156 $(GDB_DOC_SOURCE_INCLUDES) \
157 $(GDB_DOC_BUILD_INCLUDES)
158
159# Stabs manual: All files
160STABS_DOC_SOURCE_INCLUDES = \
161 $(srcdir)/fdl.texi
162STABS_DOC_BUILD_INCLUDES = \
163 gdb-cfg.texi \
164 GDBvn.texi
165STABS_DOC_FILES = \
166 $(srcdir)/stabs.texinfo \
167 $(STABS_DOC_SOURCE_INCLUDES) \
168 $(STABS_DOC_BUILD_INCLUDES)
169
170# Annotate migration document
171ANNOTATE_DOC_SOURCE_INCLUDES = \
172 $(srcdir)/fdl.texi
173ANNOTATE_DOC_BUILD_INCLUDES = \
174 gdb-cfg.texi \
175 GDBvn.texi
176ANNOTATE_DOC_FILES = \
177 $(srcdir)/annotate.texinfo \
178 $(ANNOTATE_DOC_SOURCE_INCLUDES) \
179 $(ANNOTATE_DOC_BUILD_INCLUDES)
180
181# Options to extract the man page from gdb.texinfo
182MANCONF = -Dman
183
184TEXI2POD = perl $(srcdir)/../../etc/texi2pod.pl \
185 $(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS) -I $(srcdir)
186
187
188POD2MAN = pod2man --center="GNU Development Tools"
189
190# List of man pages generated from gdb.texi
191MAN1S = gdb.1 gdbserver.1 gcore.1 gstack.1 gdb-add-index.1
192MAN5S = gdbinit.5
193MANS = $(MAN1S) $(MAN5S)
194
195# The pod files that are generated as a side effect of creating the
196# man pages.
197POD_FILE_TMPS = $(patsubst %.1,%.pod,$(MAN1S)) \
198 $(patsubst %.5,%.pod,$(MAN5S))
199
200HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@
201HAVE_NATIVE_GCORE_HOST = @HAVE_NATIVE_GCORE_HOST@
202HAVE_GSTACK = @HAVE_GSTACK@
203
204###
205
206all: info
207
208info: $(INFO_DEPS)
209dvi: $(DVIFILES)
210ps: gdb.ps stabs.ps refcard.ps annotate.ps
211html: $(HTMLFILES)
212pdf: $(PDFFILES)
213man: $(MANS)
214
215DOXYGEN = doxygen
216doxyedit = sed -e 's,@srcdir\@,$(srcdir),g'
217
218doxy: doxy/index.html \
219 doxy/gdb-api/index.html \
220 doxy/gdb-xref/index.html \
221 doxy/gdbserver/index.html
222
223doxy/index.html: $(srcdir)/doxy-index.in
224 -mkdir -p doxy
225 cp $(srcdir)/doxy-index.in doxy/index.html
226
227doxy/gdb-api/index.html: Doxyfile-gdb-api Doxyfile-base
228 -mkdir -p doxy
229 $(DOXYGEN) Doxyfile-gdb-api
230
231doxy/gdb-xref/index.html: Doxyfile-gdb-xref Doxyfile-base
232 -mkdir -p doxy
233 $(DOXYGEN) Doxyfile-gdb-xref
234
235doxy/gdbserver/index.html: Doxyfile-gdbserver Doxyfile-base
236 -mkdir -p doxy
237 $(DOXYGEN) Doxyfile-gdbserver
238
239Doxyfile-base: $(srcdir)/Doxyfile-base.in
240 $(doxyedit) $(srcdir)/Doxyfile-base.in >Doxyfile-base
241
242Doxyfile-gdb-api: $(srcdir)/Doxyfile-gdb-api.in
243 $(doxyedit) $(srcdir)/Doxyfile-gdb-api.in >Doxyfile-gdb-api
244
245Doxyfile-gdb-xref: $(srcdir)/Doxyfile-gdb-xref.in
246 $(doxyedit) $(srcdir)/Doxyfile-gdb-xref.in >Doxyfile-gdb-xref
247
248Doxyfile-gdbserver: $(srcdir)/Doxyfile-gdbserver.in
249 $(doxyedit) $(srcdir)/Doxyfile-gdbserver.in >Doxyfile-gdbserver
250
251all-doc: info man dvi ps pdf html
252diststuff: info man
253
254install-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
274
275uninstall-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
290
291html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
292
293install-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
309
310dvi__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
311
312install-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
321
322pdf__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
323
324install-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
333
334install-man: install-man1 install-man5
335
336install-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
352
353install-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
361
362uninstall-man: uninstall-man1 uninstall-man5
363
364uninstall-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; }
383
384uninstall-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; }
393
394STAGESTUFF = *.info* gdb-all.texi GDBvn.texi *.ps *.dvi *.pdf *.1 *.5
395
396# Copy the object files from a particular stage into a subdirectory.
397stage1: force
398 -mkdir stage1
399 -mv $(STAGESTUFF) stage1
400
401stage2: force
402 -mkdir stage2
403 -mv $(STAGESTUFF) stage2
404
405stage3: force
406 -mkdir stage3
407 -mv $(STAGESTUFF) stage3
408
409against=stage2
410
411comparison: force
412 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
413
414de-stage1: force
415 -(cd stage1 ; mv -f * ..)
416 -rmdir stage1
417
418de-stage2: force
419 -(cd stage2 ; mv -f * ..)
420 -rmdir stage2
421
422de-stage3: force
423 -(cd stage3 ; mv -f * ..)
424 -rmdir stage3
425
426
427sedref.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
435
436
437# GDB QUICK REFERENCE (dvi output)
438refcard.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 $@
443
444refcard.ps : refcard.dvi
445 $(ECHO_DVIPS) $(DVIPS) $(SILENT_Q_FLAG) -t landscape -o $@ $?
446
447refcard.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 $@
452
453# File to record current GDB version number.
454#
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.
459GDBvn.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; \
464 fi
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; \
468 fi
469 $(SILENCE) if test -z "$(READLINE_TEXI_INCFLAG)"; then \
470 echo "@set SYSTEM_READLINE" >> ./GDBvn.new; \
471 fi
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; \
475 fi
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; \
479 fi
480 $(SILENCE) mv GDBvn.new GDBvn.texi
481
482version.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
485
486# Updated atomically
487.PRECIOUS: GDBvn.texi
488
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).
493gdb-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
498
499# GDB MANUAL: TeX dvi file
500gdb.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
504
505gdb.ps: gdb.dvi
506 $(ECHO_DVIPS) $(DVIPS) $(SILENT_Q_FLAG) -o $@ $?
507
508gdb.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
512
513# GDB MANUAL: info file
514gdb.info: ${GDB_DOC_FILES}
515 $(ECHO_MAKEINFO) $(MAKEINFO_CMD) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) \
516 -o gdb.info $(srcdir)/gdb.texinfo
517
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
528
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.
532links2roff: $(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) . ; \
537 fi
538 $(SILENCE) touch links2roff
539
540# gdb manual suitable for [gtn]roff -me
541gdb.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
554
555# gdb manual suitable for [gtn]roff -ms
556gdb.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
569
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
573gdb.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
587
588# GDB MANUAL: HTML file
589
590gdb/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
595
596stabs.info: $(STABS_DOC_FILES)
597 $(ECHO_MAKEINFO) $(MAKEINFO_CMD) -I $(srcdir) -o stabs.info $(srcdir)/stabs.texinfo
598
599# STABS DOCUMENTATION: HTML file
600
601stabs/index.html: $(STABS_DOC_FILES)
602 $(ECHO_GEN) $(MAKEHTML) $(MAKEHTMLFLAGS) \
603 -o stabs \
604 -I $(srcdir) \
605 $(srcdir)/stabs.texinfo
606
607# STABS DOCUMENTATION: TeX dvi file
608stabs.dvi : $(STABS_DOC_FILES)
609 $(ECHO_TEXI2DVI) $(TEXI2DVI_CMD) $(SILENT_Q_FLAG) -I $(srcdir) \
610 $(srcdir)/stabs.texinfo
611
612stabs.ps: stabs.dvi
613 $(ECHO_DVIPS) $(DVIPS) $(SILENT_Q_FLAG) -o $@ $?
614
615stabs.pdf: $(STABS_DOC_FILES)
616 $(ECHO_TEXI2DVI) $(TEXI2DVI_CMD) $(SILENT_Q_FLAG) --pdf -I $(srcdir) \
617 $(srcdir)/stabs.texinfo
618
619# ANNOTATE DOCUMENTATION: TeX dvi file
620annotate.dvi : $(ANNOTATE_DOC_FILES)
621 $(ECHO_TEXI2DVI) $(TEXI2DVI_CMD) $(SILENT_Q_FLAG) -I $(srcdir) \
622 $(srcdir)/annotate.texinfo
623
624annotate.ps: annotate.dvi
625 $(ECHO_DVIPS) $(DVIPS) $(SILENT_Q_FLAG) -o $@ $?
626
627annotate.pdf: $(ANNOTATE_DOC_FILES)
628 $(ECHO_TEXI2DVI) $(TEXI2DVI_CMD) $(SILENT_Q_FLAG) --pdf -I $(srcdir) \
629 $(srcdir)/annotate.texinfo
630
631annotate.info: $(ANNOTATE_DOC_FILES)
632 $(ECHO_MAKEINFO) $(MAKEINFO_CMD) -I $(srcdir) -o annotate.info $(srcdir)/annotate.texinfo
633
634annotate/index.html: $(ANNOTATE_DOC_FILES)
635 $(ECHO_MAKEHTML) $(MAKEHTML) $(MAKEHTMLFLAGS) \
636 -o annotate \
637 -I $(srcdir) \
638 $(srcdir)/annotate.texinfo
639
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.
644#
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.
648#
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.
653#
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
666
667force:
668
669Makefile: Makefile.in $(host_makefile_frag) ../config.status
670 $(ECHO_GEN) cd .. && $(SHELL) ./config.status $(SILENT_FLAG) doc/Makefile
671
672
673# The "least clean" level of cleaning. Get rid of files which are
674# automatically generated files that are just intermediate files,
675
676mostlyclean:
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)
681
682clean: mostlyclean
683 rm -f gdb-cfg.texi
684
685distclean: clean
686 rm -f Makefile
687
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.
691
692maintainer-clean realclean: distclean
693 rm -f GDBvn.texi version.subst *.info* *.dvi *.ps *.html *.pdf $(MANS)
694
695install: install-info install-man
696
697uninstall: uninstall-info uninstall-man
698
699# Disable implicit make rules.
700include $(srcdir)/../disable-implicit-rules.mk