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 ;;
37 hppa*-*-osf*) gdb_host=hppabsd ;;
39 i[34]86-ncr-*) gdb_host=ncr3000 ;;
40 i[34]86-sequent-bsd*) gdb_host=symmetry ;; #dynix
41 i[34]86-sequent-sysv*) gdb_host=ptx ;;
43 i[34]86-*-aix*) gdb_host=i386aix ;;
44 i[34]86-*-bsd*) gdb_host=i386bsd ;;
45 i[34]86-*-netbsd*) gdb_host=i386bsd ;;
46 i[34]86-*-go32*) gdb_host=go32 ;;
47 i[34]86-*-linux*) gdb_host=linux ;;
48 i[34]86-*-lynxos*) gdb_host=i386lynx ;;
50 # i[34]86-*-mach) gdb_host=i386mach ;;
51 i[34]86-*-mach*) gdb_host=i386m3 ;;
52 i[34]86-*-osf1mk*) gdb_host=i386mk ;;
53 i[34]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
54 i[34]86-*-sco*) gdb_host=i386sco ;;
55 i[34]86-*-solaris*) gdb_host=i386sol2 ;;
56 i[34]86-*-sunos*) gdb_host=sun386 ;;
57 i[34]86-*-sysv3.2*) gdb_host=i386v32 ;;
58 i[34]86-*-sysv4*) gdb_host=i386v4 ;;
59 i[34]86-*-unixware) gdb_host=i386v4 ;;
60 i[34]86-*-sysv*) gdb_host=i386v ;;
61 i[34]86-*-isc*) gdb_host=i386v32 ;;
63 m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
64 m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
65 m68030-sony-*) gdb_host=news1000 ;;
67 m68*-altos-*) gdb_host=altos ;;
68 m68*-apollo*-sysv*) gdb_host=apollo68v ;;
69 m68*-apollo*-bsd*) gdb_host=apollo68b ;;
70 m68*-att-*) gdb_host=3b1 ;;
71 m68*-bull*-sysv*) gdb_host=dpx2 ;;
72 m68*-cbm-sysv4*) gdb_host=amix ;;
73 m68*-hp-bsd*) gdb_host=hp300bsd ;;
74 m68*-hp-hpux*) gdb_host=hp300hpux ;;
75 m68*-isi-*) gdb_host=isi ;;
76 m68*-*-lynxos*) gdb_host=m68klynx ;;
77 m68*-motorola-*) gdb_host=delta68 ;;
78 m68*-sony-*) gdb_host=news ;;
79 m68*-sun-sunos3*) gdb_host=sun3os3 ;;
80 m68*-sun-sunos4*) gdb_host=sun3os4 ;;
81 m68*-sun-*) gdb_host=sun3os4 ;;
83 m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
84 m88*-motorola-sysv*) gdb_host=delta88 ;;
85 # I suspect this is just used for DGUX
86 m88*-*-*) gdb_host=m88k ;;
88 mips-dec-*) gdb_host=decstation ;;
89 mips-little-*) gdb_host=littlemips ;;
90 mips-sgi-irix3*) gdb_host=irix3 ;;
91 mips-sgi-irix4*) gdb_host=irix4 ;;
92 mips-sgi-irix5*) gdb_host=irix5 ;;
93 mips-sony-*) gdb_host=news-mips ;;
94 mips-*-sysv*) gdb_host=riscos ;;
95 mips-*-riscos*) gdb_host=riscos ;;
96 mips-*-mach*) gdb_host=mipsm3 ;;
98 none-*-*) gdb_host=none ;;
100 np1-*-*) gdb_host=np1 ;;
102 ns32k-umax-*) gdb_host=umax ;;
103 ns32k-utek-sysv*) gdb_host=merlin ;;
105 pn-*-*) gdb_host=pn ;;
107 pyramid-*-*) gdb_host=pyramid ;;
109 romp-*-*) gdb_host=rtbsd ;;
111 rs6000-*-lynxos*) gdb_host=rs6000lynx ;;
112 rs6000-*-*) gdb_host=rs6000 ;;
114 sparc-*-lynxos*) gdb_host=sparclynx ;;
115 sparc-*-solaris2*) gdb_host=sun4sol2 ;;
116 sparc-*-sunos4*) gdb_host=sun4os4 ;;
117 sparc-*-*) gdb_host=sun4os4 ;;
119 tahoe-*-*) gdb_host=tahoe ;;
121 vax-*-bsd*) gdb_host=vaxbsd ;;
122 vax-*-ultrix2*) gdb_host=vaxult2 ;;
123 vax-*-ultrix*) gdb_host=vaxult ;;
128 if [ ! -f ${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh ]; then
129 echo '***' "Gdb does not support host ${host}" 1>&2
133 # We really shouldn't depend on there being a space after XM_FILE= ...
134 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh`
138 # Map target cpu into the config cpu subdirectory name.
139 # The default is $target_cpu.
141 case "${target_cpu}" in
143 alpha) gdb_target_cpu=alpha ;;
144 c[12]) gdb_target_cpu=convex ;;
145 hppa*) gdb_target_cpu=pa ;;
146 i[34]86) gdb_target_cpu=i386 ;;
147 m68*) gdb_target_cpu=m68k ;;
148 m8*) gdb_target_cpu=m88k ;;
149 mips*) gdb_target_cpu=mips ;;
150 np1) gdb_target_cpu=gould ;;
151 pn) gdb_target_cpu=gould ;;
152 pyramid) gdb_target_cpu=pyr ;;
153 sparclite) gdb_target_cpu=sparc
154 configdirs="${configdirs} sparclite"
156 sparc*) gdb_target_cpu=sparc ;;
157 *) gdb_target_cpu=$target_cpu ;;
161 # map target info into gdb names.
165 a29k-*-aout*) gdb_target=a29k ;;
166 a29k-*-coff*) gdb_target=a29k ;;
167 a29k-*-elf*) gdb_target=a29k ;;
168 a29k-*-ebmon*) gdb_target=a29k ;;
169 a29k-*-kern*) gdb_target=a29k-kern ;;
170 a29k-*-none*) gdb_target=a29k ;;
171 a29k-*-sym1*) gdb_target=ultra3 ;;
172 a29k-*-udi*) gdb_target=a29k-udi ;;
174 alpha-*-osf*) gdb_target=alpha-osf1 ;;
175 alpha-*-netware*) gdb_target=alpha-nw ;;
177 arm-*-*) gdb_target=arm ;;
179 c1-*-*) gdb_target=convex ;;
180 c2-*-*) gdb_target=convex ;;
182 h8300-*-*) gdb_target=h8300hms ;;
183 h8500-*-*) gdb_target=h8500hms ;;
185 sh-*-*) gdb_target=sh ;;
187 hppa*-*-bsd*) gdb_target=hppabsd ;;
188 hppa*-*-hpux*) gdb_target=hppahpux ;;
189 hppa*-*-hiux*) gdb_target=hppahpux ;;
190 hppa*-*-osf*) gdb_target=hppaosf ;;
192 i[34]86-sequent-*) gdb_target=symmetry ;;
193 i[34]86-ncr-*) gdb_target=ncr3000 ;;
195 i[34]86-*-aout*) gdb_target=i386aout ;;
196 i[34]86-*-coff*) gdb_target=i386v ;;
197 i[34]86-*-elf*) gdb_target=i386v ;;
199 i[34]86-*-aix*) gdb_target=i386aix ;;
200 i[34]86-*-bsd*) gdb_target=i386bsd ;;
201 i[34]86-*-netbsd*) gdb_target=i386bsd ;;
202 i[34]86-*-go32*) gdb_target=i386aout ;;
203 i[34]86-*-lynxos*) gdb_target=i386lynx
204 configdirs="${configdirs} gdbserver"
206 i[34]86-*-solaris*) gdb_target=i386sol2 ;;
207 i[34]86-*-sunos*) gdb_target=sun386 ;;
208 i[34]86-*-sysv4*) gdb_target=i386v4 ;;
209 i[34]86-*-sco*) gdb_target=i386v ;;
210 i[34]86-*-sysv*) gdb_target=i386v ;;
211 i[34]86-*-linux*) gdb_target=linux ;;
212 i[34]86-*-isc*) gdb_target=i386v ;;
213 i[34]86-*-mach*) gdb_target=i386m3 ;;
214 i[34]86-*-netware*) gdb_target=i386nw ;;
215 i[34]86-*-osf1mk*) gdb_target=i386mk ;;
217 i960-*-bout*) gdb_target=vxworks960 ;;
218 i960-*-coff*) gdb_target=nindy960 ;;
219 i960-*-elf*) gdb_target=nindy960 ;;
221 i960-*-nindy*) gdb_target=nindy960 ;;
222 i960-*-vxworks*) gdb_target=vxworks960 ;;
224 m68000-*-sunos3*) gdb_target=sun2os3 ;;
225 m68000-*-sunos4*) gdb_target=sun2os4 ;;
227 m68*-cbm-sysv4*) gdb_target=amix ;;
228 m68*-bull-sysv*) gdb_target=dpx2 ;;
229 m68*-hp-bsd*) gdb_target=hp300bsd ;;
230 m68*-hp-hpux*) gdb_target=hp300hpux ;;
232 m68*-altos-*) gdb_target=altos ;;
233 m68*-apollo*-bsd*) gdb_target=apollo68b ;;
234 m68*-att-*) gdb_target=3b1 ;;
235 m68*-ericsson-*) gdb_target=es1800 ;;
236 m68*-isi-*) gdb_target=isi ;;
237 m68*-motorola-*) gdb_target=delta68 ;;
238 m68*-netx-*) gdb_target=vxworks68 ;;
239 m68*-sony-*) gdb_target=news ;;
240 m68*-tandem-*) gdb_target=st2000 ;;
242 m68*-rom68k-*) gdb_target=monitor ;;
243 m68*-*bug-*) gdb_target=monitor ;;
244 m68*-monitor-*) gdb_target=monitor ;;
246 m68*-*-aout*) gdb_target=monitor ;;
247 m68*-*-coff*) gdb_target=monitor ;;
248 m68*-*-elf*) gdb_target=monitor ;;
249 m68*-*-lynxos*) gdb_target=m68klynx
250 configdirs="${configdirs} gdbserver"
252 m68*-*-os68k*) gdb_target=os68k ;;
253 m68*-*-sunos3*) gdb_target=sun3os3 ;;
254 m68*-*-sunos4*) gdb_target=sun3os4 ;;
255 m68*-*-vxworks*) gdb_target=vxworks68 ;;
257 m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
258 m88*-motorola-*) gdb_target=delta88 ;;
259 m88*-*-*) gdb_target=m88k ;;
261 mips64*-big-*) gdb_target=bigmips64 ;;
262 mips*-big-*) gdb_target=bigmips ;;
263 mips*-dec-*) gdb_target=decstation ;;
264 mips64*el-*-ecoff*) gdb_target=idtl64 ;;
265 mips64*-idt-ecoff*) gdb_target=idt64 ;;
266 mips64*el-*-elf*) gdb_target=idtl64 ;;
267 mips64*-*-elf*) gdb_target=idt64 ;;
268 mips*el-*-ecoff*) gdb_target=idtl ;;
269 mips*-idt-ecoff*) gdb_target=idt ;;
270 mips*el-*-elf*) gdb_target=idtl ;;
271 mips*-*-elf*) gdb_target=idt ;;
272 mips*-little-*) gdb_target=littlemips ;;
273 mips*-sgi-irix5*) gdb_target=irix5 ;;
274 mips*-sgi-*) gdb_target=irix3 ;;
275 mips*-sony-*) gdb_target=bigmips ;;
276 mips*-*-sysv*) gdb_target=bigmips ;;
277 mips*-*-riscos*) gdb_target=bigmips ;;
278 mips*-*-mach*) gdb_target=mipsm3 ;;
280 none-*-*) gdb_target=none ;;
282 np1-*-*) gdb_target=np1 ;;
284 ns32k-utek-sysv*) gdb_target=merlin ;;
285 ns32k-utek-*) gdb_target=umax ;;
287 pn-*-*) gdb_target=pn ;;
289 pyramid-*-*) gdb_target=pyramid ;;
291 rs6000-*-lynxos*) gdb_target=rs6000lynx ;;
292 rs6000-*-*) gdb_target=rs6000 ;;
294 sparc-*-aout*) gdb_target=sparc-em ;;
295 sparc-*-coff*) gdb_target=sparc-em ;;
296 sparc-*-elf*) gdb_target=sparc-em ;;
297 sparc-*-lynxos*) gdb_target=sparclynx
298 configdirs="${configdirs} gdbserver"
300 sparc-*-solaris2*) gdb_target=sun4sol2 ;;
301 sparc-*-sunos4*) gdb_target=sun4os4 ;;
302 sparc-*-vxworks*) gdb_target=vxsparc ;;
303 sparc-*-*) gdb_target=sun4os4 ;;
304 sparclite*-*-*) gdb_target=sparclite ;;
306 sparc64-*-*) gdb_target_cpu=sparc gdb_target=sp64 ;;
309 tahoe-*-*) gdb_target=tahoe ;;
310 vax-*-*) gdb_target=vax ;;
312 z8k-*-sim*) gdb_target=z8ksim ;;
313 z8k-*-coff*) gdb_target=z8ksim ;;
316 if [ ! -f ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt ]; then
317 echo '***' "Gdb does not support target ${target}" 1>&2
321 if [ -z "${removing}" ] ; then
322 cat ${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | awk '$1 == "#msg" {
326 # We really shouldn't depend on there being a space after TM_FILE= ...
327 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt`
330 # these really aren't orthogonal true/false values of the same condition,
331 # but shells are slow enough that I like to reuse the test conditions
334 if [ "${target}" = "${host}" ] ; then
335 nativefile=`awk '$1 == "NAT_FILE=" { print $2 }' <${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh`
337 # GDBserver is only useful in a "native" enviroment
338 configdirs=`echo $configdirs | sed 's/gdbserver//'`
341 host_makefile_frag=config/${gdb_host_cpu}/${gdb_host}.mh
342 target_makefile_frag=config/${gdb_target_cpu}/${gdb_target}.mt
344 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
345 # (NAT_FILE) is not set in the ?config/* file, we don't make the
346 # corresponding links. But we have to remove the xm.h files and tm.h
347 # files anyway, e.g. when switching from "configure host" to
353 if [ "${hostfile}" != "" ]; then
354 if [ -f ${srcdir}/config/${hostfile} ]; then
355 files="${files} config/${hostfile}"
357 files="${files} config/${gdb_host_cpu}/${hostfile}"
359 links="${links} xm.h"
362 if [ "${targetfile}" != "" ]; then
363 if [ -f ${srcdir}/config/${targetfile} ]; then
364 files="${files} config/${targetfile}"
366 files="${files} config/${gdb_target_cpu}/${targetfile}"
368 links="${links} tm.h"
371 if [ "${nativefile}" != "" ]; then
372 if [ -f ${srcdir}/config/${nativefile} ]; then
373 files="${files} config/${nativefile}"
375 files="${files} config/${gdb_host_cpu}/${nativefile}"
377 links="${links} nm.h"
378 # temporary scaffolding until all hosts have the host/target/native
381 files="${files} config/nm-trash.h"
382 links="${links} nm.h"
391 grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
392 echo "source ${srcdir}/.gdbinit" >> .gdbinit
395 if [ "${nativefile}" = "" ] ; then
396 sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
397 < Makefile > Makefile.tem
398 mv -f Makefile.tem Makefile