Thu Jul 4 14:47:06 1991 John Gilmore (gnu at cygint.cygnus.com)
[binutils-gdb.git] / gdb / configure.in
1 srcname="GDB"
2 srctrigger=main.c
3 Makefile=Makefile.conf
4
5 # per-host:
6
7 if [ ! -f xconfig/${host} ]; then
8 echo "No such host ${host}"
9 exit 1
10 fi
11
12 # We really shouldn't depend on there being a space after XM_FILE= ...
13 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <xconfig/$host`
14
15 # per-target:
16
17 if [ ! -f tconfig/${target} ]; then
18 echo "No such target ${target}"
19 exit 1
20 fi
21
22 if [ -z "${removing}" ] ; then
23 cat xconfig/${host} tconfig/${target} | awk '$1 == "#msg" {
24 print substr($0,6)}'
25 fi
26
27 # We really shouldn't depend on there being a space after TM_FILE= ...
28 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <tconfig/$target`
29
30 host_makefile_frag=xconfig/${host}
31 target_makefile_frag=tconfig/${target}
32
33 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
34 # ?config/* file, we don't make the corresponding links.
35 files=
36 links=
37 if [ "${hostfile}" != "" ]; then
38 files="${files} ${hostfile}"
39 links="${links} xm.h"
40 fi
41 if [ "${targetfile}" != "" ]; then
42 files="${files} ${targetfile}"
43 links="${links} tm.h"
44 fi
45
46 # post-target:
47
48 case ${srcdir} in
49 .)
50 ;;
51 *)
52 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
53 echo "source ${srcdir}/.gdbinit" >> .gdbinit
54 esac
55
56 rm -f Makefile
57 if [ ! -f ${srcdir}/depend ]; then
58 make -f Makefile.conf make-depend
59 fi
60 make -f Makefile.conf make-Makefile