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 arc_files="cpu-arc.c elf32-arc.c"
20 if ( echo $* | grep keep\-arc > /dev/null ) ; then
21 keep_these_too="${arc_files} ${keep_these_too}"
23 lose_these_too="${arc_files} ${lose_these_too}"
26 d30v_files="cpu-d30v.c elf32-d30v.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 v850_files="cpu-v850.c elf32-v850.c"
36 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
37 keep_these_too="${v850_files} ${keep_these_too}"
39 lose_these_too="${v850_files} ${lose_these_too}"
42 tic80_files="cpu-tic80.c coff-tic80.c"
44 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
45 keep_these_too="${tic80_files} ${keep_these_too}"
47 lose_these_too="${tic80_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
305 arc_files="ChangeLog ChangeLog.2 Makefile.in archures.c reloc.c targets.c config.bfd configure.in configure bfd-in2.h elf.c libbfd.h"
306 if ( echo $* | grep keep\-arc > /dev/null ) ; then
307 for i in $arc_files ; do
308 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
309 if [ -n "${verbose}" ] ; then
310 echo Keeping arc stuff in $i
315 for i in $arc_files ; do
316 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
317 if [ -n "${verbose}" ] ; then
318 echo Removing traces of \"arc\" from $i...
321 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
322 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
323 if [ -n "${verbose}" ] ; then
324 echo Caching $i in .Recover...
333 d30v_files="ChangeLog ChangeLog.2 Makefile.in archures.c reloc.c targets.c config.bfd configure.in configure bfd-in2.h elf.c libbfd.h"
334 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
335 for i in $d30v_files ; do
336 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
337 if [ -n "${verbose}" ] ; then
338 echo Keeping d30v stuff in $i
343 for i in $d30v_files ; do
344 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
345 if [ -n "${verbose}" ] ; then
346 echo Removing traces of \"d30v\" from $i...
349 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
350 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
351 if [ -n "${verbose}" ] ; then
352 echo Caching $i in .Recover...
361 v850_files="ChangeLog ChangeLog.2 Makefile.in archures.c reloc.c targets.c config.bfd configure.in configure bfd-in2.h elf.c libbfd.h"
362 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
363 for i in $v850_files ; do
364 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
365 if [ -n "${verbose}" ] ; then
366 echo Keeping v850 stuff in $i
371 for i in $v850_files ; do
372 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
373 if [ -n "${verbose}" ] ; then
374 echo Removing traces of \"v850\" from $i...
377 sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
378 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
379 if [ -n "${verbose}" ] ; then
380 echo Caching $i in .Recover...
389 r5900_files="ChangeLog config.bfd"
390 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
391 for i in $r5900_files ; do
392 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
393 if [ -n "${verbose}" ] ; then
394 echo Keeping r5900 stuff in $i
399 for i in $r5900_files ; do
400 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
401 if [ -n "${verbose}" ] ; then
402 echo Removing traces of \"r5900\" from $i...
405 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
406 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
407 if [ -n "${verbose}" ] ; then
408 echo Caching $i in .Recover...
417 tic80_files="ChangeLog Makefile.in archures.c bfd-in2.h config.bfd configure configure.in targets.c coffcode.h coffswap.h"
418 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
419 for i in $tic80_files ; do
420 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
421 if [ -n "${verbose}" ] ; then
422 echo Keeping tic80 stuff in $i
427 for i in $tic80_files ; do
428 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
429 if [ -n "${verbose}" ] ; then
430 echo Removing traces of \"tic80\" from $i...
433 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
434 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
435 if [ -n "${verbose}" ] ; then
436 echo Caching $i in .Recover...
445 gm_files="ChangeLog ChangeLog.2 config.bfd"
446 if ( echo $* | grep keep\-gm > /dev/null ) ; then
447 for i in $gm_files ; do
448 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
449 if [ -n "${verbose}" ] ; then
450 echo Keeping gm stuff in $i
455 for i in $gm_files ; do
456 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
457 if [ -n "${verbose}" ] ; then
458 echo Removing traces of \"gm\" from $i...
461 sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
462 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
463 if [ -n "${verbose}" ] ; then
464 echo Caching $i in .Recover...
474 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
475 echo '***' Some mentions of Sanitize are still left in $i! 1>&2