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 # All files listed between the "Things-to-keep:" line and the
35 # "Files-to-sed:" line will be kept. All other files will be removed.
36 # Directories listed in this section will have their own Sanitize
37 # called. Directories not listed will be removed in their entirety
270 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"
271 if ( echo $* | grep keep\-arc > /dev/null ) ; then
272 for i in $arc_files ; do
273 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
274 if [ -n "${verbose}" ] ; then
275 echo Keeping arc stuff in $i
280 for i in $arc_files ; do
281 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
282 if [ -n "${verbose}" ] ; then
283 echo Removing traces of \"arc\" from $i...
286 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
287 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
288 if [ -n "${verbose}" ] ; then
289 echo Caching $i in .Recover...
298 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"
299 if ( echo $* | grep keep\-d10v > /dev/null ) ; then
300 for i in $d10v_files ; do
301 if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then
302 if [ -n "${verbose}" ] ; then
303 echo Keeping d10v stuff in $i
308 for i in $d10v_files ; do
309 if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then
310 if [ -n "${verbose}" ] ; then
311 echo Removing traces of \"d10v\" from $i...
314 sed '/start\-sanitize\-d10v/,/end-\sanitize\-d10v/d' < $i > new
315 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
316 if [ -n "${verbose}" ] ; then
317 echo Caching $i in .Recover...
326 gm_files="ChangeLog ChangeLog.2 config.bfd"
327 if ( echo $* | grep keep\-gm > /dev/null ) ; then
328 for i in $gm_files ; do
329 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
330 if [ -n "${verbose}" ] ; then
331 echo Keeping gm stuff in $i
336 for i in $gm_files ; do
337 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
338 if [ -n "${verbose}" ] ; then
339 echo Removing traces of \"gm\" from $i...
342 sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
343 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
344 if [ -n "${verbose}" ] ; then
345 echo Caching $i in .Recover...
355 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
356 echo '***' Some mentions of Sanitize are still left in $i! 1>&2