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="cpu-v850.c elf32-v850.c"
28 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
29 keep_these_too="${v850_files} ${keep_these_too}"
31 lose_these_too="${v850_files} ${lose_these_too}"
34 tic80_files="cpu-tic80.c coff-tic80.c"
36 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
37 keep_these_too="${tic80_files} ${keep_these_too}"
39 lose_these_too="${tic80_files} ${lose_these_too}"
42 # All files listed between the "Things-to-keep:" line and the
43 # "Files-to-sed:" line will be kept. All other files will be removed.
44 # Directories listed in this section will have their own Sanitize
45 # called. Directories not listed will be removed in their entirety
298 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"
299 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
300 for i in $d30v_files ; do
301 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
302 if [ -n "${verbose}" ] ; then
303 echo Keeping d30v stuff in $i
308 for i in $d30v_files ; do
309 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
310 if [ -n "${verbose}" ] ; then
311 echo Removing traces of \"d30v\" from $i...
314 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
315 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
316 if [ -n "${verbose}" ] ; then
317 echo Caching $i in .Recover...
326 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"
327 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
328 for i in $v850_files ; do
329 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
330 if [ -n "${verbose}" ] ; then
331 echo Keeping v850 stuff in $i
336 for i in $v850_files ; do
337 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
338 if [ -n "${verbose}" ] ; then
339 echo Removing traces of \"v850\" from $i...
342 sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
343 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
344 if [ -n "${verbose}" ] ; then
345 echo Caching $i in .Recover...
354 r5900_files="ChangeLog config.bfd"
355 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
356 for i in $r5900_files ; do
357 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
358 if [ -n "${verbose}" ] ; then
359 echo Keeping r5900 stuff in $i
364 for i in $r5900_files ; do
365 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
366 if [ -n "${verbose}" ] ; then
367 echo Removing traces of \"r5900\" from $i...
370 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
371 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
372 if [ -n "${verbose}" ] ; then
373 echo Caching $i in .Recover...
382 tic80_files="ChangeLog Makefile.in Makefile.am archures.c bfd-in2.h config.bfd configure configure.in targets.c coffcode.h coffswap.h"
383 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
384 for i in $tic80_files ; do
385 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
386 if [ -n "${verbose}" ] ; then
387 echo Keeping tic80 stuff in $i
392 for i in $tic80_files ; do
393 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
394 if [ -n "${verbose}" ] ; then
395 echo Removing traces of \"tic80\" from $i...
398 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
399 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
400 if [ -n "${verbose}" ] ; then
401 echo Caching $i in .Recover...
410 gm_files="ChangeLog ChangeLog.2 config.bfd"
411 if ( echo $* | grep keep\-gm > /dev/null ) ; then
412 for i in $gm_files ; do
413 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
414 if [ -n "${verbose}" ] ; then
415 echo Keeping gm stuff in $i
420 for i in $gm_files ; do
421 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
422 if [ -n "${verbose}" ] ; then
423 echo Removing traces of \"gm\" from $i...
426 sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
427 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
428 if [ -n "${verbose}" ] ; then
429 echo Caching $i in .Recover...
439 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
440 echo '***' Some mentions of Sanitize are still left in $i! 1>&2