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 d10v_files="cpu-d10v.c elf32-d10v.c"
28 if ( echo $* | grep keep\-d10v > /dev/null ) ; then
29 keep_these_too="${d10v_files} ${keep_these_too}"
31 lose_these_too="${d10v_files} ${lose_these_too}"
34 d30v_files="cpu-d30v.c elf32-d30v.c"
36 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
37 keep_these_too="${d30v_files} ${keep_these_too}"
39 lose_these_too="${d30v_files} ${lose_these_too}"
42 m32r_files="cpu-m32r.c elf32-m32r.c"
44 if ( echo $* | grep keep\-m32r > /dev/null ) ; then
45 keep_these_too="${m32r_files} ${keep_these_too}"
47 lose_these_too="${m32r_files} ${lose_these_too}"
50 v850_files="cpu-v850.c elf32-v850.c"
52 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
53 keep_these_too="${v850_files} ${keep_these_too}"
55 lose_these_too="${v850_files} ${lose_these_too}"
58 tic80_files="cpu-tic80.c coff-tic80.c"
60 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
61 keep_these_too="${tic80_files} ${keep_these_too}"
63 lose_these_too="${tic80_files} ${lose_these_too}"
66 # All files listed between the "Things-to-keep:" line and the
67 # "Files-to-sed:" line will be kept. All other files will be removed.
68 # Directories listed in this section will have their own Sanitize
69 # called. Directories not listed will be removed in their entirety
310 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"
311 if ( echo $* | grep keep\-arc > /dev/null ) ; then
312 for i in $arc_files ; do
313 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
314 if [ -n "${verbose}" ] ; then
315 echo Keeping arc stuff in $i
320 for i in $arc_files ; do
321 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
322 if [ -n "${verbose}" ] ; then
323 echo Removing traces of \"arc\" from $i...
326 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
327 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
328 if [ -n "${verbose}" ] ; then
329 echo Caching $i in .Recover...
338 d10v_files="ChangeLog ChangeLog.2 Makefile.in archures.c reloc.c targets.c config.bfd configure.in configure bfd-in2.h elf.c libbfd.h"
339 if ( echo $* | grep keep\-d10v > /dev/null ) ; then
340 for i in $d10v_files ; do
341 if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then
342 if [ -n "${verbose}" ] ; then
343 echo Keeping d10v stuff in $i
348 for i in $d10v_files ; do
349 if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then
350 if [ -n "${verbose}" ] ; then
351 echo Removing traces of \"d10v\" from $i...
354 sed '/start\-sanitize\-d10v/,/end-\sanitize\-d10v/d' < $i > new
355 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
356 if [ -n "${verbose}" ] ; then
357 echo Caching $i in .Recover...
366 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"
367 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
368 for i in $d30v_files ; do
369 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
370 if [ -n "${verbose}" ] ; then
371 echo Keeping d30v stuff in $i
376 for i in $d30v_files ; do
377 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
378 if [ -n "${verbose}" ] ; then
379 echo Removing traces of \"d30v\" from $i...
382 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
383 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
384 if [ -n "${verbose}" ] ; then
385 echo Caching $i in .Recover...
394 m32r_files="ChangeLog Makefile.in config.bfd configure.in configure elf.c archures.c reloc.c targets.c bfd-in2.h libbfd.h"
395 if ( echo $* | grep keep\-m32r > /dev/null ) ; then
396 for i in $m32r_files ; do
397 if test ! -d $i && (grep sanitize-m32r $i > /dev/null) ; then
398 if [ -n "${verbose}" ] ; then
399 echo Keeping m32r stuff in $i
404 for i in $m32r_files ; do
405 if test ! -d $i && (grep sanitize-m32r $i > /dev/null) ; then
406 if [ -n "${verbose}" ] ; then
407 echo Removing traces of \"m32r\" from $i...
410 sed '/start\-sanitize\-m32r/,/end-\sanitize\-m32r/d' < $i > new
411 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
412 if [ -n "${verbose}" ] ; then
413 echo Caching $i in .Recover...
422 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"
423 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
424 for i in $v850_files ; do
425 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
426 if [ -n "${verbose}" ] ; then
427 echo Keeping v850 stuff in $i
432 for i in $v850_files ; do
433 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
434 if [ -n "${verbose}" ] ; then
435 echo Removing traces of \"v850\" from $i...
438 sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
439 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
440 if [ -n "${verbose}" ] ; then
441 echo Caching $i in .Recover...
450 r5900_files="ChangeLog config.bfd"
451 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
452 for i in $r5900_files ; do
453 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
454 if [ -n "${verbose}" ] ; then
455 echo Keeping r5900 stuff in $i
460 for i in $r5900_files ; do
461 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
462 if [ -n "${verbose}" ] ; then
463 echo Removing traces of \"r5900\" from $i...
466 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
467 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
468 if [ -n "${verbose}" ] ; then
469 echo Caching $i in .Recover...
478 tic80_files="ChangeLog Makefile.in archures.c bfd-in2.h config.bfd configure configure.in targets.c"
479 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
480 for i in $tic80_files ; do
481 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
482 if [ -n "${verbose}" ] ; then
483 echo Keeping tic80 stuff in $i
488 for i in $tic80_files ; do
489 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
490 if [ -n "${verbose}" ] ; then
491 echo Removing traces of \"tic80\" from $i...
494 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
495 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
496 if [ -n "${verbose}" ] ; then
497 echo Caching $i in .Recover...
506 gm_files="ChangeLog ChangeLog.2 config.bfd"
507 if ( echo $* | grep keep\-gm > /dev/null ) ; then
508 for i in $gm_files ; do
509 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
510 if [ -n "${verbose}" ] ; then
511 echo Keeping gm stuff in $i
516 for i in $gm_files ; do
517 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
518 if [ -n "${verbose}" ] ; then
519 echo Removing traces of \"gm\" from $i...
522 sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
523 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
524 if [ -n "${verbose}" ] ; then
525 echo Caching $i in .Recover...
535 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
536 echo '***' Some mentions of Sanitize are still left in $i! 1>&2