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 # All files listed between the "Things-to-keep:" line and the
27 # "Files-to-sed:" line will be kept. All other files will be removed.
28 # Directories listed in this section will have their own Sanitize
29 # called. Directories not listed will be removed in their entirety
262 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"
263 if ( echo $* | grep keep\-arc > /dev/null ) ; then
264 for i in $arc_files ; do
265 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
266 if [ -n "${verbose}" ] ; then
267 echo Keeping arc stuff in $i
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 Removing traces of \"arc\" from $i...
278 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
279 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
280 if [ -n "${verbose}" ] ; then
281 echo Caching $i in .Recover...
290 gm_files="ChangeLog ChangeLog.2 config.bfd"
291 if ( echo $* | grep keep\-gm > /dev/null ) ; then
292 for i in $gm_files ; do
293 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
294 if [ -n "${verbose}" ] ; then
295 echo Keeping gm stuff in $i
300 for i in $gm_files ; do
301 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
302 if [ -n "${verbose}" ] ; then
303 echo Removing traces of \"gm\" from $i...
306 sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
307 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
308 if [ -n "${verbose}" ] ; then
309 echo Caching $i in .Recover...
318 h8s_files="archures.c coff-h8300.c coffcode.h cpu-h8300.c ChangeLog bfd-in2.h"
319 if ( echo $* | grep keep\-h8s > /dev/null ) ; then
320 for i in $h8s_files ; do
321 if test ! -d $i && (grep sanitize-h8s $i > /dev/null) ; then
322 if [ -n "${verbose}" ] ; then
323 echo Keeping h8s stuff in $i
328 for i in $h8s_files ; do
329 if test ! -d $i && (grep sanitize-h8s $i > /dev/null) ; then
330 if [ -n "${verbose}" ] ; then
331 echo Removing traces of \"h8s\" from $i...
334 sed '/start\-sanitize\-h8s/,/end-\sanitize\-h8s/d' < $i > new
335 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
336 if [ -n "${verbose}" ] ; then
337 echo Caching $i in .Recover...
347 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
348 echo '***' Some mentions of Sanitize are still left in $i! 1>&2