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