Sun Jul 6 02:44:28 1997 Philippe De Muyter <phdm@macqel.be>
[deliverable/binutils-gdb.git] / gdb / gdbserver / configure.in
1 srcname="Remote GDB server"
2 srctrigger=server.c
3 gdb_serial_driver=../ser-unix.c
4
5 # per-host:
6
7 . ${srcdir}/../configure.host
8
9 echo "gdbserver/configure.in: host is $host, target is $target"
10
11 if [ ! -f ${srcdir}/../config/${gdb_host_cpu}/${gdb_host}.mh ]; then
12 echo '***' "GDB remote does not support host ${host}" 1>&2
13 exit 1
14 fi
15
16 # We really shouldn't depend on there being a space after XM_FILE= ...
17 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/../config/${gdb_host_cpu}/${gdb_host}.mh`
18
19 # per-target:
20
21 . ${srcdir}/../configure.tgt
22
23 echo "gdbserver/configure.in: host_cpu is $host_cpu, target_cpu is $target_cpu"
24
25 if [ ! -f ${srcdir}/../config/${gdb_target_cpu}/${gdb_target}.mt ]; then
26 echo '***' "GDB remote does not support target ${target}" 1>&2
27 exit 1
28 fi
29
30 if [ -z "${removing}" ] ; then
31 cat ${srcdir}/../config/${gdb_host_cpu}/${gdb_host}.mh ${srcdir}/../config/${gdb_target_cpu}/${gdb_target}.mt | awk '$1 == "#msg" {
32 print substr($0,6)}'
33 fi
34
35 # We really shouldn't depend on there being a space after TM_FILE= ...
36 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/../config/${gdb_target_cpu}/${gdb_target}.mt`
37
38 if [ "${target}" = "${host}" ] ; then
39 nativefile=`awk '$1 == "NAT_FILE=" { print $2 }' <${srcdir}/../config/${gdb_host_cpu}/${gdb_host}.mh`
40 fi
41
42 host_makefile_frag=../config/${gdb_host_cpu}/${gdb_host}.mh
43 target_makefile_frag=../config/${gdb_target_cpu}/${gdb_target}.mt
44
45 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
46 # (NAT_FILE) is not set in the ?config/* file, we don't make the
47 # corresponding links. But we have to remove the xm.h files and tm.h
48 # files anyway, e.g. when switching from "configure host" to
49 # "configure none".
50
51 files=
52 links=
53 rm -f xm.h
54 rm -f ser-hardwire.c
55 if [ "${hostfile}" != "" ]; then
56 if [ -f ${srcdir}/../config/${hostfile} ]; then
57 files="${files} ../config/${hostfile}"
58 else
59 files="${files} ../config/${gdb_host_cpu}/${hostfile}"
60 fi
61 links="${links} xm.h"
62
63 # files="${files} ${gdb_serial_driver}"
64 # links="${links} ser-hardwire.c"
65 fi
66 rm -f tm.h
67 if [ "${targetfile}" != "" ]; then
68 if [ -f ${srcdir}/../config/${targetfile} ]; then
69 files="${files} ../config/${targetfile}"
70 else
71 files="${files} ../config/${gdb_target_cpu}/${targetfile}"
72 fi
73 links="${links} tm.h"
74 fi
75 rm -f nm.h
76 if [ "${nativefile}" != "" ]; then
77 if [ -f ${srcdir}/../config/${nativefile} ]; then
78 files="${files} ../config/${nativefile}"
79 else
80 files="${files} ../config/${gdb_host_cpu}/${nativefile}"
81 fi
82 links="${links} nm.h"
83 # temporary scaffolding until all hosts have the host/target/native
84 # split in place.
85 else
86 files="${files} ../config/nm-empty.h"
87 links="${links} nm.h"
88 fi
89
90 if [ ${target_cpu} = "sparclite" ]; then
91 configdirs="${configdirs} sparclite"
92 fi
93
94 # post-target:
95
96 if [ "${nativefile}" = "" ] ; then
97 sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
98 < Makefile > Makefile.tem
99 mv -f Makefile.tem Makefile
100 fi
This page took 0.036217 seconds and 4 git commands to generate.