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