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