1 # .Sanitize for devo/opcodes.
3 # Each directory to survive its way into a release will need a file
4 # like this one called "./.Sanitize". All keyword lines must exist,
5 # and must exist in the order specified by this file. Each directory
6 # in the tree will be processed, top down, in the following order.
8 # Hash started lines like this one are comments and will be deleted
9 # before anything else is done. Blank lines will also be squashed
12 # The lines between the "Do-first:" line and the "Things-to-keep:"
13 # line are executed as a /bin/sh shell script before anything else is
14 # done in this directory.
18 cygnus_files="cgen.sh cgen-asm.in cgen-dis.in"
20 if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
21 keep_these_too="${cygnus_files} ${keep_these_too}"
23 lose_these_too="${cygnus_files} ${lose_these_too}"
26 d30v_files="d30v-dis.c d30v-opc.c"
28 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
29 keep_these_too="${d30v_files} ${keep_these_too}"
31 lose_these_too="${d30v_files} ${lose_these_too}"
34 tic80_files="tic80-opc.c tic80-dis.c"
36 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
37 keep_these_too="${tic80_files} ${keep_these_too}"
39 lose_these_too="${tic80_files} ${lose_these_too}"
42 sky_files="dvp-opc.c dvp-dis.c"
44 if ( echo $* | grep keep\-sky > /dev/null ) ; then
45 keep_these_too="${sky_files} ${keep_these_too}"
47 lose_these_too="${sky_files} ${lose_these_too}"
50 # All files listed between the "Things-to-keep:" line and the
51 # "Files-to-sed:" line will be kept. All other files will be removed.
52 # Directories listed in this section will have their own Sanitize
53 # called. Directories not listed will be removed in their entirety
128 cygnus_files="ChangeLog Makefile.am Makefile.in configure.in configure"
129 if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
130 for i in $cygnus_files ; do
131 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
132 if [ -n "${verbose}" ] ; then
133 echo Keeping cygnus stuff in $i
138 for i in $cygnus_files ; do
139 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
140 if [ -n "${verbose}" ] ; then
141 echo Removing traces of \"cygnus\" from $i...
144 sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new
145 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
146 if [ -n "${verbose}" ] ; then
147 echo Caching $i in .Recover...
156 d30v_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
157 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
158 for i in $d30v_files ; do
159 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
160 if [ -n "${verbose}" ] ; then
161 echo Keeping d30v stuff in $i
166 for i in $d30v_files ; do
167 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
168 if [ -n "${verbose}" ] ; then
169 echo Removing traces of \"d30v\" from $i...
172 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
173 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
174 if [ -n "${verbose}" ] ; then
175 echo Caching $i in .Recover...
184 v850e_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c v850-opc.c v850-dis.c"
185 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
186 for i in $v850e_files ; do
187 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
188 if [ -n "${verbose}" ] ; then
189 echo Keeping v850e stuff in $i
194 for i in $v850e_files ; do
195 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
196 if [ -n "${verbose}" ] ; then
197 echo Removing traces of \"v850e\" from $i...
200 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
201 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
202 if [ -n "${verbose}" ] ; then
203 echo Caching $i in .Recover...
213 r5900_files="ChangeLog mips-opc.c mips-dis.c"
214 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
215 for i in $r5900_files ; do
216 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
217 if [ -n "${verbose}" ] ; then
218 echo Keeping r5900 stuff in $i
223 for i in $r5900_files ; do
224 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
225 if [ -n "${verbose}" ] ; then
226 echo Removing traces of \"r5900\" from $i...
229 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
230 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
231 if [ -n "${verbose}" ] ; then
232 echo Caching $i in .Recover...
241 vr5400_files="ChangeLog mips-opc.c mips-dis.c"
242 if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then
243 for i in $vr5400_files ; do
244 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
245 if [ -n "${verbose}" ] ; then
246 echo Keeping vr5400 stuff in $i
251 for i in $vr5400_files ; do
252 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
253 if [ -n "${verbose}" ] ; then
254 echo Removing traces of \"vr5400\" from $i...
257 sed '/start\-sanitize\-vr5400/,/end-\sanitize\-vr5400/d' < $i > new
258 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
259 if [ -n "${verbose}" ] ; then
260 echo Caching $i in .Recover...
269 tx19_files="ChangeLog mips16-opc.c mips-dis.c"
270 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
271 for i in $tx19_files ; do
272 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
273 if [ -n "${verbose}" ] ; then
274 echo Keeping tx19 stuff in $i
279 for i in $tx19_files ; do
280 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
281 if [ -n "${verbose}" ] ; then
282 echo Removing traces of \"tx19\" from $i...
285 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
286 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
287 if [ -n "${verbose}" ] ; then
288 echo Caching $i in .Recover...
297 tx49_files="ChangeLog mips-opc.c mips-dis.c"
298 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
299 for i in $tx49_files ; do
300 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
301 if [ -n "${verbose}" ] ; then
302 echo Keeping tx49 stuff in $i
307 for i in $tx49_files ; do
308 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
309 if [ -n "${verbose}" ] ; then
310 echo Removing traces of \"tx49\" from $i...
313 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
314 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
315 if [ -n "${verbose}" ] ; then
316 echo Caching $i in .Recover...
325 tic80_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
326 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
327 for i in $tic80_files ; do
328 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
329 if [ -n "${verbose}" ] ; then
330 echo Keeping tic80 stuff in $i
335 for i in $tic80_files ; do
336 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
337 if [ -n "${verbose}" ] ; then
338 echo Removing traces of \"tic80\" from $i...
341 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
342 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
343 if [ -n "${verbose}" ] ; then
344 echo Caching $i in .Recover...
353 coldfire_files="ChangeLog m68k-opc.c"
354 if ( echo $* | grep keep\-coldfire > /dev/null ) ; then
355 for i in $coldfire_files ; do
356 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
357 if [ -n "${verbose}" ] ; then
358 echo Keeping coldfire stuff in $i
363 for i in $coldfire_files ; do
364 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
365 if [ -n "${verbose}" ] ; then
366 echo Removing traces of \"coldfire\" from $i...
369 sed '/start\-sanitize\-coldfire/,/end-\sanitize\-coldfire/d' < $i > new
370 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
371 if [ -n "${verbose}" ] ; then
372 echo Caching $i in .Recover...
381 if [ -n "${verbose}" ] ; then
382 echo Processing \"sh4\"...
385 sh4_files="ChangeLog sh-opc.h sh-dis.c"
386 if ( echo $* | grep keep\-sh4 > /dev/null ) ; then
387 for i in $sh4_files ; do
388 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
389 if [ -n "${verbose}" ] ; then
390 echo Keeping sh4 stuff in $i
395 for i in $sh4_files ; do
396 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
397 if [ -n "${verbose}" ] ; then
398 echo Removing traces of \"sh4\" from $i...
401 sed -e '/start\-sanitize\-sh4/,/end-\sanitize\-sh4/d' -e 's/.*restore\-sanitize\-sh4//' < $i > new
402 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
403 if [ -n "${verbose}" ] ; then
404 echo Caching $i in .Recover...
413 sky_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c mips-dis.c"
414 if ( echo $* | grep keep\-sky > /dev/null ) ; then
415 for i in $sky_files ; do
416 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
417 if [ -n "${verbose}" ] ; then
418 echo Keeping sky stuff in $i
423 for i in $sky_files ; do
424 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
425 if [ -n "${verbose}" ] ; then
426 echo Removing traces of \"sky\" from $i...
429 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
430 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
431 if [ -n "${verbose}" ] ; then
432 echo Caching $i in .Recover...
441 m32rx_files="ChangeLog m32r-opc.c m32r-opc.h m32r-dis.c m32r-asm.c"
442 if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
443 for i in $m32rx_files ; do
444 if test -f $i && (grep sanitize-m32rx $i > /dev/null) ; then
445 if [ -n "${verbose}" ] ; then
446 echo Keeping m32rx stuff in $i
451 for i in $m32rx_files ; do
452 if test -f $i && (grep sanitize-m32rx $i > /dev/null) ; then
453 if [ -n "${verbose}" ] ; then
454 echo Removing traces of \"m32rx\" from $i...
457 sed '/start\-sanitize\-m32rx/,/end\-sanitize\-m32rx/d' < $i > new
458 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
459 if [ -n "${verbose}" ] ; then
460 echo Caching $i in .Recover...
470 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
471 echo '***' Some mentions of Sanitize are still left in $i! 1>&2