* Rename remote-es1800.c to remote-es.c
[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 24infodir = $(prefix)/info
dc341d8b
RP
25
26SHELL = /bin/sh
27
570e1733
RP
28INSTALL = install -c
29INSTALL_PROGRAM = $(INSTALL)
30INSTALL_DATA = $(INSTALL)
31
1eb988b9 32# main GDB source directory
18fae2a8 33gdbdir = $(srcdir)/..
1eb988b9
RP
34
35# where to find texinfo; GDB dist should include a recent one
18fae2a8 36TEXIDIR=${gdbdir}/../texinfo
1eb988b9
RP
37
38# where to find makeinfo, preferably one designed for texinfo-2
39MAKEINFO=makeinfo
40
92b73793
RP
41# where to find texi2roff, ditto
42TEXI2ROFF=texi2roff
43
18fae2a8
RP
44# Where is the source dir for the READLINE library doc?
45# Traditionally readline is in .. or .
46READLINE_DIR = ${gdbdir}/../readline/doc
47
48SET_TEXINPUTS = TEXINPUTS=${TEXIDIR}:.:$(srcdir):$(READLINE_DIR):$$TEXINPUTS
49
1d7c3357
RP
50DOC_CONFIG = all
51
18fae2a8
RP
52# Don Knuth's TeX formatter
53TEX = tex
54
55# auxiliary program for sorting Texinfo indices
56TEXINDEX = texindex
1eb988b9
RP
57
58# Main GDB manual's source files
f930354a 59SFILES_INCLUDED = gdb-config.texi $(srcdir)/gdbinv-s.texi
18fae2a8
RP
60
61SFILES_LOCAL = $(srcdir)/gdb.texinfo GDBvn.texi $(SFILES_INCLUDED)
1eb988b9 62
18fae2a8
RP
63SFILES_DOC = $(SFILES_LOCAL) \
64 $(READLINE_DIR)/rluser.texinfo $(READLINE_DIR)/inc-hist.texi
92b73793 65
4f98572e
RP
66#### Host, target, and site specific Makefile fragments come in here.
67###
68
e92ee469
RP
69all install:
70
612dbd4c 71info: gdb.info gdbint.info stabs.info
6a962504 72dvi: gdb.dvi refcard.dvi gdbint.dvi
1041a570 73all-doc: gdb.info gdb.dvi refcard.dvi gdb-internals gdbint.dvi
dc341d8b 74
570e1733 75install-info: info
c973953a
ILT
76 -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
77 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
78 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
dc341d8b 79 for i in *.info* ; do \
570e1733 80 $(INSTALL_DATA) $$i $(infodir)/$$i ; \
dc341d8b 81 done
1eb988b9 82
18fae2a8 83STAGESTUFF = *.info* gdb-all.texi GDBvn.texi
332523bf
RP
84
85# Copy the object files from a particular stage into a subdirectory.
86stage1: force
87 -mkdir stage1
88 -mv $(STAGESTUFF) stage1
89
90stage2: force
91 -mkdir stage2
92 -mv $(STAGESTUFF) stage2
93
94stage3: force
95 -mkdir stage3
96 -mv $(STAGESTUFF) stage3
97
98against=stage2
99
100comparison: force
101 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
102
103de-stage1: force
570e1733
RP
104 -(cd stage1 ; mv -f * ..)
105 -rmdir stage1
332523bf
RP
106
107de-stage2: force
570e1733
RP
108 -(cd stage2 ; mv -f * ..)
109 -rmdir stage2
332523bf
RP
110
111de-stage3: force
570e1733
RP
112 -(cd stage3 ; mv -f * ..)
113 -rmdir stage3
332523bf 114
18fae2a8
RP
115clean-info:
116 rm -f gdb.info* gdbint.info* stabs.info*
117
118clean-dvi:
119 rm -f gdb.dvi refcard.dvi gdbint.dvi stabs.dvi psref.dvi
120
121mostlyclean: clean-info clean-dvi
122 rm -f gdb.?? gdb.??? gdb.mm gdb.ms gdb.me
123 rm -f links2roff
124 rm -f refcard.ps lrefcard.ps refcard.log psref.* *~
125 rm -f gdbint.?? gdbint.??? stabs.?? stabs.???
126
127clean: mostlyclean
128 rm -f GDBvn.texi rluser.texinfo inc-hist.texi
129
130distclean: clean
131 rm -f Makefile config.status
132
133realclean: distclean
134
1eb988b9
RP
135
136# GDB QUICK REFERENCE (TeX dvi file, CM fonts)
cacf5942 137refcard.dvi : $(srcdir)/refcard.tex
18fae2a8 138 $(SET_TEXINPUTS) $(TEX) refcard.tex; rm -f refcard.log
1eb988b9
RP
139 rm -f rcfonts.tex
140
141# GDB QUICK REFERENCE (PostScript output, common PS fonts)
228d9e54 142refcard.ps : $(srcdir)/refcard.tex $(srcdir)/psrc.sed
0d1cd01e 143 sed -f $(srcdir)/psrc.sed $(srcdir)/refcard.tex >psref.tex
18fae2a8 144 $(SET_TEXINPUTS) $(TEX) psref.tex
228d9e54 145 dvips -t landscape psref -o; mv psref.ps refcard.ps
7a694ae8 146 rm -f psref.dvi psref.log psref.tex
228d9e54
RP
147
148# GDB QUICK REFERENCE (PostScript output, common PS fonts w/long names)
149lrefcard.ps : $(srcdir)/refcard.tex $(srcdir)/lpsrc.sed
0d1cd01e 150 sed -f $(srcdir)/lpsrc.sed $(srcdir)/refcard.tex >psref.tex
18fae2a8 151 $(SET_TEXINPUTS) $(TEX) psref.tex
228d9e54 152 dvips -t landscape psref -o; mv psref.ps lrefcard.ps
7a694ae8 153 rm -f psref.dvi psref.log psref.tex
1eb988b9 154
1eb988b9 155# File to record current GDB version number (copied from main dir Makefile.in)
18fae2a8
RP
156GDBvn.texi : ${gdbdir}/Makefile.in
157 echo "@set GDBVN `sed <$(srcdir)/../Makefile.in -n 's/VERSION = //p'`" > ./GDBvn.texi
158
1d7c3357
RP
159# Choose configuration for GDB manual (normally `all'; normally not tied into
160# `configure' script because most users prefer generic version of manual,
161# not one for their binary config---which may not be specifically
162# defined anyways).
f930354a 163gdb-config.texi: ${srcdir}/${DOC_CONFIG}-config.texi
1d7c3357
RP
164 ln -s ${srcdir}/${DOC_CONFIG}-config.texi gdb-config.texi || \
165 ln ${srcdir}/${DOC_CONFIG}-config.texi gdb-config.texi || \
166 cp ${srcdir}/${DOC_CONFIG}-config.texi gdb-config.texi
167
18fae2a8
RP
168# GDB MANUAL: texinfo source, using @set/@clear/@value/@ifset/@ifclear
169# If your texinfo or makeinfo don't support these, get a new texinfo release
170#
171# The nonsense with GDBvn.texi gets this to run with both Sun and GNU make.
172# Note that we can *generate* GDBvn.texi, but since we distribute one in the
cacf5942
RP
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).
787c6bfe 176
1eb988b9 177# GDB MANUAL: TeX dvi file
18fae2a8
RP
178gdb.dvi: ${SFILES_DOC}
179 if [ ! -f ./GDBvn.texi ]; then \
180 ln -s $(srcdir)/GDBvn.texi . || \
181 ln $(srcdir)/GDBvn.texi . || \
182 cp $(srcdir)/GDBvn.texi . ; else true; fi
183 $(SET_TEXINPUTS) $(TEX) gdb.texinfo
184 $(SET_TEXINPUTS) $(TEX) gdb.texinfo
185 $(TEXINDEX) gdb.??
186 $(SET_TEXINPUTS) $(TEX) gdb.texinfo
187 rm -f gdb.?? gdb.log gdb.aux gdb.toc gdb.??s
1eb988b9
RP
188
189# GDB MANUAL: info file
190# We're using texinfo2, and older makeinfo's may not be able to
18fae2a8
RP
191# cope with all the markup.
192gdb.info: ${SFILES_DOC}
193 $(MAKEINFO) -I ${READLINE_DIR} -I $(srcdir) -o ./gdb.info gdb.texinfo
92b73793
RP
194
195# GDB MANUAL: roff translations
196# Try to use a recent texi2roff. v2 was put on prep in jan91.
197# If you want an index, see texi2roff doc for postprocessing
198# and add -i to texi2roff invocations below.
199# Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
cacf5942 200# corresponding -e lines when later texi2roff's are current)
92b73793
RP
201# + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
202# + @c's deleted explicitly because texi2roff sees texinfo commands in them
203# + @ (that's at-BLANK) not recognized by texi2roff, turned into blank
204# + @alphaenumerate is ridiculously new, turned into @enumerate
205
18fae2a8
RP
206# texi2roff doesn't have a notion of include dirs, so we have to fake
207# it out for gdb manual's include files---but only if not configured
208# in main sourcedir.
209links2roff: $(SFILES_INCLUDED)
1d7c3357 210 if [ ! -f gdb.texinfo ]; then \
18fae2a8
RP
211 ln -s $(SFILES_INCLUDED) . || \
212 ln $(SFILES_INCLUDED) . || \
213 cp $(SFILES_INCLUDED) . ; \
214 fi
215 touch links2roff
216
217# "Readline" appendices. Get them also due to lack of includes,
218# regardless of whether or not configuring in main sourcedir.
219# @ftable removed due to bug in texi2roff-2; if your texi2roff
220# is newer, try just ln or cp
221rluser.texinfo: ${READLINE_DIR}/rluser.texinfo
222 sed -e 's/^@ftable/@table/g' \
5f92dab8 223 -e 's/^@end ftable/@end table/g' \
18fae2a8
RP
224 ${READLINE_DIR}/rluser.texinfo > ./rluser.texinfo
225
226inc-hist.texi: ${READLINE_DIR}/inc-hist.texi
227 ln -s ${READLINE_DIR}/inc-hist.texi . || \
228 ln ${READLINE_DIR}/inc-hist.texi . || \
229 cp ${READLINE_DIR}/inc-hist.texi .
230
231# gdb manual suitable for [gtn]roff -me
232gdb.me: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texi
92b73793
RP
233 sed -e '/\\input texinfo/d' \
234 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
235 -e '/^@ifinfo/,/^@end ifinfo/d' \
50a39795 236 -e '/^@c /d' \
92b73793 237 -e 's/{.*,,/{/' \
92b73793
RP
238 -e 's/@ / /g' \
239 -e 's/^@alphaenumerate/@enumerate/g' \
240 -e 's/^@end alphaenumerate/@end enumerate/g' \
18fae2a8
RP
241 $(srcdir)/gdb.texinfo | \
242 $(TEXI2ROFF) -me | \
92b73793 243 sed -e 's/---/\\(em/g' \
18fae2a8 244 >gdb.me
92b73793 245
18fae2a8
RP
246# gdb manual suitable for [gtn]roff -ms
247gdb.ms: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texi
92b73793
RP
248 sed -e '/\\input texinfo/d' \
249 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
250 -e '/^@ifinfo/,/^@end ifinfo/d' \
50a39795 251 -e '/^@c /d' \
92b73793
RP
252 -e 's/{.*,,/{/' \
253 -e 's/@ / /g' \
254 -e 's/^@alphaenumerate/@enumerate/g' \
255 -e 's/^@end alphaenumerate/@end enumerate/g' \
18fae2a8
RP
256 $(srcdir)/gdb.texinfo | \
257 $(TEXI2ROFF) -ms | \
92b73793 258 sed -e 's/---/\\(em/g' \
18fae2a8 259 >gdb.ms
92b73793 260
18fae2a8
RP
261# gdb manual suitable for [tn]roff -mm
262# '@noindent's removed due to texi2roff-2 mm bug; if yours is newer,
263# try leaving them in
264gdb.mm: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texi
92b73793
RP
265 sed -e '/\\input texinfo/d' \
266 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
267 -e '/^@ifinfo/,/^@end ifinfo/d' \
50a39795 268 -e '/^@c /d' \
92b73793 269 -e 's/{.*,,/{/' \
18fae2a8 270 -e '/@noindent/d' \
92b73793
RP
271 -e 's/@ / /g' \
272 -e 's/^@alphaenumerate/@enumerate/g' \
273 -e 's/^@end alphaenumerate/@end enumerate/g' \
18fae2a8
RP
274 $(srcdir)/gdb.texinfo | \
275 $(TEXI2ROFF) -mm | \
92b73793 276 sed -e 's/---/\\(em/g' \
18fae2a8 277 >gdb.mm
1eb988b9
RP
278
279# GDB INTERNALS MANUAL: TeX dvi file
280gdbint.dvi : gdbint.texinfo
18fae2a8
RP
281 $(SET_TEXINPUTS) $(TEX) gdbint.texinfo
282 $(TEXINDEX) gdbint.??
283 $(SET_TEXINPUTS) $(TEX) gdbint.texinfo
1eb988b9
RP
284 rm -f gdbint.?? gdbint.aux gdbint.cps gdbint.fns gdbint.kys \
285 gdbint.log gdbint.pgs gdbint.toc gdbint.tps gdbint.vrs
286
287# GDB INTERNALS MANUAL: info file
dc341d8b 288gdb-internals: gdbint.info
1eb988b9 289
dc341d8b
RP
290gdbint.info: gdbint.texinfo
291 $(MAKEINFO) -o gdbint.info $(srcdir)/gdbint.texinfo
1eb988b9 292
e505224d
PB
293stabs.info: stabs.texinfo
294 $(MAKEINFO) -o stabs.info $(srcdir)/stabs.texinfo
295
612dbd4c
JG
296# STABS DOCUMENTATION: TeX dvi file
297stabs.dvi : stabs.texinfo
18fae2a8
RP
298 $(SET_TEXINPUTS) $(TEX) stabs.texinfo
299 $(TEXINDEX) stabs.??
300 $(SET_TEXINPUTS) $(TEX) stabs.texinfo
612dbd4c
JG
301 rm -f stabs.?? stabs.aux stabs.cps stabs.fns stabs.kys \
302 stabs.log stabs.pgs stabs.toc stabs.tps stabs.vrs
303
304stabs.ps: stabs.dvi
305 dvips -o stabs.ps stabs
306
dc341d8b 307force:
1eb988b9 308
dc341d8b
RP
309Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
310 $(SHELL) ./config.status
This page took 0.087452 seconds and 4 git commands to generate.