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