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