1 configdirs="doc testsuite"
7 # Map host cpu into the config cpu subdirectory name.
8 # The default is $host_cpu.
12 c[12]) gdb_host_cpu=convex ;;
13 hppa*) gdb_host_cpu=pa ;;
14 i[34]86) gdb_host_cpu=i386 ;;
15 m68*) gdb_host_cpu=m68k ;;
16 np1) gdb_host_cpu=gould ;;
17 pyramid) gdb_host_cpu=pyr ;;
18 *) gdb_host_cpu=$host_cpu ;;
22 # map host info into gdb names.
26 a29k-*-*) gdb_host=ultra3 ;;
28 alpha-*-osf*) gdb_host=alpha-osf1 ;;
30 arm-*-*) gdb_host=arm ;;
32 c[12]-*-*) gdb_host=convex ;;
34 hppa*-*-bsd*) gdb_host=hppabsd ;;
35 hppa*-*-hpux*) gdb_host=hppahpux ;;
36 hppa*-*-hiux*) gdb_host=hppahpux ;;
38 i[34]86-ncr-*) gdb_host=ncr3000 ;;
39 i[34]86-sequent-bsd*) gdb_host=symmetry ;; #dynix
40 i[34]86-sequent-sysv*) gdb_host=ptx ;;
42 i[34]86-*-aix*) gdb_host=i386aix ;;
43 i[34]86-*-bsd*) gdb_host=i386bsd ;;
44 i[34]86-*-netbsd*) gdb_host=i386bsd ;;
45 i[34]86-*-go32*) gdb_host=go32 ;;
46 i[34]86-*-linux*) gdb_host=linux ;;
47 i[34]86-*-lynxos*) gdb_host=i386lynx ;;
49 # i[34]86-*-mach) gdb_host=i386mach ;;
50 i[34]86-*-mach*) gdb_host=i386m3 ;;
51 i[34]86-*-osf1mk*) gdb_host=i386mk ;;
52 i[34]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
53 i[34]86-*-sco*) gdb_host=i386sco ;;
54 i[34]86-*-solaris*) gdb_host=i386sol2 ;;
55 i[34]86-*-sunos*) gdb_host=sun386 ;;
56 i[34]86-*-sysv3.2*) gdb_host=i386v32 ;;
57 i[34]86-*-sysv4*) gdb_host=i386v4 ;;
58 i[34]86-*-unixware) gdb_host=i386v4 ;;
59 i[34]86-*-sysv*) gdb_host=i386v ;;
60 i[34]86-*-isc*) gdb_host=i386v32 ;;
62 m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
63 m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
64 m68030-sony-*) gdb_host=news1000 ;;
66 m68*-altos-*) gdb_host=altos ;;
67 m68*-apollo*-sysv*) gdb_host=apollo68v ;;
68 m68*-apollo*-bsd*) gdb_host=apollo68b ;;
69 m68*-att-*) gdb_host=3b1 ;;
70 m68*-bull*-sysv*) gdb_host=dpx2 ;;
71 m68*-cbm-sysv4*) gdb_host=amix ;;
72 m68*-hp-bsd*) gdb_host=hp300bsd ;;
73 m68*-hp-hpux*) gdb_host=hp300hpux ;;
74 m68*-isi-*) gdb_host=isi ;;
75 m68*-*-lynxos*) gdb_host=m68klynx ;;
76 m68*-motorola-*) gdb_host=delta68 ;;
77 m68*-sony-*) gdb_host=news ;;
78 m68*-sun-sunos3*) gdb_host=sun3os3 ;;
79 m68*-sun-sunos4*) gdb_host=sun3os4 ;;
80 m68*-sun-*) gdb_host=sun3os4 ;;
82 m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
83 m88*-motorola-sysv*) gdb_host=delta88 ;;
84 # I suspect this is just used for DGUX
85 m88*-*-*) gdb_host=m88k ;;
87 mips-dec-*) gdb_host=decstation ;;
88 mips-little-*) gdb_host=littlemips ;;
89 mips-sgi-irix3*) gdb_host=irix3 ;;
90 mips-sgi-irix4*) gdb_host=irix4 ;;
91 mips-sgi-irix5*) gdb_host=irix5 ;;
92 mips-sony-*) gdb_host=news-mips ;;
93 mips-*-sysv*) gdb_host=riscos ;;
94 mips-*-riscos*) gdb_host=riscos ;;
95 mips-*-mach*) gdb_host=mipsm3 ;;
97 none-*-*) gdb_host=none ;;
99 np1-*-*) gdb_host=np1 ;;
101 ns32k-umax-*) gdb_host=umax ;;
102 ns32k-utek-sysv*) gdb_host=merlin ;;
104 pn-*-*) gdb_host=pn ;;
106 pyramid-*-*) gdb_host=pyramid ;;
108 romp-*-*) gdb_host=rtbsd ;;
110 rs6000-*-*) gdb_host=rs6000 ;;
112 sparc-*-lynxos*) gdb_host=sparclynx ;;
113 sparc-*-solaris2*) gdb_host=sun4sol2 ;;
114 sparc-*-sunos4*) gdb_host=sun4os4 ;;
115 sparc-*-*) gdb_host=sun4os4 ;;
117 tahoe-*-*) gdb_host=tahoe ;;
119 vax-*-bsd*) gdb_host=vaxbsd ;;
120 vax-*-ultrix2*) gdb_host=vaxult2 ;;
121 vax-*-ultrix*) gdb_host=vaxult ;;
126 if [ ! -f ${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh ]; then
127 echo '***' "Gdb does not support host ${host}" 1>&2
131 # We really shouldn't depend on there being a space after XM_FILE= ...
132 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh`
136 # Map target cpu into the config cpu subdirectory name.
137 # The default is $target_cpu.
139 case "${target_cpu}" in
141 alpha) gdb_target_cpu=alpha ;;
142 c[12]) gdb_target_cpu=convex ;;
143 hppa*) gdb_target_cpu=pa ;;
144 i[34]86) gdb_target_cpu=i386 ;;
145 m68*) gdb_target_cpu=m68k ;;
146 m8*) gdb_target_cpu=m88k ;;
147 mips*) gdb_target_cpu=mips ;;
148 np1) gdb_target_cpu=gould ;;
149 pn) gdb_target_cpu=gould ;;
150 pyramid) gdb_target_cpu=pyr ;;
151 sparclite) gdb_target_cpu=sparc
152 configdirs="${configdirs} sparclite"
154 sparc*) gdb_target_cpu=sparc ;;
155 *) gdb_target_cpu=$target_cpu ;;
159 # map target info into gdb names.
163 a29k-*-aout*) gdb_target=a29k ;;
164 a29k-*-coff*) gdb_target=a29k ;;
165 a29k-*-elf*) gdb_target=a29k ;;
166 a29k-*-ebmon*) gdb_target=a29k ;;
167 a29k-*-kern*) gdb_target=a29k-kern ;;
168 a29k-*-none*) gdb_target=a29k ;;
169 a29k-*-sym1*) gdb_target=ultra3 ;;
170 a29k-*-udi*) gdb_target=a29k-udi ;;
172 alpha-*-osf*) gdb_target=alpha-osf1 ;;
173 alpha-*-netware*) gdb_target=alpha-nw ;;
175 arm-*-*) gdb_target=arm ;;
177 c1-*-*) gdb_target=convex ;;
178 c2-*-*) gdb_target=convex ;;
180 h8300-*-*) gdb_target=h8300hms ;;
181 h8500-*-*) gdb_target=h8500hms ;;
183 sh-*-*) gdb_target=sh ;;
185 hppa*-*-bsd*) gdb_target=hppabsd ;;
186 hppa*-*-hpux*) gdb_target=hppahpux ;;
187 hppa*-*-hiux*) gdb_target=hppahpux ;;
189 i[34]86-sequent-*) gdb_target=symmetry ;;
190 i[34]86-ncr-*) gdb_target=ncr3000 ;;
192 i[34]86-*-aout*) gdb_target=i386aout ;;
193 i[34]86-*-coff*) gdb_target=i386v ;;
194 i[34]86-*-elf*) gdb_target=i386v ;;
196 i[34]86-*-aix*) gdb_target=i386aix ;;
197 i[34]86-*-bsd*) gdb_target=i386bsd ;;
198 i[34]86-*-netbsd*) gdb_target=i386bsd ;;
199 i[34]86-*-go32*) gdb_target=i386aout ;;
200 i[34]86-*-lynxos*) gdb_target=i386lynx
201 configdirs="${configdirs} gdbserver"
203 i[34]86-*-solaris*) gdb_target=i386sol2 ;;
204 i[34]86-*-sunos*) gdb_target=sun386 ;;
205 i[34]86-*-sysv4*) gdb_target=i386v4 ;;
206 i[34]86-*-sco*) gdb_target=i386v ;;
207 i[34]86-*-sysv*) gdb_target=i386v ;;
208 i[34]86-*-linux*) gdb_target=linux ;;
209 i[34]86-*-isc*) gdb_target=i386v ;;
210 i[34]86-*-mach*) gdb_target=i386m3 ;;
211 i[34]86-*-netware*) gdb_target=i386nw ;;
212 i[34]86-*-osf1mk*) gdb_target=i386mk ;;
214 i960-*-bout*) gdb_target=vxworks960 ;;
215 i960-*-coff*) gdb_target=nindy960 ;;
216 i960-*-elf*) gdb_target=nindy960 ;;
218 i960-*-nindy*) gdb_target=nindy960 ;;
219 i960-*-vxworks*) gdb_target=vxworks960 ;;
221 m68000-*-sunos3*) gdb_target=sun2os3 ;;
222 m68000-*-sunos4*) gdb_target=sun2os4 ;;
224 m68*-cbm-sysv4*) gdb_target=amix ;;
225 m68*-bull-sysv*) gdb_target=dpx2 ;;
226 m68*-hp-bsd*) gdb_target=hp300bsd ;;
227 m68*-hp-hpux*) gdb_target=hp300hpux ;;
229 m68*-altos-*) gdb_target=altos ;;
230 m68*-apollo*-bsd*) gdb_target=apollo68b ;;
231 m68*-att-*) gdb_target=3b1 ;;
232 m68*-ericsson-*) gdb_target=es1800 ;;
233 m68*-isi-*) gdb_target=isi ;;
234 m68*-motorola-*) gdb_target=delta68 ;;
235 m68*-netx-*) gdb_target=vxworks68 ;;
236 m68*-sony-*) gdb_target=news ;;
237 m68*-tandem-*) gdb_target=st2000 ;;
239 m68*-rom68k-*) gdb_target=monitor ;;
240 m68*-*bug-*) gdb_target=monitor ;;
241 m68*-monitor-*) gdb_target=monitor ;;
243 m68*-*-aout*) gdb_target=monitor ;;
244 m68*-*-coff*) gdb_target=monitor ;;
245 m68*-*-elf*) gdb_target=monitor ;;
246 m68*-*-lynxos*) gdb_target=m68klynx
247 configdirs="${configdirs} gdbserver"
249 m68*-*-os68k*) gdb_target=os68k ;;
250 m68*-*-sunos3*) gdb_target=sun3os3 ;;
251 m68*-*-sunos4*) gdb_target=sun3os4 ;;
252 m68*-*-vxworks*) gdb_target=vxworks68 ;;
254 m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
255 m88*-motorola-*) gdb_target=delta88 ;;
256 m88*-*-*) gdb_target=m88k ;;
258 mips*-big-*) gdb_target=bigmips ;;
259 mips*-dec-*) gdb_target=decstation ;;
260 mips*el-*-ecoff*) gdb_target=idtl ;;
261 mips*-idt-ecoff*) gdb_target=idt ;;
262 mips*el-*-elf*) gdb_target=idtl ;;
263 mips*-*-elf*) gdb_target=idt ;;
264 mips*-little-*) gdb_target=littlemips ;;
265 mips*-sgi-irix5*) gdb_target=irix5 ;;
266 mips*-sgi-*) gdb_target=irix3 ;;
267 mips*-sony-*) gdb_target=bigmips ;;
268 mips*-*-sysv*) gdb_target=bigmips ;;
269 mips*-*-riscos*) gdb_target=bigmips ;;
270 mips*-*-mach*) gdb_target=mipsm3 ;;
272 none-*-*) gdb_target=none ;;
274 np1-*-*) gdb_target=np1 ;;
276 ns32k-utek-sysv*) gdb_target=merlin ;;
277 ns32k-utek-*) gdb_target=umax ;;
279 pn-*-*) gdb_target=pn ;;
281 pyramid-*-*) gdb_target=pyramid ;;
283 rs6000-*-*) gdb_target=rs6000 ;;
285 sparc-*-aout*) gdb_target=sparc-em ;;
286 sparc-*-coff*) gdb_target=sparc-em ;;
287 sparc-*-elf*) gdb_target=sparc-em ;;
288 sparc-*-lynxos*) gdb_target=sparclynx
289 configdirs="${configdirs} gdbserver"
291 sparc-*-solaris2*) gdb_target=sun4sol2 ;;
292 sparc-*-sunos4*) gdb_target=sun4os4 ;;
293 sparc-*-vxworks*) gdb_target=vxsparc ;;
294 sparc-*-*) gdb_target=sun4os4 ;;
295 sparclite*-*-*) gdb_target=sparclite ;;
297 sparc64-*-*) gdb_target_cpu=sparc gdb_target=sp64 ;;
300 tahoe-*-*) gdb_target=tahoe ;;
301 vax-*-*) gdb_target=vax ;;
303 z8k-*-sim*) gdb_target=z8ksim ;;
304 z8k-*-coff*) gdb_target=z8ksim ;;
307 if [ ! -f ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt ]; then
308 echo '***' "Gdb does not support target ${target}" 1>&2
312 if [ -z "${removing}" ] ; then
313 cat ${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | awk '$1 == "#msg" {
317 # We really shouldn't depend on there being a space after TM_FILE= ...
318 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt`
321 # these really aren't orthogonal true/false values of the same condition,
322 # but shells are slow enough that I like to reuse the test conditions
325 if [ "${target}" = "${host}" ] ; then
326 nativefile=`awk '$1 == "NAT_FILE=" { print $2 }' <${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh`
328 # GDBserver is only useful in a "native" enviroment
329 configdirs=`echo $configdirs | sed 's/gdbserver//'`
332 host_makefile_frag=config/${gdb_host_cpu}/${gdb_host}.mh
333 target_makefile_frag=config/${gdb_target_cpu}/${gdb_target}.mt
335 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
336 # (NAT_FILE) is not set in the ?config/* file, we don't make the
337 # corresponding links. But we have to remove the xm.h files and tm.h
338 # files anyway, e.g. when switching from "configure host" to
344 if [ "${hostfile}" != "" ]; then
345 if [ -f ${srcdir}/config/${hostfile} ]; then
346 files="${files} config/${hostfile}"
348 files="${files} config/${gdb_host_cpu}/${hostfile}"
350 links="${links} xm.h"
353 if [ "${targetfile}" != "" ]; then
354 if [ -f ${srcdir}/config/${targetfile} ]; then
355 files="${files} config/${targetfile}"
357 files="${files} config/${gdb_target_cpu}/${targetfile}"
359 links="${links} tm.h"
362 if [ "${nativefile}" != "" ]; then
363 if [ -f ${srcdir}/config/${nativefile} ]; then
364 files="${files} config/${nativefile}"
366 files="${files} config/${gdb_host_cpu}/${nativefile}"
368 links="${links} nm.h"
369 # temporary scaffolding until all hosts have the host/target/native
372 files="${files} config/nm-trash.h"
373 links="${links} nm.h"
382 grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
383 echo "source ${srcdir}/.gdbinit" >> .gdbinit
386 if [ "${nativefile}" = "" ] ; then
387 sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
388 < Makefile > Makefile.tem
389 mv -f Makefile.tem Makefile