1 configdirs="doc testsuite"
7 # map host info into gdb names.
11 a29k-*-*) gdb_host=ultra3 ;;
13 arm-*-*) gdb_host=arm ;;
15 c[12]-*-*) gdb_host=convex ;;
17 hppa*-hp-bsd) gdb_host=hppabsd ;;
18 hppa*-hp-hpux) gdb_host=hppahpux ;;
20 i[34]86-ncr-*) gdb_host=ncr3000 ;;
21 i[34]86-sequent-*) gdb_host=symmetry ;;
23 i[34]86-*-bsd*) gdb_host=i386bsd ;;
24 i[34]86-*-go32) gdb_host=go32 ;;
25 i[34]86-*-linux) gdb_host=linux ;;
26 i[34]86-*-mach) gdb_host=i386mach ;;
27 i[34]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
28 i[34]86-*-sco*) gdb_host=i386sco ;;
29 i[34]86-*-solaris*) gdb_host=i386sol2 ;;
30 i[34]86-*-sunos*) gdb_host=sun386 ;;
31 i[34]86-*-sysv32) gdb_host=i386v32 ;;
32 i[34]86-*-sysv4*) gdb_host=i386v4 ;;
33 i[34]86-*-sysv*) gdb_host=i386v ;;
35 i860-*-*) gdb_host=stratus ;;
37 m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
38 m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
39 m68030-sony-*) gdb_host=news1000 ;;
41 m68*-altos-*) gdb_host=altos ;;
42 m68*-apollo*-sysv*) gdb_host=apollo68v ;;
43 m68*-apollo*-bsd*) gdb_host=apollo68b ;;
44 m68*-att-*) gdb_host=3b1 ;;
45 m68*-cbm-sysv4*) gdb_host=amix ;;
46 m68*-hp-bsd) gdb_host=hp300bsd ;;
47 m68*-hp-hpux) gdb_host=hp300hpux ;;
48 m68*-isi-*) gdb_host=isi ;;
49 m68*-sony-*) gdb_host=news ;;
50 m68*-sun-sunos3*) gdb_host=sun3os3 ;;
51 m68*-sun-sunos4*) gdb_host=sun3os4 ;;
52 m68*-sun-*) gdb_host=sun3os4 ;;
54 m88k-motorola-*) gdb_host=delta88 ;;
55 m88k-*-*) gdb_host=m88k ;;
57 mips-dec-*) gdb_host=decstation ;;
58 mips-little-*) gdb_host=littlemips ;;
59 mips-sgi-irix3) gdb_host=irix3 ;;
60 mips-sgi-irix4*) gdb_host=irix4 ;;
61 mips-sony-*) gdb_host=bigmips ;;
63 none-*-*) gdb_host=none ;;
65 np1-*-*) gdb_host=np1 ;;
67 ns32k-umax-*) gdb_host=umax ;;
68 ns32k-utek-sysv) gdb_host=merlin ;;
70 pn-*-*) gdb_host=pn ;;
72 pyramid-*-*) gdb_host=pyramid ;;
74 romp-*-*) gdb_host=rtbsd ;;
76 rs6000-*-*) gdb_host=rs6000 ;;
78 sparc-*-solaris2*) gdb_host=sun4sol2 ;;
79 sparc-*-sunos4*) gdb_host=sun4os4 ;;
80 sparc-*-*) gdb_host=sun4os4 ;;
82 tahoe-*-*) gdb_host=tahoe ;;
84 vax-*-bsd*) gdb_host=vaxbsd ;;
85 vax-*-ultrix2*) gdb_host=vaxult2 ;;
86 vax-*-ultrix*) gdb_host=vaxult ;;
91 if [ ! -f ${srcdir}/config/${gdb_host}.mh ]; then
92 echo '***' "Gdb does not support host ${host}" 1>&2
96 # We really shouldn't depend on there being a space after XM_FILE= ...
97 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/${gdb_host}.mh`
103 a29k-*-aout) gdb_target=a29k ;;
104 a29k-*-coff) gdb_target=a29k ;;
105 a29k-*-elf) gdb_target=a29k ;;
106 a29k-*-ebmon) gdb_target=a29k ;;
107 a29k-*-kern) gdb_target=a29k-kern ;;
108 a29k-*-none) gdb_target=a29k ;;
109 a29k-*-sym1) gdb_target=ultra3 ;;
110 a29k-*-udi) gdb_target=a29k-udi ;;
112 arm-*-*) gdb_target=arm ;;
114 c1-*-*) gdb_target=convex ;;
115 c2-*-*) gdb_target=convex ;;
117 h8300-*-*) gdb_target=h8300hms ;;
119 hppa*-*-bsd) gdb_target=hppabsd ;;
120 hppa*-*-hpux) gdb_target=hppahpux ;;
122 i[34]86-sequent-*) gdb_target=symmetry ;;
123 i[34]86-ncr-*) gdb_target=ncr3000 ;;
125 i[34]86-*-aout) gdb_target=i386aout ;;
126 i[34]86-*-coff) gdb_target=i386v ;;
127 i[34]86-*-elf) gdb_target=i386v ;;
129 i[34]86-*-bsd*) gdb_target=i386bsd ;;
130 i[34]86-*-go32) gdb_target=i386aout ;;
131 i[34]86-*-solaris*) gdb_target=i386sol2 ;;
132 i[34]86-*-sunos*) gdb_target=sun386 ;;
133 i[34]86-*-sysv4*) gdb_target=i386v4 ;;
134 i[34]86-*-sco*) gdb_target=i386v ;;
135 i[34]86-*-sysv*) gdb_target=i386v ;;
136 i[34]86-*-linux) gdb_target=linux ;;
138 i860-*-*) gdb_target=stratus ;;
140 i960-*-bout) gdb_target=vxworks960 ;;
141 i960-*-coff) gdb_target=nindy960 ;;
142 i960-*-elf) gdb_target=nindy960 ;;
144 i960-*-nindy) gdb_target=nindy960 ;;
145 i960-*-vxworks) gdb_target=vxworks960 ;;
147 m68000-*-sunos3*) gdb_target=sun2os3 ;;
148 m68000-*-sunos4*) gdb_target=sun2os4 ;;
150 m68*-cbm-sysv4*) gdb_target=amix ;;
151 m68*-hp-bsd) gdb_target=hp300bsd ;;
152 m68*-hp-hpux) gdb_target=hp300hpux ;;
154 m68*-altos-*) gdb_target=altos ;;
155 m68*-att-*) gdb_target=3b1 ;;
156 m68*-ericsson-*) gdb_target=es1800 ;;
157 m68*-isi-*) gdb_target=isi ;;
158 m68*-netx-*) gdb_target=vxworks68 ;;
159 m68*-sony-*) gdb_target=news ;;
160 m68*-tandem-*) gdb_target=st2000 ;;
162 m68*-*-aout) gdb_target=m68k-fp ;;
163 m68*-*-coff) gdb_target=m68k-fp ;;
164 m68*-*-elf) gdb_target=m68k-fp ;;
165 m68*-*-os68k) gdb_target=os68k ;;
166 m68*-*-sunos3*) gdb_target=sun3os3 ;;
167 m68*-*-sunos4*) gdb_target=sun3os4 ;;
168 m68*-*-vxworks*) gdb_target=vxworks68 ;;
170 m88k-motorola-*) gdb_target=delta88 ;;
171 m88k-*-*) gdb_target=m88k ;;
173 mips-big-*) gdb_target=bigmips ;;
174 mips-dec-*) gdb_target=decstation ;;
175 mips-idt-ecoff) gdb_target=idt ;;
176 mips-little-*) gdb_target=littlemips ;;
177 mips-sgi-*) gdb_target=irix3 ;;
178 mips-sony-*) gdb_target=bigmips ;;
180 none-*-*) gdb_target=none ;;
182 np1-*-*) gdb_target=np1 ;;
184 ns32k-utek-sysv) gdb_target=merlin ;;
185 ns32k-utek-*) gdb_target=umax ;;
187 pn-*-*) gdb_target=pn ;;
189 pyramid-*-*) gdb_target=pyramid ;;
191 rs6000-*-*) gdb_target=rs6000 ;;
193 sparc-*-aout) gdb_target=sparc-em ;;
194 sparc-*-coff) gdb_target=sparc-em ;;
195 sparc-*-elf) gdb_target=sparc-em ;;
196 sparc-*-solaris2*) gdb_target=sun4sol2 ;;
197 sparc-*-sunos4*) gdb_target=sun4os4 ;;
198 sparc-*-vxworks*) gdb_target=sparc-em ;;
199 sparc-*-*) gdb_target=sun4os4 ;;
200 sparclite*-*-*) gdb_target=sun4os4 ;;
202 tahoe-*-*) gdb_target=tahoe ;;
203 vax-*-*) gdb_target=vax ;;
205 z8k-unknown-sim) gdb_target=z8ksim ;;
208 if [ ! -f ${srcdir}/config/${gdb_target}.mt ]; then
209 echo '***' "Gdb does not support target ${target}" 1>&2
213 if [ -z "${removing}" ] ; then
214 cat ${srcdir}/config/${gdb_host}.mh ${srcdir}/config/${gdb_target}.mt | awk '$1 == "#msg" {
218 # We really shouldn't depend on there being a space after TM_FILE= ...
219 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target}.mt`
221 if [ "${target}" = "${host}" ] ; then
222 nativefile=`awk '$1 == "NAT_FILE=" { print $2 }' <${srcdir}/config/${gdb_host}.mh`
225 host_makefile_frag=config/${gdb_host}.mh
226 target_makefile_frag=config/${gdb_target}.mt
228 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
229 # (NAT_FILE) is not set in the ?config/* file, we don't make the
230 # corresponding links. But we have to remove the xm.h files and tm.h
231 # files anyway, e.g. when switching from "configure host" to
237 if [ "${hostfile}" != "" ]; then
238 files="${files} ${hostfile}"
239 links="${links} xm.h"
242 if [ "${targetfile}" != "" ]; then
243 files="${files} ${targetfile}"
244 links="${links} tm.h"
247 if [ "${nativefile}" != "" ]; then
248 files="${files} ${nativefile}"
249 links="${links} nm.h"
250 # temporary scaffolding until all hosts have the host/target/native
253 files="${files} nm-trash.h"
254 links="${links} nm.h"
263 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
264 echo "source ${srcdir}/.gdbinit" >> .gdbinit
267 if [ "${nativefile}" = "" ] ; then
268 sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
269 < Makefile > Makefile.tem
270 mv -f Makefile.tem Makefile
273 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile