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 v850_files="elf32-v850.c"
28 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
29 keep_these_too="cpu-v850.c ${v850_files} ${keep_these_too}"
30 lose_these_too="cpu-v850e.c cpu-v850eq.c ${lose_these_too}"
32 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
33 keep_these_too="cpu-v850e.c ${v850_files} ${keep_these_too}"
34 lose_these_too="cpu-v850.c cpu-v850eq.c ${lose_these_too}"
36 if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
37 keep_these_too="cpu-v850eq.c ${v850_files} ${keep_these_too}"
38 lose_these_too="cpu-v850.c cpu-v850e.c ${lose_these_too}"
40 lose_these_too="cpu-v850.c cpu-v850e.c cpu-v850eq.c ${v850_files} ${lose_these_too}"
45 tic80_files="cpu-tic80.c coff-tic80.c"
47 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
48 keep_these_too="${tic80_files} ${keep_these_too}"
50 lose_these_too="${tic80_files} ${lose_these_too}"
53 # All files listed between the "Things-to-keep:" line and the
54 # "Files-to-sed:" line will be kept. All other files will be removed.
55 # Directories listed in this section will have their own Sanitize
56 # called. Directories not listed will be removed in their entirety
309 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"
310 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
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 Keeping d30v stuff in $i
319 for i in $d30v_files ; do
320 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
321 if [ -n "${verbose}" ] ; then
322 echo Removing traces of \"d30v\" from $i...
325 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
326 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
327 if [ -n "${verbose}" ] ; then
328 echo Caching $i in .Recover...
337 v850_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 elf32-v850.c"
338 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
339 for i in $v850_files ; do
340 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
341 if [ -n "${verbose}" ] ; then
342 echo Keeping v850 stuff in $i
347 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
350 if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
353 for i in $v850_files ; do
354 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
355 if [ -n "${verbose}" ] ; then
356 echo Removing traces of \"v850\" from $i...
359 sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
360 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
361 if [ -n "${verbose}" ] ; then
362 echo Caching $i in .Recover...
373 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
374 for i in $v850_files ; do
375 if test -r $i && (grep sanitize-v850e $i > /dev/null) ; then
376 if [ -n "${verbose}" ] ; then
377 echo Keeping v850e stuff in $i
382 for i in $v850_files ; do
383 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
384 if [ -n "${verbose}" ] ; then
385 echo Removing traces of \"v850e\" from $i...
388 sed '/start\-sanitize\-v850e/,/end-\sanitize\-v850e/d' < $i > new
389 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
390 if [ -n "${verbose}" ] ; then
391 echo Caching $i in .Recover...
399 if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
400 for i in $v850_files ; do
401 if test -r $i && (grep sanitize-v850eq $i > /dev/null) ; then
402 if [ -n "${verbose}" ] ; then
403 echo Keeping v850eq stuff in $i
408 for i in $v850_files ; do
409 if test -f $i && (grep sanitize-v850eq $i > /dev/null) ; then
410 if [ -n "${verbose}" ] ; then
411 echo Removing traces of \"v850eq\" from $i...
414 sed '/start\-sanitize\-v850eq/,/end-\sanitize\-v850eq/d' < $i > new
415 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
416 if [ -n "${verbose}" ] ; then
417 echo Caching $i in .Recover...
426 r5900_files="ChangeLog config.bfd"
427 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
428 for i in $r5900_files ; do
429 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
430 if [ -n "${verbose}" ] ; then
431 echo Keeping r5900 stuff in $i
436 for i in $r5900_files ; do
437 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
438 if [ -n "${verbose}" ] ; then
439 echo Removing traces of \"r5900\" from $i...
442 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
443 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
444 if [ -n "${verbose}" ] ; then
445 echo Caching $i in .Recover...
454 tic80_files="ChangeLog Makefile.in Makefile.am archures.c bfd-in2.h config.bfd configure configure.in targets.c coffcode.h coffswap.h"
455 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
456 for i in $tic80_files ; do
457 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
458 if [ -n "${verbose}" ] ; then
459 echo Keeping tic80 stuff in $i
464 for i in $tic80_files ; do
465 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
466 if [ -n "${verbose}" ] ; then
467 echo Removing traces of \"tic80\" from $i...
470 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
471 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
472 if [ -n "${verbose}" ] ; then
473 echo Caching $i in .Recover...
482 gm_files="ChangeLog ChangeLog.2 config.bfd"
483 if ( echo $* | grep keep\-gm > /dev/null ) ; then
484 for i in $gm_files ; do
485 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
486 if [ -n "${verbose}" ] ; then
487 echo Keeping gm stuff in $i
492 for i in $gm_files ; do
493 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
494 if [ -n "${verbose}" ] ; then
495 echo Removing traces of \"gm\" from $i...
498 sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
499 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
500 if [ -n "${verbose}" ] ; then
501 echo Caching $i in .Recover...
511 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
512 echo '***' Some mentions of Sanitize are still left in $i! 1>&2