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
300 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"
301 if ( echo $* | grep keep\-arc > /dev/null ) ; then
302 for i in $arc_files ; do
303 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
304 if [ -n "${verbose}" ] ; then
305 echo Keeping arc stuff in $i
310 for i in $arc_files ; do
311 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
312 if [ -n "${verbose}" ] ; then
313 echo Removing traces of \"arc\" from $i...
316 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
317 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
318 if [ -n "${verbose}" ] ; then
319 echo Caching $i in .Recover...
328 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"
329 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
330 for i in $d30v_files ; do
331 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
332 if [ -n "${verbose}" ] ; then
333 echo Keeping d30v stuff in $i
338 for i in $d30v_files ; do
339 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
340 if [ -n "${verbose}" ] ; then
341 echo Removing traces of \"d30v\" from $i...
344 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
345 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
346 if [ -n "${verbose}" ] ; then
347 echo Caching $i in .Recover...
356 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"
357 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
358 for i in $v850_files ; do
359 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
360 if [ -n "${verbose}" ] ; then
361 echo Keeping v850 stuff in $i
366 for i in $v850_files ; do
367 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
368 if [ -n "${verbose}" ] ; then
369 echo Removing traces of \"v850\" from $i...
372 sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
373 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
374 if [ -n "${verbose}" ] ; then
375 echo Caching $i in .Recover...
384 r5900_files="ChangeLog config.bfd"
385 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
386 for i in $r5900_files ; do
387 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
388 if [ -n "${verbose}" ] ; then
389 echo Keeping r5900 stuff in $i
394 for i in $r5900_files ; do
395 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
396 if [ -n "${verbose}" ] ; then
397 echo Removing traces of \"r5900\" from $i...
400 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
401 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
402 if [ -n "${verbose}" ] ; then
403 echo Caching $i in .Recover...
412 tic80_files="ChangeLog Makefile.in archures.c bfd-in2.h config.bfd configure configure.in targets.c coffcode.h"
413 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
414 for i in $tic80_files ; do
415 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
416 if [ -n "${verbose}" ] ; then
417 echo Keeping tic80 stuff in $i
422 for i in $tic80_files ; do
423 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
424 if [ -n "${verbose}" ] ; then
425 echo Removing traces of \"tic80\" from $i...
428 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
429 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
430 if [ -n "${verbose}" ] ; then
431 echo Caching $i in .Recover...
440 gm_files="ChangeLog ChangeLog.2 config.bfd"
441 if ( echo $* | grep keep\-gm > /dev/null ) ; then
442 for i in $gm_files ; do
443 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
444 if [ -n "${verbose}" ] ; then
445 echo Keeping gm stuff in $i
450 for i in $gm_files ; do
451 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
452 if [ -n "${verbose}" ] ; then
453 echo Removing traces of \"gm\" from $i...
456 sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
457 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
458 if [ -n "${verbose}" ] ; then
459 echo Caching $i in .Recover...
469 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
470 echo '***' Some mentions of Sanitize are still left in $i! 1>&2