6 # map host info into gdb names.
11 case "${host_vendor}" in
15 gas) gdb_host=altosgas ;;
22 amigados) gdb_host=amigados ;;
23 svr4) gdb_host=amix ;;
29 hpux) gdb_host=hp300hpux ;;
30 bsd) gdb_host=hp300bsd ;;
35 sony) gdb_host=news ;;
38 sunos3) gdb_host=sun3os3 ;;
39 sunos4) gdb_host=sun3os4 ;;
47 case "${host_vendor}" in
50 sunos3) gdb_host=sun2os3 ;;
51 sunos4) gdb_host=sun2os4 ;;
59 sunos3) gdb_host=sun4os3 ;;
60 sunos4) gdb_host=sun4os4 ;;
66 case "${host_vendor}" in
67 sony) gdb_host=news1000 ;;
72 case "${host_vendor}" in
73 sony) gdb_host=bigmips ;;
74 dec) gdb_host=decstation ;;
75 little) gdb_host=littlemips ;;
76 sgi) gdb_host=irix3 ;;
81 case "${host_vendor}" in
82 sun) gdb_host=sun386 ;;
83 sco) gdb_host=i386sco ;;
84 sequent) gdb_host=symmetry ;;
87 sysv) gdb_host=i386v ;;
88 sysv32) gdb_host=i386v32 ;;
89 svr4) gdb_host=i386v4 ;;
90 mach) gdb_host=i386mach ;;
96 c1 | c2) gdb_host=convex ;;
99 case "${host_vendor}" in
100 umax) gdb_host=umax ;;
117 case "${host_vendor}" in
125 arm | vax | merlin | none | np1 | pn | pyramid | tahoe)
137 if [ ! -f config/mh-${gdb_host} ]; then
138 echo '***' "Gdb does not support host ${host}" 1>&2
142 # We really shouldn't depend on there being a space after XM_FILE= ...
143 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <config/mh-${gdb_host}`
147 case "${target_cpu}" in
150 case "${target_vendor}" in
151 att) gdb_target=3b1 ;;
152 altos) gdb_target=altos ;;
155 amigados) gdb_host=amigados ;;
156 svr4) gdb_target=amix ;;
160 case "${target_os}" in
161 bsd) gdb_target=hp300bsd ;;
162 hpux) gdb_target=hp300hpux ;;
166 case "${target_os}" in
167 sunos3) gdb_target=sun3os3 ;;
168 sunos4) gdb_target=sun3os4 ;;
169 *) gdb_target=sun3 ;;
172 wrs) gdb_target=vxworks68 ;;
173 isi) gdb_target=isi ;;
174 sony) gdb_target=news ;;
179 case "${target_vendor}" in
181 case "${target_os}" in
182 sunos3) gdb_target=sun2os3 ;;
183 sunos4) gdb_target=sun2os4 ;;
184 *) gdb_target=sun2 ;;
190 case "${target_vendor}" in
191 sony) gdb_target=news1000 ;;
195 none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin)
196 gdb_target=${target_cpu} ;;
199 case "${target_vendor}" in
200 motorola) gdb_target=delta88 ;;
201 *) gdb_target=dgux ;;
205 case "${target_os}" in
206 none|aout|coff) gdb_target=a29k ;;
207 sym1) gdb_target=ultra3 ;;
208 kern) gdb_target=a29k-kern ;;
209 ebmon) gdb_target=a29k;;
214 case "${target_vendor}" in
215 sony) gdb_target=bigmips ;;
216 dec) gdb_target=decstation ;;
217 little) gdb_target=littlemips ;;
218 sgi) gdb_target=irix3 ;;
222 c1 | c2) gdb_target=convex ;;
225 case "${target_vendor}" in
227 case "${target_os}" in
228 sunos3) gdb_target=sun4os3 ;;
229 sunos4) gdb_target=sun4os4 ;;
230 *) gdb_target=sun4 ;;
238 case "${target_vendor}" in
239 sco) gdb_target=i386sco ;;
240 sun) gdb_target=sun386 ;;
241 sequent) gdb_target=symmetry ;;
243 case "${target_os}" in
244 sysv) gdb_target=i386v ;;
245 sysv32) gdb_target=i386v32 ;;
246 svr4) gdb_target=i386v4 ;;
247 mach) gdb_target=i386mach ;;
248 coff) gdb_target=i386v ;;
249 aout) gdb_target=i386aout ;;
255 case "${target_vendor}" in
256 bout | wrs) gdb_target=vxworks960 ;;
257 coff | intel) gdb_target=nindy960 ;;
262 case "${target_vendor}" in
263 utek) gdb_target=umax ;;
271 ### unhandled targets
278 if [ ! -f config/mt-${gdb_target} ]; then
279 echo '***' "Gdb does not support target ${target}" 1>&2
283 if [ -z "${removing}" ] ; then
284 cat config/mh-${gdb_host} config/mt-${gdb_target} | awk '$1 == "#msg" {
288 # We really shouldn't depend on there being a space after TM_FILE= ...
289 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <config/mt-${gdb_target}`
291 host_makefile_frag=config/mh-${gdb_host}
292 target_makefile_frag=config/mt-${gdb_target}
294 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
295 # ?config/* file, we don't make the corresponding links. But we have
296 # to remove the xm.h files and tm.h files anyway, e.g. when switching
297 # from "configure host" to "configure none".
301 if [ "${hostfile}" != "" ]; then
302 files="${files} ${hostfile}"
303 links="${links} xm.h"
306 if [ "${targetfile}" != "" ]; then
307 files="${files} ${targetfile}"
308 links="${links} tm.h"
317 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
318 echo "source ${srcdir}/.gdbinit" >> .gdbinit
321 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile