Pristine Ack-5.5
[Ack-5.5.git] / first / limit_impl
1 for i in $DISABLE_LANG
2 do
3         ed -s $CONFIG/Action <<EOF
4 /^name "$i/;/^end/s/^/!/
5 w
6 q
7 EOF
8         case $i in
9         Modula-2)
10                 ed -s $CONFIG/Action <<EOF
11 /^name "$i definition/;/^end/s/^/!/
12 /^name "$i makefile/;/^end/s/^/!/
13 w
14 q
15 EOF
16                 ;;
17         ANSI-C) : install compiler anyway
18                 ed -s $CONFIG/Action <<EOF
19 /^!name "$i frontend/;/^!end/s/^!//
20 w
21 q
22 EOF
23                 ;;
24         C)      : install compiler anyway
25                 ed -s $CONFIG/Action <<EOF
26 /^!name "$i frontend/;/^!end/s/^!//
27 w
28 q
29 EOF
30                 ;;
31         esac
32 done
33 for i in Modula-2 Pascal Basic Occam ANSI-C C Fortran
34 do
35         if [ $DO_MACHINE_INDEP = n ]
36         then
37                 continue
38         fi
39         for j in $DISABLE_LANG
40         do
41                 case $i in
42                 $j)     i=X
43                         break
44                         ;;
45                 esac
46         done
47         case $i in
48         X)      continue
49                 ;;
50         Modula-2)
51                 lib=libm2
52                 ;;
53         Pascal)
54                 lib=libpc
55                 ;;
56         Basic)
57                 lib=libbc
58                 ;;
59         Occam)
60                 lib=liboc
61                 ;;
62         ANSI-C)
63                 lib=libcc.ansi
64                 ;;
65         C)
66                 lib=libcc
67                 ;;
68         Fortran)
69                 lib=libf77
70                 ;;
71         esac
72         ( cd $CONFIG/mach
73           for j in $MACH_LIST
74           do
75                 case $j in
76                 6800|6805|6809|s2650)   continue
77                                         ;;
78                 esac
79                 : do not install fortran for 2-byte integer machines
80                 case $i in
81                 Fortran)        case $j in
82                                 em2*|i8*|m68k2|minix*|pdp|pmds|xenix3|z80*)
83                                         continue
84                                         ;;
85                                 esac
86                                 ;;
87                 esac
88                 case $j in
89                 sparc*)
90                         ( cd $j
91                           cat >> Action <<EOF
92 name "$j $i libraries"
93 system "$j"
94 dir $lib
95 end
96 EOF
97                         )
98                         ;;
99                 *)
100                         ( cd $j
101                           cat >> Action <<EOF
102 name "$j $i libraries"
103 dir $lib
104 end
105 EOF
106                         )
107                         ;;
108                 esac
109           done
110         )
111 done
112 DISABLE_INT=0
113 for i in $DISABLE_SUP
114 do
115         ed -s $CONFIG/Action <<EOF
116 /^dir .*$i\$/;?^name?;/^end/s/^/!/
117 w
118 q
119 EOF
120         case $i in
121         m68k2)
122                 DISABLE_INT=1
123                 ;;
124         m68k4)
125                 case $SYSNAME in
126                 m68_sysV_0|sun2)
127                         DISABLE_INT=1
128                         ;;
129                 esac
130                 ;;
131         mantra)
132                 if test $SYSNAME = m68_sysV_0
133                 then
134                         DISABLE_INT=1
135                 fi
136                 ;;
137         sun2)
138                 if test $SYSNAME = sun2
139                 then
140                         DISABLE_INT=1
141                 fi
142                 ;;
143         sun3)
144                 if test $SYSNAME = sun3
145                 then
146                         DISABLE_INT=1
147                 fi
148                 ;;
149         pmds4)
150                 case $SYSNAME in
151                 pmds*)
152                         DISABLE_INT=1
153                         ;;
154                 esac
155                 ;;
156         m68020)
157                 case $SYSNAME in
158                 m68020|sun3)
159                         DISABLE_INT=1
160                         ;;
161                 esac
162                 ;;
163         esac
164 done
165 case $SYSNAME in
166 m68*|sun2|sun3|pmds*)
167         ;;
168 *)      DISABLE_INT=1
169         ;;
170 esac
171 if test $DISABLE_INT = 1
172 then
173         ed -s $CONFIG/Action <<EOF
174 /68000 interpreters/;/^end/s/^/!/
175 w
176 q
177 EOF
178 fi
179
180 if [ $DO_MACHINE_INDEP = n ]
181 then
182         for i in $CONFIG/mach/*/Action
183         do
184                 for j in libem libend libfp libdb libsys libmon libbsd4_2 libbsd4_1a libsysV_2 libce
185                 do
186                         if fgrep -s $j $i
187                         then
188                                 ed -s $i <<EOF
189 /$j/;?^name?,/^end/s/^/!/
190 w
191 q
192 EOF
193                         fi
194                 done
195         done
196 fi
197
198 if [ $DO_FAST = n ]
199 then
200         ed -s $CONFIG/Action <<'EOF'
201 /^name "Peephole optimizer lib/;/^end/s/^/!/
202 /^name "Fast/;$s/^/!/
203 w
204 q
205 EOF
206 fi