Initial creation of sourceware repository
[deliverable/binutils-gdb.git] / gdb / gdbserver / configure.in
CommitLineData
c906108c
SS
1srcname="Remote GDB server"
2srctrigger=server.c
3gdb_serial_driver=../ser-unix.c
4
5# per-host:
6
7. ${srcdir}/../configure.host
8
9echo "gdbserver/configure.in: host is $host, target is $target"
10
11if [ ! -f ${srcdir}/../config/${gdb_host_cpu}/${gdb_host}.mh ]; then
12 echo '***' "GDB remote does not support host ${host}" 1>&2
13 exit 1
14fi
15
16# We really shouldn't depend on there being a space after XM_FILE= ...
17hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/../config/${gdb_host_cpu}/${gdb_host}.mh`
18
19# per-target:
20
21. ${srcdir}/../configure.tgt
22
23echo "gdbserver/configure.in: host_cpu is $host_cpu, target_cpu is $target_cpu"
24
25if [ ! -f ${srcdir}/../config/${gdb_target_cpu}/${gdb_target}.mt ]; then
26 echo '***' "GDB remote does not support target ${target}" 1>&2
27 exit 1
28fi
29
30if [ -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)}'
33fi
34
35# We really shouldn't depend on there being a space after TM_FILE= ...
36targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/../config/${gdb_target_cpu}/${gdb_target}.mt`
37
38if [ "${target}" = "${host}" ] ; then
39 nativefile=`awk '$1 == "NAT_FILE=" { print $2 }' <${srcdir}/../config/${gdb_host_cpu}/${gdb_host}.mh`
40fi
41
42host_makefile_frag=../config/${gdb_host_cpu}/${gdb_host}.mh
43target_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
51files=
52links=
53rm -f xm.h
54rm -f ser-hardwire.c
55if [ "${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"
65fi
66rm -f tm.h
67if [ "${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"
74fi
75rm -f nm.h
76if [ "${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.
85else
86 files="${files} ../config/nm-empty.h"
87 links="${links} nm.h"
88fi
89
90if [ ${target_cpu} = "sparclite" ]; then
91 configdirs="${configdirs} sparclite"
92fi
93
94# post-target:
95
96if [ "${nativefile}" = "" ] ; then
97 sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
98 < Makefile > Makefile.tem
99 mv -f Makefile.tem Makefile
100fi
This page took 0.03498 seconds and 4 git commands to generate.