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
304 arc_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"
305 if ( echo $* | grep keep\-arc > /dev/null ) ; then
306 for i in $arc_files ; do
307 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
308 if [ -n "${verbose}" ] ; then
309 echo Keeping arc stuff in $i
314 for i in $arc_files ; do
315 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
316 if [ -n "${verbose}" ] ; then
317 echo Removing traces of \"arc\" from $i...
320 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
321 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
322 if [ -n "${verbose}" ] ; then
323 echo Caching $i in .Recover...
332 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"
333 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
334 for i in $d30v_files ; do
335 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
336 if [ -n "${verbose}" ] ; then
337 echo Keeping d30v stuff in $i
342 for i in $d30v_files ; do
343 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
344 if [ -n "${verbose}" ] ; then
345 echo Removing traces of \"d30v\" from $i...
348 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
349 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
350 if [ -n "${verbose}" ] ; then
351 echo Caching $i in .Recover...
360 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"
361 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
362 for i in $v850_files ; do
363 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
364 if [ -n "${verbose}" ] ; then
365 echo Keeping v850 stuff in $i
370 for i in $v850_files ; do
371 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
372 if [ -n "${verbose}" ] ; then
373 echo Removing traces of \"v850\" from $i...
376 sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
377 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
378 if [ -n "${verbose}" ] ; then
379 echo Caching $i in .Recover...
388 r5900_files="ChangeLog config.bfd"
389 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
390 for i in $r5900_files ; do
391 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
392 if [ -n "${verbose}" ] ; then
393 echo Keeping r5900 stuff in $i
398 for i in $r5900_files ; do
399 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
400 if [ -n "${verbose}" ] ; then
401 echo Removing traces of \"r5900\" from $i...
404 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
405 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
406 if [ -n "${verbose}" ] ; then
407 echo Caching $i in .Recover...
416 tic80_files="ChangeLog Makefile.in Makefile.am archures.c bfd-in2.h config.bfd configure configure.in targets.c coffcode.h coffswap.h"
417 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
418 for i in $tic80_files ; do
419 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
420 if [ -n "${verbose}" ] ; then
421 echo Keeping tic80 stuff in $i
426 for i in $tic80_files ; do
427 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
428 if [ -n "${verbose}" ] ; then
429 echo Removing traces of \"tic80\" from $i...
432 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
433 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
434 if [ -n "${verbose}" ] ; then
435 echo Caching $i in .Recover...
444 gm_files="ChangeLog ChangeLog.2 config.bfd"
445 if ( echo $* | grep keep\-gm > /dev/null ) ; then
446 for i in $gm_files ; do
447 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
448 if [ -n "${verbose}" ] ; then
449 echo Keeping gm stuff in $i
454 for i in $gm_files ; do
455 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
456 if [ -n "${verbose}" ] ; then
457 echo Removing traces of \"gm\" from $i...
460 sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
461 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
462 if [ -n "${verbose}" ] ; then
463 echo Caching $i in .Recover...
473 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
474 echo '***' Some mentions of Sanitize are still left in $i! 1>&2