Commit | Line | Data |
---|---|---|
6ec7e4d3 SS |
1 | # This file is a shell script fragment that supplies the information |
2 | # necessary to tailor a template configure script into the configure | |
3 | # script appropriate for this directory. For more information, check | |
4 | # any existing configure script. | |
5 | ||
912e0732 RP |
6 | srcname="GDB" |
7 | srctrigger=main.c | |
bc028766 | 8 | |
6ec7e4d3 SS |
9 | configdirs="doc testsuite" |
10 | ||
0df06ca0 RP |
11 | # per-host: |
12 | ||
1a0edbc7 FF |
13 | # Map host cpu into the config cpu subdirectory name. |
14 | # The default is $host_cpu. | |
15 | ||
16 | case "${host_cpu}" in | |
17 | ||
18 | c[12]) gdb_host_cpu=convex ;; | |
19 | hppa*) gdb_host_cpu=pa ;; | |
20 | i[34]86) gdb_host_cpu=i386 ;; | |
21 | m68*) gdb_host_cpu=m68k ;; | |
6ec7e4d3 | 22 | m88*) gdb_host_cpu=m88k ;; |
1a0edbc7 FF |
23 | np1) gdb_host_cpu=gould ;; |
24 | pyramid) gdb_host_cpu=pyr ;; | |
25 | *) gdb_host_cpu=$host_cpu ;; | |
26 | ||
27 | esac | |
28 | ||
6c815bbe RP |
29 | # map host info into gdb names. |
30 | ||
19758e9e | 31 | case "${host}" in |
6c815bbe | 32 | |
19758e9e JG |
33 | a29k-*-*) gdb_host=ultra3 ;; |
34 | ||
7ccb1e44 SC |
35 | alpha-*-osf*) gdb_host=alpha-osf1 ;; |
36 | ||
19758e9e JG |
37 | arm-*-*) gdb_host=arm ;; |
38 | ||
39 | c[12]-*-*) gdb_host=convex ;; | |
40 | ||
e8e13040 | 41 | hppa*-*-bsd*) gdb_host=hppabsd ;; |
e8e13040 | 42 | hppa*-*-hiux*) gdb_host=hppahpux ;; |
6ec7e4d3 | 43 | hppa*-*-hpux*) gdb_host=hppahpux ;; |
6bfd168c | 44 | hppa*-*-osf*) gdb_host=hppabsd ;; |
19758e9e | 45 | |
19758e9e | 46 | i[34]86-ncr-*) gdb_host=ncr3000 ;; |
6ec7e4d3 | 47 | i[34]86-sequent-bsd*) gdb_host=symmetry ;; # dynix |
59144a81 | 48 | i[34]86-sequent-sysv4*) gdb_host=ptx4 ;; |
56eec3c7 | 49 | i[34]86-sequent-sysv*) gdb_host=ptx ;; |
2c7ab4ca | 50 | i[34]86-*-aix*) gdb_host=i386aix ;; |
6d685882 | 51 | i[34]86-*-bsd*) gdb_host=i386bsd ;; |
a6565079 | 52 | i[34]86-*-netbsd*) gdb_host=i386bsd ;; |
6ec7e4d3 | 53 | i[34]86-*-go32*) gdb_host=go32 ;; |
3b891e0b | 54 | i[34]86-*-linux*) gdb_host=linux ;; |
9bebe500 | 55 | i[34]86-*-lynxos*) gdb_host=i386lynx ;; |
3563094d | 56 | i[34]86-*-mach3*) gdb_host=i386m3 ;; |
6ec7e4d3 SS |
57 | i[34]86-*-mach*) gdb_host=i386mach ;; |
58 | i[34]86-*-osf1mk*) gdb_host=osf1mk ;; | |
117f631e | 59 | i[34]86-*-sco3.2v4*) gdb_host=i386sco4 ;; |
cf57ff2a | 60 | i[34]86-*-sco*) gdb_host=i386sco ;; |
5c820c19 | 61 | i[34]86-*-solaris*) gdb_host=i386sol2 ;; |
b1aa08e2 | 62 | i[34]86-*-sunos*) gdb_host=sun386 ;; |
3b891e0b | 63 | i[34]86-*-sysv3.2*) gdb_host=i386v32 ;; |
d9a5e91f | 64 | i[34]86-*-sysv32*) gdb_host=i386v32 ;; |
19758e9e | 65 | i[34]86-*-sysv4*) gdb_host=i386v4 ;; |
2fa6925b | 66 | i[34]86-*-unixware) gdb_host=i386v4 ;; |
19758e9e | 67 | i[34]86-*-sysv*) gdb_host=i386v ;; |
e23a6896 | 68 | i[34]86-*-isc*) gdb_host=i386v32 ;; |
1340861c | 69 | i[34]86-*-os9k) gdb_host=i386os9k ;; |
19758e9e | 70 | |
358ca35e JG |
71 | m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;; |
72 | m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;; | |
ef131e13 | 73 | m68030-sony-*) gdb_host=news1000 ;; |
19758e9e | 74 | |
358ca35e JG |
75 | m68*-altos-*) gdb_host=altos ;; |
76 | m68*-apollo*-sysv*) gdb_host=apollo68v ;; | |
77 | m68*-apollo*-bsd*) gdb_host=apollo68b ;; | |
78 | m68*-att-*) gdb_host=3b1 ;; | |
0a8f1742 | 79 | m68*-bull*-sysv*) gdb_host=dpx2 ;; |
8f59e92b FF |
80 | m68*-hp-bsd*) gdb_host=hp300bsd ;; |
81 | m68*-hp-hpux*) gdb_host=hp300hpux ;; | |
358ca35e | 82 | m68*-isi-*) gdb_host=isi ;; |
9bebe500 | 83 | m68*-*-lynxos*) gdb_host=m68klynx ;; |
670a8e09 | 84 | m68*-*-sysv4*) gdb_host=m68kv4 ;; |
c649a7c2 | 85 | m68*-motorola-*) gdb_host=delta68 ;; |
358ca35e JG |
86 | m68*-sony-*) gdb_host=news ;; |
87 | m68*-sun-sunos3*) gdb_host=sun3os3 ;; | |
88 | m68*-sun-sunos4*) gdb_host=sun3os4 ;; | |
89 | m68*-sun-*) gdb_host=sun3os4 ;; | |
19758e9e | 90 | |
670a8e09 | 91 | m88*-harris-cxux*) gdb_host=cxux ;; |
304977ab JK |
92 | m88*-motorola-sysv4*) gdb_host=delta88v4 ;; |
93 | m88*-motorola-sysv*) gdb_host=delta88 ;; | |
6ec7e4d3 | 94 | m88*-*-mach3*) gdb_host=mach3 ;; |
304977ab | 95 | m88*-*-*) gdb_host=m88k ;; |
19758e9e | 96 | |
6ec7e4d3 | 97 | mips-dec-mach3*) gdb_host=mach3 ;; |
19758e9e JG |
98 | mips-dec-*) gdb_host=decstation ;; |
99 | mips-little-*) gdb_host=littlemips ;; | |
3b891e0b | 100 | mips-sgi-irix3*) gdb_host=irix3 ;; |
81029114 | 101 | mips-sgi-irix4*) gdb_host=irix4 ;; |
e03c0cc6 | 102 | mips-sgi-irix5*) gdb_host=irix5 ;; |
b487ba2e | 103 | mips-sony-*) gdb_host=news-mips ;; |
6ec7e4d3 | 104 | mips-*-mach3*) gdb_host=mach3 ;; |
2fe3b329 | 105 | mips-*-sysv4*) gdb_host=mipsv4 ;; |
ee06f230 | 106 | mips-*-sysv*) gdb_host=riscos ;; |
e8f8e093 | 107 | mips-*-riscos*) gdb_host=riscos ;; |
19758e9e JG |
108 | |
109 | none-*-*) gdb_host=none ;; | |
ef131e13 | 110 | |
19758e9e JG |
111 | np1-*-*) gdb_host=np1 ;; |
112 | ||
6ec7e4d3 | 113 | ns32k-*-mach3*) gdb_host=mach3 ;; |
19758e9e | 114 | ns32k-umax-*) gdb_host=umax ;; |
3b891e0b | 115 | ns32k-utek-sysv*) gdb_host=merlin ;; |
19758e9e | 116 | |
19758e9e JG |
117 | pn-*-*) gdb_host=pn ;; |
118 | ||
119 | pyramid-*-*) gdb_host=pyramid ;; | |
120 | ||
121 | romp-*-*) gdb_host=rtbsd ;; | |
122 | ||
d87d7b10 | 123 | rs6000-*-lynxos*) gdb_host=rs6000lynx ;; |
19758e9e JG |
124 | rs6000-*-*) gdb_host=rs6000 ;; |
125 | ||
9bebe500 | 126 | sparc-*-lynxos*) gdb_host=sparclynx ;; |
ef131e13 | 127 | sparc-*-solaris2*) gdb_host=sun4sol2 ;; |
ebb3a1e5 | 128 | sparc-*-sunos4*) gdb_host=sun4os4 ;; |
b52373a2 | 129 | sparc-*-*) gdb_host=sun4os4 ;; |
19758e9e JG |
130 | |
131 | tahoe-*-*) gdb_host=tahoe ;; | |
132 | ||
133 | vax-*-bsd*) gdb_host=vaxbsd ;; | |
6985bc54 | 134 | vax-*-ultrix2*) gdb_host=vaxult2 ;; |
19758e9e | 135 | vax-*-ultrix*) gdb_host=vaxult ;; |
7da1e27d | 136 | |
6c815bbe RP |
137 | esac |
138 | ||
8c7ae4a2 | 139 | |
1a0edbc7 | 140 | if [ ! -f ${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh ]; then |
6c815bbe | 141 | echo '***' "Gdb does not support host ${host}" 1>&2 |
912e0732 RP |
142 | exit 1 |
143 | fi | |
144 | ||
bdf3621b | 145 | # We really shouldn't depend on there being a space after XM_FILE= ... |
1a0edbc7 | 146 | hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh` |
912e0732 | 147 | |
0df06ca0 | 148 | # per-target: |
912e0732 | 149 | |
1a0edbc7 FF |
150 | # Map target cpu into the config cpu subdirectory name. |
151 | # The default is $target_cpu. | |
152 | ||
153 | case "${target_cpu}" in | |
154 | ||
cef4c2e7 | 155 | alpha) gdb_target_cpu=alpha ;; |
1a0edbc7 FF |
156 | c[12]) gdb_target_cpu=convex ;; |
157 | hppa*) gdb_target_cpu=pa ;; | |
158 | i[34]86) gdb_target_cpu=i386 ;; | |
159 | m68*) gdb_target_cpu=m68k ;; | |
6ec7e4d3 | 160 | m88*) gdb_target_cpu=m88k ;; |
b60f6584 | 161 | mips*) gdb_target_cpu=mips ;; |
1a0edbc7 FF |
162 | np1) gdb_target_cpu=gould ;; |
163 | pn) gdb_target_cpu=gould ;; | |
164 | pyramid) gdb_target_cpu=pyr ;; | |
2c30f258 | 165 | sparclite*) gdb_target_cpu=sparc |
6ec7e4d3 | 166 | configdirs="${configdirs} sparclite" ;; |
0c101d49 | 167 | sparc*) gdb_target_cpu=sparc ;; |
1a0edbc7 FF |
168 | *) gdb_target_cpu=$target_cpu ;; |
169 | ||
170 | esac | |
171 | ||
172 | # map target info into gdb names. | |
173 | ||
ef131e13 JG |
174 | case "${target}" in |
175 | ||
3b891e0b JK |
176 | a29k-*-aout*) gdb_target=a29k ;; |
177 | a29k-*-coff*) gdb_target=a29k ;; | |
178 | a29k-*-elf*) gdb_target=a29k ;; | |
179 | a29k-*-ebmon*) gdb_target=a29k ;; | |
180 | a29k-*-kern*) gdb_target=a29k-kern ;; | |
181 | a29k-*-none*) gdb_target=a29k ;; | |
182 | a29k-*-sym1*) gdb_target=ultra3 ;; | |
183 | a29k-*-udi*) gdb_target=a29k-udi ;; | |
ef131e13 | 184 | |
cef4c2e7 | 185 | alpha-*-osf*) gdb_target=alpha-osf1 ;; |
2e6784a8 | 186 | alpha-*-netware*) gdb_target=alpha-nw |
6ec7e4d3 SS |
187 | configdirs="${configdirs} nlm" ;; |
188 | ||
ef131e13 JG |
189 | arm-*-*) gdb_target=arm ;; |
190 | ||
191 | c1-*-*) gdb_target=convex ;; | |
192 | c2-*-*) gdb_target=convex ;; | |
193 | ||
194 | h8300-*-*) gdb_target=h8300hms ;; | |
195e46ea | 195 | h8500-*-*) gdb_target=h8500hms ;; |
ef131e13 | 196 | |
9faacb92 SC |
197 | sh-*-*) gdb_target=sh ;; |
198 | ||
8f59e92b FF |
199 | hppa*-*-bsd*) gdb_target=hppabsd ;; |
200 | hppa*-*-hpux*) gdb_target=hppahpux ;; | |
7079e766 | 201 | hppa*-*-hiux*) gdb_target=hppahpux ;; |
6bfd168c | 202 | hppa*-*-osf*) gdb_target=hppaosf ;; |
ef131e13 | 203 | |
59144a81 JK |
204 | i[34]86-sequent-bsd*) gdb_target=symmetry ;; |
205 | i[34]86-sequent-sysv4*) gdb_target=ptx4 ;; | |
206 | i[34]86-sequent-sysv*) gdb_target=ptx ;; | |
ef131e13 | 207 | i[34]86-ncr-*) gdb_target=ncr3000 ;; |
3b891e0b JK |
208 | i[34]86-*-aout*) gdb_target=i386aout ;; |
209 | i[34]86-*-coff*) gdb_target=i386v ;; | |
210 | i[34]86-*-elf*) gdb_target=i386v ;; | |
2c7ab4ca | 211 | i[34]86-*-aix*) gdb_target=i386aix ;; |
6d685882 | 212 | i[34]86-*-bsd*) gdb_target=i386bsd ;; |
a6565079 | 213 | i[34]86-*-netbsd*) gdb_target=i386bsd ;; |
1340861c | 214 | i[34]86-*-os9k) gdb_target=i386os9k ;; |
3b891e0b | 215 | i[34]86-*-go32*) gdb_target=i386aout ;; |
9bebe500 | 216 | i[34]86-*-lynxos*) gdb_target=i386lynx |
6ec7e4d3 | 217 | configdirs="${configdirs} gdbserver" ;; |
5c820c19 | 218 | i[34]86-*-solaris*) gdb_target=i386sol2 ;; |
ef131e13 JG |
219 | i[34]86-*-sunos*) gdb_target=sun386 ;; |
220 | i[34]86-*-sysv4*) gdb_target=i386v4 ;; | |
cf57ff2a | 221 | i[34]86-*-sco*) gdb_target=i386v ;; |
ef131e13 | 222 | i[34]86-*-sysv*) gdb_target=i386v ;; |
e23a6896 JK |
223 | i[34]86-*-linux*) gdb_target=linux ;; |
224 | i[34]86-*-isc*) gdb_target=i386v ;; | |
3563094d | 225 | i[34]86-*-mach3*) gdb_target=i386m3 ;; |
6ec7e4d3 | 226 | i[34]86-*-mach*) gdb_target=i386mach ;; |
db85f523 | 227 | i[34]86-*-netware*) gdb_target=i386nw ;; |
5d76c8e6 | 228 | i[34]86-*-osf1mk*) gdb_target=i386mk ;; |
ef131e13 | 229 | |
3b891e0b JK |
230 | i960-*-bout*) gdb_target=vxworks960 ;; |
231 | i960-*-coff*) gdb_target=nindy960 ;; | |
232 | i960-*-elf*) gdb_target=nindy960 ;; | |
ebb3a1e5 | 233 | |
3b891e0b JK |
234 | i960-*-nindy*) gdb_target=nindy960 ;; |
235 | i960-*-vxworks*) gdb_target=vxworks960 ;; | |
ef131e13 | 236 | |
ebb3a1e5 JG |
237 | m68000-*-sunos3*) gdb_target=sun2os3 ;; |
238 | m68000-*-sunos4*) gdb_target=sun2os4 ;; | |
ef131e13 | 239 | |
835fe6e6 | 240 | m68*-apollo*-bsd*) gdb_target=apollo68b ;; |
6ec7e4d3 | 241 | m68*-bull-sysv*) gdb_target=dpx2 ;; |
6ec7e4d3 SS |
242 | m68*-hp-bsd*) gdb_target=hp300bsd ;; |
243 | m68*-hp-hpux*) gdb_target=hp300hpux ;; | |
670a8e09 SS |
244 | m68*-altos-*) gdb_target=altos ;; |
245 | m68*-att-*) gdb_target=3b1 ;; | |
246 | m68*-cisco*-*) gdb_target=cisco ;; | |
247 | m68*-ericsson-*) gdb_target=es1800 ;; | |
358ca35e | 248 | m68*-isi-*) gdb_target=isi ;; |
c649a7c2 | 249 | m68*-motorola-*) gdb_target=delta68 ;; |
358ca35e JG |
250 | m68*-netx-*) gdb_target=vxworks68 ;; |
251 | m68*-sony-*) gdb_target=news ;; | |
252 | m68*-tandem-*) gdb_target=st2000 ;; | |
c1128340 RS |
253 | m68*-rom68k-*) gdb_target=monitor ;; |
254 | m68*-*bug-*) gdb_target=monitor ;; | |
255 | m68*-monitor-*) gdb_target=monitor ;; | |
0ffba029 RS |
256 | m68*-*-aout*) gdb_target=monitor ;; |
257 | m68*-*-coff*) gdb_target=monitor ;; | |
258 | m68*-*-elf*) gdb_target=monitor ;; | |
9bebe500 | 259 | m68*-*-lynxos*) gdb_target=m68klynx |
6ec7e4d3 | 260 | configdirs="${configdirs} gdbserver" ;; |
3b891e0b | 261 | m68*-*-os68k*) gdb_target=os68k ;; |
358ca35e JG |
262 | m68*-*-sunos3*) gdb_target=sun3os3 ;; |
263 | m68*-*-sunos4*) gdb_target=sun3os4 ;; | |
670a8e09 | 264 | m68*-*-sysv4*) gdb_target=m68kv4 ;; |
358ca35e | 265 | m68*-*-vxworks*) gdb_target=vxworks68 ;; |
ef131e13 | 266 | |
670a8e09 | 267 | m88*-harris-cxux*) gdb_target=cxux ;; |
f9440640 | 268 | m88*-motorola-sysv4*) gdb_target=delta88v4 ;; |
6ec7e4d3 | 269 | m88*-*-mach3*) gdb_target=mach3 ;; |
304977ab JK |
270 | m88*-motorola-*) gdb_target=delta88 ;; |
271 | m88*-*-*) gdb_target=m88k ;; | |
ef131e13 | 272 | |
70126bf9 | 273 | mips64*-big-*) gdb_target=bigmips64 ;; |
b60f6584 | 274 | mips*-big-*) gdb_target=bigmips ;; |
6ec7e4d3 | 275 | mips*-dec-mach3*) gdb_target=mach3 ;; |
b60f6584 | 276 | mips*-dec-*) gdb_target=decstation ;; |
70126bf9 KH |
277 | mips64*el-*-ecoff*) gdb_target=idtl64 ;; |
278 | mips64*-idt-ecoff*) gdb_target=idt64 ;; | |
279 | mips64*el-*-elf*) gdb_target=idtl64 ;; | |
280 | mips64*-*-elf*) gdb_target=idt64 ;; | |
b60f6584 ILT |
281 | mips*el-*-ecoff*) gdb_target=idtl ;; |
282 | mips*-idt-ecoff*) gdb_target=idt ;; | |
283 | mips*el-*-elf*) gdb_target=idtl ;; | |
284 | mips*-*-elf*) gdb_target=idt ;; | |
285 | mips*-little-*) gdb_target=littlemips ;; | |
286 | mips*-sgi-irix5*) gdb_target=irix5 ;; | |
287 | mips*-sgi-*) gdb_target=irix3 ;; | |
288 | mips*-sony-*) gdb_target=bigmips ;; | |
6ec7e4d3 | 289 | mips*-*-mach3*) gdb_target=mach3 ;; |
2fe3b329 | 290 | mips*-*-sysv4*) gdb_target=mipsv4 ;; |
b60f6584 ILT |
291 | mips*-*-sysv*) gdb_target=bigmips ;; |
292 | mips*-*-riscos*) gdb_target=bigmips ;; | |
ef131e13 JG |
293 | |
294 | none-*-*) gdb_target=none ;; | |
295 | ||
296 | np1-*-*) gdb_target=np1 ;; | |
297 | ||
6ec7e4d3 | 298 | ns32k-*-mach3*) gdb_target=mach3 ;; |
3b891e0b | 299 | ns32k-utek-sysv*) gdb_target=merlin ;; |
ef131e13 JG |
300 | ns32k-utek-*) gdb_target=umax ;; |
301 | ||
302 | pn-*-*) gdb_target=pn ;; | |
cad1498f | 303 | powerpc-*-netware*) gdb_target=ppc-nw ;; |
ef131e13 JG |
304 | |
305 | pyramid-*-*) gdb_target=pyramid ;; | |
306 | ||
d87d7b10 | 307 | rs6000-*-lynxos*) gdb_target=rs6000lynx ;; |
ef131e13 JG |
308 | rs6000-*-*) gdb_target=rs6000 ;; |
309 | ||
3b891e0b JK |
310 | sparc-*-aout*) gdb_target=sparc-em ;; |
311 | sparc-*-coff*) gdb_target=sparc-em ;; | |
312 | sparc-*-elf*) gdb_target=sparc-em ;; | |
9bebe500 | 313 | sparc-*-lynxos*) gdb_target=sparclynx |
6ec7e4d3 | 314 | configdirs="${configdirs} gdbserver" ;; |
ef131e13 | 315 | sparc-*-solaris2*) gdb_target=sun4sol2 ;; |
ebb3a1e5 | 316 | sparc-*-sunos4*) gdb_target=sun4os4 ;; |
54d44c8c | 317 | sparc-*-vxworks*) gdb_target=vxsparc ;; |
b52373a2 | 318 | sparc-*-*) gdb_target=sun4os4 ;; |
0c101d49 | 319 | sparclite*-*-*) gdb_target=sparclite ;; |
6ec7e4d3 | 320 | sparc64-*-*) gdb_target=sp64 ;; |
ef131e13 JG |
321 | |
322 | tahoe-*-*) gdb_target=tahoe ;; | |
6ec7e4d3 | 323 | |
ef131e13 | 324 | vax-*-*) gdb_target=vax ;; |
6c815bbe | 325 | |
3b891e0b JK |
326 | z8k-*-sim*) gdb_target=z8ksim ;; |
327 | z8k-*-coff*) gdb_target=z8ksim ;; | |
6ec7e4d3 | 328 | |
6c815bbe RP |
329 | esac |
330 | ||
1a0edbc7 | 331 | if [ ! -f ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt ]; then |
6c815bbe | 332 | echo '***' "Gdb does not support target ${target}" 1>&2 |
912e0732 RP |
333 | exit 1 |
334 | fi | |
335 | ||
336 | if [ -z "${removing}" ] ; then | |
1a0edbc7 | 337 | cat ${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | awk '$1 == "#msg" { |
912e0732 RP |
338 | print substr($0,6)}' |
339 | fi | |
340 | ||
bdf3621b | 341 | # We really shouldn't depend on there being a space after TM_FILE= ... |
1a0edbc7 | 342 | targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt` |
912e0732 | 343 | |
79f68f0f DZ |
344 | |
345 | # these really aren't orthogonal true/false values of the same condition, | |
346 | # but shells are slow enough that I like to reuse the test conditions | |
347 | # whenever possible | |
348 | # | |
d40309c7 | 349 | if [ "${target}" = "${host}" ] ; then |
1a0edbc7 | 350 | nativefile=`awk '$1 == "NAT_FILE=" { print $2 }' <${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh` |
79f68f0f DZ |
351 | else |
352 | # GDBserver is only useful in a "native" enviroment | |
353 | configdirs=`echo $configdirs | sed 's/gdbserver//'` | |
d40309c7 JG |
354 | fi |
355 | ||
1a0edbc7 FF |
356 | host_makefile_frag=config/${gdb_host_cpu}/${gdb_host}.mh |
357 | target_makefile_frag=config/${gdb_target_cpu}/${gdb_target}.mt | |
912e0732 | 358 | |
d40309c7 JG |
359 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
360 | # (NAT_FILE) is not set in the ?config/* file, we don't make the | |
361 | # corresponding links. But we have to remove the xm.h files and tm.h | |
362 | # files anyway, e.g. when switching from "configure host" to | |
363 | # "configure none". | |
364 | ||
bdf3621b JG |
365 | files= |
366 | links= | |
dc0c3f64 | 367 | rm -f xm.h |
bdf3621b | 368 | if [ "${hostfile}" != "" ]; then |
1a0edbc7 FF |
369 | if [ -f ${srcdir}/config/${hostfile} ]; then |
370 | files="${files} config/${hostfile}" | |
371 | else | |
372 | files="${files} config/${gdb_host_cpu}/${hostfile}" | |
373 | fi | |
bdf3621b JG |
374 | links="${links} xm.h" |
375 | fi | |
dc0c3f64 | 376 | rm -f tm.h |
bdf3621b | 377 | if [ "${targetfile}" != "" ]; then |
1a0edbc7 FF |
378 | if [ -f ${srcdir}/config/${targetfile} ]; then |
379 | files="${files} config/${targetfile}" | |
380 | else | |
381 | files="${files} config/${gdb_target_cpu}/${targetfile}" | |
382 | fi | |
bdf3621b JG |
383 | links="${links} tm.h" |
384 | fi | |
1a0edbc7 | 385 | rm -f nm.h |
d40309c7 | 386 | if [ "${nativefile}" != "" ]; then |
1a0edbc7 FF |
387 | if [ -f ${srcdir}/config/${nativefile} ]; then |
388 | files="${files} config/${nativefile}" | |
389 | else | |
390 | files="${files} config/${gdb_host_cpu}/${nativefile}" | |
391 | fi | |
dfc82617 | 392 | links="${links} nm.h" |
c9c23412 RP |
393 | # temporary scaffolding until all hosts have the host/target/native |
394 | # split in place. | |
395 | else | |
1a0edbc7 | 396 | files="${files} config/nm-trash.h" |
dfc82617 | 397 | links="${links} nm.h" |
d40309c7 | 398 | fi |
bdf3621b | 399 | |
754e5da2 SG |
400 | # Make it possible to use the GUI without doing a full install |
401 | if [ "${enable_gdbtk}" = "yes" ] ; then | |
402 | files="${files} gdbtk.tcl" | |
403 | links="${links} gdbtk.tcl" | |
404 | fi | |
405 | ||
bdf3621b | 406 | # post-target: |
912e0732 | 407 | |
bdf3621b JG |
408 | case ${srcdir} in |
409 | .) | |
410 | ;; | |
411 | *) | |
e8f8e093 | 412 | grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \ |
bdf3621b JG |
413 | echo "source ${srcdir}/.gdbinit" >> .gdbinit |
414 | esac | |
415 | ||
c1ab5dba | 416 | if [ "${nativefile}" = "" ] ; then |
41617f8b | 417 | sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \ |
d40309c7 JG |
418 | < Makefile > Makefile.tem |
419 | mv -f Makefile.tem Makefile | |
420 | fi | |
94d4b713 | 421 | |
754e5da2 SG |
422 | if [ "${enable_gdbtk}" = "yes" ] ; then |
423 | sed -e '/# End of host and/i\ | |
424 | \ | |
425 | ENABLE_DEPFILES = gdbtk.o\ | |
426 | ENABLE_CLIBS = -ltcl -ltk -lX11 -lm | |
427 | ' < Makefile > Makefile.tem | |
428 | mv -f Makefile.tem Makefile | |
429 | fi | |
430 | ||
94d4b713 JK |
431 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, |
432 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
433 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
434 | mv -f Makefile.tmp Makefile |