blob: 62848f83c898f873ea70f795ccb4eb141d386913 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
#!/bin/sh
#
# Shell script to create proper links to machine-dependent files in
# preparation for compiling gdb.
#
# Usage: config.gdb machine
#
# If config.gdb succeeds, it leaves its status in config.status.
# If config.gdb fails after disturbing the status quo,
# config.status is removed.
#
progname=$0
case $# in
1)
machine=$1
paramfile=m-${machine}.h
initfile=m-${machine}init.h
pinsnfile=${machine}-pinsn.c
opcodefile=${machine}-opcode.h
case $machine in
hp9k320)
initfile=m-sun3init.h
pinsnfile=m68k-pinsn.c
opcodefile=m68k-opcode.h
;;
hp9k320bsd)
initfile=m-sun3init.h
pinsnfile=m68k-pinsn.c
opcodefile=m68k-opcode.h
;;
isi)
# some version of m68k-pinsn.c should work here
pinsnfile=m68k-pinsn.c
opcodefile=m68k-opcode.h
;;
merlin)
# m-umaxinit.h?
initfile=unknown-or-unavailable
pinsnfile=ns32k-pinsn.c
opcodefile=ns32k-opcode.h
;;
news)
pinsnfile=m68k-pinsn.c
opcodefile=m68k-opcode.h
;;
npl)
pinsnfile=gld-pinsn.c
;;
pn)
pinsnfile=gld-pinsn.c
;;
sun2)
pinsnfile=m68k-pinsn.c
opcodefile=m68k-opcode.h
;;
sun3)
pinsnfile=m68k-pinsn.c
opcodefile=m68k-opcode.h
;;
sun4)
pinsnfile=sparc-pinsn.c
opcodefile=sparc-opcode.h
;;
umax)
pinsnfile=ns32k-pinsn.c
opcodefile=ns32k-opcode.h
;;
test)
paramfile=one
initfile=two
pinsnfile=three
opcodefile=four
;;
esac
files="$paramfile $initfile $pinsnfile $opcodefile"
links="param.h m-init.h pinsn.c opcode.h"
while [ -n "$files" ]
do
# set file to car of files, files to cdr of files
set $files; file=$1; shift; files=$*
set $links; link=$1; shift; links=$*
if [ ! -r $file ]
then
echo "$progname: cannot create a link \`$link',"
echo "since the file \`$file' does not exist."
exit 1
fi
rm -f $link config.status
# Make a symlink if possible, otherwise try a hard link
ln -s $file $link 2>/dev/null || ln $file $link
if [ ! -r $link ]
then
echo "$progname: unable to link \`$link' to \`$file'."
exit 1
fi
echo "Linked \`$link' to \`$file'."
done
echo "Links are now set up for use with a $machine." \
| tee config.status
exit 0
;;
*)
echo "Usage: $progname machine"
echo -n "Where \`machine' is something like "
echo "\`vax', \`sun3', \`umax', etc."
if [ -r config.status ]
then
cat config.status
fi
exit 1
;;
esac
|