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