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