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 m32r_files="cpu-m32r.c elf32-m32r.c"
36 if ( echo $* | grep keep\-m32r > /dev/null ) ; then
37 keep_these_too="${m32r_files} ${keep_these_too}"
39 lose_these_too="${m32r_files} ${lose_these_too}"
42 v850_files="cpu-v850.c elf32-v850.c"
44 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
45 keep_these_too="${v850_files} ${keep_these_too}"
47 lose_these_too="${v850_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
291 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"
292 if ( echo $* | grep keep\-arc > /dev/null ) ; then
293 for i in $arc_files ; do
294 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
295 if [ -n "${verbose}" ] ; then
296 echo Keeping arc stuff in $i
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 Removing traces of \"arc\" from $i...
307 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
308 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
309 if [ -n "${verbose}" ] ; then
310 echo Caching $i in .Recover...
319 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"
320 if ( echo $* | grep keep\-d10v > /dev/null ) ; then
321 for i in $d10v_files ; do
322 if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then
323 if [ -n "${verbose}" ] ; then
324 echo Keeping d10v stuff in $i
329 for i in $d10v_files ; do
330 if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then
331 if [ -n "${verbose}" ] ; then
332 echo Removing traces of \"d10v\" from $i...
335 sed '/start\-sanitize\-d10v/,/end-\sanitize\-d10v/d' < $i > new
336 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
337 if [ -n "${verbose}" ] ; then
338 echo Caching $i in .Recover...
347 m32r_files="ChangeLog Makefile.in config.bfd configure.in configure elf.c archures.c reloc.c targets.c bfd-in2.h libbfd.h"
348 if ( echo $* | grep keep\-m32r > /dev/null ) ; then
349 for i in $m32r_files ; do
350 if test ! -d $i && (grep sanitize-m32r $i > /dev/null) ; then
351 if [ -n "${verbose}" ] ; then
352 echo Keeping m32r stuff in $i
357 for i in $m32r_files ; do
358 if test ! -d $i && (grep sanitize-m32r $i > /dev/null) ; then
359 if [ -n "${verbose}" ] ; then
360 echo Removing traces of \"m32r\" from $i...
363 sed '/start\-sanitize\-m32r/,/end-\sanitize\-m32r/d' < $i > new
364 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
365 if [ -n "${verbose}" ] ; then
366 echo Caching $i in .Recover...
375 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"
376 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
377 for i in $v850_files ; do
378 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
379 if [ -n "${verbose}" ] ; then
380 echo Keeping v850 stuff in $i
385 for i in $v850_files ; do
386 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
387 if [ -n "${verbose}" ] ; then
388 echo Removing traces of \"v850\" from $i...
391 sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
392 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
393 if [ -n "${verbose}" ] ; then
394 echo Caching $i in .Recover...
403 gm_files="ChangeLog ChangeLog.2 config.bfd"
404 if ( echo $* | grep keep\-gm > /dev/null ) ; then
405 for i in $gm_files ; do
406 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
407 if [ -n "${verbose}" ] ; then
408 echo Keeping gm stuff in $i
413 for i in $gm_files ; do
414 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
415 if [ -n "${verbose}" ] ; then
416 echo Removing traces of \"gm\" from $i...
419 sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
420 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
421 if [ -n "${verbose}" ] ; then
422 echo Caching $i in .Recover...
432 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
433 echo '***' Some mentions of Sanitize are still left in $i! 1>&2