include ansidecl.h
[deliverable/binutils-gdb.git] / gdb / doc / Makefile.in
CommitLineData
1eb988b9
RP
1##Copyright (C) 1991 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 2 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, write to the Free Software
18# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
dc341d8b
RP
20srcdir = .
21
570e1733
RP
22prefix = /usr/local
23
24bindir = $(prefix)/bin
25datadir = $(prefix)/lib
26libdir = $(prefix)/lib
27mandir = $(datadir)/man
28man1dir = $(mandir)/man1
29man2dir = $(mandir)/man2
30man3dir = $(mandir)/man3
31man4dir = $(mandir)/man4
32man5dir = $(mandir)/man5
33man6dir = $(mandir)/man6
34man7dir = $(mandir)/man7
35man8dir = $(mandir)/man8
36man9dir = $(mandir)/man9
c466cfab 37infodir = $(datadir)/info
570e1733
RP
38includedir = $(prefix)/include
39docdir = $(datadir)/doc
dc341d8b
RP
40
41SHELL = /bin/sh
42
570e1733
RP
43INSTALL = install -c
44INSTALL_PROGRAM = $(INSTALL)
45INSTALL_DATA = $(INSTALL)
46
47AR = ar
48AR_FLAGS = qv
49BISON = bison
50RANLIB = ranlib
51
52#### Host, target, and site specific Makefile fragments come in here.
53###
1eb988b9 54# main GDB source directory
dc341d8b 55gdbdir = ..
1eb988b9
RP
56
57# Documentation (gdb.dvi) needs either GNU m4 or SysV m4;
58# Berkeley/Sun don't have quite enough.
59#M4=/usr/5bin/m4
60M4=gm4
61
62# where to find texinfo; GDB dist should include a recent one
e92ee469 63TEXIDIR=$(srcdir)/${gdbdir}/../texinfo/fsf
1eb988b9
RP
64
65# where to find makeinfo, preferably one designed for texinfo-2
66MAKEINFO=makeinfo
67
92b73793
RP
68# where to find texi2roff, ditto
69TEXI2ROFF=texi2roff
70
1eb988b9
RP
71# Where is the source dir for the READLINE library? Traditionally in .. or .
72# (For the binary library built from it, we use ${READLINE_DIR}${subdir}.)
e92ee469 73READLINE_DIR = $(srcdir)/${gdbdir}/../readline
1eb988b9
RP
74
75# Main GDB manual's source files
76SFILES_DOCDIR = \
e92ee469 77 $(srcdir)/gdb.texinfo $(srcdir)/pretex.m4 $(srcdir)/none.m4 \
919de9a1 78 $(srcdir)/all.m4 gdbinv-m.m4 gdbinv-s.m4 gdbVN.m4
1eb988b9 79
92b73793
RP
80# Which version of GDB manual? default includes everything
81CONFIG=all
82
e92ee469
RP
83all install:
84
570e1733 85info: gdb.info gdbint.info
1041a570 86all-doc: gdb.info gdb.dvi refcard.dvi gdb-internals gdbint.dvi
570e1733
RP
87clean-info:
88 -rm -f *.info*
dc341d8b 89
570e1733 90install-info: info
dc341d8b 91 for i in *.info* ; do \
570e1733 92 $(INSTALL_DATA) $$i $(infodir)/$$i ; \
dc341d8b 93 done
1eb988b9 94
332523bf
RP
95STAGESTUFF = *.info* gdb-all.texi gdbVN.m4
96
97# Copy the object files from a particular stage into a subdirectory.
98stage1: force
99 -mkdir stage1
100 -mv $(STAGESTUFF) stage1
101
102stage2: force
103 -mkdir stage2
104 -mv $(STAGESTUFF) stage2
105
106stage3: force
107 -mkdir stage3
108 -mv $(STAGESTUFF) stage3
109
110against=stage2
111
112comparison: force
113 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
114
115de-stage1: force
570e1733
RP
116 -(cd stage1 ; mv -f * ..)
117 -rmdir stage1
332523bf
RP
118
119de-stage2: force
570e1733
RP
120 -(cd stage2 ; mv -f * ..)
121 -rmdir stage2
332523bf
RP
122
123de-stage3: force
570e1733
RP
124 -(cd stage3 ; mv -f * ..)
125 -rmdir stage3
332523bf 126
1eb988b9 127clean:
cacf5942 128 rm -f gdb.dvi rluser.texinfo inc-hist.texi gdb-all* gdb.info* gdbVN.m4
dc341d8b 129 rm -f gdb-internals gdbint.?? gdbint.??? gdbint.info
228d9e54 130 rm -f refcard.ps refcard.dvi refcard.log *~
1eb988b9
RP
131
132# GDB QUICK REFERENCE (TeX dvi file, CM fonts)
cacf5942 133refcard.dvi : $(srcdir)/refcard.tex
cacf5942 134 TEXINPUTS=$(srcdir):.:$$TEXINPUTS tex refcard.tex; rm -f refcard.log
1eb988b9
RP
135 rm -f rcfonts.tex
136
137# GDB QUICK REFERENCE (PostScript output, common PS fonts)
228d9e54
RP
138refcard.ps : $(srcdir)/refcard.tex $(srcdir)/psrc.sed
139 sed -f $(srcdir)/psrc.sed refcard.tex >psref.tex
140 TEXINPUTS=$(srcdir):.:$$TEXINPUTS tex psref.tex
141 dvips -t landscape psref -o; mv psref.ps refcard.ps
142 rm -f psref.dvi psref.log
143
144# GDB QUICK REFERENCE (PostScript output, common PS fonts w/long names)
145lrefcard.ps : $(srcdir)/refcard.tex $(srcdir)/lpsrc.sed
146 sed -f $(srcdir)/lpsrc.sed refcard.tex >psref.tex
147 TEXINPUTS=$(srcdir):.:$$TEXINPUTS tex psref.tex
148 dvips -t landscape psref -o; mv psref.ps lrefcard.ps
149 rm -f psref.dvi psref.log
1eb988b9 150
cacf5942
RP
151# "Readline" appendices. Get them here so both TeX and texi2roff can find.
152rluser.texinfo: ${READLINE_DIR}/doc/rluser.texinfo
a9b4626a
RP
153 ln -s ${READLINE_DIR}/doc/rluser.texinfo . || \
154 ln ${READLINE_DIR}/doc/rluser.texinfo . || \
155 cp ${READLINE_DIR}/doc/rluser.texinfo .
cacf5942
RP
156
157inc-hist.texi: ${READLINE_DIR}/doc/inc-hist.texi
a9b4626a
RP
158 ln -s ${READLINE_DIR}/doc/inc-hist.texi . || \
159 ln ${READLINE_DIR}/doc/inc-hist.texi . || \
160 cp ${READLINE_DIR}/doc/inc-hist.texi .
1eb988b9
RP
161
162# File to record current GDB version number (copied from main dir Makefile.in)
cacf5942 163gdbVN.m4 : $(srcdir)/${gdbdir}/Makefile.in
a9b4626a 164 echo "_define__(<_GDB_VN__>,`sed <$(srcdir)/../Makefile.in -n 's/VERSION = //p'`)" > ./gdbVN.m4
1eb988b9
RP
165
166# GDB MANUAL: texinfo source, created by preprocessing w/m4
92b73793
RP
167# If you want other configs in the makefile, add or modify instructions for
168# building source here, then change CONFIG (that way you get info, dvi,
169# roff targets automatically for your config).
1eb988b9 170# Be sure to not create a bad gdb-all.texi if ${M4} is missing or aborts...
cacf5942
RP
171# The nonsense with gdbVN.m4 is to get this to run with both Sun and GNU make.
172# Note that we can *generate* gdbVN.m4, but since we distribute one in the
173# source directory for the benefit of people who *don't* use this makefile,
174# VPATH will often tell make not to bother building it, because the one
175# in the srcdir is up to date. (if not, then make should build one here).
1eb988b9 176gdb-all.texi: ${SFILES_DOCDIR}
cacf5942
RP
177 if [ ! -f ./gdbVN.m4 ]; then \
178 ln -s $(srcdir)/gdbVN.m4 . || \
179 ln $(srcdir)/gdbVN.m4 . || \
ae28e399 180 cp $(srcdir)/gdbVN.m4 . ; else true; fi
1eb988b9 181 rm -f foobus.texinfo
cacf5942
RP
182 ${M4} $(srcdir)/pretex.m4 $(srcdir)/none.m4 $(srcdir)/all.m4 \
183 gdbVN.m4 $(srcdir)/gdb.texinfo >foobus.texinfo
1eb988b9 184 rm -f gdb-all.texi
a9b4626a 185 mv foobus.texinfo ./gdb-all.texi
1eb988b9
RP
186
187# GDB MANUAL: TeX dvi file
cacf5942
RP
188gdb.dvi : gdb-${CONFIG}.texi rluser.texinfo inc-hist.texi
189 TEXINPUTS=${TEXIDIR}:.:$(srcdir):$$TEXINPUTS tex gdb-${CONFIG}.texi
92b73793 190 texindex gdb-${CONFIG}.??
cacf5942 191 TEXINPUTS=${TEXIDIR}:.:$(srcdir):$$TEXINPUTS tex gdb-${CONFIG}.texi
a9b4626a 192 mv gdb-${CONFIG}.dvi ./gdb.dvi
92b73793 193 rm -f gdb-${CONFIG}.?? gdb-${CONFIG}.???
1eb988b9
RP
194
195# GDB MANUAL: info file
196# We're using texinfo2, and older makeinfo's may not be able to
197# cope with all the markup. In the meantime, we distribute the info
198# files
92b73793 199gdb.info: gdb-${CONFIG}.texi
a9b4626a 200 $(MAKEINFO) -o ./gdb.info gdb-${CONFIG}.texi
92b73793
RP
201
202# GDB MANUAL: roff translations
203# Try to use a recent texi2roff. v2 was put on prep in jan91.
204# If you want an index, see texi2roff doc for postprocessing
205# and add -i to texi2roff invocations below.
206# Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
cacf5942 207# corresponding -e lines when later texi2roff's are current)
92b73793
RP
208# + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
209# + @c's deleted explicitly because texi2roff sees texinfo commands in them
210# + @ (that's at-BLANK) not recognized by texi2roff, turned into blank
211# + @alphaenumerate is ridiculously new, turned into @enumerate
212
213
214# gdb manual suitable for [tn]roff -mm
215# '@noindent's removed due to texi2roff-2 mm bug; if yours is newer,
216# try leaving them in
5f92dab8
RP
217# ditto special treatment of @ftable in rluser.texinfo
218gdb.mm: gdb-${CONFIG}.texi ${READLINE_DIR}/doc/rluser.texinfo inc-hist.texi
a9b4626a 219 rm -f ./rluser.texinfo
5f92dab8
RP
220 sed -e 's/^@ftable/@table/g' \
221 -e 's/^@end ftable/@end table/g' \
a9b4626a 222 ${READLINE_DIR}/doc/rluser.texinfo > ./rluser.texinfo
92b73793
RP
223 sed -e '/\\input texinfo/d' \
224 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
225 -e '/^@ifinfo/,/^@end ifinfo/d' \
226 -e '/^@c/d' \
227 -e 's/{.*,,/{/' \
228 -e '/@noindent/d' \
229 -e 's/@ / /g' \
230 -e 's/^@alphaenumerate/@enumerate/g' \
231 -e 's/^@end alphaenumerate/@end enumerate/g' \
232 gdb-${CONFIG}.texi | \
233 $(TEXI2ROFF) -mm | \
234 sed -e 's/---/\\(em/g' \
235 >gdb.mm
a9b4626a 236 rm ./rluser.texinfo
92b73793
RP
237
238# gdb manual suitable for [gtn]roff -me
5f92dab8 239gdb.me: gdb-${CONFIG}.texi ${READLINE_DIR}/doc/rluser.texinfo inc-hist.texi
a9b4626a 240 rm -f ./rluser.texinfo
5f92dab8
RP
241 sed -e 's/^@ftable/@table/g' \
242 -e 's/^@end ftable/@end table/g' \
a9b4626a 243 ${READLINE_DIR}/doc/rluser.texinfo > ./rluser.texinfo
92b73793
RP
244 sed -e '/\\input texinfo/d' \
245 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
246 -e '/^@ifinfo/,/^@end ifinfo/d' \
247 -e '/^@c/d' \
248 -e 's/{.*,,/{/' \
249 -e 's/@ / /g' \
250 -e 's/^@alphaenumerate/@enumerate/g' \
251 -e 's/^@end alphaenumerate/@end enumerate/g' \
252 gdb-${CONFIG}.texi | \
253 $(TEXI2ROFF) -me | \
254 sed -e 's/---/\\(em/g' \
255 >gdb.me
a9b4626a 256 rm ./rluser.texinfo
92b73793
RP
257
258# gdb manual suitable for [gtn]roff -ms
5f92dab8 259gdb.ms: gdb-${CONFIG}.texi ${READLINE_DIR}/doc/rluser.texinfo inc-hist.texi
a9b4626a 260 rm -f ./rluser.texinfo
5f92dab8
RP
261 sed -e 's/^@ftable/@table/g' \
262 -e 's/^@end ftable/@end table/g' \
a9b4626a 263 ${READLINE_DIR}/doc/rluser.texinfo > ./rluser.texinfo
92b73793
RP
264 sed -e '/\\input texinfo/d' \
265 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
266 -e '/^@ifinfo/,/^@end ifinfo/d' \
267 -e '/^@c/d' \
268 -e 's/{.*,,/{/' \
269 -e 's/@ / /g' \
270 -e 's/^@alphaenumerate/@enumerate/g' \
271 -e 's/^@end alphaenumerate/@end enumerate/g' \
272 gdb-${CONFIG}.texi | \
273 $(TEXI2ROFF) -ms | \
274 sed -e 's/---/\\(em/g' \
275 >gdb.ms
a9b4626a 276 rm ./rluser.texinfo
1eb988b9
RP
277
278# GDB INTERNALS MANUAL: TeX dvi file
279gdbint.dvi : gdbint.texinfo
a9b4626a 280 TEXINPUTS=${TEXIDIR}:.:$(srcdir):$$TEXINPUTS tex gdbint.texinfo
1eb988b9 281 texindex gdbint.??
a9b4626a 282 TEXINPUTS=${TEXIDIR}:.:$(srcdir):$$TEXINPUTS tex gdbint.texinfo
1eb988b9
RP
283 rm -f gdbint.?? gdbint.aux gdbint.cps gdbint.fns gdbint.kys \
284 gdbint.log gdbint.pgs gdbint.toc gdbint.tps gdbint.vrs
285
286# GDB INTERNALS MANUAL: info file
dc341d8b 287gdb-internals: gdbint.info
1eb988b9 288
dc341d8b
RP
289gdbint.info: gdbint.texinfo
290 $(MAKEINFO) -o gdbint.info $(srcdir)/gdbint.texinfo
1eb988b9 291
dc341d8b 292force:
1eb988b9 293
dc341d8b
RP
294Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
295 $(SHELL) ./config.status
This page took 0.045912 seconds and 4 git commands to generate.