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 ;;
174 arm-*-*) gdb_target=arm ;;
176 c1-*-*) gdb_target=convex ;;
177 c2-*-*) gdb_target=convex ;;
179 h8300-*-*) gdb_target=h8300hms ;;
180 h8500-*-*) gdb_target=h8500hms ;;
182 sh-*-*) gdb_target=sh ;;
184 hppa*-*-bsd*) gdb_target=hppabsd ;;
185 hppa*-*-hpux*) gdb_target=hppahpux ;;
186 hppa*-*-hiux*) gdb_target=hppahpux ;;
188 i[34]86-sequent-*) gdb_target=symmetry ;;
189 i[34]86-ncr-*) gdb_target=ncr3000 ;;
191 i[34]86-*-aout*) gdb_target=i386aout ;;
192 i[34]86-*-coff*) gdb_target=i386v ;;
193 i[34]86-*-elf*) gdb_target=i386v ;;
195 i[34]86-*-aix*) gdb_target=i386aix ;;
196 i[34]86-*-bsd*) gdb_target=i386bsd ;;
197 i[34]86-*-netbsd*) gdb_target=i386bsd ;;
198 i[34]86-*-go32*) gdb_target=i386aout ;;
199 i[34]86-*-lynxos*) gdb_target=i386lynx
200 configdirs="${configdirs} gdbserver"
202 i[34]86-*-solaris*) gdb_target=i386sol2 ;;
203 i[34]86-*-sunos*) gdb_target=sun386 ;;
204 i[34]86-*-sysv4*) gdb_target=i386v4 ;;
205 i[34]86-*-sco*) gdb_target=i386v ;;
206 i[34]86-*-sysv*) gdb_target=i386v ;;
207 i[34]86-*-linux*) gdb_target=linux ;;
208 i[34]86-*-isc*) gdb_target=i386v ;;
209 i[34]86-*-mach*) gdb_target=i386m3 ;;
210 i[34]86-*-netware*) gdb_target=i386nw ;;
211 i[34]86-*-osf1mk*) gdb_target=i386mk ;;
213 i960-*-bout*) gdb_target=vxworks960 ;;
214 i960-*-coff*) gdb_target=nindy960 ;;
215 i960-*-elf*) gdb_target=nindy960 ;;
217 i960-*-nindy*) gdb_target=nindy960 ;;
218 i960-*-vxworks*) gdb_target=vxworks960 ;;
220 m68000-*-sunos3*) gdb_target=sun2os3 ;;
221 m68000-*-sunos4*) gdb_target=sun2os4 ;;
223 m68*-cbm-sysv4*) gdb_target=amix ;;
224 m68*-bull-sysv*) gdb_target=dpx2 ;;
225 m68*-hp-bsd*) gdb_target=hp300bsd ;;
226 m68*-hp-hpux*) gdb_target=hp300hpux ;;
228 m68*-altos-*) gdb_target=altos ;;
229 m68*-apollo*-bsd*) gdb_target=apollo68b ;;
230 m68*-att-*) gdb_target=3b1 ;;
231 m68*-ericsson-*) gdb_target=es1800 ;;
232 m68*-isi-*) gdb_target=isi ;;
233 m68*-motorola-*) gdb_target=delta68 ;;
234 m68*-netx-*) gdb_target=vxworks68 ;;
235 m68*-sony-*) gdb_target=news ;;
236 m68*-tandem-*) gdb_target=st2000 ;;
238 m68*-rom68k-*) gdb_target=monitor ;;
239 m68*-*bug-*) gdb_target=monitor ;;
240 m68*-monitor-*) gdb_target=monitor ;;
242 m68*-*-aout*) gdb_target=m68k-em ;;
243 m68*-*-coff*) gdb_target=m68k-em ;;
244 m68*-*-elf*) gdb_target=m68k-em ;;
245 m68*-*-lynxos*) gdb_target=m68klynx
246 configdirs="${configdirs} gdbserver"
248 m68*-*-os68k*) gdb_target=os68k ;;
249 m68*-*-sunos3*) gdb_target=sun3os3 ;;
250 m68*-*-sunos4*) gdb_target=sun3os4 ;;
251 m68*-*-vxworks*) gdb_target=vxworks68 ;;
253 m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
254 m88*-motorola-*) gdb_target=delta88 ;;
255 m88*-*-*) gdb_target=m88k ;;
257 mips*-big-*) gdb_target=bigmips ;;
258 mips*-dec-*) gdb_target=decstation ;;
259 mips*el-*-ecoff*) gdb_target=idtl ;;
260 mips*-idt-ecoff*) gdb_target=idt ;;
261 mips*el-*-elf*) gdb_target=idtl ;;
262 mips*-*-elf*) gdb_target=idt ;;
263 mips*-little-*) gdb_target=littlemips ;;
264 mips*-sgi-irix5*) gdb_target=irix5 ;;
265 mips*-sgi-*) gdb_target=irix3 ;;
266 mips*-sony-*) gdb_target=bigmips ;;
267 mips*-*-sysv*) gdb_target=bigmips ;;
268 mips*-*-riscos*) gdb_target=bigmips ;;
269 mips*-*-mach*) gdb_target=mipsm3 ;;
271 none-*-*) gdb_target=none ;;
273 np1-*-*) gdb_target=np1 ;;
275 ns32k-utek-sysv*) gdb_target=merlin ;;
276 ns32k-utek-*) gdb_target=umax ;;
278 pn-*-*) gdb_target=pn ;;
280 pyramid-*-*) gdb_target=pyramid ;;
282 rs6000-*-*) gdb_target=rs6000 ;;
284 sparc-*-aout*) gdb_target=sparc-em ;;
285 sparc-*-coff*) gdb_target=sparc-em ;;
286 sparc-*-elf*) gdb_target=sparc-em ;;
287 sparc-*-lynxos*) gdb_target=sparclynx
288 configdirs="${configdirs} gdbserver"
290 sparc-*-solaris2*) gdb_target=sun4sol2 ;;
291 sparc-*-sunos4*) gdb_target=sun4os4 ;;
292 sparc-*-vxworks*) gdb_target=vxsparc ;;
293 sparc-*-*) gdb_target=sun4os4 ;;
294 sparclite*-*-*) gdb_target=sparclite ;;
296 sparc64-*-*) gdb_target_cpu=sparc gdb_target=sp64 ;;
299 tahoe-*-*) gdb_target=tahoe ;;
300 vax-*-*) gdb_target=vax ;;
302 z8k-*-sim*) gdb_target=z8ksim ;;
303 z8k-*-coff*) gdb_target=z8ksim ;;
306 if [ ! -f ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt ]; then
307 echo '***' "Gdb does not support target ${target}" 1>&2
311 if [ -z "${removing}" ] ; then
312 cat ${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | awk '$1 == "#msg" {
316 # We really shouldn't depend on there being a space after TM_FILE= ...
317 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt`
320 # these really aren't orthogonal true/false values of the same condition,
321 # but shells are slow enough that I like to reuse the test conditions
324 if [ "${target}" = "${host}" ] ; then
325 nativefile=`awk '$1 == "NAT_FILE=" { print $2 }' <${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh`
327 # GDBserver is only useful in a "native" enviroment
328 configdirs=`echo $configdirs | sed 's/gdbserver//'`
331 host_makefile_frag=config/${gdb_host_cpu}/${gdb_host}.mh
332 target_makefile_frag=config/${gdb_target_cpu}/${gdb_target}.mt
334 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
335 # (NAT_FILE) is not set in the ?config/* file, we don't make the
336 # corresponding links. But we have to remove the xm.h files and tm.h
337 # files anyway, e.g. when switching from "configure host" to
343 if [ "${hostfile}" != "" ]; then
344 if [ -f ${srcdir}/config/${hostfile} ]; then
345 files="${files} config/${hostfile}"
347 files="${files} config/${gdb_host_cpu}/${hostfile}"
349 links="${links} xm.h"
352 if [ "${targetfile}" != "" ]; then
353 if [ -f ${srcdir}/config/${targetfile} ]; then
354 files="${files} config/${targetfile}"
356 files="${files} config/${gdb_target_cpu}/${targetfile}"
358 links="${links} tm.h"
361 if [ "${nativefile}" != "" ]; then
362 if [ -f ${srcdir}/config/${nativefile} ]; then
363 files="${files} config/${nativefile}"
365 files="${files} config/${gdb_host_cpu}/${nativefile}"
367 links="${links} nm.h"
368 # temporary scaffolding until all hosts have the host/target/native
371 files="${files} config/nm-trash.h"
372 links="${links} nm.h"
381 grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
382 echo "source ${srcdir}/.gdbinit" >> .gdbinit
385 if [ "${nativefile}" = "" ] ; then
386 sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
387 < Makefile > Makefile.tem
388 mv -f Makefile.tem Makefile