8 # map host info into gdb names.
13 case "${host_vendor}" in
17 gas) gdb_host=altosgas ;;
24 amigados) gdb_host=amigados ;;
25 sysv4*) gdb_host=amix ;;
31 hpux) gdb_host=hp300hpux ;;
32 bsd) gdb_host=hp300bsd ;;
37 sony) gdb_host=news ;;
40 sunos3) gdb_host=sun3os3 ;;
41 sunos4) gdb_host=sun3os4 ;;
49 case "${host_vendor}" in
52 sunos3) gdb_host=sun2os3 ;;
53 sunos4) gdb_host=sun2os4 ;;
61 sunos3) gdb_host=sun4os3 ;;
62 sunos4) gdb_host=sun4os4 ;;
68 case "${host_vendor}" in
69 sony) gdb_host=news1000 ;;
74 case "${host_vendor}" in
75 sony) gdb_host=bigmips ;;
76 dec) gdb_host=decstation ;;
77 little) gdb_host=littlemips ;;
78 sgi) gdb_host=irix3 ;;
83 case "${host_vendor}" in
84 sun) gdb_host=sun386 ;;
85 sco) gdb_host=i386sco ;;
86 sequent) gdb_host=symmetry ;;
89 sysv32) gdb_host=i386v32 ;;
90 sysv4*) gdb_host=i386v4 ;;
91 sysv*) gdb_host=i386v ;;
92 mach) gdb_host=i386mach ;;
98 c1 | c2) gdb_host=convex ;;
101 case "${host_vendor}" in
102 umax) gdb_host=umax ;;
119 case "${host_vendor}" in
127 arm | vax | merlin | none | np1 | pn | pyramid | tahoe)
139 if [ ! -f ${srcdir}/config/mh-${gdb_host} ]; then
140 echo '***' "Gdb does not support host ${host}" 1>&2
144 # We really shouldn't depend on there being a space after XM_FILE= ...
145 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/mh-${gdb_host}`
149 case "${target_cpu}" in
152 case "${target_vendor}" in
153 att) gdb_target=3b1 ;;
154 altos) gdb_target=altos ;;
157 amigados) gdb_host=amigados ;;
158 sysv4*) gdb_target=amix ;;
162 case "${target_os}" in
163 bsd) gdb_target=hp300bsd ;;
164 hpux) gdb_target=hp300hpux ;;
168 case "${target_os}" in
169 sunos3) gdb_target=sun3os3 ;;
170 sunos4) gdb_target=sun3os4 ;;
171 *) gdb_target=sun3 ;;
174 wrs) gdb_target=vxworks68 ;;
175 isi) gdb_target=isi ;;
176 sony) gdb_target=news ;;
181 case "${target_vendor}" in
183 case "${target_os}" in
184 sunos3) gdb_target=sun2os3 ;;
185 sunos4) gdb_target=sun2os4 ;;
186 *) gdb_target=sun2 ;;
192 case "${target_vendor}" in
193 sony) gdb_target=news1000 ;;
197 none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin)
198 gdb_target=${target_cpu} ;;
201 case "${target_vendor}" in
202 motorola) gdb_target=delta88 ;;
203 *) gdb_target=dgux ;;
207 case "${target_os}" in
208 none|aout|coff) gdb_target=a29k ;;
209 sym1) gdb_target=ultra3 ;;
210 kern) gdb_target=a29k-kern ;;
211 ebmon) gdb_target=a29k;;
216 case "${target_vendor}" in
217 sony) gdb_target=bigmips ;;
218 dec) gdb_target=decstation ;;
219 little) gdb_target=littlemips ;;
220 sgi) gdb_target=irix3 ;;
224 c1 | c2) gdb_target=convex ;;
227 case "${target_vendor}" in
229 case "${target_os}" in
230 sunos3) gdb_target=sun4os3 ;;
231 sunos4) gdb_target=sun4os4 ;;
232 *) gdb_target=sun4 ;;
240 case "${target_vendor}" in
241 sco) gdb_target=i386sco ;;
242 sun) gdb_target=sun386 ;;
243 sequent) gdb_target=symmetry ;;
245 case "${target_os}" in
246 sysv32) gdb_target=i386v32 ;;
247 sysv4*) gdb_target=i386v4 ;;
248 sysv*) gdb_target=i386v ;;
249 mach) gdb_target=i386mach ;;
250 coff) gdb_target=i386v ;;
251 aout) gdb_target=i386aout ;;
257 case "${target_vendor}" in
258 bout | wrs) gdb_target=vxworks960 ;;
259 coff | intel) gdb_target=nindy960 ;;
264 case "${target_vendor}" in
265 utek) gdb_target=umax ;;
273 ### unhandled targets
280 if [ ! -f ${srcdir}/config/mt-${gdb_target} ]; then
281 echo '***' "Gdb does not support target ${target}" 1>&2
285 if [ -z "${removing}" ] ; then
286 cat ${srcdir}/config/mh-${gdb_host} ${srcdir}/config/mt-${gdb_target} | awk '$1 == "#msg" {
290 # We really shouldn't depend on there being a space after TM_FILE= ...
291 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/mt-${gdb_target}`
293 host_makefile_frag=config/mh-${gdb_host}
294 target_makefile_frag=config/mt-${gdb_target}
296 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
297 # ?config/* file, we don't make the corresponding links. But we have
298 # to remove the xm.h files and tm.h files anyway, e.g. when switching
299 # from "configure host" to "configure none".
303 if [ "${hostfile}" != "" ]; then
304 files="${files} ${hostfile}"
305 links="${links} xm.h"
308 if [ "${targetfile}" != "" ]; then
309 files="${files} ${targetfile}"
310 links="${links} tm.h"
319 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
320 echo "source ${srcdir}/.gdbinit" >> .gdbinit
323 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile