6 # map host info into gdb names.
11 case "${host_vendor}" in
15 gas) gdb_host=altosgas ;;
21 hpux) gdb_host=hp300hpux ;;
22 bsd) gdb_host=hp300bsd ;;
27 sony) gdb_host=news ;;
30 sunos3) gdb_host=sun3os3 ;;
31 sunos4) gdb_host=sun3os4 ;;
39 case "${host_vendor}" in
42 sunos3) gdb_host=sun2os3 ;;
43 sunos4) gdb_host=sun2os4 ;;
51 sunos3) gdb_host=sun4os3 ;;
52 sunos4) gdb_host=sun4os4 ;;
58 case "${host_vendor}" in
59 sony) gdb_host=news1000 ;;
64 case "${host_vendor}" in
65 sony) gdb_host=bigmips ;;
66 dec) gdb_host=dec3100 ;;
67 little) gdb_host=littlemips ;;
72 case "${host_vendor}" in
73 sun) gdb_host=sun386 ;;
74 sco) gdb_host=i386sco ;;
75 sequent) gdb_host=symmetry ;;
78 sysv) gdb_host=i386v ;;
79 sysv32) gdb_host=i386v32 ;;
85 c1 | c2) gdb_host=convex ;;
88 case "${host_vendor}" in
89 umax) gdb_host=umax ;;
93 arm | vax | m88k | merlin | none | np1 | pn | pyramid | tahoe) gdb_host=${host_cpu} ;;
102 if [ ! -f xconfig/${gdb_host} ]; then
103 echo '***' "Gdb does not support host ${host}" 1>&2
107 # We really shouldn't depend on there being a space after XM_FILE= ...
108 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <xconfig/${gdb_host}`
112 case "${target_cpu}" in
115 case "${target_vendor}" in
116 att) gdb_target=3b1 ;;
117 altos) gdb_target=altos ;;
119 case "${target_os}" in
120 bsd) gdb_target=hp300bsd ;;
121 hpux) gdb_target=hp300hpux ;;
125 case "${target_os}" in
126 sunos3) gdb_target=sun3os3 ;;
127 sunos4) gdb_target=sun3os4 ;;
128 *) gdb_target=sun3 ;;
131 wrs) gdb_target=vxworks68 ;;
132 isi) gdb_target=isi ;;
133 sony) gdb_target=news ;;
138 case "${target_vendor}" in
140 case "${target_os}" in
141 sunos3) gdb_target=sun2os3 ;;
142 sunos4) gdb_target=sun2os4 ;;
143 *) gdb_target=sun2 ;;
149 case "${target_vendor}" in
150 sony) gdb_target=news1000 ;;
154 none | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin | m88k)
155 gdb_target=${target_cpu} ;;
156 a29k) gdb_target=am29k ;;
157 arm) gdb_target=${target_cpu} ;;
160 case "${target_vendor}" in
161 sony) gdb_target=bigmips ;;
162 dec) gdb_target=dec3100 ;;
163 little) gdb_target=littlemips ;;
167 c1 | c2) gdb_target=convex ;;
170 case "${target_vendor}" in
172 case "${target_os}" in
173 sunos3) gdb_target=sun4os3 ;;
174 sunos4) gdb_target=sun4os4 ;;
175 *) gdb_target=sun4 ;;
183 case "${target_vendor}" in
184 sco) gdb_target=i386sco ;;
185 sun) gdb_target=sun386 ;;
186 sequent) gdb_target=symmetry ;;
187 coff) gdb_target=i386v ;;
188 aout) gdb_target=i386v ;;
190 case "${target_os}" in
191 sysv) gdb_target=i386v ;;
192 sysv32) gdb_target=i386v32 ;;
198 case "${target_vendor}" in
199 bout | wrs) gdb_target=vxworks960 ;;
200 coff | intel) gdb_target=nindy960 ;;
205 case "${target_vendor}" in
206 utek) gdb_target=umax ;;
210 ### unhandled targets
217 if [ ! -f tconfig/${gdb_target} ]; then
218 echo '***' "Gdb does not support target ${target}" 1>&2
222 if [ -z "${removing}" ] ; then
223 cat xconfig/${gdb_host} tconfig/${gdb_target} | awk '$1 == "#msg" {
227 # We really shouldn't depend on there being a space after TM_FILE= ...
228 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <tconfig/${gdb_target}`
230 host_makefile_frag=xconfig/${gdb_host}
231 target_makefile_frag=tconfig/${gdb_target}
233 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
234 # ?config/* file, we don't make the corresponding links. But we have
235 # to remove the xm.h files and tm.h files anyway, e.g. when switching
236 # from "configure host" to "configure none".
240 if [ "${hostfile}" != "" ]; then
241 files="${files} ${hostfile}"
242 links="${links} xm.h"
245 if [ "${targetfile}" != "" ]; then
246 files="${files} ${targetfile}"
247 links="${links} tm.h"
256 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
257 echo "source ${srcdir}/.gdbinit" >> .gdbinit
260 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile