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 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
35 keep_these_too="cpu-v850.c elf32-v850.c ${keep_these_too}"
37 lose_these_too="cpu-v850.c elf32-v850.c ${lose_these_too}"
40 # All files listed between the "Things-to-keep:" line and the
41 # "Files-to-sed:" line will be kept. All other files will be removed.
42 # Directories listed in this section will have their own Sanitize
43 # called. Directories not listed will be removed in their entirety
296 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"
297 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
298 for i in $d30v_files ; do
299 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
300 if [ -n "${verbose}" ] ; then
301 echo Keeping d30v stuff in $i
306 for i in $d30v_files ; do
307 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
308 if [ -n "${verbose}" ] ; then
309 echo Removing traces of \"d30v\" from $i...
312 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
313 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
314 if [ -n "${verbose}" ] ; then
315 echo Caching $i in .Recover...
324 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"
325 if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
326 for i in $v850_files ; do
327 if test -r $i && (grep sanitize-v850eq $i > /dev/null) ; then
328 if [ -n "${verbose}" ] ; then
329 echo Keeping v850eq stuff in $i
334 for i in $v850_files ; do
335 if test -f $i && (grep sanitize-v850eq $i > /dev/null) ; then
336 if [ -n "${verbose}" ] ; then
337 echo Removing traces of \"v850eq\" from $i...
340 sed '/start\-sanitize\-v850eq/,/end\-sanitize\-v850eq/d' < $i > new
341 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
342 if [ -n "${verbose}" ] ; then
343 echo Caching $i in .Recover...
351 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
352 for i in $v850_files ; do
353 if test -r $i && (grep sanitize-v850e $i > /dev/null) ; then
354 if [ -n "${verbose}" ] ; then
355 echo Keeping v850e stuff in $i
360 for i in $v850_files ; do
361 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
362 if [ -n "${verbose}" ] ; then
363 echo Removing traces of \"v850e\" from $i...
366 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
367 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
368 if [ -n "${verbose}" ] ; then
369 echo Caching $i in .Recover...
378 r5900_files="ChangeLog config.bfd"
379 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
380 for i in $r5900_files ; do
381 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
382 if [ -n "${verbose}" ] ; then
383 echo Keeping r5900 stuff in $i
388 for i in $r5900_files ; do
389 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
390 if [ -n "${verbose}" ] ; then
391 echo Removing traces of \"r5900\" from $i...
394 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
395 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
396 if [ -n "${verbose}" ] ; then
397 echo Caching $i in .Recover...
406 sh4_files="ChangeLog config.bfd archures.c bfd-in2.h cpu-sh.c"
407 if ( echo $* | grep keep\-sh4 > /dev/null ) ; then
408 for i in $sh4_files ; do
409 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
410 if [ -n "${verbose}" ] ; then
411 echo Keeping sh4 stuff in $i
416 for i in $sh4_files ; do
417 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
418 if [ -n "${verbose}" ] ; then
419 echo Removing traces of \"sh4\" from $i...
422 sed '/start\-sanitize\-sh4/,/end-\sanitize\-sh4/d' < $i > new
423 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
424 if [ -n "${verbose}" ] ; then
425 echo Caching $i in .Recover...
434 tic80_files="ChangeLog Makefile.in Makefile.am archures.c bfd-in2.h config.bfd configure configure.in targets.c coffcode.h coffswap.h"
435 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
436 for i in $tic80_files ; do
437 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
438 if [ -n "${verbose}" ] ; then
439 echo Keeping tic80 stuff in $i
444 for i in $tic80_files ; do
445 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
446 if [ -n "${verbose}" ] ; then
447 echo Removing traces of \"tic80\" from $i...
450 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
451 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
452 if [ -n "${verbose}" ] ; then
453 echo Caching $i in .Recover...
462 gm_files="ChangeLog ChangeLog.2 config.bfd"
463 if ( echo $* | grep keep\-gm > /dev/null ) ; then
464 for i in $gm_files ; do
465 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
466 if [ -n "${verbose}" ] ; then
467 echo Keeping gm stuff in $i
472 for i in $gm_files ; do
473 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
474 if [ -n "${verbose}" ] ; then
475 echo Removing traces of \"gm\" from $i...
478 sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
479 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
480 if [ -n "${verbose}" ] ; then
481 echo Caching $i in .Recover...
491 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
492 echo '***' Some mentions of Sanitize are still left in $i! 1>&2