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