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
293 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"
294 if ( echo $* | grep keep\-arc > /dev/null ) ; then
295 for i in $arc_files ; do
296 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
297 if [ -n "${verbose}" ] ; then
298 echo Keeping arc stuff in $i
303 for i in $arc_files ; do
304 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
305 if [ -n "${verbose}" ] ; then
306 echo Removing traces of \"arc\" from $i...
309 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
310 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
311 if [ -n "${verbose}" ] ; then
312 echo Caching $i in .Recover...
321 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"
322 if ( echo $* | grep keep\-d10v > /dev/null ) ; then
323 for i in $d10v_files ; do
324 if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then
325 if [ -n "${verbose}" ] ; then
326 echo Keeping d10v stuff in $i
331 for i in $d10v_files ; do
332 if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then
333 if [ -n "${verbose}" ] ; then
334 echo Removing traces of \"d10v\" from $i...
337 sed '/start\-sanitize\-d10v/,/end-\sanitize\-d10v/d' < $i > new
338 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
339 if [ -n "${verbose}" ] ; then
340 echo Caching $i in .Recover...
349 m32r_files="ChangeLog Makefile.in config.bfd configure.in configure elf.c archures.c reloc.c targets.c bfd-in2.h libbfd.h"
350 if ( echo $* | grep keep\-m32r > /dev/null ) ; then
351 for i in $m32r_files ; do
352 if test ! -d $i && (grep sanitize-m32r $i > /dev/null) ; then
353 if [ -n "${verbose}" ] ; then
354 echo Keeping m32r stuff in $i
359 for i in $m32r_files ; do
360 if test ! -d $i && (grep sanitize-m32r $i > /dev/null) ; then
361 if [ -n "${verbose}" ] ; then
362 echo Removing traces of \"m32r\" from $i...
365 sed '/start\-sanitize\-m32r/,/end-\sanitize\-m32r/d' < $i > new
366 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
367 if [ -n "${verbose}" ] ; then
368 echo Caching $i in .Recover...
377 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"
378 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
379 for i in $v850_files ; do
380 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
381 if [ -n "${verbose}" ] ; then
382 echo Keeping v850 stuff in $i
387 for i in $v850_files ; do
388 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
389 if [ -n "${verbose}" ] ; then
390 echo Removing traces of \"v850\" from $i...
393 sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
394 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
395 if [ -n "${verbose}" ] ; then
396 echo Caching $i in .Recover...
405 gm_files="ChangeLog ChangeLog.2 config.bfd"
406 if ( echo $* | grep keep\-gm > /dev/null ) ; then
407 for i in $gm_files ; do
408 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
409 if [ -n "${verbose}" ] ; then
410 echo Keeping gm stuff in $i
415 for i in $gm_files ; do
416 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
417 if [ -n "${verbose}" ] ; then
418 echo Removing traces of \"gm\" from $i...
421 sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
422 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
423 if [ -n "${verbose}" ] ; then
424 echo Caching $i in .Recover...
434 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
435 echo '***' Some mentions of Sanitize are still left in $i! 1>&2