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