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 mach) gdb_host=i386mach ;;
95 c1 | c2) gdb_host=convex ;;
98 case "${host_vendor}" in
99 umax) gdb_host=umax ;;
115 arm | vax | m88k | merlin | none | np1 | pn | pyramid | tahoe)
126 if [ ! -f xconfig/${gdb_host} ]; 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 }' <xconfig/${gdb_host}`
136 case "${target_cpu}" in
139 case "${target_vendor}" in
140 att) gdb_target=3b1 ;;
141 altos) gdb_target=altos ;;
144 amigados) gdb_host=amigados ;;
145 svr4) gdb_target=amix ;;
149 case "${target_os}" in
150 bsd) gdb_target=hp300bsd ;;
151 hpux) gdb_target=hp300hpux ;;
155 case "${target_os}" in
156 sunos3) gdb_target=sun3os3 ;;
157 sunos4) gdb_target=sun3os4 ;;
158 *) gdb_target=sun3 ;;
161 wrs) gdb_target=vxworks68 ;;
162 isi) gdb_target=isi ;;
163 sony) gdb_target=news ;;
168 case "${target_vendor}" in
170 case "${target_os}" in
171 sunos3) gdb_target=sun2os3 ;;
172 sunos4) gdb_target=sun2os4 ;;
173 *) gdb_target=sun2 ;;
179 case "${target_vendor}" in
180 sony) gdb_target=news1000 ;;
184 none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin | m88k)
185 gdb_target=${target_cpu} ;;
188 case "${target_os}" in
189 none|aout|coff) gdb_target=a29k ;;
190 sym1) gdb_target=ultra3 ;;
191 kern) gdb_target=a29k-kern ;;
192 ebmon) gdb_target=a29k;;
197 case "${target_vendor}" in
198 sony) gdb_target=bigmips ;;
199 dec) gdb_target=decstation ;;
200 little) gdb_target=littlemips ;;
201 sgi) gdb_target=irix3 ;;
205 c1 | c2) gdb_target=convex ;;
208 case "${target_vendor}" in
210 case "${target_os}" in
211 sunos3) gdb_target=sun4os3 ;;
212 sunos4) gdb_target=sun4os4 ;;
213 *) gdb_target=sun4 ;;
221 case "${target_vendor}" in
222 sco) gdb_target=i386sco ;;
223 sun) gdb_target=sun386 ;;
224 sequent) gdb_target=symmetry ;;
225 coff) gdb_target=i386v ;;
226 aout) gdb_target=i386v ;;
228 case "${target_os}" in
229 sysv) gdb_target=i386v ;;
230 sysv32) gdb_target=i386v32 ;;
231 mach) gdb_target=i386mach ;;
237 case "${target_vendor}" in
238 bout | wrs) gdb_target=vxworks960 ;;
239 coff | intel) gdb_target=nindy960 ;;
244 case "${target_vendor}" in
245 utek) gdb_target=umax ;;
253 ### unhandled targets
260 if [ ! -f tconfig/${gdb_target} ]; then
261 echo '***' "Gdb does not support target ${target}" 1>&2
265 if [ -z "${removing}" ] ; then
266 cat xconfig/${gdb_host} tconfig/${gdb_target} | awk '$1 == "#msg" {
270 # We really shouldn't depend on there being a space after TM_FILE= ...
271 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <tconfig/${gdb_target}`
273 host_makefile_frag=xconfig/${gdb_host}
274 target_makefile_frag=tconfig/${gdb_target}
276 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
277 # ?config/* file, we don't make the corresponding links. But we have
278 # to remove the xm.h files and tm.h files anyway, e.g. when switching
279 # from "configure host" to "configure none".
283 if [ "${hostfile}" != "" ]; then
284 files="${files} ${hostfile}"
285 links="${links} xm.h"
288 if [ "${targetfile}" != "" ]; then
289 files="${files} ${targetfile}"
290 links="${links} tm.h"
299 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
300 echo "source ${srcdir}/.gdbinit" >> .gdbinit
303 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile