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 sky_files="cpu-txvu.c elf32-txvu.c"
36 if ( echo $* | grep keep\-sky > /dev/null ) ; then
37 keep_these_too="${sky_files} ${keep_these_too}"
39 lose_these_too="${sky_files} ${lose_these_too}"
42 # All files listed between the "Things-to-keep:" line and the
43 # "Files-to-sed:" line will be kept. All other files will be removed.
44 # Directories listed in this section will have their own Sanitize
45 # called. Directories not listed will be removed in their entirety
301 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"
302 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
303 for i in $d30v_files ; do
304 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
305 if [ -n "${verbose}" ] ; then
306 echo Keeping d30v stuff in $i
311 for i in $d30v_files ; do
312 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
313 if [ -n "${verbose}" ] ; then
314 echo Removing traces of \"d30v\" from $i...
317 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
318 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
319 if [ -n "${verbose}" ] ; then
320 echo Caching $i in .Recover...
329 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"
330 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
331 for i in $v850_files ; do
332 if test -r $i && (grep sanitize-v850e $i > /dev/null) ; then
333 if [ -n "${verbose}" ] ; then
334 echo Keeping v850e stuff in $i
339 for i in $v850_files ; do
340 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
341 if [ -n "${verbose}" ] ; then
342 echo Removing traces of \"v850e\" from $i...
345 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
346 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
347 if [ -n "${verbose}" ] ; then
348 echo Caching $i in .Recover...
357 r5900_files="ChangeLog config.bfd"
358 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
359 for i in $r5900_files ; do
360 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
361 if [ -n "${verbose}" ] ; then
362 echo Keeping r5900 stuff in $i
367 for i in $r5900_files ; do
368 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
369 if [ -n "${verbose}" ] ; then
370 echo Removing traces of \"r5900\" from $i...
373 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
374 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
375 if [ -n "${verbose}" ] ; then
376 echo Caching $i in .Recover...
385 sh4_files="ChangeLog config.bfd archures.c bfd-in2.h cpu-sh.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 '/start\-sanitize\-sh4/,/end-\sanitize\-sh4/d' < $i > new
402 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
403 if [ -n "${verbose}" ] ; then
404 echo Caching $i in .Recover...
413 tic80_files="ChangeLog Makefile.in Makefile.am archures.c bfd-in2.h config.bfd configure configure.in targets.c coffcode.h coffswap.h"
414 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
415 for i in $tic80_files ; do
416 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
417 if [ -n "${verbose}" ] ; then
418 echo Keeping tic80 stuff in $i
423 for i in $tic80_files ; do
424 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
425 if [ -n "${verbose}" ] ; then
426 echo Removing traces of \"tic80\" from $i...
429 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
430 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
431 if [ -n "${verbose}" ] ; then
432 echo Caching $i in .Recover...
441 gm_files="ChangeLog ChangeLog.2 config.bfd"
442 if ( echo $* | grep keep\-gm > /dev/null ) ; then
443 for i in $gm_files ; do
444 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
445 if [ -n "${verbose}" ] ; then
446 echo Keeping gm stuff in $i
451 for i in $gm_files ; do
452 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
453 if [ -n "${verbose}" ] ; then
454 echo Removing traces of \"gm\" from $i...
457 sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
458 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
459 if [ -n "${verbose}" ] ; then
460 echo Caching $i in .Recover...
469 vr5400_files="ChangeLog archures.c bfd-in2.h bfd-in.h cpu-mips.c"
470 if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then
471 for i in $vr5400_files ; do
472 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
473 if [ -n "${verbose}" ] ; then
474 echo Keeping vr5400 stuff in $i
479 for i in $vr5400_files ; do
480 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
481 if [ -n "${verbose}" ] ; then
482 echo Removing traces of \"vr5400\" from $i...
485 sed '/start\-sanitize\-vr5400/,/end-\sanitize\-vr5400/d' < $i > new
486 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
487 if [ -n "${verbose}" ] ; then
488 echo Caching $i in .Recover...
497 m32rx_files="ChangeLog archures.c bfd-in2.h elf32-m32r.c cpu-m32r.c"
498 if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
499 for i in $m32rx_files ; do
500 if test -r $i && (grep sanitize-m32rx $i > /dev/null) ; then
501 if [ -n "${verbose}" ] ; then
502 echo Keeping m32rx stuff in $i
507 for i in $m32rx_files ; do
508 if test -f $i && (grep sanitize-m32rx $i > /dev/null) ; then
509 if [ -n "${verbose}" ] ; then
510 echo Removing traces of \"m32rx\" from $i...
513 sed '/start\-sanitize\-m32rx/,/end\-sanitize\-m32rx/d' < $i > new
514 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
515 if [ -n "${verbose}" ] ; then
516 echo Caching $i in .Recover...
525 sky_files="ChangeLog Makefile.in Makefile.am archures.c elf.c reloc.c targets.c config.bfd configure.in configure bfd-in2.h libbfd.h"
526 if ( echo $* | grep keep\-sky > /dev/null ) ; then
527 for i in $sky_files ; do
528 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
529 if [ -n "${verbose}" ] ; then
530 echo Keeping sky stuff in $i
535 for i in $sky_files ; do
536 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
537 if [ -n "${verbose}" ] ; then
538 echo Removing traces of \"sky\" from $i...
541 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
542 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
543 if [ -n "${verbose}" ] ; then
544 echo Caching $i in .Recover...
554 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
555 echo '***' Some mentions of Sanitize are still left in $i! 1>&2