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 v850e_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"
339 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
340 for i in $v850_files ; do
341 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
342 if [ -n "${verbose}" ] ; then
343 echo Keeping v850 stuff in $i
348 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
351 if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
354 for i in $v850e_files ; do
355 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
356 if [ -n "${verbose}" ] ; then
357 echo Removing traces of \"v850\" from $i...
360 sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
361 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
362 if [ -n "${verbose}" ] ; then
363 echo Caching $i in .Recover...
374 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
375 for i in $v850_files ; do
376 if test -r $i && (grep sanitize-v850e $i > /dev/null) ; then
377 if [ -n "${verbose}" ] ; then
378 echo Keeping v850e stuff in $i
383 for i in $v850_files ; do
384 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
385 if [ -n "${verbose}" ] ; then
386 echo Removing traces of \"v850e\" from $i...
389 sed '/start\-sanitize\-v850e/,/end-\sanitize\-v850e/d' < $i > new
390 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
391 if [ -n "${verbose}" ] ; then
392 echo Caching $i in .Recover...
400 if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
401 for i in $v850_files ; do
402 if test -r $i && (grep sanitize-v850eq $i > /dev/null) ; then
403 if [ -n "${verbose}" ] ; then
404 echo Keeping v850eq stuff in $i
409 for i in $v850_files ; do
410 if test -f $i && (grep sanitize-v850eq $i > /dev/null) ; then
411 if [ -n "${verbose}" ] ; then
412 echo Removing traces of \"v850eq\" from $i...
415 sed '/start\-sanitize\-v850eq/,/end-\sanitize\-v850eq/d' < $i > new
416 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
417 if [ -n "${verbose}" ] ; then
418 echo Caching $i in .Recover...
427 r5900_files="ChangeLog config.bfd"
428 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
429 for i in $r5900_files ; do
430 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
431 if [ -n "${verbose}" ] ; then
432 echo Keeping r5900 stuff in $i
437 for i in $r5900_files ; do
438 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
439 if [ -n "${verbose}" ] ; then
440 echo Removing traces of \"r5900\" from $i...
443 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
444 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
445 if [ -n "${verbose}" ] ; then
446 echo Caching $i in .Recover...
455 tic80_files="ChangeLog Makefile.in Makefile.am archures.c bfd-in2.h config.bfd configure configure.in targets.c coffcode.h coffswap.h"
456 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
457 for i in $tic80_files ; do
458 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
459 if [ -n "${verbose}" ] ; then
460 echo Keeping tic80 stuff in $i
465 for i in $tic80_files ; do
466 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
467 if [ -n "${verbose}" ] ; then
468 echo Removing traces of \"tic80\" from $i...
471 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
472 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
473 if [ -n "${verbose}" ] ; then
474 echo Caching $i in .Recover...
483 gm_files="ChangeLog ChangeLog.2 config.bfd"
484 if ( echo $* | grep keep\-gm > /dev/null ) ; then
485 for i in $gm_files ; do
486 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
487 if [ -n "${verbose}" ] ; then
488 echo Keeping gm stuff in $i
493 for i in $gm_files ; do
494 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
495 if [ -n "${verbose}" ] ; then
496 echo Removing traces of \"gm\" from $i...
499 sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
500 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
501 if [ -n "${verbose}" ] ; then
502 echo Caching $i in .Recover...
512 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
513 echo '***' Some mentions of Sanitize are still left in $i! 1>&2