1 # .Sanitize for devo/bfd.
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 d30v_files="cpu-d30v.c elf32-d30v.c"
20 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
21 keep_these_too="${d30v_files} ${keep_these_too}"
23 lose_these_too="${d30v_files} ${lose_these_too}"
26 tic80_files="cpu-tic80.c coff-tic80.c"
28 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
29 keep_these_too="${tic80_files} ${keep_these_too}"
31 lose_these_too="${tic80_files} ${lose_these_too}"
34 # All files listed between the "Things-to-keep:" line and the
35 # "Files-to-sed:" line will be kept. All other files will be removed.
36 # Directories listed in this section will have their own Sanitize
37 # called. Directories not listed will be removed in their entirety
292 d30v_files="ChangeLog ChangeLog.2 Makefile.in Makefile.am archures.c reloc.c targets.c config.bfd configure.in configure bfd-in2.h elf.c libbfd.h"
293 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
294 for i in $d30v_files ; do
295 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
296 if [ -n "${verbose}" ] ; then
297 echo Keeping d30v stuff in $i
302 for i in $d30v_files ; do
303 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
304 if [ -n "${verbose}" ] ; then
305 echo Removing traces of \"d30v\" from $i...
308 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
309 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
310 if [ -n "${verbose}" ] ; then
311 echo Caching $i in .Recover...
320 v850_files="ChangeLog Makefile.in Makefile.am archures.c reloc.c targets.c config.bfd configure.in configure bfd-in2.h elf.c libbfd.h elf32-v850.c cpu-v850.c"
321 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
322 for i in $v850_files ; do
323 if test -r $i && (grep sanitize-v850e $i > /dev/null) ; then
324 if [ -n "${verbose}" ] ; then
325 echo Keeping v850e stuff in $i
330 for i in $v850_files ; do
331 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
332 if [ -n "${verbose}" ] ; then
333 echo Removing traces of \"v850e\" from $i...
336 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
337 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
338 if [ -n "${verbose}" ] ; then
339 echo Caching $i in .Recover...
348 r5900_files="ChangeLog config.bfd"
349 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
350 for i in $r5900_files ; do
351 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
352 if [ -n "${verbose}" ] ; then
353 echo Keeping r5900 stuff in $i
358 for i in $r5900_files ; do
359 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
360 if [ -n "${verbose}" ] ; then
361 echo Removing traces of \"r5900\" from $i...
364 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
365 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
366 if [ -n "${verbose}" ] ; then
367 echo Caching $i in .Recover...
376 sh4_files="ChangeLog config.bfd archures.c bfd-in2.h cpu-sh.c"
377 if ( echo $* | grep keep\-sh4 > /dev/null ) ; then
378 for i in $sh4_files ; do
379 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
380 if [ -n "${verbose}" ] ; then
381 echo Keeping sh4 stuff in $i
386 for i in $sh4_files ; do
387 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
388 if [ -n "${verbose}" ] ; then
389 echo Removing traces of \"sh4\" from $i...
392 sed '/start\-sanitize\-sh4/,/end-\sanitize\-sh4/d' < $i > new
393 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
394 if [ -n "${verbose}" ] ; then
395 echo Caching $i in .Recover...
404 tic80_files="ChangeLog Makefile.in Makefile.am archures.c bfd-in2.h config.bfd configure configure.in targets.c coffcode.h coffswap.h"
405 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
406 for i in $tic80_files ; do
407 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
408 if [ -n "${verbose}" ] ; then
409 echo Keeping tic80 stuff in $i
414 for i in $tic80_files ; do
415 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
416 if [ -n "${verbose}" ] ; then
417 echo Removing traces of \"tic80\" from $i...
420 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
421 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
422 if [ -n "${verbose}" ] ; then
423 echo Caching $i in .Recover...
432 gm_files="ChangeLog ChangeLog.2 config.bfd"
433 if ( echo $* | grep keep\-gm > /dev/null ) ; then
434 for i in $gm_files ; do
435 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
436 if [ -n "${verbose}" ] ; then
437 echo Keeping gm stuff in $i
442 for i in $gm_files ; do
443 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
444 if [ -n "${verbose}" ] ; then
445 echo Removing traces of \"gm\" from $i...
448 sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
449 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
450 if [ -n "${verbose}" ] ; then
451 echo Caching $i in .Recover...
460 vr5400_files="ChangeLog archures.c bfd-in2.h bfd-in.h cpu-mips.c"
461 if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then
462 for i in $vr5400_files ; do
463 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
464 if [ -n "${verbose}" ] ; then
465 echo Keeping vr5400 stuff in $i
470 for i in $vr5400_files ; do
471 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
472 if [ -n "${verbose}" ] ; then
473 echo Removing traces of \"vr5400\" from $i...
476 sed '/start\-sanitize\-vr5400/,/end-\sanitize\-vr5400/d' < $i > new
477 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
478 if [ -n "${verbose}" ] ; then
479 echo Caching $i in .Recover...
488 m32rx_files="ChangeLog archures.c bfd-in2.h elf32-m32r.c cpu-m32r.c"
489 if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
490 for i in $m32rx_files ; do
491 if test -r $i && (grep sanitize-m32rx $i > /dev/null) ; then
492 if [ -n "${verbose}" ] ; then
493 echo Keeping m32rx stuff in $i
498 for i in $m32rx_files ; do
499 if test -f $i && (grep sanitize-m32rx $i > /dev/null) ; then
500 if [ -n "${verbose}" ] ; then
501 echo Removing traces of \"m32rx\" from $i...
504 sed '/start\-sanitize\-m32rx/,/end\-sanitize\-m32rx/d' < $i > new
505 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
506 if [ -n "${verbose}" ] ; then
507 echo Caching $i in .Recover...
517 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
518 echo '***' Some mentions of Sanitize are still left in $i! 1>&2