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