* interp.c (OPTION_BRANCH_BUG_4011): Add.
[binutils-gdb.git] / sim / mips / .Sanitize
1 # Sanitize.in for devo.
2 # $Id$
3 #
4
5 # Each directory to survive it's way into a release will need a file
6 # like this one called "./.Sanitize". All keyword lines must exist,
7 # and must exist in the order specified by this file. Each directory
8 # in the tree will be processed, top down, in the following order.
9
10 # Hash started lines like this one are comments and will be deleted
11 # before anything else is done. Blank lines will also be squashed
12 # out.
13
14 # The lines between the "Do-first:" line and the "Things-to-keep:"
15 # line are executed as a /bin/sh shell script before anything else is
16 # done in this
17
18 Do-first:
19
20 r5900_files="r5900.igen"
21 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
22 keep_these_too="${r5900_files} ${keep_these_too}"
23 else
24 lose_these_too="${r5900_files} ${lose_these_too}"
25 fi
26
27 vr4320_files="vr4320.igen"
28 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
29 keep_these_too="${vr4320_files} ${keep_these_too}"
30 else
31 lose_these_too="${vr4320_files} ${lose_these_too}"
32 fi
33
34 tx3904_files="dv-tx3904cpu.c dv-tx3904irc.c dv-tx3904tmr.c"
35 if ( echo $* | grep keep\-tx3904 > /dev/null ) ; then
36 keep_these_too="${tx3904_files} ${keep_these_too}"
37 else
38 lose_these_too="${tx3904_files} ${lose_these_too}"
39 fi
40
41 sky_files="ChangeLog.sky sky-device.c sky-device.h sky-dma.c sky-dma.h sky-bits.h"
42 sky_files="$sky_files sky-engine.c sky-gpuif.c sky-gpuif.h"
43 sky_files="$sky_files sky-gs.c sky-gs.h"
44 sky_files="$sky_files sky-hardware.c sky-hardware.h sky-gdb.c sky-gdb.h"
45 sky_files="$sky_files sky-libvpe.c sky-libvpe.h sky-pke.c sky-pke.h"
46 sky_files="$sky_files sky-vpe.h sky-vu.h sky-vu.c sky-vudis.h sky-vudis.c"
47 sky_files="$sky_files sky-console.h sky-console.c"
48 sky_files="$sky_files sky-interact.h sky-interact.c"
49 sky_files="$sky_files sky-indebug.h sky-indebug.c"
50 if ( echo $* | grep keep\-sky > /dev/null ) ; then
51 keep_these_too="${sky_files} ${keep_these_too}"
52 else
53 lose_these_too="${sky_files} ${lose_these_too}"
54 fi
55
56 vr5400_files="vr5400.igen mdmx.igen"
57 if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then
58 keep_these_too="${vr5400_files} ${keep_these_too}"
59 else
60 lose_these_too="${vr5400_files} ${lose_these_too}"
61 fi
62
63 # All files listed between the "Things-to-keep:" line and the
64 # "Files-to-sed:" line will be kept. All other files will be removed.
65 # Directories listed in this section will have their own Sanitize
66 # called. Directories not listed will be removed in their entirety
67 # with rm -rf.
68
69 Things-to-keep:
70
71 ChangeLog
72 Makefile.in
73 README.Cygnus
74 acconfig.h
75 config.in
76 configure
77 configure.in
78 gencode.c
79 interp.c
80 sim-main.c
81 sim-main.h
82 tconfig.in
83 mips.igen
84 m16.igen
85 m16.dc
86 m16run.c
87 mips.dc
88 tx.igen
89
90 Things-to-lose:
91
92
93 Do-last:
94
95 r5900_files="ChangeLog configure configure.in sim-main.h interp.c gencode.c mips.igen mips.dc m16.igen r5900.igen tx.igen"
96
97 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
98 for i in $r5900_files ; do
99 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
100 if [ -n "${verbose}" ] ; then
101 echo Keeping r5900 stuff in $i
102 fi
103 fi
104 done
105 else
106 for i in * ; do
107 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
108 if [ -n "${verbose}" ] ; then
109 echo Removing traces of \"r5900\" from $i...
110 fi
111 cp $i new
112 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
113 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
114 if [ -n "${verbose}" ] ; then
115 echo Caching $i in .Recover...
116 fi
117 mv $i .Recover
118 fi
119 mv new $i
120 fi
121 done
122 fi
123
124
125 sky_files="ChangeLog Makefile.in configure configure.in"
126
127 if ( echo $* | grep keep\-sky > /dev/null ) ; then
128 for i in $sky_files ; do
129 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
130 if [ -n "${verbose}" ] ; then
131 echo Keeping sky stuff in $i
132 fi
133 fi
134 done
135 else
136 for i in * ; do
137 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
138 if [ -n "${verbose}" ] ; then
139 echo Removing traces of \"sky\" from $i...
140 fi
141 cp $i new
142 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
143 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
144 if [ -n "${verbose}" ] ; then
145 echo Caching $i in .Recover...
146 fi
147 mv $i .Recover
148 fi
149 mv new $i
150 fi
151 done
152 fi
153
154
155 tx19_files="ChangeLog configure configure.in sim-main.h interp.c gencode.c mips.igen mips.dc m16.igen"
156
157 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
158 for i in $tx19_files ; do
159 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
160 if [ -n "${verbose}" ] ; then
161 echo Keeping tx19 stuff in $i
162 fi
163 fi
164 done
165 else
166 for i in * ; do
167 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
168 if [ -n "${verbose}" ] ; then
169 echo Removing traces of \"tx19\" from $i...
170 fi
171 cp $i new
172 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
173 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
174 if [ -n "${verbose}" ] ; then
175 echo Caching $i in .Recover...
176 fi
177 mv $i .Recover
178 fi
179 mv new $i
180 fi
181 done
182 fi
183
184
185 tx49_files="ChangeLog configure.in configure gencode.c"
186
187 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
188 for i in $tx49_files ; do
189 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
190 if [ -n "${verbose}" ] ; then
191 echo Keeping tx49 stuff in $i
192 fi
193 fi
194 done
195 else
196 for i in * ; do
197 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
198 if [ -n "${verbose}" ] ; then
199 echo Removing traces of \"tx49\" from $i...
200 fi
201 cp $i new
202 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
203 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
204 if [ -n "${verbose}" ] ; then
205 echo Caching $i in .Recover...
206 fi
207 mv $i .Recover
208 fi
209 mv new $i
210 fi
211 done
212 fi
213
214
215 vr5400_files="ChangeLog configure configure.in sim-main.h interp.c gencode.c mips.igen mips.dc m16.igen vr5400.igen mdmx.igen"
216
217 if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then
218 for i in $vr5400_files ; do
219 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
220 if [ -n "${verbose}" ] ; then
221 echo Keeping vr5400 stuff in $i
222 fi
223 fi
224 done
225 else
226 for i in * ; do
227 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
228 if [ -n "${verbose}" ] ; then
229 echo Removing traces of \"vr5400\" from $i...
230 fi
231 cp $i new
232 sed '/start\-sanitize\-vr5400/,/end-\sanitize\-vr5400/d' < $i > new
233 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
234 if [ -n "${verbose}" ] ; then
235 echo Caching $i in .Recover...
236 fi
237 mv $i .Recover
238 fi
239 mv new $i
240 fi
241 done
242 fi
243
244 vr4320_files="ChangeLog Makefile.in configure configure.in mips.igen"
245
246 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
247 for i in $vr4320_files ; do
248 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
249 if [ -n "${verbose}" ] ; then
250 echo Keeping vr4320 stuff in $i
251 fi
252 fi
253 done
254 else
255 for i in * ; do
256 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
257 if [ -n "${verbose}" ] ; then
258 echo Removing traces of \"vr4320\" from $i...
259 fi
260 cp $i new
261 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
262 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
263 if [ -n "${verbose}" ] ; then
264 echo Caching $i in .Recover...
265 fi
266 mv $i .Recover
267 fi
268 mv new $i
269 fi
270 done
271 fi
272
273
274 tx3904_files="ChangeLog configure configure.in interp.c"
275
276 if ( echo $* | grep keep\-tx3904 > /dev/null ) ; then
277 for i in $tx3904_files ; do
278 if test ! -d $i && (grep sanitize-tx3904 $i > /dev/null) ; then
279 if [ -n "${verbose}" ] ; then
280 echo Keeping tx3904 stuff in $i
281 fi
282 fi
283 done
284 else
285 for i in * ; do
286 if test ! -d $i && (grep sanitize-tx3904 $i > /dev/null) ; then
287 if [ -n "${verbose}" ] ; then
288 echo Removing traces of \"tx3904\" from $i...
289 fi
290 cp $i new
291 sed '/start\-sanitize\-tx3904/,/end-\sanitize\-tx3904/d' < $i > new
292 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
293 if [ -n "${verbose}" ] ; then
294 echo Caching $i in .Recover...
295 fi
296 mv $i .Recover
297 fi
298 mv new $i
299 fi
300 done
301 fi
302
303 branchbug4011_files="interp.c mips.igen sim-main.h ChangeLog"
304 if ( echo $* | grep keep\-branchbug4011 > /dev/null ) ; then
305 for i in $branchbug4011_files ; do
306 if test ! -d $i && (grep sanitize-branchbug4011 $i > /dev/null) ; then
307 if [ -n "${verbose}" ] ; then
308 echo Keeping branchbug4011 stuff in $i
309 fi
310 fi
311 done
312 else
313 for i in $branchbug4011_files ; do
314 if test -r $i && (grep sanitize-branchbug4011 $i > /dev/null) ; then
315 if [ -n "${verbose}" ] ; then
316 echo Removing traces of \"branchbug4011\" from $i...
317 fi
318 cp $i new
319 sed '/start\-sanitize\-branchbug4011/,/end\-sanitize\-branchbug4011/d' < $i > new
320 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
321 if [ -n "${verbose}" ] ; then
322 echo Caching $i in .Recover...
323 fi
324 mv $i .Recover
325 fi
326 mv new $i
327 fi
328 done
329 fi
330
331 never_files="ChangeLog configure configure.in interp.c gencode.c mips.igen mips.dc"
332
333 for i in * ; do
334 if test ! -d $i && (grep sanitize-cygnus-never $i > /dev/null) ; then
335 if [ -n "${verbose}" ] ; then
336 echo Removing traces of \"cygnus-never\" from $i...
337 fi
338 cp $i new
339 sed '/start\-sanitize\-cygnus\-never/,/end-\sanitize\-cygnus\-never/d' < $i > new
340 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
341 if [ -n "${verbose}" ] ; then
342 echo Caching $i in .Recover...
343 fi
344 mv $i .Recover
345 fi
346 mv new $i
347 fi
348 done
349
350
351 for i in * ; do
352 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
353 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
354 fi
355 done
356
357 # End of file.