]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/doc/Makefile.in
Fri Dec 6 23:57:34 1991 K. Richard Pixley (rich at rtl.cygnus.com)
[thirdparty/binutils-gdb.git] / gdb / doc / Makefile.in
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
20 srcdir = .
21
22 prefix = /usr/local
23
24 bindir = $(prefix)/bin
25 datadir = $(prefix)/lib
26 libdir = $(prefix)/lib
27 mandir = $(datadir)/man
28 man1dir = $(mandir)/man1
29 man2dir = $(mandir)/man2
30 man3dir = $(mandir)/man3
31 man4dir = $(mandir)/man4
32 man5dir = $(mandir)/man5
33 man6dir = $(mandir)/man6
34 man7dir = $(mandir)/man7
35 man8dir = $(mandir)/man8
36 man9dir = $(mandir)/man9
37 infodir = $(prefix)/info
38 includedir = $(prefix)/include
39 docdir = $(datadir)/doc
40
41 SHELL = /bin/sh
42
43 INSTALL = install -c
44 INSTALL_PROGRAM = $(INSTALL)
45 INSTALL_DATA = $(INSTALL)
46
47 AR = ar
48 AR_FLAGS = qv
49 BISON = bison
50 RANLIB = ranlib
51
52 #### Host, target, and site specific Makefile fragments come in here.
53 ###
54 # main GDB source directory
55 gdbdir = ..
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
60 M4=gm4
61
62 # where to find texinfo; GDB dist should include a recent one
63 TEXIDIR=$(srcdir)/${gdbdir}/../texinfo/fsf
64
65 # where to find makeinfo, preferably one designed for texinfo-2
66 MAKEINFO=makeinfo
67
68 # where to find texi2roff, ditto
69 TEXI2ROFF=texi2roff
70
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}.)
73 READLINE_DIR = $(srcdir)/${gdbdir}/../readline
74
75 # Main GDB manual's source files
76 SFILES_DOCDIR = \
77 $(srcdir)/gdb.texinfo $(srcdir)/pretex.m4 $(srcdir)/none.m4 \
78 $(srcdir)/all.m4 gdbinv-m.m4 gdbinv-s.m4 gdbVN.m4
79
80 # Which version of GDB manual? default includes everything
81 CONFIG=all
82
83 all install:
84
85 info: gdb.info gdbint.info
86 #all: gdb.info gdb.dvi refcard.dvi gdb-internals gdbint.dvi
87 clean-info:
88 -rm -f *.info*
89
90 install-info: info
91 for i in *.info* ; do \
92 $(INSTALL_DATA) $$i $(infodir)/$$i ; \
93 done
94
95 STAGESTUFF = *.info* gdb-all.texi gdbVN.m4
96
97 # Copy the object files from a particular stage into a subdirectory.
98 stage1: force
99 -mkdir stage1
100 -mv $(STAGESTUFF) stage1
101
102 stage2: force
103 -mkdir stage2
104 -mv $(STAGESTUFF) stage2
105
106 stage3: force
107 -mkdir stage3
108 -mv $(STAGESTUFF) stage3
109
110 against=stage2
111
112 comparison: force
113 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
114
115 de-stage1: force
116 -(cd stage1 ; mv -f * ..)
117 -rmdir stage1
118
119 de-stage2: force
120 -(cd stage2 ; mv -f * ..)
121 -rmdir stage2
122
123 de-stage3: force
124 -(cd stage3 ; mv -f * ..)
125 -rmdir stage3
126
127 clean:
128 rm -f gdb.dvi rdl-apps.texi gdb-all* gdb.info* gdbVN.m4
129 rm -f gdb-internals gdbint.?? gdbint.??? gdbint.info
130 rm -f refcard.ps refcard.dvi rcfonts.tex refcard.log *~
131
132 # GDB QUICK REFERENCE (TeX dvi file, CM fonts)
133 refcard.dvi : refcard.tex
134 rm -f rcfonts.tex; cp rc-cm.tex rcfonts.tex
135 TEXINPUTS=.:$$TEXINPUTS tex refcard.tex; rm -f refcard.log
136 rm -f rcfonts.tex
137
138 # GDB QUICK REFERENCE (PostScript output, common PS fonts)
139 refcard.ps : refcard.tex
140 rm -f rcfonts.tex; cp rc-ps.tex rcfonts.tex
141 TEXINPUTS=.:$$TEXINPUTS tex refcard.tex
142 dvips -t landscape refcard -o; rm -f refcard.dvi refcard.log
143 rm -f rcfonts.tex
144
145 # Cover file for "Readline" appendices
146 rdl-apps.texi: ${READLINE_DIR}/doc/rluser.texinfo \
147 ${READLINE_DIR}/doc/inc-hist.texi
148 rm -f rdl-apps.texi
149 echo "@include ${READLINE_DIR}/doc/rluser.texinfo" >rdl-apps.texi
150 echo "@include ${READLINE_DIR}/doc/inc-hist.texi" >>rdl-apps.texi
151
152 # File to record current GDB version number (copied from main dir Makefile.in)
153 gdbVN.m4 : ${gdbdir}/Makefile.in
154 ( VER=`sed <$(srcdir)/${gdbdir}/Makefile.in -n 's/VERSION = //p'` ;\
155 echo "_define__(<_GDB_VN__>,$$VER)" > gdbVN.m4 )
156
157 # GDB MANUAL: texinfo source, created by preprocessing w/m4
158 # If you want other configs in the makefile, add or modify instructions for
159 # building source here, then change CONFIG (that way you get info, dvi,
160 # roff targets automatically for your config).
161 # Be sure to not create a bad gdb-all.texi if ${M4} is missing or aborts...
162 gdb-all.texi: ${SFILES_DOCDIR}
163 rm -f foobus.texinfo
164 ${M4} $(srcdir)/pretex.m4 $(srcdir)/none.m4 $(srcdir)/all.m4 $(srcdir)/gdb.texinfo >foobus.texinfo
165 rm -f gdb-all.texi
166 mv foobus.texinfo gdb-all.texi
167
168 # GDB MANUAL: TeX dvi file
169 gdb.dvi : gdb-${CONFIG}.texi rdl-apps.texi
170 TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex gdb-${CONFIG}.texi
171 texindex gdb-${CONFIG}.??
172 TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex gdb-${CONFIG}.texi
173 mv gdb-${CONFIG}.dvi gdb.dvi
174 rm -f gdb-${CONFIG}.?? gdb-${CONFIG}.???
175
176 # GDB MANUAL: info file
177 # We're using texinfo2, and older makeinfo's may not be able to
178 # cope with all the markup. In the meantime, we distribute the info
179 # files
180 gdb.info: gdb-${CONFIG}.texi
181 $(MAKEINFO) -o gdb.info gdb-${CONFIG}.texi
182
183 # GDB MANUAL: roff translations
184 # Try to use a recent texi2roff. v2 was put on prep in jan91.
185 # If you want an index, see texi2roff doc for postprocessing
186 # and add -i to texi2roff invocations below.
187 # Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
188 # correspondint -e lines when later texi2roff's are current)
189 # + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
190 # + @c's deleted explicitly because texi2roff sees texinfo commands in them
191 # + @ (that's at-BLANK) not recognized by texi2roff, turned into blank
192 # + @alphaenumerate is ridiculously new, turned into @enumerate
193
194
195 # gdb manual suitable for [tn]roff -mm
196 # '@noindent's removed due to texi2roff-2 mm bug; if yours is newer,
197 # try leaving them in
198 gdb.mm: gdb-${CONFIG}.texi
199 sed -e '/\\input texinfo/d' \
200 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
201 -e '/^@ifinfo/,/^@end ifinfo/d' \
202 -e '/^@c/d' \
203 -e 's/{.*,,/{/' \
204 -e '/@noindent/d' \
205 -e 's/@ / /g' \
206 -e 's/^@alphaenumerate/@enumerate/g' \
207 -e 's/^@end alphaenumerate/@end enumerate/g' \
208 gdb-${CONFIG}.texi | \
209 $(TEXI2ROFF) -mm | \
210 sed -e 's/---/\\(em/g' \
211 >gdb.mm
212
213 # gdb manual suitable for [gtn]roff -me
214 gdb.me: gdb-${CONFIG}.texi
215 sed -e '/\\input texinfo/d' \
216 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
217 -e '/^@ifinfo/,/^@end ifinfo/d' \
218 -e '/^@c/d' \
219 -e 's/{.*,,/{/' \
220 -e 's/@ / /g' \
221 -e 's/^@alphaenumerate/@enumerate/g' \
222 -e 's/^@end alphaenumerate/@end enumerate/g' \
223 gdb-${CONFIG}.texi | \
224 $(TEXI2ROFF) -me | \
225 sed -e 's/---/\\(em/g' \
226 >gdb.me
227
228 # gdb manual suitable for [gtn]roff -ms
229 gdb.ms: gdb-${CONFIG}.texi
230 sed -e '/\\input texinfo/d' \
231 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
232 -e '/^@ifinfo/,/^@end ifinfo/d' \
233 -e '/^@c/d' \
234 -e 's/{.*,,/{/' \
235 -e 's/@ / /g' \
236 -e 's/^@alphaenumerate/@enumerate/g' \
237 -e 's/^@end alphaenumerate/@end enumerate/g' \
238 gdb-${CONFIG}.texi | \
239 $(TEXI2ROFF) -ms | \
240 sed -e 's/---/\\(em/g' \
241 >gdb.ms
242
243 # GDB INTERNALS MANUAL: TeX dvi file
244 gdbint.dvi : gdbint.texinfo
245 TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex gdbint.texinfo
246 texindex gdbint.??
247 TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex gdbint.texinfo
248 rm -f gdbint.?? gdbint.aux gdbint.cps gdbint.fns gdbint.kys \
249 gdbint.log gdbint.pgs gdbint.toc gdbint.tps gdbint.vrs
250
251 # GDB INTERNALS MANUAL: info file
252 gdb-internals: gdbint.info
253
254 gdbint.info: gdbint.texinfo
255 $(MAKEINFO) -o gdbint.info $(srcdir)/gdbint.texinfo
256
257 force:
258
259 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
260 $(SHELL) ./config.status