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