1 # .Sanitize for devo/gas/config
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.
19 lose_these_too="vms ${lose_these_too}"
22 tic80_files="tc-tic80.c tc-tic80.h"
24 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
25 keep_these_too="${tic80_files} ${keep_these_too}"
27 lose_these_too="${tic80_files} ${lose_these_too}"
30 sky_files="tc-dvp.c tc-dvp.h"
32 if ( echo $* | grep keep\-sky > /dev/null ) ; then
33 keep_these_too="${sky_files} ${keep_these_too}"
35 lose_these_too="${sky_files} ${lose_these_too}"
38 # All files listed between the "Things-to-keep:" line and the
39 # "Do-last:" line will be kept. All other files will be removed.
40 # Directories listed in this section will have their own Sanitize
41 # called. Directories not listed will be removed in their entirety
179 # The lines between the "Do-last:" line and the end of the file
180 # are executed as a /bin/sh shell script after everything else is
185 am33_files="tc-mn10300.c"
186 if ( echo $* | grep keep\-am33 > /dev/null ) ; then
187 for i in $am33_files ; do
188 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
189 if [ -n "${verbose}" ] ; then
190 echo Keeping am33 stuff in $i
195 for i in $am33_files ; do
196 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
197 if [ -n "${verbose}" ] ; then
198 echo Removing traces of \"am33\" from $i...
201 sed '/start\-sanitize\-am33/,/end-\sanitize\-am33/d' < $i > new
202 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
203 if [ -n "${verbose}" ] ; then
204 echo Caching $i in .Recover...
213 r5900_files="tc-mips.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
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 cygnus_files="tc-mips.c"
242 if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
243 for i in $cygnus_files ; do
244 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
245 if [ -n "${verbose}" ] ; then
246 echo Keeping cygnus stuff in $i
252 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
253 if [ -n "${verbose}" ] ; then
254 echo Removing traces of \"cygnus\" from $i...
257 sed '/start\-sanitize\-cygnus/,/end\-sanitize\-cygnus/d' < $i > new
258 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
259 if [ -n "${verbose}" ] ; then
260 echo Caching $i in .Recover...
269 armelf_files="tc-arm.c tc-arm.h"
270 if ( echo $* | grep keep\-armelf > /dev/null ) ; then
271 for i in $armelf_files ; do
272 if test ! -d $i && (grep sanitize-armelf $i > /dev/null) ; then
273 if [ -n "${verbose}" ] ; then
274 echo Keeping armelf stuff in $i
280 if test ! -d $i && (grep sanitize-armelf $i > /dev/null) ; then
281 if [ -n "${verbose}" ] ; then
282 echo Removing traces of \"armelf\" from $i...
285 sed '/start\-sanitize\-armelf/,/end\-sanitize\-armelf/d' < $i > new
286 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
287 if [ -n "${verbose}" ] ; then
288 echo Caching $i in .Recover...
297 tx19_files="tc-mips.c"
298 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
299 for i in $tx19_files ; do
300 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
301 if [ -n "${verbose}" ] ; then
302 echo Keeping tx19 stuff in $i
308 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
309 if [ -n "${verbose}" ] ; then
310 echo Removing traces of \"tx19\" from $i...
313 sed '/start\-sanitize\-tx19/,/end\-sanitize\-tx19/d' < $i > new
314 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
315 if [ -n "${verbose}" ] ; then
316 echo Caching $i in .Recover...
325 tx49_files="ChangeLog tc-mips.c"
326 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
327 for i in $tx49_files ; do
328 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
329 if [ -n "${verbose}" ] ; then
330 echo Keeping tx49 stuff in $i
336 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
337 if [ -n "${verbose}" ] ; then
338 echo Removing traces of \"tx49\" from $i...
341 sed '/start\-sanitize\-tx49/,/end\-sanitize\-tx49/d' < $i > new
342 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
343 if [ -n "${verbose}" ] ; then
344 echo Caching $i in .Recover...
353 tic80_files="obj-coff.h"
354 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
355 for i in $tic80_files ; do
356 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
357 if [ -n "${verbose}" ] ; then
358 echo Keeping tic80 stuff in $i
364 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
365 if [ -n "${verbose}" ] ; then
366 echo Removing traces of \"tic80\" from $i...
369 sed '/start\-sanitize\-tic80/,/end\-sanitize\-tic80/d' < $i > new
370 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
371 if [ -n "${verbose}" ] ; then
372 echo Caching $i in .Recover...
381 v850e_files="tc-v850.c tc-v850.h"
382 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
383 for i in $v850e_files ; do
384 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
385 if [ -n "${verbose}" ] ; then
386 echo Keeping v850e stuff in $i
391 for i in $v850e_files ; do
392 if test -r $i && (grep sanitize-v850e $i > /dev/null) ; then
393 if [ -n "${verbose}" ] ; then
394 echo Removing traces of \"v850e\" from $i...
397 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
398 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
399 if [ -n "${verbose}" ] ; then
400 echo Caching $i in .Recover...
409 m32rx_files="tc-m32r.c tc-m32r.h"
410 if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
411 for i in $m32rx_files ; do
412 if test ! -d $i && (grep sanitize\-m32rx $i > /dev/null) ; then
413 if [ -n "${verbose}" ] ; then
414 echo Keeping m32rx stuff in $i
419 for i in $m32rx_files ; do
420 if test -r $i && (grep sanitize\-m32rx $i > /dev/null) ; then
421 if [ -n "${verbose}" ] ; then
422 echo Removing traces of \"m32rx\" from $i...
425 sed '/start\-sanitize\-m32rx/,/end\-sanitize\-m32rx/d' < $i > new
426 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
427 if [ -n "${verbose}" ] ; then
428 echo Caching $i in .Recover...
436 if ( echo $* | grep keep\-phase2\-m32rx > /dev/null ) ; then
437 for i in $m32rx_files ; do
438 if test ! -d $i && (grep sanitize\-phase2\-m32rx $i > /dev/null) ; then
439 if [ -n "${verbose}" ] ; then
440 echo Keeping m32rx stuff in $i
445 for i in $m32rx_files ; do
446 if test -r $i && (grep sanitize\-phase2\-m32rx $i > /dev/null) ; then
447 if [ -n "${verbose}" ] ; then
448 echo Removing traces of \"m32rx\" from $i...
451 sed '/start\-sanitize\-phase2\-m32rx/,/end\-sanitize\-phase2\-m32rx/d' < $i > new
452 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
453 if [ -n "${verbose}" ] ; then
454 echo Caching $i in .Recover...
463 vr4320_files="tc-mips.c"
464 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
465 for i in $vr4320_files ; do
466 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
467 if [ -n "${verbose}" ] ; then
468 echo Keeping vr4320 stuff in $i
473 for i in $vr4320_files ; do
474 if test -r $i && (grep sanitize-vr4320 $i > /dev/null) ; then
475 if [ -n "${verbose}" ] ; then
476 echo Removing traces of \"vr4320\" from $i...
479 sed '/start\-sanitize\-vr4320/,/end\-sanitize\-vr4320/d' < $i > new
480 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
481 if [ -n "${verbose}" ] ; then
482 echo Caching $i in .Recover...
491 branchbug4011_files="tc-mips.c"
492 if ( echo $* | grep keep\-branchbug4011 > /dev/null ) ; then
493 for i in $branchbug4011_files ; do
494 if test ! -d $i && (grep sanitize-branchbug4011 $i > /dev/null) ; then
495 if [ -n "${verbose}" ] ; then
496 echo Keeping branchbug4011 stuff in $i
501 for i in $branchbug4011_files ; do
502 if test -r $i && (grep sanitize-branchbug4011 $i > /dev/null) ; then
503 if [ -n "${verbose}" ] ; then
504 echo Removing traces of \"branchbug4011\" from $i...
507 sed '/start\-sanitize\-branchbug4011/,/end\-sanitize\-branchbug4011/d' < $i > new
508 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
509 if [ -n "${verbose}" ] ; then
510 echo Caching $i in .Recover...
520 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
521 echo '***' Some mentions of Sanitize are still left in gas/config/$i! 1>&2