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 v850_files="cpu-v850.c elf32-v850.c"
36 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
37 keep_these_too="${v850_files} ${keep_these_too}"
39 lose_these_too="${v850_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
280 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"
281 if ( echo $* | grep keep\-arc > /dev/null ) ; then
282 for i in $arc_files ; do
283 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
284 if [ -n "${verbose}" ] ; then
285 echo Keeping arc stuff in $i
290 for i in $arc_files ; do
291 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
292 if [ -n "${verbose}" ] ; then
293 echo Removing traces of \"arc\" from $i...
296 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
297 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
298 if [ -n "${verbose}" ] ; then
299 echo Caching $i in .Recover...
308 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"
309 if ( echo $* | grep keep\-d10v > /dev/null ) ; then
310 for i in $d10v_files ; do
311 if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then
312 if [ -n "${verbose}" ] ; then
313 echo Keeping d10v stuff in $i
318 for i in $d10v_files ; do
319 if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then
320 if [ -n "${verbose}" ] ; then
321 echo Removing traces of \"d10v\" from $i...
324 sed '/start\-sanitize\-d10v/,/end-\sanitize\-d10v/d' < $i > new
325 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
326 if [ -n "${verbose}" ] ; then
327 echo Caching $i in .Recover...
336 m32r_files="ChangeLog Makefile.in archures.c config.bfd configure.in configure elf.c targets.c"
337 if ( echo $* | grep keep\-m32r > /dev/null ) ; then
338 for i in $m32r_files ; do
339 if test ! -d $i && (grep sanitize-m32r $i > /dev/null) ; then
340 if [ -n "${verbose}" ] ; then
341 echo Keeping m32r stuff in $i
346 for i in $m32r_files ; do
347 if test ! -d $i && (grep sanitize-m32r $i > /dev/null) ; then
348 if [ -n "${verbose}" ] ; then
349 echo Removing traces of \"m32r\" from $i...
352 sed '/start\-sanitize\-m32r/,/end-\sanitize\-m32r/d' < $i > new
353 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
354 if [ -n "${verbose}" ] ; then
355 echo Caching $i in .Recover...
364 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"
365 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
366 for i in $v850_files ; do
367 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
368 if [ -n "${verbose}" ] ; then
369 echo Keeping v850 stuff in $i
374 for i in $v850_files ; do
375 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
376 if [ -n "${verbose}" ] ; then
377 echo Removing traces of \"v850\" from $i...
380 sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
381 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
382 if [ -n "${verbose}" ] ; then
383 echo Caching $i in .Recover...
392 gm_files="ChangeLog ChangeLog.2 config.bfd"
393 if ( echo $* | grep keep\-gm > /dev/null ) ; then
394 for i in $gm_files ; do
395 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
396 if [ -n "${verbose}" ] ; then
397 echo Keeping gm stuff in $i
402 for i in $gm_files ; do
403 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
404 if [ -n "${verbose}" ] ; then
405 echo Removing traces of \"gm\" from $i...
408 sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
409 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
410 if [ -n "${verbose}" ] ; then
411 echo Caching $i in .Recover...
421 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
422 echo '***' Some mentions of Sanitize are still left in $i! 1>&2